@@ -20,6 +20,51 @@ import (
20
20
"github.com/vmware/govmomi/vim25/types"
21
21
)
22
22
23
+ /*
24
+ Source:
25
+ - https://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_ResourceAllocationSettingData.xsd
26
+ - https://schemas.dmtf.org/wbem/cim-html/2/CIM_ResourceAllocationSettingData.html
27
+ */
28
+ type CIMResourceType uint16
29
+
30
+ // Please note, the iota pattern is not used to ensure these constants remain
31
+ // affixed to an explicit value.
32
+ const (
33
+ Other CIMResourceType = 1
34
+ ComputerSystem CIMResourceType = 2
35
+ Processor CIMResourceType = 3
36
+ Memory CIMResourceType = 4
37
+ IdeController CIMResourceType = 5
38
+ ParallelScsiHba CIMResourceType = 6
39
+ FcHba CIMResourceType = 7
40
+ IScsiHba CIMResourceType = 8
41
+ IbHba CIMResourceType = 9
42
+ EthernetAdapter CIMResourceType = 10
43
+ OtherNetwork CIMResourceType = 11
44
+ IoSlot CIMResourceType = 12
45
+ IoDevice CIMResourceType = 13
46
+ FloppyDrive CIMResourceType = 14
47
+ CdDrive CIMResourceType = 15
48
+ DvdDrive CIMResourceType = 16
49
+ DiskDrive CIMResourceType = 17
50
+ TapeDrive CIMResourceType = 18
51
+ StorageExtent CIMResourceType = 19
52
+ OtherStorage CIMResourceType = 20
53
+ SerialPort CIMResourceType = 21
54
+ ParallelPort CIMResourceType = 22
55
+ UsbController CIMResourceType = 23
56
+ Graphics CIMResourceType = 24
57
+ Ieee1394 CIMResourceType = 25
58
+ PartitionableUnit CIMResourceType = 26
59
+ BasePartitionable CIMResourceType = 27
60
+ PowerSupply CIMResourceType = 28
61
+ CoolingDevice CIMResourceType = 29
62
+ EthernetSwitchPort CIMResourceType = 30
63
+ LogicalDisk CIMResourceType = 31
64
+ StorageVolume CIMResourceType = 32
65
+ EthernetConnection CIMResourceType = 33
66
+ )
67
+
23
68
/*
24
69
Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_VirtualSystemSettingData.xsd
25
70
*/
@@ -57,9 +102,9 @@ type CIMResourceAllocationSettingData struct {
57
102
ElementName string `xml:"ElementName"`
58
103
InstanceID string `xml:"InstanceID"`
59
104
60
- ResourceType * uint16 `xml:"ResourceType"`
61
- OtherResourceType * string `xml:"OtherResourceType"`
62
- ResourceSubType * string `xml:"ResourceSubType"`
105
+ ResourceType * CIMResourceType `xml:"ResourceType"`
106
+ OtherResourceType * string `xml:"OtherResourceType"`
107
+ ResourceSubType * string `xml:"ResourceSubType"`
63
108
64
109
AddressOnParent * string `xml:"AddressOnParent"`
65
110
Address * string `xml:"Address"`
@@ -88,9 +133,9 @@ type CIMStorageAllocationSettingData struct {
88
133
ElementName string `xml:"ElementName"`
89
134
InstanceID string `xml:"InstanceID"`
90
135
91
- ResourceType * uint16 `xml:"ResourceType"`
92
- OtherResourceType * string `xml:"OtherResourceType"`
93
- ResourceSubType * string `xml:"ResourceSubType"`
136
+ ResourceType * CIMResourceType `xml:"ResourceType"`
137
+ OtherResourceType * string `xml:"OtherResourceType"`
138
+ ResourceSubType * string `xml:"ResourceSubType"`
94
139
95
140
Access * uint16 `xml:"Access"`
96
141
Address * string `xml:"Address"`
0 commit comments