mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-30 17:45:23 +00:00
2a151699f1
Instead of just reporting that a task failed get the localized message from the TaskInfo error and include it in the reported error message. Implement minimal deserialization support for the MethodFault type in order to obtain the actual fault type. For example, this changes the reported error message when trying to create a volume with zero size from Could not create volume to Could not create volume: InvalidArgument - A specified parameter was not correct. Not perfect yet, but better than before.
901 lines
32 KiB
Plaintext
901 lines
32 KiB
Plaintext
#
|
|
# Definitions of vSphere API 2.5 enumeration and objects types used as input
|
|
# for the esx_vi_generator.py script.
|
|
#
|
|
# This format is line-based, so end-of-line is important.
|
|
#
|
|
#
|
|
# Enumeration definition:
|
|
#
|
|
# enum <name>
|
|
# <value>
|
|
# ...
|
|
# end
|
|
#
|
|
#
|
|
# Object definition:
|
|
#
|
|
# object <name> [extends <name>]
|
|
# <type> <name> <occurrence>
|
|
# ...
|
|
# end
|
|
#
|
|
# Possible values for the <occurrence> field are:
|
|
#
|
|
# - r for a required item
|
|
# - rl for a required list
|
|
# - o for an optional item
|
|
# - ol for an optional list
|
|
# - i for an ignored item or list
|
|
#
|
|
# Object member sequence has to match the WSDL sequence.
|
|
#
|
|
#
|
|
# Method definition:
|
|
#
|
|
# method <name> [returns <type> <occurrence>]
|
|
# <type> <name> <occurrence>
|
|
# ...
|
|
# end
|
|
#
|
|
# The _this parameter can have a type attached to it:
|
|
#
|
|
# _this:<type>
|
|
#
|
|
# The <type> refers to one of the ServiceContent members. This make the
|
|
# generator auto-bind _this to the corresponding ServiceContent member.
|
|
#
|
|
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
# Enumerations
|
|
#
|
|
|
|
enum ManagedEntityStatus
|
|
gray
|
|
green
|
|
yellow
|
|
red
|
|
end
|
|
|
|
|
|
enum ObjectUpdateKind
|
|
modify
|
|
enter
|
|
leave
|
|
end
|
|
|
|
|
|
enum PerfStatsType
|
|
absolute
|
|
delta
|
|
rate
|
|
end
|
|
|
|
|
|
enum PerfSummaryType
|
|
average
|
|
maximum
|
|
minimum
|
|
latest
|
|
summation
|
|
none
|
|
end
|
|
|
|
|
|
enum PropertyChangeOp
|
|
add
|
|
remove
|
|
assign
|
|
indirectRemove
|
|
end
|
|
|
|
|
|
enum SharesLevel
|
|
low
|
|
normal
|
|
high
|
|
custom
|
|
end
|
|
|
|
|
|
enum TaskInfoState
|
|
queued
|
|
running
|
|
success
|
|
error
|
|
end
|
|
|
|
|
|
enum VirtualMachineMovePriority
|
|
lowPriority
|
|
highPriority
|
|
defaultPriority
|
|
end
|
|
|
|
|
|
enum VirtualMachinePowerState
|
|
poweredOff
|
|
poweredOn
|
|
suspended
|
|
end
|
|
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
# Objects
|
|
#
|
|
|
|
object AboutInfo
|
|
String name r
|
|
String fullName r
|
|
String vendor r
|
|
String version r
|
|
String build r
|
|
String localeVersion o
|
|
String localeBuild o
|
|
String osType r
|
|
String productLineId r
|
|
String apiType r
|
|
String apiVersion r
|
|
end
|
|
|
|
|
|
object ChoiceOption extends OptionType
|
|
ElementDescription choiceInfo rl
|
|
Int defaultIndex o
|
|
end
|
|
|
|
|
|
object DatastoreHostMount
|
|
ManagedObjectReference key r
|
|
HostMountInfo mountInfo r
|
|
end
|
|
|
|
|
|
object DatastoreInfo
|
|
String name r
|
|
String url r
|
|
Long freeSpace r
|
|
Long maxFileSize r
|
|
end
|
|
|
|
|
|
object Description
|
|
String label r
|
|
String summary r
|
|
end
|
|
|
|
|
|
object DeviceBackedVirtualDiskSpec extends VirtualDiskSpec
|
|
String device r
|
|
end
|
|
|
|
|
|
object DynamicProperty
|
|
String name r
|
|
AnyType val r
|
|
end
|
|
|
|
|
|
object ElementDescription extends Description
|
|
String key r
|
|
end
|
|
|
|
|
|
object Event
|
|
Int key r
|
|
Int chainId r
|
|
DateTime createdTime r
|
|
String userName r
|
|
DatacenterEventArgument datacenter i
|
|
ComputeResourceEventArgument computeResource i
|
|
HostEventArgument host i
|
|
VmEventArgument vm i
|
|
String fullFormattedMessage o
|
|
end
|
|
|
|
|
|
object FileBackedVirtualDiskSpec extends VirtualDiskSpec
|
|
Long capacityKb r
|
|
end
|
|
|
|
|
|
object FileInfo
|
|
String path r
|
|
Long fileSize o
|
|
DateTime modification o
|
|
end
|
|
|
|
|
|
object FileQuery
|
|
end
|
|
|
|
|
|
object FileQueryFlags
|
|
Boolean fileType r
|
|
Boolean fileSize r
|
|
Boolean modification r
|
|
end
|
|
|
|
|
|
object FloppyImageFileInfo extends FileInfo
|
|
end
|
|
|
|
|
|
object FloppyImageFileQuery extends FileQuery
|
|
end
|
|
|
|
|
|
object FolderFileInfo extends FileInfo
|
|
end
|
|
|
|
|
|
object FolderFileQuery extends FileQuery
|
|
end
|
|
|
|
|
|
object HostCpuIdInfo
|
|
Int level r
|
|
String vendor o
|
|
String eax o
|
|
String ebx o
|
|
String ecx o
|
|
String edx o
|
|
end
|
|
|
|
|
|
object HostDatastoreBrowserSearchResults
|
|
ManagedObjectReference datastore o
|
|
String folderPath o
|
|
FileInfo file ol
|
|
end
|
|
|
|
|
|
object HostDatastoreBrowserSearchSpec
|
|
FileQuery query ol
|
|
FileQueryFlags details o
|
|
Boolean searchCaseInsensitive o
|
|
String matchPattern ol
|
|
Boolean sortFoldersFirst o
|
|
end
|
|
|
|
|
|
object HostFileSystemVolume
|
|
String type r
|
|
String name r
|
|
Long capacity r
|
|
end
|
|
|
|
|
|
object HostMountInfo
|
|
String path o
|
|
String accessMode r
|
|
Boolean accessible o
|
|
end
|
|
|
|
|
|
object HostNasVolume extends HostFileSystemVolume
|
|
String remoteHost r
|
|
String remotePath r
|
|
String userName o
|
|
end
|
|
|
|
|
|
object HostScsiDiskPartition
|
|
String diskName r
|
|
Int partition r
|
|
end
|
|
|
|
|
|
object HostVmfsVolume extends HostFileSystemVolume
|
|
Int blockSizeMb r
|
|
Int maxBlocks r
|
|
Int majorVersion r
|
|
String version r
|
|
String uuid r
|
|
HostScsiDiskPartition extent rl
|
|
Boolean vmfsUpgradable r
|
|
end
|
|
|
|
|
|
object IsoImageFileInfo extends FileInfo
|
|
end
|
|
|
|
|
|
object IsoImageFileQuery extends FileQuery
|
|
end
|
|
|
|
|
|
object LocalDatastoreInfo extends DatastoreInfo
|
|
String path o
|
|
end
|
|
|
|
|
|
object LocalizedMethodFault
|
|
MethodFault fault r
|
|
String localizedMessage o
|
|
end
|
|
|
|
|
|
object NasDatastoreInfo extends DatastoreInfo
|
|
HostNasVolume nas o
|
|
end
|
|
|
|
|
|
object ObjectContent
|
|
ManagedObjectReference obj r
|
|
DynamicProperty propSet ol
|
|
MissingProperty missingSet i
|
|
end
|
|
|
|
|
|
object ObjectSpec
|
|
ManagedObjectReference obj r
|
|
Boolean skip o
|
|
SelectionSpec selectSet ol
|
|
end
|
|
|
|
|
|
object ObjectUpdate
|
|
ObjectUpdateKind kind r
|
|
ManagedObjectReference obj r
|
|
PropertyChange changeSet ol
|
|
MissingProperty missingSet i
|
|
end
|
|
|
|
|
|
object OptionType
|
|
Boolean valueIsReadonly o
|
|
end
|
|
|
|
|
|
object PerfCounterInfo
|
|
Int key r
|
|
ElementDescription nameInfo r
|
|
ElementDescription groupInfo r
|
|
ElementDescription unitInfo r
|
|
PerfSummaryType rollupType r
|
|
PerfStatsType statsType r
|
|
Int level o
|
|
Int associatedCounterId ol
|
|
end
|
|
|
|
|
|
object PerfEntityMetric extends PerfEntityMetricBase
|
|
PerfSampleInfo sampleInfo ol
|
|
PerfMetricSeries value ol
|
|
end
|
|
|
|
|
|
object PerfEntityMetricBase
|
|
ManagedObjectReference entity r
|
|
end
|
|
|
|
|
|
object PerfMetricId
|
|
Int counterId r
|
|
String instance r
|
|
end
|
|
|
|
|
|
object PerfMetricIntSeries extends PerfMetricSeries
|
|
Long value ol
|
|
end
|
|
|
|
|
|
object PerfMetricSeries
|
|
PerfMetricId id r
|
|
end
|
|
|
|
|
|
object PerfQuerySpec
|
|
ManagedObjectReference entity r
|
|
DateTime startTime o
|
|
DateTime endTime o
|
|
Int maxSample o
|
|
PerfMetricId metricId ol
|
|
Int intervalId o
|
|
String format o
|
|
end
|
|
|
|
|
|
object PerfSampleInfo
|
|
DateTime timestamp r
|
|
Int interval r
|
|
end
|
|
|
|
|
|
object PropertyChange
|
|
String name r
|
|
PropertyChangeOp op r
|
|
AnyType val o
|
|
end
|
|
|
|
|
|
object PropertyFilterSpec
|
|
PropertySpec propSet rl
|
|
ObjectSpec objectSet rl
|
|
end
|
|
|
|
|
|
object PropertyFilterUpdate
|
|
ManagedObjectReference filter r
|
|
ObjectUpdate objectSet ol
|
|
MissingObject missingSet i
|
|
end
|
|
|
|
|
|
object PropertySpec
|
|
String type r
|
|
Boolean all o
|
|
String pathSet ol
|
|
end
|
|
|
|
|
|
object ResourceAllocationInfo
|
|
Long reservation o
|
|
Boolean expandableReservation o
|
|
Long limit o
|
|
SharesInfo shares o
|
|
Long overheadLimit o
|
|
end
|
|
|
|
|
|
object ResourcePoolResourceUsage
|
|
Long reservationUsed r
|
|
Long reservationUsedForVm r
|
|
Long unreservedForPool r
|
|
Long unreservedForVm r
|
|
Long overallUsage r
|
|
Long maxUsage r
|
|
end
|
|
|
|
|
|
object SelectionSpec
|
|
String name o
|
|
end
|
|
|
|
|
|
object ServiceContent
|
|
ManagedObjectReference rootFolder r
|
|
ManagedObjectReference propertyCollector r
|
|
ManagedObjectReference viewManager o
|
|
AboutInfo about r
|
|
ManagedObjectReference setting o
|
|
ManagedObjectReference userDirectory o
|
|
ManagedObjectReference sessionManager o
|
|
ManagedObjectReference authorizationManager o
|
|
ManagedObjectReference perfManager o
|
|
ManagedObjectReference scheduledTaskManager o
|
|
ManagedObjectReference alarmManager o
|
|
ManagedObjectReference eventManager o
|
|
ManagedObjectReference taskManager o
|
|
ManagedObjectReference extensionManager o
|
|
ManagedObjectReference customizationSpecManager o
|
|
ManagedObjectReference customFieldsManager o
|
|
ManagedObjectReference accountManager o
|
|
ManagedObjectReference diagnosticManager o
|
|
ManagedObjectReference licenseManager o
|
|
ManagedObjectReference searchIndex o
|
|
ManagedObjectReference fileManager o
|
|
ManagedObjectReference virtualDiskManager o
|
|
ManagedObjectReference virtualizationManager o
|
|
end
|
|
|
|
|
|
object SharesInfo
|
|
Int shares r
|
|
SharesLevel level r
|
|
end
|
|
|
|
|
|
object TaskInfo
|
|
String key r
|
|
ManagedObjectReference task r
|
|
String name o
|
|
String descriptionId r
|
|
ManagedObjectReference entity o
|
|
String entityName o
|
|
ManagedObjectReference locked ol
|
|
TaskInfoState state r
|
|
Boolean cancelled r
|
|
Boolean cancelable r
|
|
LocalizedMethodFault error o
|
|
AnyType result o
|
|
Int progress o
|
|
TaskReason reason i
|
|
DateTime queueTime r
|
|
DateTime startTime o
|
|
DateTime completeTime o
|
|
Int eventChainId r
|
|
end
|
|
|
|
|
|
object TemplateConfigFileInfo extends VmConfigFileInfo
|
|
end
|
|
|
|
|
|
object TemplateConfigFileQuery extends VmConfigFileQuery
|
|
end
|
|
|
|
|
|
object TraversalSpec extends SelectionSpec
|
|
String type r
|
|
String path r
|
|
Boolean skip o
|
|
SelectionSpec selectSet ol
|
|
end
|
|
|
|
|
|
object UpdateSet
|
|
String version r
|
|
PropertyFilterUpdate filterSet ol
|
|
end
|
|
|
|
|
|
object UserSession
|
|
String key r
|
|
String userName r
|
|
String fullName r
|
|
DateTime loginTime r
|
|
DateTime lastActiveTime r
|
|
String locale r
|
|
String messageLocale r
|
|
end
|
|
|
|
|
|
object VirtualDiskSpec
|
|
String diskType r
|
|
String adapterType r
|
|
end
|
|
|
|
|
|
object VirtualMachineConfigSpec
|
|
String changeVersion o
|
|
String name o
|
|
String version o
|
|
String uuid o
|
|
Long npivNodeWorldWideName ol
|
|
Long npivPortWorldWideName ol
|
|
String npivWorldWideNameType o
|
|
String npivWorldWideNameOp o
|
|
String locationId o
|
|
String guestId o
|
|
String alternateGuestName o
|
|
String annotation o
|
|
VirtualMachineFileInfo files i
|
|
ToolsConfigInfo tools i
|
|
VirtualMachineFlagInfo flags i
|
|
VirtualMachineConsolePreferences consolePreferences i
|
|
VirtualMachineDefaultPowerOpInfo powerOpInfo i
|
|
Int numCPUs o
|
|
Long memoryMB o
|
|
VirtualDeviceConfigSpec deviceChange i
|
|
ResourceAllocationInfo cpuAllocation o
|
|
ResourceAllocationInfo memoryAllocation o
|
|
VirtualMachineAffinityInfo cpuAffinity i
|
|
VirtualMachineAffinityInfo memoryAffinity i
|
|
VirtualMachineNetworkShaperInfo networkShaper i
|
|
VirtualMachineCpuIdInfoSpec cpuFeatureMask i
|
|
OptionValue extraConfig i
|
|
String swapPlacement o
|
|
VirtualMachineBootOptions bootOptions i
|
|
end
|
|
|
|
|
|
object VirtualMachineQuestionInfo
|
|
String id r
|
|
String text r
|
|
ChoiceOption choice r
|
|
VirtualMachineMessage message i
|
|
end
|
|
|
|
|
|
object VirtualMachineSnapshotTree
|
|
ManagedObjectReference snapshot r
|
|
ManagedObjectReference vm r
|
|
String name r
|
|
String description r
|
|
DateTime createTime r
|
|
VirtualMachinePowerState state r
|
|
Boolean quiesced r
|
|
VirtualMachineSnapshotTree childSnapshotList ol
|
|
end
|
|
|
|
|
|
object VmConfigFileInfo extends FileInfo
|
|
Int configVersion o
|
|
end
|
|
|
|
|
|
object VmConfigFileQuery extends FileQuery
|
|
VmConfigFileQueryFilter filter o
|
|
VmConfigFileQueryFlags details o
|
|
end
|
|
|
|
|
|
object VmConfigFileQueryFilter
|
|
Int matchConfigVersion ol
|
|
end
|
|
|
|
|
|
object VmConfigFileQueryFlags
|
|
Boolean configVersion r
|
|
end
|
|
|
|
|
|
object VmDiskFileInfo extends FileInfo
|
|
String diskType o
|
|
Long capacityKb o
|
|
Int hardwareVersion o
|
|
String controllerType o
|
|
String diskExtents ol
|
|
end
|
|
|
|
|
|
object VmDiskFileQuery extends FileQuery
|
|
VmDiskFileQueryFilter filter o
|
|
VmDiskFileQueryFlags details o
|
|
end
|
|
|
|
|
|
object VmDiskFileQueryFilter
|
|
String diskType ol
|
|
Int matchHardwareVersion ol
|
|
String controllerType ol
|
|
end
|
|
|
|
|
|
object VmDiskFileQueryFlags
|
|
Boolean diskType r
|
|
Boolean capacityKb r
|
|
Boolean hardwareVersion r
|
|
Boolean controllerType o
|
|
Boolean diskExtents o
|
|
end
|
|
|
|
|
|
object VmLogFileInfo extends FileInfo
|
|
end
|
|
|
|
|
|
object VmLogFileQuery extends FileQuery
|
|
end
|
|
|
|
|
|
object VmNvramFileInfo extends FileInfo
|
|
end
|
|
|
|
|
|
object VmNvramFileQuery extends FileQuery
|
|
end
|
|
|
|
|
|
object VmSnapshotFileInfo extends FileInfo
|
|
end
|
|
|
|
|
|
object VmSnapshotFileQuery extends FileQuery
|
|
end
|
|
|
|
|
|
object VmfsDatastoreInfo extends DatastoreInfo
|
|
HostVmfsVolume vmfs o
|
|
end
|
|
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
# Methods
|
|
#
|
|
|
|
method AnswerVM
|
|
ManagedObjectReference _this r
|
|
String questionId r
|
|
String answerChoice r
|
|
end
|
|
|
|
|
|
method CancelTask
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method CreateFilter returns ManagedObjectReference r
|
|
ManagedObjectReference _this:PropertyCollector r
|
|
PropertyFilterSpec spec r
|
|
Boolean partialUpdates r
|
|
end
|
|
|
|
|
|
method CreateSnapshot_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
String name r
|
|
String description o
|
|
Boolean memory r
|
|
Boolean quiesce r
|
|
end
|
|
|
|
|
|
method CreateVirtualDisk_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this:VirtualDiskManager r
|
|
String name r
|
|
ManagedObjectReference datacenter o
|
|
VirtualDiskSpec spec r
|
|
end
|
|
|
|
|
|
method DestroyPropertyFilter
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method FindByIp returns ManagedObjectReference o
|
|
ManagedObjectReference _this:SearchIndex r
|
|
ManagedObjectReference datacenter o
|
|
String ip r
|
|
Boolean vmSearch r
|
|
end
|
|
|
|
|
|
method FindByUuid returns ManagedObjectReference o
|
|
ManagedObjectReference _this:SearchIndex r
|
|
ManagedObjectReference datacenter o
|
|
String uuid r
|
|
Boolean vmSearch r
|
|
end
|
|
|
|
|
|
method Login returns UserSession r
|
|
ManagedObjectReference _this:SessionManager r
|
|
String userName r
|
|
String password r
|
|
String locale o
|
|
end
|
|
|
|
|
|
method Logout
|
|
ManagedObjectReference _this:SessionManager r
|
|
end
|
|
|
|
|
|
method MakeDirectory
|
|
ManagedObjectReference _this:FileManager r
|
|
String name r
|
|
ManagedObjectReference datacenter o
|
|
Boolean createParentDirectories o
|
|
end
|
|
|
|
|
|
method MigrateVM_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
ManagedObjectReference pool o
|
|
ManagedObjectReference host o
|
|
VirtualMachineMovePriority priority r
|
|
VirtualMachinePowerState state o
|
|
end
|
|
|
|
|
|
method PowerOffVM_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method PowerOnVM_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
ManagedObjectReference host o
|
|
end
|
|
|
|
|
|
method QueryAvailablePerfMetric returns PerfMetricId ol
|
|
ManagedObjectReference _this:PerformanceManager r
|
|
ManagedObjectReference entity r
|
|
DateTime beginTime o
|
|
DateTime endTime o
|
|
Int intervalId o
|
|
end
|
|
|
|
|
|
method QueryPerf returns PerfEntityMetricBase ol
|
|
ManagedObjectReference _this:PerformanceManager r
|
|
PerfQuerySpec querySpec rl
|
|
end
|
|
|
|
|
|
method QueryPerfCounter returns PerfCounterInfo ol
|
|
ManagedObjectReference _this:PerformanceManager r
|
|
Int counterId rl
|
|
end
|
|
|
|
|
|
method QueryVirtualDiskUuid returns String r
|
|
ManagedObjectReference _this:VirtualDiskManager r
|
|
String name r
|
|
ManagedObjectReference datacenter o
|
|
end
|
|
|
|
|
|
method RebootGuest
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method ReconfigVM_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
VirtualMachineConfigSpec spec r
|
|
end
|
|
|
|
|
|
method RefreshDatastore
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method RegisterVM_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
String path r
|
|
String name o
|
|
Boolean asTemplate r
|
|
ManagedObjectReference pool o
|
|
ManagedObjectReference host o
|
|
end
|
|
|
|
|
|
method RemoveSnapshot_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
Boolean removeChildren r
|
|
end
|
|
|
|
|
|
method RetrieveProperties returns ObjectContent ol
|
|
ManagedObjectReference _this:PropertyCollector r
|
|
PropertyFilterSpec specSet rl
|
|
end
|
|
|
|
|
|
method RevertToSnapshot_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
ManagedObjectReference host o
|
|
end
|
|
|
|
|
|
method SearchDatastoreSubFolders_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
String datastorePath r
|
|
HostDatastoreBrowserSearchSpec searchSpec o
|
|
end
|
|
|
|
|
|
method SearchDatastore_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
String datastorePath r
|
|
HostDatastoreBrowserSearchSpec searchSpec o
|
|
end
|
|
|
|
|
|
method SessionIsActive returns Boolean r
|
|
ManagedObjectReference _this:SessionManager r
|
|
String sessionID r
|
|
String userName r
|
|
end
|
|
|
|
|
|
method ShutdownGuest
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method SuspendVM_Task returns ManagedObjectReference r
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method UnregisterVM
|
|
ManagedObjectReference _this r
|
|
end
|
|
|
|
|
|
method WaitForUpdates returns UpdateSet r
|
|
ManagedObjectReference _this:PropertyCollector r
|
|
String version o
|
|
end
|