github.com/vmware/govmomi@v0.51.0/ovf/cim.go (about)

     1  // © Broadcom. All Rights Reserved.
     2  // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  package ovf
     6  
     7  import (
     8  	"github.com/vmware/govmomi/vim25/types"
     9  )
    10  
    11  /*
    12  Source:
    13    - https://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_ResourceAllocationSettingData.xsd
    14    - https://schemas.dmtf.org/wbem/cim-html/2/CIM_ResourceAllocationSettingData.html
    15  */
    16  type CIMResourceType uint16
    17  
    18  // Please note, the iota pattern is not used to ensure these constants remain
    19  // affixed to an explicit value.
    20  const (
    21  	Other              CIMResourceType = 1
    22  	ComputerSystem     CIMResourceType = 2
    23  	Processor          CIMResourceType = 3
    24  	Memory             CIMResourceType = 4
    25  	IdeController      CIMResourceType = 5
    26  	ParallelScsiHba    CIMResourceType = 6
    27  	FcHba              CIMResourceType = 7
    28  	IScsiHba           CIMResourceType = 8
    29  	IbHba              CIMResourceType = 9
    30  	EthernetAdapter    CIMResourceType = 10
    31  	OtherNetwork       CIMResourceType = 11
    32  	IoSlot             CIMResourceType = 12
    33  	IoDevice           CIMResourceType = 13
    34  	FloppyDrive        CIMResourceType = 14
    35  	CdDrive            CIMResourceType = 15
    36  	DvdDrive           CIMResourceType = 16
    37  	DiskDrive          CIMResourceType = 17
    38  	TapeDrive          CIMResourceType = 18
    39  	StorageExtent      CIMResourceType = 19
    40  	OtherStorage       CIMResourceType = 20
    41  	SerialPort         CIMResourceType = 21
    42  	ParallelPort       CIMResourceType = 22
    43  	UsbController      CIMResourceType = 23
    44  	Graphics           CIMResourceType = 24
    45  	Ieee1394           CIMResourceType = 25
    46  	PartitionableUnit  CIMResourceType = 26
    47  	BasePartitionable  CIMResourceType = 27
    48  	PowerSupply        CIMResourceType = 28
    49  	CoolingDevice      CIMResourceType = 29
    50  	EthernetSwitchPort CIMResourceType = 30
    51  	LogicalDisk        CIMResourceType = 31
    52  	StorageVolume      CIMResourceType = 32
    53  	EthernetConnection CIMResourceType = 33
    54  )
    55  
    56  /*
    57  Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_VirtualSystemSettingData.xsd
    58  */
    59  
    60  type CIMVirtualSystemSettingData struct {
    61  	ElementName string `xml:"ElementName" json:"elementName"`
    62  	InstanceID  string `xml:"InstanceID" json:"instanceID"`
    63  
    64  	AutomaticRecoveryAction              *uint8   `xml:"AutomaticRecoveryAction" json:"automaticRecoveryAction,omitempty"`
    65  	AutomaticShutdownAction              *uint8   `xml:"AutomaticShutdownAction" json:"automaticShutdownAction,omitempty"`
    66  	AutomaticStartupAction               *uint8   `xml:"AutomaticStartupAction" json:"automaticStartupAction,omitempty"`
    67  	AutomaticStartupActionDelay          *string  `xml:"AutomaticStartupActionDelay>Interval" json:"automaticStartupActionDelay,omitempty"`
    68  	AutomaticStartupActionSequenceNumber *uint16  `xml:"AutomaticStartupActionSequenceNumber" json:"automaticStartupActionSequenceNumber,omitempty"`
    69  	Caption                              *string  `xml:"Caption" json:"caption,omitempty"`
    70  	ConfigurationDataRoot                *string  `xml:"ConfigurationDataRoot" json:"configurationDataRoot,omitempty"`
    71  	ConfigurationFile                    *string  `xml:"ConfigurationFile" json:"configurationFile,omitempty"`
    72  	ConfigurationID                      *string  `xml:"ConfigurationID" json:"configurationID,omitempty"`
    73  	CreationTime                         *string  `xml:"CreationTime" json:"creationTime,omitempty"`
    74  	Description                          *string  `xml:"Description" json:"description,omitempty"`
    75  	LogDataRoot                          *string  `xml:"LogDataRoot" json:"logDataRoot,omitempty"`
    76  	Notes                                []string `xml:"Notes" json:"notes,omitempty"`
    77  	RecoveryFile                         *string  `xml:"RecoveryFile" json:"recoveryFile,omitempty"`
    78  	SnapshotDataRoot                     *string  `xml:"SnapshotDataRoot" json:"snapshotDataRoot,omitempty"`
    79  	SuspendDataRoot                      *string  `xml:"SuspendDataRoot" json:"suspendDataRoot,omitempty"`
    80  	SwapFileDataRoot                     *string  `xml:"SwapFileDataRoot" json:"swapFileDataRoot,omitempty"`
    81  	VirtualSystemIdentifier              *string  `xml:"VirtualSystemIdentifier" json:"virtualSystemIdentifier,omitempty"`
    82  	VirtualSystemType                    *string  `xml:"VirtualSystemType" json:"virtualSystemType,omitempty"`
    83  }
    84  
    85  /*
    86  Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_ResourceAllocationSettingData.xsd
    87  */
    88  
    89  type CIMResourceAllocationSettingData struct {
    90  	ElementName string `xml:"ElementName" json:"elementName,omitempty"`
    91  	InstanceID  string `xml:"InstanceID" json:"instanceID,omitempty"`
    92  
    93  	ResourceType      *CIMResourceType `xml:"ResourceType" json:"resourceType,omitempty"`
    94  	OtherResourceType *string          `xml:"OtherResourceType" json:"otherResourceType,omitempty"`
    95  	ResourceSubType   *string          `xml:"ResourceSubType" json:"resourceSubType,omitempty"`
    96  
    97  	AddressOnParent       *string  `xml:"AddressOnParent" json:"addressOnParent,omitempty"`
    98  	Address               *string  `xml:"Address" json:"address,omitempty"`
    99  	AllocationUnits       *string  `xml:"AllocationUnits" json:"allocationUnits,omitempty"`
   100  	AutomaticAllocation   *bool    `xml:"AutomaticAllocation" json:"automaticAllocation,omitempty"`
   101  	AutomaticDeallocation *bool    `xml:"AutomaticDeallocation" json:"automaticDeallocation,omitempty"`
   102  	Caption               *string  `xml:"Caption" json:"caption,omitempty"`
   103  	Connection            []string `xml:"Connection" json:"connection,omitempty"`
   104  	ConsumerVisibility    *uint16  `xml:"ConsumerVisibility" json:"consumerVisibility,omitempty"`
   105  	Description           *string  `xml:"Description" json:"description,omitempty"`
   106  	HostResource          []string `xml:"HostResource" json:"hostResource,omitempty"`
   107  	Limit                 *uint64  `xml:"Limit" json:"limit,omitempty"`
   108  	MappingBehavior       *uint    `xml:"MappingBehavior" json:"mappingBehavior,omitempty"`
   109  	Parent                *string  `xml:"Parent" json:"parent,omitempty"`
   110  	PoolID                *string  `xml:"PoolID" json:"poolID,omitempty"`
   111  	Reservation           *uint64  `xml:"Reservation" json:"reservation,omitempty"`
   112  	VirtualQuantity       *uint    `xml:"VirtualQuantity" json:"virtualQuantity,omitempty"`
   113  	VirtualQuantityUnits  *string  `xml:"VirtualQuantityUnits" json:"virtualQuantityUnits,omitempty"`
   114  	Weight                *uint    `xml:"Weight" json:"weight,omitempty"`
   115  }
   116  
   117  /*
   118  Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_StorageAllocationSettingData.xsd
   119  */
   120  type CIMStorageAllocationSettingData struct {
   121  	ElementName string `xml:"ElementName" json:"elementName"`
   122  	InstanceID  string `xml:"InstanceID" json:"instanceID"`
   123  
   124  	ResourceType      *CIMResourceType `xml:"ResourceType" json:"resourceType,omitempty"`
   125  	OtherResourceType *string          `xml:"OtherResourceType" json:"otherResourceType,omitempty"`
   126  	ResourceSubType   *string          `xml:"ResourceSubType" json:"resourceSubType,omitempty"`
   127  
   128  	Access                       *uint16         `xml:"Access" json:"access,omitempty"`
   129  	Address                      *string         `xml:"Address" json:"address,omitempty"`
   130  	AddressOnParent              *string         `xml:"AddressOnParent" json:"addressOnParent,omitempty"`
   131  	AllocationUnits              *string         `xml:"AllocationUnits" json:"allocationUnits,omitempty"`
   132  	AutomaticAllocation          *bool           `xml:"AutomaticAllocation" json:"automaticAllocation,omitempty"`
   133  	AutomaticDeallocation        *bool           `xml:"AutomaticDeallocation" json:"automaticDeallocation,omitempty"`
   134  	Caption                      *string         `xml:"Caption" json:"caption,omitempty"`
   135  	ChangeableType               *uint16         `xml:"ChangeableType" json:"changeableType,omitempty"`
   136  	ComponentSetting             []types.AnyType `xml:"ComponentSetting" json:"componentSetting,omitempty"`
   137  	ConfigurationName            *string         `xml:"ConfigurationName" json:"configurationName,omitempty"`
   138  	Connection                   []string        `xml:"Connection" json:"connection,omitempty"`
   139  	ConsumerVisibility           *uint16         `xml:"ConsumerVisibility" json:"consumerVisibility,omitempty"`
   140  	Description                  *string         `xml:"Description" json:"description,omitempty"`
   141  	Generation                   *uint64         `xml:"Generation" json:"generation,omitempty"`
   142  	HostExtentName               *string         `xml:"HostExtentName" json:"hostExtentName,omitempty"`
   143  	HostExtentNameFormat         *uint16         `xml:"HostExtentNameFormat" json:"hostExtentNameFormat,omitempty"`
   144  	HostExtentNameNamespace      *uint16         `xml:"HostExtentNameNamespace" json:"hostExtentNameNamespace,omitempty"`
   145  	HostExtentStartingAddress    *uint64         `xml:"HostExtentStartingAddress" json:"hostExtentStartingAddress,omitempty"`
   146  	HostResource                 []string        `xml:"HostResource" json:"hostResource,omitempty"`
   147  	HostResourceBlockSize        *uint64         `xml:"HostResourceBlockSize" json:"hostResourceBlockSize,omitempty"`
   148  	Limit                        *uint64         `xml:"Limit" json:"limit,omitempty"`
   149  	MappingBehavior              *uint           `xml:"MappingBehavior" json:"mappingBehavior,omitempty"`
   150  	OtherHostExtentNameFormat    *string         `xml:"OtherHostExtentNameFormat" json:"otherHostExtentNameFormat,omitempty"`
   151  	OtherHostExtentNameNamespace *string         `xml:"OtherHostExtentNameNamespace" json:"otherHostExtentNameNamespace,omitempty"`
   152  	Parent                       *string         `xml:"Parent" json:"parent,omitempty"`
   153  	PoolID                       *string         `xml:"PoolID" json:"poolID,omitempty"`
   154  	Reservation                  *uint64         `xml:"Reservation" json:"reservation,omitempty"`
   155  	SoID                         *string         `xml:"SoID" json:"soID,omitempty"`
   156  	SoOrgID                      *string         `xml:"SoOrgID" json:"soOrgID,omitempty"`
   157  	VirtualQuantity              *uint           `xml:"VirtualQuantity" json:"virtualQuantity,omitempty"`
   158  	VirtualQuantityUnits         *string         `xml:"VirtualQuantityUnits" json:"virtualQuantityUnits,omitempty"`
   159  	VirtualResourceBlockSize     *uint64         `xml:"VirtualResourceBlockSize" json:"virtualResourceBlockSize,omitempty"`
   160  	Weight                       *uint           `xml:"Weight" json:"weight,omitempty"`
   161  }