forked from vmware/go-vcloud-director
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.go
506 lines (458 loc) · 21.6 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
/*
* Copyright 2021 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
*/
package types
const (
// PublicCatalog Name
PublicCatalog = "Public Catalog"
// DefaultCatalog Name
DefaultCatalog = "Default Catalog"
// JSONMimeV57 the json mime for version 5.7 of the API
JSONMimeV57 = "application/json;version=5.7"
// AnyXMLMime511 the wildcard xml mime for version 5.11 of the API
AnyXMLMime511 = "application/*+xml;version=5.11"
AnyXMLMime = "application/xml"
// Version511 the 5.11 version
Version511 = "5.11"
// Version is the default version number
Version = Version511
// SoapXML mime type
SoapXML = "application/soap+xml"
// JSONMime
JSONMime = "application/json"
)
const (
// MimeOrgList mime for org list
MimeOrgList = "application/vnd.vmware.vcloud.orgList+xml"
// MimeOrg mime for org
MimeOrg = "application/vnd.vmware.vcloud.org+xml"
// MimeAdminOrg mime for admin org
MimeAdminOrg = "application/vnd.vmware.admin.organization+xml"
// MimeCatalog mime for catalog
MimeCatalog = "application/vnd.vmware.vcloud.catalog+xml"
// MimeCatalogItem mime for catalog item
MimeCatalogItem = "application/vnd.vmware.vcloud.catalogItem+xml"
// MimeVDC mime for a VDC
MimeVDC = "application/vnd.vmware.vcloud.vdc+xml"
// MimeVDC mime for a admin VDC
MimeAdminVDC = "application/vnd.vmware.admin.vdc+xml"
// MimeEdgeGateway mime for an Edge Gateway
MimeEdgeGateway = "application/vnd.vmware.admin.edgeGateway+xml"
// MimeVAppTemplate mime for a vapp template
MimeVAppTemplate = "application/vnd.vmware.vcloud.vAppTemplate+xml"
// MimeVApp mime for a vApp
MimeVApp = "application/vnd.vmware.vcloud.vApp+xml"
// MimeQueryRecords mime for the query records
MimeQueryRecords = "application/vnd.vmware.vcloud.query.records+xml"
// MimeAPIExtensibility mime for api extensibility
MimeAPIExtensibility = "application/vnd.vmware.vcloud.apiextensibility+xml"
// MimeEntity mime for vcloud entity
MimeEntity = "application/vnd.vmware.vcloud.entity+xml"
// MimeQueryList mime for query list
MimeQueryList = "application/vnd.vmware.vcloud.query.queryList+xml"
// MimeSession mime for a session
MimeSession = "application/vnd.vmware.vcloud.session+xml"
// MimeTask mime for task
MimeTask = "application/vnd.vmware.vcloud.task+xml"
// MimeError mime for error
MimeError = "application/vnd.vmware.vcloud.error+xml"
// MimeNetwork mime for a network
MimeNetwork = "application/vnd.vmware.vcloud.network+xml"
// MimeOrgVdcNetwork mime for an Org VDC network
MimeOrgVdcNetwork = "application/vnd.vmware.vcloud.orgVdcNetwork+xml"
//MimeDiskCreateParams mime for create independent disk
MimeDiskCreateParams = "application/vnd.vmware.vcloud.diskCreateParams+xml"
// Mime for VMs
MimeVMs = "application/vnd.vmware.vcloud.vms+xml"
// Mime for attach or detach independent disk
MimeDiskAttachOrDetachParams = "application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml"
// Mime for Disk
MimeDisk = "application/vnd.vmware.vcloud.disk+xml"
// Mime for insert or eject media
MimeMediaInsertOrEjectParams = "application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml"
// Mime for catalog
MimeAdminCatalog = "application/vnd.vmware.admin.catalog+xml"
// Mime for virtual hardware section
MimeVirtualHardwareSection = "application/vnd.vmware.vcloud.virtualHardwareSection+xml"
// Mime for networkConnectionSection
MimeNetworkConnectionSection = "application/vnd.vmware.vcloud.networkConnectionSection+xml"
// Mime for Item
MimeRasdItem = "application/vnd.vmware.vcloud.rasdItem+xml"
// Mime for guest customization section
MimeGuestCustomizationSection = "application/vnd.vmware.vcloud.guestCustomizationSection+xml"
// Mime for guest customization status
MimeGuestCustomizationStatus = "application/vnd.vmware.vcloud.guestcustomizationstatussection"
// Mime for network config section
MimeNetworkConfigSection = "application/vnd.vmware.vcloud.networkconfigsection+xml"
// Mime for recompose vApp params
MimeRecomposeVappParams = "application/vnd.vmware.vcloud.recomposeVAppParams+xml"
// Mime for compose vApp params
MimeComposeVappParams = "application/vnd.vmware.vcloud.composeVAppParams+xml"
// Mime for undeploy vApp params
MimeUndeployVappParams = "application/vnd.vmware.vcloud.undeployVAppParams+xml"
// Mime for deploy vApp params
MimeDeployVappParams = "application/vnd.vmware.vcloud.deployVAppParams+xml"
// Mime for VM
MimeVM = "application/vnd.vmware.vcloud.vm+xml"
// Mime for instantiate vApp template params
MimeInstantiateVappTemplateParams = "application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml"
// Mime for product section
MimeProductSection = "application/vnd.vmware.vcloud.productSections+xml"
// Mime for metadata
MimeMetaData = "application/vnd.vmware.vcloud.metadata+xml"
// Mime for metadata value
MimeMetaDataValue = "application/vnd.vmware.vcloud.metadata.value+xml"
// Mime for a admin network
MimeExtensionNetwork = "application/vnd.vmware.admin.extension.network+xml"
// Mime for an external network
MimeExternalNetwork = "application/vnd.vmware.admin.vmwexternalnet+xml"
// Mime of an Org User
MimeAdminUser = "application/vnd.vmware.admin.user+xml"
// MimeAdminGroup specifies groups
MimeAdminGroup = "application/vnd.vmware.admin.group+xml"
// MimeOrgLdapSettings
MimeOrgLdapSettings = "application/vnd.vmware.admin.organizationldapsettings+xml"
// Mime of vApp network
MimeVappNetwork = "application/vnd.vmware.vcloud.vAppNetwork+xml"
// Mime of access control
MimeControlAccess = "application/vnd.vmware.vcloud.controlAccess+xml"
// Mime of VM capabilities
MimeVmCapabilities = "application/vnd.vmware.vcloud.vmCapabilitiesSection+xml"
// Mime of Vdc Compute Policy References
MimeVdcComputePolicyReferences = "application/vnd.vmware.vcloud.vdcComputePolicyReferences+xml"
// Mime for Storage profile
MimeStorageProfile = "application/vnd.vmware.admin.vdcStorageProfile+xml "
// Mime for create VM Params
MimeCreateVmParams = "application/vnd.vmware.vcloud.CreateVmParams+xml"
// Mime for instantiate VM Params from template
MimeInstantiateVmTemplateParams = "application/vnd.vmware.vcloud.instantiateVmTemplateParams+xml"
// Mime for adding or removing VDC storage profiles
MimeUpdateVdcStorageProfiles = "application/vnd.vmware.admin.updateVdcStorageProfiles+xml"
// Mime to modify lease settings
MimeLeaseSettingSection = "application/vnd.vmware.vcloud.leaseSettingsSection+xml"
// Mime to publish external catalog
PublishExternalCatalog = "application/vnd.vmware.admin.publishExternalCatalogParams+xml"
)
const (
VMsCDResourceSubType = "vmware.cdrom.iso"
)
// https://blogs.vmware.com/vapp/2009/11/virtual-hardware-in-ovf-part-1.html
const (
ResourceTypeOther int = 0
ResourceTypeProcessor int = 3
ResourceTypeMemory int = 4
ResourceTypeIDE int = 5
ResourceTypeSCSI int = 6
ResourceTypeEthernet int = 10
ResourceTypeFloppy int = 14
ResourceTypeCD int = 15
ResourceTypeDVD int = 16
ResourceTypeDisk int = 17
ResourceTypeUSB int = 23
)
const (
FenceModeIsolated = "isolated"
FenceModeBridged = "bridged"
FenceModeNAT = "natRouted"
)
const (
IPAllocationModeDHCP = "DHCP"
IPAllocationModeManual = "MANUAL"
IPAllocationModeNone = "NONE"
IPAllocationModePool = "POOL"
)
// NoneNetwork is a special type of network in vCD which represents a network card which is not
// attached to any network.
const (
NoneNetwork = "none"
)
const (
XMLNamespaceVCloud = "http://www.vmware.com/vcloud/v1.5"
XMLNamespaceOVF = "http://schemas.dmtf.org/ovf/envelope/1"
XMLNamespaceVMW = "http://www.vmware.com/schema/ovf"
XMLNamespaceXSI = "http://www.w3.org/2001/XMLSchema-instance"
XMLNamespaceRASD = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
XMLNamespaceVSSD = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
XMLNamespaceExtension = "http://www.vmware.com/vcloud/extension/v1.5"
)
// NSX-V Edge gateway API endpoints
const (
EdgeNatPath = "/nat/config"
EdgeCreateNatPath = "/nat/config/rules"
EdgeFirewallPath = "/firewall/config"
EdgeCreateFirewallPath = "/firewall/config/rules"
EdgeVnicConfig = "/vnics"
EdgeVdcVnicConfig = "/vdcNetworks"
EdgeDhcpRelayPath = "/dhcp/config/relay"
EdgeDhcpLeasePath = "/dhcp/leaseInfo"
LbConfigPath = "/loadbalancer/config/"
LbMonitorPath = "/loadbalancer/config/monitors/"
LbServerPoolPath = "/loadbalancer/config/pools/"
LbAppProfilePath = "/loadbalancer/config/applicationprofiles/"
LbAppRulePath = "/loadbalancer/config/applicationrules/"
LbVirtualServerPath = "/loadbalancer/config/virtualservers/"
)
// NSX-V proxied services API endpoints
const (
NsxvIpSetServicePath = "/ipset"
)
// Guest customization statuses. These are all known possible statuses
const (
GuestCustStatusPending = "GC_PENDING"
GuestCustStatusPostPending = "POST_GC_PENDING"
GuestCustStatusComplete = "GC_COMPLETE"
GuestCustStatusFailed = "GC_FAILED"
GuestCustStatusRebootPending = "REBOOT_PENDING"
)
// Edge gateway vNic types
const (
EdgeGatewayVnicTypeUplink = "uplink"
EdgeGatewayVnicTypeInternal = "internal"
EdgeGatewayVnicTypeTrunk = "trunk"
EdgeGatewayVnicTypeSubinterface = "subinterface"
EdgeGatewayVnicTypeAny = "any"
)
// Names of the filters allowed in the search engine
const (
FilterNameRegex = "name_regex" // a name, searched by regular expression
FilterDate = "date" // a date expression (>|<|==|>=|<= date)
FilterIp = "ip" // An IP, searched by regular expression
FilterLatest = "latest" // gets the newest element
FilterEarliest = "earliest" // gets the oldest element
FilterParent = "parent" // matches the entity parent
FilterParentId = "parent_id" // matches the entity parent ID
)
const (
// The Qt* (Query Type) constants are the names used with Query requests to retrieve the corresponding entities
QtVappTemplate = "vAppTemplate" // vApp template
QtAdminVappTemplate = "adminVAppTemplate" // vApp template as admin
QtEdgeGateway = "edgeGateway" // edge gateway
QtOrgVdcNetwork = "orgVdcNetwork" // Org VDC network
QtCatalog = "catalog" // catalog
QtAdminCatalog = "adminCatalog" // catalog as admin
QtCatalogItem = "catalogItem" // catalog item
QtAdminCatalogItem = "adminCatalogItem" // catalog item as admin
QtAdminMedia = "adminMedia" // media item as admin
QtMedia = "media" // media item
QtVm = "vm" // Virtual machine
QtAdminVm = "adminVM" // Virtual machine as admin
QtVapp = "vApp" // vApp
QtAdminVapp = "adminVApp" // vApp as admin
QtOrgVdc = "orgVdc" // Org VDC
QtAdminOrgVdc = "adminOrgVdc" // Org VDC as admin
)
// AdminQueryTypes returns the corresponding "admin" query type for each regular type
var AdminQueryTypes = map[string]string{
QtEdgeGateway: QtEdgeGateway, // EdgeGateway query type is the same for admin and regular users
QtOrgVdcNetwork: QtOrgVdcNetwork, // Org VDC Network query type is the same for admin and regular users
QtVappTemplate: QtAdminVappTemplate,
QtCatalog: QtAdminCatalog,
QtCatalogItem: QtAdminCatalogItem,
QtMedia: QtAdminMedia,
QtVm: QtAdminVm,
QtVapp: QtAdminVapp,
QtOrgVdc: QtAdminOrgVdc,
}
const (
// Affinity and anti affinity definitions
PolarityAffinity = "Affinity"
PolarityAntiAffinity = "Anti-Affinity"
)
// VmQueryFilter defines how we search VMs
type VmQueryFilter int
const (
// VmQueryFilterAll defines a no-filter search, i.e. will return all elements
VmQueryFilterAll VmQueryFilter = iota
// VmQueryFilterOnlyDeployed defines a filter for deployed VMs
VmQueryFilterOnlyDeployed
// VmQueryFilterOnlyTemplates defines a filter for VMs inside a template
VmQueryFilterOnlyTemplates
)
// String converts a VmQueryFilter into the corresponding filter needed by the query to get the wanted result
func (qf VmQueryFilter) String() string {
// Makes sure that we handle out-of-range values
if qf < VmQueryFilterAll || qf > VmQueryFilterOnlyTemplates {
return ""
}
return [...]string{
"", // No filter: will not remove any items
"isVAppTemplate==false", // Will find only the deployed VMs
"isVAppTemplate==true", // Will find only those VM that are inside a template
}[qf]
}
// LDAP modes for Organization
const (
LdapModeNone = "NONE"
LdapModeSystem = "SYSTEM"
LdapModeCustom = "CUSTOM"
)
// Access control modes
const (
ControlAccessReadOnly = "ReadOnly"
ControlAccessReadWrite = "Change"
ControlAccessFullControl = "FullControl"
)
// BodyType allows to define API body types where applicable
type BodyType int
const (
// BodyTypeXML
BodyTypeXML BodyType = iota
// BodyTypeJSON
BodyTypeJSON
)
const (
// FiqlQueryTimestampFormat is the format accepted by Cloud API time comparison operator in FIQL query filters
FiqlQueryTimestampFormat = "2006-01-02T15:04:05.000Z"
)
// These constants allow constructing OpenAPI endpoint paths and avoid strings in code for easy replacement in the
// future.
const (
OpenApiPathVersion1_0_0 = "1.0.0/"
OpenApiEndpointRoles = "roles/"
OpenApiEndpointGlobalRoles = "globalRoles/"
OpenApiEndpointRights = "rights/"
OpenApiEndpointRightsCategories = "rightsCategories/"
OpenApiEndpointRightsBundles = "rightsBundles/"
OpenApiEndpointAuditTrail = "auditTrail/"
OpenApiEndpointImportableTier0Routers = "nsxTResources/importableTier0Routers"
OpenApiEndpointImportableSwitches = "/network/orgvdcnetworks/importableswitches"
OpenApiEndpointEdgeClusters = "nsxTResources/edgeClusters"
OpenApiEndpointExternalNetworks = "externalNetworks/"
OpenApiEndpointVdcComputePolicies = "vdcComputePolicies/"
OpenApiEndpointVdcAssignedComputePolicies = "vdcs/%s/computePolicies"
OpenApiEndpointVdcCapabilities = "vdcs/%s/capabilities"
OpenApiEndpointEdgeGateways = "edgeGateways/"
OpenApiEndpointNsxtFirewallRules = "edgeGateways/%s/firewall/rules"
OpenApiEndpointFirewallGroups = "firewallGroups/"
OpenApiEndpointOrgVdcNetworks = "orgVdcNetworks/"
OpenApiEndpointOrgVdcNetworksDhcp = "orgVdcNetworks/%s/dhcp"
OpenApiEndpointNsxtNatRules = "edgeGateways/%s/nat/rules/"
OpenApiEndpointAppPortProfiles = "applicationPortProfiles/"
OpenApiEndpointIpSecVpnTunnel = "edgeGateways/%s/ipsec/tunnels/"
OpenApiEndpointIpSecVpnTunnelConnectionProperties = "edgeGateways/%s/ipsec/tunnels/%s/connectionProperties"
OpenApiEndpointIpSecVpnTunnelStatus = "edgeGateways/%s/ipsec/tunnels/%s/status"
OpenApiEndpointSSLCertificateLibrary = "ssl/certificateLibrary/"
OpenApiEndpointSSLCertificateLibraryOld = "ssl/cetificateLibrary/"
OpenApiEndpointSessionCurrent = "sessions/current"
OpenApiEndpointVdcGroups = "vdcGroups/"
OpenApiEndpointVdcGroupsCandidateVdcs = "vdcGroups/networkingCandidateVdcs"
OpenApiEndpointVdcGroupsDfwPolicies = "vdcGroups/%s/dfwPolicies"
OpenApiEndpointVdcGroupsDfwDefaultPolicies = "vdcGroups/%s/dfwPolicies/default"
OpenApiEndpointVdcGroupsDfwRules = "vdcGroups/%s/dfwPolicies/%s/rules"
OpenApiEndpointNetworkContextProfiles = "networkContextProfiles"
OpenApiEndpointSecurityTags = "securityTags"
OpenApiEndpointNsxtRouteAdvertisement = "edgeGateways/%s/routing/advertisement"
// NSX-T ALB related endpoints
OpenApiEndpointAlbController = "loadBalancer/controllers/"
// OpenApiEndpointAlbImportableClouds endpoint requires a filter _context==urn:vcloud:loadBalancerController:aa23ef66-ba32-48b2-892f-7acdffe4587e
OpenApiEndpointAlbImportableClouds = "nsxAlbResources/importableClouds/"
OpenApiEndpointAlbImportableServiceEngineGroups = "nsxAlbResources/importableServiceEngineGroups"
OpenApiEndpointAlbCloud = "loadBalancer/clouds/"
OpenApiEndpointAlbServiceEngineGroups = "loadBalancer/serviceEngineGroups/"
OpenApiEndpointAlbPools = "loadBalancer/pools/"
// OpenApiEndpointAlbPoolSummaries returns a limited subset of data provided by OpenApiEndpointAlbPools
// however only the summary endpoint can list all available pools for an edge gateway
OpenApiEndpointAlbPoolSummaries = "edgeGateways/%s/loadBalancer/poolSummaries" // %s contains edge gateway
OpenApiEndpointAlbVirtualServices = "loadBalancer/virtualServices/"
OpenApiEndpointAlbVirtualServiceSummaries = "edgeGateways/%s/loadBalancer/virtualServiceSummaries" // %s contains edge gateway
OpenApiEndpointAlbServiceEngineGroupAssignments = "loadBalancer/serviceEngineGroups/assignments/"
OpenApiEndpointAlbEdgeGateway = "edgeGateways/%s/loadBalancer"
)
// Header keys to run operations in tenant context
const (
// HeaderTenantContext requires the Org ID of the tenant
HeaderTenantContext = "X-VMWARE-VCLOUD-TENANT-CONTEXT"
// HeaderAuthContext requires the Org name of the tenant
HeaderAuthContext = "X-VMWARE-VCLOUD-AUTH-CONTEXT"
)
const (
// ExternalNetworkBackingTypeNsxtTier0Router defines backing type of NSX-T Tier-0 router
ExternalNetworkBackingTypeNsxtTier0Router = "NSXT_TIER0"
// ExternalNetworkBackingTypeNsxtVrfTier0Router defines backing type of NSX-T Tier-0 VRF router
ExternalNetworkBackingTypeNsxtVrfTier0Router = "NSXT_VRF_TIER0"
// ExternalNetworkBackingTypeNsxtSegment defines backing type of NSX-T Segment (supported in VCD 10.3+)
ExternalNetworkBackingTypeNsxtSegment = "IMPORTED_T_LOGICAL_SWITCH"
// ExternalNetworkBackingTypeNetwork defines vSwitch portgroup
ExternalNetworkBackingTypeNetwork = "NETWORK"
// ExternalNetworkBackingDvPortgroup refers distributed switch portgroup
ExternalNetworkBackingDvPortgroup = "DV_PORTGROUP"
)
const (
// OrgVdcNetworkTypeRouted can be used to create NSX-T or NSX-V routed Org Vdc network
OrgVdcNetworkTypeRouted = "NAT_ROUTED"
// OrgVdcNetworkTypeIsolated can be used to create NSX-T or NSX-V isolated Org Vdc network
OrgVdcNetworkTypeIsolated = "ISOLATED"
// OrgVdcNetworkTypeOpaque type is used to create NSX-T imported Org Vdc network
OrgVdcNetworkTypeOpaque = "OPAQUE"
// OrgVdcNetworkTypeDirect can be used to create NSX-V direct Org Vdc network
OrgVdcNetworkTypeDirect = "DIRECT"
)
const (
// VdcCapabilityNetworkProviderNsxv is a convenience constant to match VDC capability
VdcCapabilityNetworkProviderNsxv = "NSX_V"
// VdcCapabilityNetworkProviderNsxt is a convenience constant to match VDC capability
VdcCapabilityNetworkProviderNsxt = "NSX_T"
)
const (
// FirewallGroupTypeSecurityGroup can be used in types.NsxtFirewallGroup for 'type' field to
// create Security Group
FirewallGroupTypeSecurityGroup = "SECURITY_GROUP"
// FirewallGroupTypeIpSet can be used in types.NsxtFirewallGroup for 'type' field to create IP
// Set
FirewallGroupTypeIpSet = "IP_SET"
)
// These constants can be used to pick type of NSX-T NAT Rule
const (
NsxtNatRuleTypeDnat = "DNAT"
NsxtNatRuleTypeNoDnat = "NO_DNAT"
NsxtNatRuleTypeSnat = "SNAT"
NsxtNatRuleTypeNoSnat = "NO_SNAT"
NsxtNatRuleTypeReflexive = "REFLEXIVE" // Only in VCD 10.3+ (API V36.0)
)
// In VCD versions 10.2.2+ (API V35.2+) there is a FirewallMatch field in NAT rule with these
// options
const (
// NsxtNatRuleFirewallMatchInternalAddress will match firewall rules based on NAT rules internal
// address (DEFAULT)
NsxtNatRuleFirewallMatchInternalAddress = "MATCH_INTERNAL_ADDRESS"
// NsxtNatRuleFirewallMatchExternalAddress will match firewall rules based on NAT rule external
// address
NsxtNatRuleFirewallMatchExternalAddress = "MATCH_EXTERNAL_ADDRESS"
// NsxtNatRuleFirewallMatchBypass will skip evaluating NAT rules in firewall
NsxtNatRuleFirewallMatchBypass = "BYPASS"
)
const (
// ApplicationPortProfileScopeSystem is a defined scope which allows user to only read (no write capability) system
// predefined Application Port Profiles
ApplicationPortProfileScopeSystem = "SYSTEM"
// ApplicationPortProfileScopeProvider allows user to read and set Application Port Profiles at provider level. In
// reality Network Provider (NSX-T Manager) must be specified while creating.
ApplicationPortProfileScopeProvider = "PROVIDER"
// ApplicationPortProfileScopeTenant allows user to read and set Application Port Profiles at Org VDC level.
ApplicationPortProfileScopeTenant = "TENANT"
)
const (
// VcloudUndefinedKey is the bundles key automatically added to new role related objects
VcloudUndefinedKey = "com.vmware.vcloud.undefined.key"
)
const (
// NsxtAlbCloudBackingTypeNsxtAlb is a backing type for NSX-T ALB used in types.NsxtAlbCloudBacking
NsxtAlbCloudBackingTypeNsxtAlb = "NSXALB_NSXT"
)
const (
// UrnTypeVdcGroup is the third segment of URN for VDC Group
UrnTypeVdcGroup = "vdcGroup"
// UrnTypeVdc is the third segment of URN for VDC
UrnTypeVdc = "vdc"
)
// Metadata type constants
const (
MetadataStringValue string = "MetadataStringValue"
MetadataNumberValue string = "MetadataNumberValue"
MetadataDateTimeValue string = "MetadataDateTimeValue"
MetadataBooleanValue string = "MetadataBooleanValue"
)
const (
// DistributedFirewallPolicyDefault is a constant for "default" Distributed Firewall Policy
DistributedFirewallPolicyDefault = "default"
)