forked from vmware/go-vcloud-director
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
3291 lines (3042 loc) · 196 KB
/
types.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
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2021 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
*/
// Package types/v56 provider all types which are used by govcd package in order to perform API
// requests and parse responses
package types
import (
"encoding/xml"
"fmt"
"sort"
)
// Maps status Attribute Values for VAppTemplate, VApp, VM, and Media Objects
var VAppStatuses = map[int]string{
-1: "FAILED_CREATION",
0: "UNRESOLVED",
1: "RESOLVED",
2: "DEPLOYED",
3: "SUSPENDED",
4: "POWERED_ON",
5: "WAITING_FOR_INPUT",
6: "UNKNOWN",
7: "UNRECOGNIZED",
8: "POWERED_OFF",
9: "INCONSISTENT_STATE",
10: "MIXED",
11: "DESCRIPTOR_PENDING",
12: "COPYING_CONTENTS",
13: "DISK_CONTENTS_PENDING",
14: "QUARANTINED",
15: "QUARANTINE_EXPIRED",
16: "REJECTED",
17: "TRANSFER_TIMEOUT",
18: "VAPP_UNDEPLOYED",
19: "VAPP_PARTIALLY_DEPLOYED",
20: "PARTIALLY_POWERED_OFF", // VCD 10.3+
21: "PARTIALLY_SUSPENDED",
}
// Maps status Attribute Values for VDC Objects
var VDCStatuses = map[int]string{
-1: "FAILED_CREATION",
0: "NOT_READY",
1: "READY",
2: "UNKNOWN",
3: "UNRECOGNIZED",
}
// VCD API
// DefaultStorageProfileSection is the name of the storage profile that will be specified for this virtual machine. The named storage profile must exist in the organization vDC that contains the virtual machine. If not specified, the default storage profile for the vDC is used.
// Type: DefaultStorageProfileSection_Type
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Name of the storage profile that will be specified for this virtual machine. The named storage profile must exist in the organization vDC that contains the virtual machine. If not specified, the default storage profile for the vDC is used.
// Since: 5.1
type DefaultStorageProfileSection struct {
StorageProfile string `xml:"StorageProfile,omitempty"`
}
// CustomizationSection represents a vApp template customization settings.
// Type: CustomizationSectionType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a vApp template customization settings.
// Since: 1.0
type CustomizationSection struct {
// FIXME: OVF Section needs to be laid down correctly
Info string `xml:"ovf:Info"`
//
GoldMaster bool `xml:"goldMaster,attr,omitempty"`
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
CustomizeOnInstantiate bool `xml:"CustomizeOnInstantiate"`
Link LinkList `xml:"Link,omitempty"`
}
// LeaseSettingsSection represents vApp lease settings.
// Type: LeaseSettingsSectionType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents vApp lease settings.
// Since: 0.9
type LeaseSettingsSection struct {
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
DeploymentLeaseExpiration string `xml:"DeploymentLeaseExpiration,omitempty"`
DeploymentLeaseInSeconds int `xml:"DeploymentLeaseInSeconds,omitempty"`
Link *Link `xml:"Link,omitempty"`
StorageLeaseExpiration string `xml:"StorageLeaseExpiration,omitempty"`
StorageLeaseInSeconds int `xml:"StorageLeaseInSeconds,omitempty"`
}
// UpdateLeaseSettingsSection is an extended version of LeaseSettingsSection
// with additional fields for update
type UpdateLeaseSettingsSection struct {
XMLName xml.Name `xml:"LeaseSettingsSection"`
XmlnsOvf string `xml:"xmlns:ovf,attr,omitempty"`
Xmlns string `xml:"xmlns,attr,omitempty"`
OVFInfo string `xml:"ovf:Info"`
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
DeploymentLeaseExpiration string `xml:"DeploymentLeaseExpiration,omitempty"`
DeploymentLeaseInSeconds *int `xml:"DeploymentLeaseInSeconds,omitempty"`
Link *Link `xml:"Link,omitempty"`
StorageLeaseExpiration string `xml:"StorageLeaseExpiration,omitempty"`
StorageLeaseInSeconds *int `xml:"StorageLeaseInSeconds,omitempty"`
}
// IPRange represents a range of IP addresses, start and end inclusive.
// Type: IpRangeType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a range of IP addresses, start and end inclusive.
// Since: 0.9
type IPRange struct {
StartAddress string `xml:"StartAddress"` // Start address of the IP range.
EndAddress string `xml:"EndAddress"` // End address of the IP range.
}
// DhcpService represents a DHCP network service.
// Type: DhcpServiceType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a DHCP network service.
// Since:
type DhcpService struct {
IsEnabled bool `xml:"IsEnabled"` // Enable or disable the service using this flag
DefaultLeaseTime int `xml:"DefaultLeaseTime,omitempty"` // Default lease in seconds for DHCP addresses.
MaxLeaseTime int `xml:"MaxLeaseTime"` // Max lease in seconds for DHCP addresses.
IPRange *IPRange `xml:"IpRange"` // IP range for DHCP addresses.
RouterIP string `xml:"RouterIp,omitempty"` // Router IP.
SubMask string `xml:"SubMask,omitempty"` // The subnet mask.
PrimaryNameServer string `xml:"PrimaryNameServer,omitempty"` // The primary name server.
SecondaryNameServer string `xml:"SecondaryNameServer,omitempty"` // The secondary name server.
DomainName string `xml:"DomainName,omitempty"` // The domain name.
}
// NetworkFeatures represents features of a network.
// Type: NetworkFeaturesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents features of a network.
// Since:
type NetworkFeatures struct {
DhcpService *DhcpService `xml:"DhcpService,omitempty"` // Substitute for NetworkService. DHCP service settings
FirewallService *FirewallService `xml:"FirewallService,omitempty"` // Substitute for NetworkService. Firewall service settings
NatService *NatService `xml:"NatService,omitempty"` // Substitute for NetworkService. NAT service settings
StaticRoutingService *StaticRoutingService `xml:"StaticRoutingService,omitempty"` // Substitute for NetworkService. Static Routing service settings
// TODO: Not Implemented
// IpsecVpnService IpsecVpnService `xml:"IpsecVpnService,omitempty"` // Substitute for NetworkService. Ipsec Vpn service settings
}
// IPAddresses a list of IP addresses
// Type: IpAddressesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: A list of IP addresses.
// Since: 0.9
type IPAddresses struct {
IPAddress []string `xml:"IpAddress,omitempty"` // A list of IP addresses.
}
// IPRanges represents a list of IP ranges.
// Type: IpRangesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a list of IP ranges.
// Since: 0.9
type IPRanges struct {
IPRange []*IPRange `xml:"IpRange,omitempty"` // IP range.
}
// IPScope specifies network settings like gateway, network mask, DNS servers IP ranges etc
// Type: IpScopeType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Specify network settings like gateway, network mask, DNS servers, IP ranges, etc.
// Since: 0.9
type IPScope struct {
IsInherited bool `xml:"IsInherited"` // True if the IP scope is inherit from parent network.
Gateway string `xml:"Gateway,omitempty"` // Gateway of the network.
Netmask string `xml:"Netmask,omitempty"` // Network mask.
SubnetPrefixLength string `xml:"SubnetPrefixLength,omitempty"` // Prefix length.
DNS1 string `xml:"Dns1,omitempty"` // Primary DNS server.
DNS2 string `xml:"Dns2,omitempty"` // Secondary DNS server.
DNSSuffix string `xml:"DnsSuffix,omitempty"` // DNS suffix.
IsEnabled bool `xml:"IsEnabled,omitempty"` // Indicates if subnet is enabled or not. Default value is True.
IPRanges *IPRanges `xml:"IpRanges,omitempty"` // IP ranges used for static pool allocation in the network.
AllocatedIPAddresses *IPAddresses `xml:"AllocatedIpAddresses,omitempty"` // Read-only list of allocated IP addresses in the network.
SubAllocations *SubAllocations `xml:"SubAllocations,omitempty"` // Read-only list of IP addresses that are sub allocated to edge gateways.
}
// SubAllocations a list of IP addresses that are sub allocated to edge gateways.
// Type: SubAllocationsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: A list of IP addresses that are sub allocated to edge gateways.
// Since: 5.1
type SubAllocations struct {
// Attributes
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
// Elements
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
SubAllocation *SubAllocation `xml:"SubAllocation,omitempty"` // IP Range sub allocated to a edge gateway.
}
// SubAllocation IP range sub allocated to an edge gateway.
// Type: SubAllocationType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: IP range sub allocated to an edge gateway.
// Since: 5.1
type SubAllocation struct {
EdgeGateway *Reference `xml:"EdgeGateway,omitempty"` // Edge gateway that uses this sub allocation.
IPRanges *IPRanges `xml:"IpRanges,omitempty"` // IP range sub allocated to the edge gateway.
}
// IPScopes represents a list of IP scopes.
// Type: IpScopesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a list of IP scopes.
// Since: 5.1
type IPScopes struct {
IPScope []*IPScope `xml:"IpScope"` // IP scope.
}
// NetworkConfiguration is the configuration applied to a network. This is an abstract base type.
// The concrete types include those for vApp and Organization wide networks.
// Type: NetworkConfigurationType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: The configurations applied to a network. This is an abstract base type. The concrete types include those for vApp and Organization wide networks.
// Since: 0.9
type NetworkConfiguration struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
BackwardCompatibilityMode bool `xml:"BackwardCompatibilityMode"`
IPScopes *IPScopes `xml:"IpScopes,omitempty"`
ParentNetwork *Reference `xml:"ParentNetwork,omitempty"`
FenceMode string `xml:"FenceMode"`
RetainNetInfoAcrossDeployments *bool `xml:"RetainNetInfoAcrossDeployments,omitempty"`
Features *NetworkFeatures `xml:"Features,omitempty"`
// SubInterface and DistributedInterface are mutually exclusive
// When they are both nil, it means the "internal" interface (the default) will be used.
// When one of them is set, the corresponding interface will be used.
// They cannot be both set (we'll get an API error if we do).
SubInterface *bool `xml:"SubInterface,omitempty"`
DistributedInterface *bool `xml:"DistributedInterface,omitempty"`
GuestVlanAllowed *bool `xml:"GuestVlanAllowed,omitempty"`
// TODO: Not Implemented
// RouterInfo RouterInfo `xml:"RouterInfo,omitempty"`
// SyslogServerSettings SyslogServerSettings `xml:"SyslogServerSettings,omitempty"`
}
// VAppNetworkConfiguration represents a vApp network configuration
// Used in vApp network configuration actions as part of vApp type,
// VApp.NetworkConfigSection.NetworkConfig or directly as NetworkConfigSection.NetworkConfig for various API calls.
// Type: VAppNetworkConfigurationType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a vApp network configuration.
// Since: 0.9
type VAppNetworkConfiguration struct {
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
NetworkName string `xml:"networkName,attr"`
Link *Link `xml:"Link,omitempty"`
Description string `xml:"Description,omitempty"`
Configuration *NetworkConfiguration `xml:"Configuration"`
IsDeployed bool `xml:"IsDeployed"`
}
// VAppNetwork represents a vApp network configuration
// Used as input PUT /network/{id}
// Type: VAppNetworkType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a vApp network configuration.
// Since: 0.9
type VAppNetwork struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
Name string `xml:"name,attr"`
Deployed *bool `xml:"deployed,attr"` // True if the network is deployed.
Link *Link `xml:"Link,omitempty"`
Description string `xml:"Description,omitempty"`
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
Configuration *NetworkConfiguration `xml:"Configuration"`
}
// NetworkConfigSection is container for vApp networks.
// Type: NetworkConfigSectionType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for vApp networks.
// Since: 0.9
type NetworkConfigSection struct {
// Extends OVF Section_Type
// FIXME: Fix the OVF section
XMLName xml.Name `xml:"NetworkConfigSection"`
Xmlns string `xml:"xmlns,attr,omitempty"`
Ovf string `xml:"xmlns:ovf,attr,omitempty"`
Info string `xml:"ovf:Info"`
//
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Link *Link `xml:"Link,omitempty"`
NetworkConfig []VAppNetworkConfiguration `xml:"NetworkConfig,omitempty"`
}
// NetworkNames allows to extract network names
func (n NetworkConfigSection) NetworkNames() []string {
var list []string
for _, netConfig := range n.NetworkConfig {
list = append(list, netConfig.NetworkName)
}
return list
}
// NetworkConnection represents a network connection in the virtual machine.
// Type: NetworkConnectionType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a network connection in the virtual machine.
// Since: 0.9
type NetworkConnection struct {
Network string `xml:"network,attr"` // Name of the network to which this NIC is connected.
NeedsCustomization bool `xml:"needsCustomization,attr,omitempty"` // True if this NIC needs customization.
NetworkConnectionIndex int `xml:"NetworkConnectionIndex"` // Virtual slot number associated with this NIC. First slot number is 0.
IPAddress string `xml:"IpAddress,omitempty"` // IP address assigned to this NIC.
ExternalIPAddress string `xml:"ExternalIpAddress,omitempty"` // If the network to which this NIC connects provides NAT services, the external address assigned to this NIC appears here.
IsConnected bool `xml:"IsConnected"` // If the virtual machine is undeployed, this value specifies whether the NIC should be connected upon deployment. If the virtual machine is deployed, this value reports the current status of this NIC's connection, and can be updated to change that connection status.
MACAddress string `xml:"MACAddress,omitempty"` // MAC address associated with the NIC.
IPAddressAllocationMode string `xml:"IpAddressAllocationMode"` // IP address allocation mode for this connection. One of: POOL (A static IP address is allocated automatically from a pool of addresses.) DHCP (The IP address is obtained from a DHCP service.) MANUAL (The IP address is assigned manually in the IpAddress element.) NONE (No IP addressing mode specified.)
NetworkAdapterType string `xml:"NetworkAdapterType,omitempty"`
}
// NetworkConnectionSection the container for the network connections of this virtual machine.
// Type: NetworkConnectionSectionType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for the network connections of this virtual machine.
// Since: 0.9
type NetworkConnectionSection struct {
// Extends OVF Section_Type
// FIXME: Fix the OVF section
XMLName xml.Name `xml:"NetworkConnectionSection"`
Xmlns string `xml:"xmlns,attr,omitempty"`
Ovf string `xml:"xmlns:ovf,attr,omitempty"`
Info string `xml:"ovf:Info"`
//
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
PrimaryNetworkConnectionIndex int `xml:"PrimaryNetworkConnectionIndex"`
NetworkConnection []*NetworkConnection `xml:"NetworkConnection,omitempty"`
Link *Link `xml:"Link,omitempty"`
}
// InstantiationParams is a container for ovf:Section_Type elements that specify vApp configuration on instantiate, compose, or recompose.
// Type: InstantiationParamsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for ovf:Section_Type elements that specify vApp configuration on instantiate, compose, or recompose.
// Since: 0.9
type InstantiationParams struct {
CustomizationSection *CustomizationSection `xml:"CustomizationSection,omitempty"`
DefaultStorageProfileSection *DefaultStorageProfileSection `xml:"DefaultStorageProfileSection,omitempty"`
GuestCustomizationSection *GuestCustomizationSection `xml:"GuestCustomizationSection,omitempty"`
LeaseSettingsSection *LeaseSettingsSection `xml:"LeaseSettingsSection,omitempty"`
NetworkConfigSection *NetworkConfigSection `xml:"NetworkConfigSection,omitempty"`
NetworkConnectionSection *NetworkConnectionSection `xml:"NetworkConnectionSection,omitempty"`
ProductSection *ProductSection `xml:"ProductSection,omitempty"`
// TODO: Not Implemented
// SnapshotSection SnapshotSection `xml:"SnapshotSection,omitempty"`
}
// OrgVDCNetwork represents an Org VDC network in the vCloud model.
// Type: OrgVdcNetworkType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents an Org VDC network in the vCloud model.
// Since: 5.1
type OrgVDCNetwork struct {
XMLName xml.Name `xml:"OrgVdcNetwork"`
Xmlns string `xml:"xmlns,attr,omitempty"`
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
OperationKey string `xml:"operationKey,attr,omitempty"`
Name string `xml:"name,attr"`
Status string `xml:"status,attr,omitempty"`
Link []Link `xml:"Link,omitempty"`
Description string `xml:"Description,omitempty"`
Configuration *NetworkConfiguration `xml:"Configuration,omitempty"`
EdgeGateway *Reference `xml:"EdgeGateway,omitempty"`
ServiceConfig *GatewayFeatures `xml:"ServiceConfig,omitempty"` // Specifies the service configuration for an isolated Org VDC networks
IsShared bool `xml:"IsShared"`
VimPortGroupRef []*VimObjectRef `xml:"VimPortGroupRef,omitempty"` // Needed to set up DHCP inside ServiceConfig
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
}
// SupportedHardwareVersions contains a list of VMware virtual hardware versions supported in this vDC.
// Type: SupportedHardwareVersionsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Contains a list of VMware virtual hardware versions supported in this vDC.
// Since: 1.5
type SupportedHardwareVersions struct {
SupportedHardwareVersion []string `xml:"SupportedHardwareVersion,omitempty"` // A virtual hardware version supported in this vDC.
}
// Capabilities collection of supported hardware capabilities.
// Type: CapabilitiesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Collection of supported hardware capabilities.
// Since: 1.5
type Capabilities struct {
SupportedHardwareVersions *SupportedHardwareVersions `xml:"SupportedHardwareVersions,omitempty"` // Read-only list of virtual hardware versions supported by this vDC.
}
// Vdc represents the user view of an organization VDC.
// Type: VdcType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the user view of an organization VDC.
// Since: 0.9
type Vdc struct {
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
OperationKey string `xml:"operationKey,attr,omitempty"`
Name string `xml:"name,attr"`
Status int `xml:"status,attr,omitempty"`
Link LinkList `xml:"Link,omitempty"`
Description string `xml:"Description,omitempty"`
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
AllocationModel string `xml:"AllocationModel"`
ComputeCapacity []*ComputeCapacity `xml:"ComputeCapacity"`
ResourceEntities []*ResourceEntities `xml:"ResourceEntities,omitempty"`
AvailableNetworks []*AvailableNetworks `xml:"AvailableNetworks,omitempty"`
Capabilities []*Capabilities `xml:"Capabilities,omitempty"`
NicQuota int `xml:"NicQuota"`
NetworkQuota int `xml:"NetworkQuota"`
UsedNetworkCount int `xml:"UsedNetworkCount,omitempty"`
VMQuota int `xml:"VmQuota"`
IsEnabled bool `xml:"IsEnabled"`
VdcStorageProfiles *VdcStorageProfiles `xml:"VdcStorageProfiles"`
DefaultComputePolicy *Reference `xml:"DefaultComputePolicy"`
}
// AdminVdc represents the admin view of an organization VDC.
// Type: AdminVdcType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the admin view of an organization VDC.
// Since: 0.9
type AdminVdc struct {
Xmlns string `xml:"xmlns,attr"`
Vdc
VCpuInMhz2 *int64 `xml:"VCpuInMhz2,omitempty"`
ResourceGuaranteedMemory *float64 `xml:"ResourceGuaranteedMemory,omitempty"`
ResourceGuaranteedCpu *float64 `xml:"ResourceGuaranteedCpu,omitempty"`
VCpuInMhz *int64 `xml:"VCpuInMhz,omitempty"`
IsThinProvision *bool `xml:"IsThinProvision,omitempty"`
NetworkPoolReference *Reference `xml:"NetworkPoolReference,omitempty"`
ProviderVdcReference *Reference `xml:"ProviderVdcReference"`
// ResourcePoolRefs is a read-only field and should be avoided in XML structure for write
// operations because it breaks on Go marshalling bug https://github.com/golang/go/issues/9519
ResourcePoolRefs *VimObjectRefs `xml:"ResourcePoolRefs,omitempty"`
UsesFastProvisioning *bool `xml:"UsesFastProvisioning,omitempty"`
OverCommitAllowed bool `xml:"OverCommitAllowed,omitempty"`
VmDiscoveryEnabled bool `xml:"VmDiscoveryEnabled,omitempty"`
IsElastic *bool `xml:"IsElastic,omitempty"` // Supported from 32.0 for the Flex model
IncludeMemoryOverhead *bool `xml:"IncludeMemoryOverhead,omitempty"` // Supported from 32.0 for the Flex model
UniversalNetworkPoolReference *Reference `xml:"UniversalNetworkPoolReference,omitempty"` // Reference to a universal network pool
}
// ProviderVdc represents a Provider VDC.
// Type: ProviderVdcType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a Provider VDC.
// Since: 0.9
type ProviderVdc struct {
Xmlns string `xml:"xmlns,attr"`
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
OperationKey string `xml:"operationKey,attr,omitempty"`
Name string `xml:"name,attr"`
Status int `xml:"status,attr,omitempty"` // -1 (creation failed), 0 (not ready), 1 (ready), 2 (unknown), 3 (unrecognized)
AvailableNetworks *AvailableNetworks `xml:"AvailableNetworks,omitempty"` // Read-only list of available networks.
Capabilities *Capabilities `xml:"Capabilities,omitempty"` // Read-only list of virtual hardware versions supported by this Provider VDC.
ComputeCapacity *RootComputeCapacity `xml:"ComputeCapacity,omitempty"` // Read-only indicator of CPU and memory capacity.
Description string `xml:"Description,omitempty"` // Optional description.
IsEnabled *bool `xml:"IsEnabled,omitempty"` // True if this Provider VDC is enabled and can provide resources to organization VDCs. A Provider VDC is always enabled on creation.
Link *Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
NetworkPoolReferences *NetworkPoolReferences `xml:"NetworkPoolReferences,omitempty"` // Read-only list of network pools used by this Provider VDC.
StorageProfiles *ProviderStorageProfiles `xml:"StorageProfiles,omitempty"` // Container for references to vSphere storage profiles available to this Provider VDC.
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
}
// VMWProviderVdc represents an extension of ProviderVdc.
// Type: VMWProviderVdcType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents an extension of ProviderVdc.
// Since: 1.0
type VMWProviderVdc struct {
ProviderVdc
AvailableUniversalNetworkPool *Reference `xml:"AvailableUniversalNetworkPool,omitempty"` // Selectable universal network reference.
ComputeProviderScope string `xml:"ComputeProviderScope,omitempty"` // The compute provider scope represents the compute fault domain for this provider VDC. This value is a tenant-facing tag that is shown to tenants when viewing fault domains of the child Organization VDCs (for ex. a VDC Group).
DataStoreRefs *VimObjectRefs `xml:"DataStoreRefs,omitempty"` // vSphere datastores backing this provider VDC.
HighestSupportedHardwareVersion string `xml:"HighestSupportedHardwareVersion,omitempty"` // The highest virtual hardware version supported by this Provider VDC. If empty or omitted on creation, the system sets it to the highest virtual hardware version supported by all hosts in the primary resource pool. You can modify it when you add more resource pools.
HostReferences *VMWHostReferences `xml:"HostReferences,omitempty"` // Shows all hosts which are connected to VC server.
NsxTManagerReference *Reference `xml:"NsxTManagerReference,omitempty"` // An optional reference to a registered NSX-T Manager to back networking operations for this provider VDC.
ResourcePoolRefs *VimObjectRefs `xml:"ResourcePoolRefs,omitempty"` // Resource pools backing this provider VDC. On create, you must specify a resource pool that is not used by (and is not the child of a resource pool used by) any other provider VDC. On modify, this element is required for schema validation, but its contents cannot be changed.
VimServer *Reference `xml:"VimServer,omitempty"` // The vCenter server that provides the resource pools and datastores. A valid reference is required on create. On modify, this element is required for schema validation, but its contents cannot be changed.
}
// VMWHostReferences represents a list of available hosts.
// Type: VMWHostReferencesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a list of available hosts.
// Since: 1.0
type VMWHostReferences struct {
HostReference []*Reference `xml:"HostReference,omitempty"`
Link *Link `xml:"Link,omitempty"`
}
// RootComputeCapacity represents compute capacity with units.
// Type: RootComputeCapacityType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents compute capacity with units.
// Since: 0.9
type RootComputeCapacity struct {
Cpu *ProviderVdcCapacity `xml:"Cpu"`
IsElastic bool `xml:"IsElastic,omitempty"`
IsHA bool `xml:"IsHA,omitempty"`
Memory *ProviderVdcCapacity `xml:"Memory"`
}
// NetworkPoolReferences is a container for references to network pools in this vDC.
// Type: NetworkPoolReferencesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for references to network pools in this vDC.
// Since: 0.9
type NetworkPoolReferences struct {
NetworkPoolReference []*Reference `xml:"NetworkPoolReference"`
}
// ProviderStorageProfiles is a container for references to storage profiles associated with a Provider vDC.
// Type: ProviderVdcStorageProfilesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for references to storage profiles associated with a Provider vDC.
// Since: 0.9
type ProviderStorageProfiles struct {
ProviderVdcStorageProfile []*Reference `xml:"ProviderVdcStorageProfile"`
}
// ProviderVdcCapacity represents resource capacity in a Provider vDC.
// Type: ProviderVdcCapacityType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents resource capacity in a Provider vDC.
// Since: 0.9
type ProviderVdcCapacity struct {
Allocation int64 `xml:"Allocation,omitempty"`
Overhead int64 `xml:"Overhead,omitempty"`
Reserved int64 `xml:"Reserved,omitempty"`
Total int64 `xml:"Total,omitempty"`
Units string `xml:"Units"`
Used int64 `xml:"Used,omitempty"`
}
// VdcStorageProfileConfiguration represents the parameters to assign a storage profile in creation of organization vDC.
// Type: VdcStorageProfileParamsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the parameters to create a storage profile in an organization vDC.
// Since: 5.1
// https://code.vmware.com/apis/220/vcloud#/doc/doc/types/VdcStorageProfileParamsType.html
type VdcStorageProfileConfiguration struct {
Enabled *bool `xml:"Enabled,omitempty"`
Units string `xml:"Units"`
Limit int64 `xml:"Limit"`
Default bool `xml:"Default"`
ProviderVdcStorageProfile *Reference `xml:"ProviderVdcStorageProfile"`
}
// VdcStorageProfile represents the parameters for fetched storage profile
// Type: VdcStorageProfileParamsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// https://vdc-repo.vmware.com/vmwb-repository/dcr-public/7a028e78-bd37-4a6a-8298-9c26c7eeb9aa/09142237-dd46-4dee-8326-e07212fb63a8/doc/doc/types/VdcStorageProfileType.html
// https://vdc-repo.vmware.com/vmwb-repository/dcr-public/71e12563-bc11-4d64-821d-92d30f8fcfa1/7424bf8e-aec2-44ad-be7d-b98feda7bae0/doc/doc/types/AdminVdcStorageProfileType.html
type VdcStorageProfile struct {
Xmlns string `xml:"xmlns,attr"`
Name string `xml:"name,attr"`
Enabled *bool `xml:"Enabled,omitempty"`
Units string `xml:"Units"`
Limit int64 `xml:"Limit"`
Default bool `xml:"Default"`
IopsSettings *VdcStorageProfileIopsSettings `xml:"IopsSettings"`
StorageUsedMB int64 `xml:"StorageUsedMB"`
IopsAllocated int64 `xml:"IopsAllocated"`
ProviderVdcStorageProfile *Reference `xml:"ProviderVdcStorageProfile"`
}
// AdminVdcStorageProfile represents the parameters for fetched storage profile
// Type: AdminVdcStorageProfileType
// Namespace: http://www.vmware.com/vcloud/v1.5
// https://vdc-repo.vmware.com/vmwb-repository/dcr-public/71e12563-bc11-4d64-821d-92d30f8fcfa1/7424bf8e-aec2-44ad-be7d-b98feda7bae0/doc/doc/types/AdminVdcStorageProfileType.html
type AdminVdcStorageProfile struct {
Xmlns string `xml:"xmlns,attr"`
Name string `xml:"name,attr"`
Enabled *bool `xml:"Enabled,omitempty"`
Units string `xml:"Units"`
Limit int64 `xml:"Limit"`
Default bool `xml:"Default"`
IopsSettings *VdcStorageProfileIopsSettings `xml:"IopsSettings"`
StorageUsedMB int64 `xml:"StorageUsedMB"`
IopsAllocated int64 `xml:"IopsAllocated"`
ProviderVdcStorageProfile *Reference `xml:"ProviderVdcStorageProfile"`
}
// VdcStorageProfileIopsSettings represents the parameters for VDC storage profiles Iops settings.
// Type: VdcStorageProfileIopsSettings
// https://vdc-repo.vmware.com/vmwb-repository/dcr-public/71e12563-bc11-4d64-821d-92d30f8fcfa1/7424bf8e-aec2-44ad-be7d-b98feda7bae0/doc/doc/types/VdcStorageProfileIopsSettingsType.html
type VdcStorageProfileIopsSettings struct {
Xmlns string `xml:"xmlns,attr"`
Enabled bool `xml:"Enabled"`
DiskIopsMax int64 `xml:"DiskIopsMax"`
DiskIopsDefault int64 `xml:"DiskIopsDefault"`
StorageProfileIopsLimit int64 `xml:"StorageProfileIopsLimit,omitempty"`
DiskIopsPerGbMax int64 `xml:"DiskIopsPerGbMax"`
}
// VdcConfiguration models the payload for creating a VDC.
// Type: CreateVdcParamsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Parameters for creating an organization VDC
// Since: 5.1
// https://code.vmware.com/apis/220/vcloud#/doc/doc/types/CreateVdcParamsType.html
type VdcConfiguration struct {
XMLName xml.Name `xml:"CreateVdcParams"`
Xmlns string `xml:"xmlns,attr"`
Name string `xml:"name,attr"`
Description string `xml:"Description,omitempty"`
AllocationModel string `xml:"AllocationModel"` // Flex supported from 32.0
ComputeCapacity []*ComputeCapacity `xml:"ComputeCapacity"`
NicQuota int `xml:"NicQuota,omitempty"`
NetworkQuota int `xml:"NetworkQuota,omitempty"`
VmQuota int `xml:"VmQuota,omitempty"`
IsEnabled bool `xml:"IsEnabled,omitempty"`
// Create uses VdcStorageProfileConfiguration and fetch AdminVdcStorageProfile or VdcStorageProfile
VdcStorageProfile []*VdcStorageProfileConfiguration `xml:"VdcStorageProfile"`
ResourceGuaranteedMemory *float64 `xml:"ResourceGuaranteedMemory,omitempty"`
ResourceGuaranteedCpu *float64 `xml:"ResourceGuaranteedCpu,omitempty"`
VCpuInMhz int64 `xml:"VCpuInMhz,omitempty"`
IsThinProvision bool `xml:"IsThinProvision,omitempty"`
NetworkPoolReference *Reference `xml:"NetworkPoolReference,omitempty"`
ProviderVdcReference *Reference `xml:"ProviderVdcReference"`
UsesFastProvisioning bool `xml:"UsesFastProvisioning,omitempty"`
OverCommitAllowed bool `xml:"OverCommitAllowed,omitempty"`
VmDiscoveryEnabled bool `xml:"VmDiscoveryEnabled,omitempty"`
IsElastic *bool `xml:"IsElastic,omitempty"` // Supported from 32.0 for the Flex model
IncludeMemoryOverhead *bool `xml:"IncludeMemoryOverhead,omitempty"` // Supported from 32.0 for the Flex model
}
// Task represents an asynchronous operation in VMware Cloud Director.
// Type: TaskType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents an asynchronous operation in VMware Cloud Director.
// Since: 0.9
// Comments added from https://code.vmware.com/apis/912/vmware-cloud-director/doc/doc/types/TaskType.html
type Task struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
ID string `xml:"id,attr,omitempty"` // The entity identifier, expressed in URN format. The value of this attribute uniquely identifies the entity, persists for the life of the entity, and is never reused.
OperationKey string `xml:"operationKey,attr,omitempty"` // Optional unique identifier to support idempotent semantics for create and delete operations.
Name string `xml:"name,attr"` // The name of the entity.
Status string `xml:"status,attr"` // The execution status of the task. One of queued, preRunning, running, success, error, aborted
Operation string `xml:"operation,attr,omitempty"` // A message describing the operation that is tracked by this task.
OperationName string `xml:"operationName,attr,omitempty"` // The short name of the operation that is tracked by this task.
ServiceNamespace string `xml:"serviceNamespace,attr,omitempty"` // Identifier of the service that created the task. It must not start with com.vmware.vcloud and the length must be between 1 and 128 symbols.
StartTime string `xml:"startTime,attr,omitempty"` // The date and time the system started executing the task. May not be present if the task has not been executed yet.
EndTime string `xml:"endTime,attr,omitempty"` // The date and time that processing of the task was completed. May not be present if the task is still being executed.
ExpiryTime string `xml:"expiryTime,attr,omitempty"` // The date and time at which the task resource will be destroyed and no longer available for retrieval. May not be present if the task has not been executed or is still being executed.
CancelRequested bool `xml:"cancelRequested,attr,omitempty"` // Whether user has requested this processing to be canceled.
Link *Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
Description string `xml:"Description,omitempty"` // Optional description.
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
Owner *Reference `xml:"Owner,omitempty"` // Reference to the owner of the task. This is typically the object that the task is creating or updating.
Error *Error `xml:"Error,omitempty"` // Represents error information from a failed task.
User *Reference `xml:"User,omitempty"` // The user who started the task.
Organization *Reference `xml:"Organization,omitempty"` // The organization to which the User belongs.
Progress int `xml:"Progress,omitempty"` // Read-only indicator of task progress as an approximate percentage between 0 and 100. Not available for all tasks.
Details string `xml:"Details,omitempty"` // Detailed message about the task. Also contained by the Owner entity when task status is preRunning.
//
// TODO: add the following fields
// Params anyType The parameters with which this task was started.
// Result ResultType An optional element that can be used to hold the result of a task.
// VcTaskList VcTaskListType List of Virtual Center tasks related to this vCD task.
}
// CapacityWithUsage represents a capacity and usage of a given resource.
// Type: CapacityWithUsageType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a capacity and usage of a given resource.
// Since: 0.9
type CapacityWithUsage struct {
Units string `xml:"Units"`
Allocated int64 `xml:"Allocated"`
Limit int64 `xml:"Limit"`
Reserved int64 `xml:"Reserved,omitempty"`
Used int64 `xml:"Used,omitempty"`
}
// ComputeCapacity represents VDC compute capacity.
// Type: ComputeCapacityType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents VDC compute capacity.
// Since: 0.9
type ComputeCapacity struct {
CPU *CapacityWithUsage `xml:"Cpu"`
Memory *CapacityWithUsage `xml:"Memory"`
}
// Reference is a reference to a resource. Contains an href attribute and optional name and type attributes.
// Type: ReferenceType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: A reference to a resource. Contains an href attribute and optional name and type attributes.
// Since: 0.9
type Reference struct {
HREF string `xml:"href,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Name string `xml:"name,attr,omitempty"`
}
// ResourceReference represents a reference to a resource. Contains an href attribute, a resource status attribute, and optional name and type attributes.
// Type: ResourceReferenceType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a reference to a resource. Contains an href attribute, a resource status attribute, and optional name and type attributes.
// Since: 0.9
type ResourceReference struct {
HREF string `xml:"href,attr"`
ID string `xml:"id,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Name string `xml:"name,attr,omitempty"`
Status string `xml:"status,attr,omitempty"`
}
// VdcStorageProfiles is a container for references to storage profiles associated with a vDC.
// Element: VdcStorageProfiles
// Type: VdcStorageProfilesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for references to storage profiles associated with a vDC.
// Since: 5.1
type VdcStorageProfiles struct {
VdcStorageProfile []*Reference `xml:"VdcStorageProfile,omitempty"`
}
// ResourceEntities is a container for references to ResourceEntity objects in this vDC.
// Type: ResourceEntitiesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for references to ResourceEntity objects in this vDC.
// Since: 0.9
type ResourceEntities struct {
ResourceEntity []*ResourceReference `xml:"ResourceEntity,omitempty"`
}
// AvailableNetworks is a container for references to available organization vDC networks.
// Type: AvailableNetworksType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Container for references to available organization vDC networks.
// Since: 0.9
type AvailableNetworks struct {
Network []*Reference `xml:"Network,omitempty"`
}
// Link extends reference type by adding relation attribute. Defines a hyper-link with a relationship, hyper-link reference, and an optional MIME type.
// Type: LinkType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Extends reference type by adding relation attribute. Defines a hyper-link with a relationship, hyper-link reference, and an optional MIME type.
// Since: 0.9
type Link struct {
HREF string `xml:"href,attr"`
ID string `xml:"id,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
Name string `xml:"name,attr,omitempty"`
Rel string `xml:"rel,attr"`
}
// OrgList represents a lists of Organizations
// Type: OrgType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents a list of VMware Cloud Director organizations.
// Since: 0.9
type OrgList struct {
Link LinkList `xml:"Link,omitempty"`
Org []*Org `xml:"Org,omitempty"`
}
// Org represents the user view of a VMware Cloud Director organization.
// Type: OrgType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the user view of a VMware Cloud Director organization.
// Since: 0.9
type Org struct {
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
OperationKey string `xml:"operationKey,attr,omitempty"`
Name string `xml:"name,attr"`
Description string `xml:"Description,omitempty"`
FullName string `xml:"FullName"`
IsEnabled bool `xml:"IsEnabled,omitempty"`
Link LinkList `xml:"Link,omitempty"`
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
}
// List of the users within the organization
type OrgUserList struct {
User []*Reference `xml:"UserReference,omitempty"`
}
type OrgGroupList struct {
Group []*Reference `xml:"GroupReference,omitempty"`
}
// List of available roles in the organization
type OrgRoleType struct {
RoleReference []*Reference `xml:"RoleReference,omitempty"`
}
// List of available rights in the organization
type RightsType struct {
Links LinkList `xml:"Link,omitempty"`
RightReference []*Reference `xml:"RightReference,omitempty"`
}
// AdminOrg represents the admin view of a VMware Cloud Director organization.
// Type: AdminOrgType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the admin view of a VMware Cloud Director organization.
// Since: 0.9
type AdminOrg struct {
XMLName xml.Name `xml:"AdminOrg"`
Xmlns string `xml:"xmlns,attr"`
HREF string `xml:"href,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
ID string `xml:"id,attr,omitempty"`
OperationKey string `xml:"operationKey,attr,omitempty"`
Name string `xml:"name,attr"`
Description string `xml:"Description,omitempty"`
FullName string `xml:"FullName"`
IsEnabled bool `xml:"IsEnabled,omitempty"`
Link LinkList `xml:"Link,omitempty"`
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
Users *OrgUserList `xml:"Users,omitempty"`
Groups *OrgGroupList `xml:"Groups,omitempty"`
Catalogs *CatalogsList `xml:"Catalogs,omitempty"`
OrgSettings *OrgSettings `xml:"Settings,omitempty"`
Vdcs *VDCList `xml:"Vdcs,omitempty"`
Networks *NetworksList `xml:"Networks,omitempty"`
RightReferences *OrgRoleType `xml:"RightReferences,omitempty"`
RoleReferences *OrgRoleType `xml:"RoleReferences,omitempty"`
}
// OrgSettingsType represents the settings for a VMware Cloud Director organization.
// Type: OrgSettingsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the settings of a VMware Cloud Director organization.
// Since: 0.9
type OrgSettings struct {
//attributes
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
//elements
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
OrgGeneralSettings *OrgGeneralSettings `xml:"OrgGeneralSettings,omitempty"` // General Settings for the org, not-required
OrgVAppLeaseSettings *VAppLeaseSettings `xml:"VAppLeaseSettings,omitempty"`
OrgVAppTemplateSettings *VAppTemplateLeaseSettings `xml:"VAppTemplateLeaseSettings,omitempty"` // Vapp template lease settings, not required
OrgLdapSettings *OrgLdapSettingsType `xml:"OrgLdapSettings,omitempty"` //LDAP settings, not-requried, defaults to none
}
// OrgGeneralSettingsType represents the general settings for a VMware Cloud Director organization.
// Type: OrgGeneralSettingsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the user view of a VMware Cloud Director organization.
// Since: 0.9
type OrgGeneralSettings struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
CanPublishCatalogs bool `xml:"CanPublishCatalogs,omitempty"`
CanPublishExternally bool `xml:"CanPublishExternally,omitempty"`
CanSubscribe bool `xml:"CanSubscribe,omitempty"`
DeployedVMQuota int `xml:"DeployedVMQuota,omitempty"`
StoredVMQuota int `xml:"StoredVmQuota,omitempty"`
UseServerBootSequence bool `xml:"UseServerBootSequence,omitempty"`
DelayAfterPowerOnSeconds int `xml:"DelayAfterPowerOnSeconds,omitempty"`
}
// VAppTemplateLeaseSettings represents the vapp template lease settings for a VMware Cloud Director organization.
// Type: VAppTemplateLeaseSettingsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the vapp template lease settings of a VMware Cloud Director organization.
// Since: 0.9
type VAppTemplateLeaseSettings struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
DeleteOnStorageLeaseExpiration *bool `xml:"DeleteOnStorageLeaseExpiration,omitempty"`
StorageLeaseSeconds *int `xml:"StorageLeaseSeconds,omitempty"`
}
type VAppLeaseSettings struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
DeleteOnStorageLeaseExpiration *bool `xml:"DeleteOnStorageLeaseExpiration,omitempty"`
DeploymentLeaseSeconds *int `xml:"DeploymentLeaseSeconds,omitempty"`
StorageLeaseSeconds *int `xml:"StorageLeaseSeconds,omitempty"`
PowerOffOnRuntimeLeaseExpiration *bool `xml:"PowerOffOnRuntimeLeaseExpiration,omitempty"`
}
type OrgFederationSettings struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
Enabled bool `xml:"Enabled,omitempty"`
}
// OrgLdapSettingsType represents the ldap settings for a VMware Cloud Director organization.
// Type: OrgLdapSettingsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the ldap settings of a VMware Cloud Director organization.
// Since: 0.9
type OrgLdapSettingsType struct {
XMLName xml.Name `xml:"OrgLdapSettings"`
Xmlns string `xml:"xmlns,attr,omitempty"`
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
CustomUsersOu string `xml:"CustomUsersOu,omitempty"` // If OrgLdapMode is SYSTEM, specifies an LDAP attribute=value pair to use for OU (organizational unit).
OrgLdapMode string `xml:"OrgLdapMode,omitempty"` // LDAP mode you want
CustomOrgLdapSettings *CustomOrgLdapSettings `xml:"CustomOrgLdapSettings,omitempty"` // Needs to be set if user chooses custom mode
}
// CustomOrgLdapSettings represents the custom ldap settings for a VMware Cloud Director organization.
// Type: CustomOrgLdapSettingsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the custom ldap settings of a VMware Cloud Director organization.
// Since: 0.9
// Note. Order of these fields matter and API will error if it is changed
type CustomOrgLdapSettings struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
HostName string `xml:"HostName,omitempty"`
Port int `xml:"Port"`
IsSsl bool `xml:"IsSsl,omitempty"`
IsSslAcceptAll bool `xml:"IsSslAcceptAll,omitempty"`
SearchBase string `xml:"SearchBase,omitempty"`
Username string `xml:"UserName,omitempty"`
Password string `xml:"Password,omitempty"`
AuthenticationMechanism string `xml:"AuthenticationMechanism"`
IsGroupSearchBaseEnabled bool `xml:"IsGroupSearchBaseEnabled"`
GroupSearchBase string `xml:"GroupSearchBase,omitempty"`
ConnectorType string `xml:"ConnectorType"` // Defines LDAP service implementation type
UserAttributes *OrgLdapUserAttributes `xml:"UserAttributes"` // Defines how LDAP attributes are used when importing a user.
GroupAttributes *OrgLdapGroupAttributes `xml:"GroupAttributes"` // Defines how LDAP attributes are used when importing a group.
UseExternalKerberos bool `xml:"UseExternalKerberos"`
Realm string `xml:"Realm,omitempty"`
}
// OrgLdapGroupAttributes represents the ldap group attribute settings for a VMware Cloud Director organization.
// Type: OrgLdapGroupAttributesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the ldap group attribute settings of a VMware Cloud Director organization.
// Since: 0.9
// Note. Order of these fields matter and API will error if it is changed
type OrgLdapGroupAttributes struct {
ObjectClass string `xml:"ObjectClass"`
ObjectIdentifier string `xml:"ObjectIdentifier"`
GroupName string `xml:"GroupName"`
Membership string `xml:"Membership"`
MembershipIdentifier string `xml:"MembershipIdentifier"`
BackLinkIdentifier string `xml:"BackLinkIdentifier,omitempty"`
}
// OrgLdapUserAttributesType represents the ldap user attribute settings for a VMware Cloud Director organization.
// Type: OrgLdapUserAttributesType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents the ldap user attribute settings of a VMware Cloud Director organization.
// Since: 0.9
// Note. Order of these fields matter and API will error if it is changed.
type OrgLdapUserAttributes struct {
ObjectClass string `xml:"ObjectClass"`