com.vmware.vcenter.storage package¶
Subpackages¶
Submodules¶
com.vmware.vcenter.storage.policies_client module¶
-
class
com.vmware.vcenter.storage.policies_client.Compliance(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe Compliance class provides methods related to all the associated entities of given compliance statuses. This class was added in vSphere API 6.7.
- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
FilterSpec(status=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
Compliance.FilterSpecclass contains complianceStatus used to filter the results when listing entities (seeCompliance.list()). This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
status (
setofCompliance.Status) – Compliance Status that a virtual machine must have to match the filter. This attribute was added in vSphere API 6.7.
-
class
Status(string)¶ Bases:
vmware.vapi.bindings.enum.EnumThis enumeration defines the set of status values for a compliance operation. This enumeration was added in vSphere API 6.7.
Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str) – String value for theStatusinstance.
-
COMPLIANT= Status(string='COMPLIANT')¶ Entity is in compliance. This class attribute was added in vSphere API 6.7.
-
NON_COMPLIANT= Status(string='NON_COMPLIANT')¶ Entity is out of compliance. This class attribute was added in vSphere API 6.7.
-
NOT_APPLICABLE= Status(string='NOT_APPLICABLE')¶ Compliance computation is not applicable for this entity because it does not have any storage requirement that apply to the object-based datastore on which the entity is placed. This class attribute was added in vSphere API 6.7.
-
OUT_OF_DATE= Status(string='OUT_OF_DATE')¶ Compliance status becomes out of date when the profile associated with the entity is edited and not applied. The compliance status will remain out of date until the latest policy is applied to the entity. This class attribute was added in vSphere API 6.7.
-
UNKNOWN= Status(string='UNKNOWN')¶ Compliance status of the entity is not known. This class attribute was added in vSphere API 6.7.
-
class
Summary(vm=None, vm_home=None, disks=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructProvides the details of a virtual machine and its associated entities which match the given compliance statuses. This class was added in vSphere API 6.7.
Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vm (
str) – Identifier of virtual machine. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:VirtualMachine. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:VirtualMachine.vm_home (
Compliance.StatusorNone) – Compliance status of the virtual machine home. This attribute was added in vSphere API 6.7. If None or empty, vmHome is not associated with a storage policy.disks ((
dictofstrandCompliance.Status) orNone) – List of the virtual hard disk. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the key in the attributedictmust be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk. When methods return a value of this class as a return value, the key in the attributedictwill be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk. If None or empty, virtual machine entity does not have any disks or its disks are not associated with a storage policy.
-
list(filter)¶ Returns compliance information about entities matching the filter
Compliance.FilterSpec. Entities without storage policy association are not returned. This method was added in vSphere API 6.7.- Parameters
filter (
Compliance.FilterSpec) – compliance status of matching entities for which information should be returned.- Return type
- Returns
compliance information about entities matching the filter
Compliance.FilterSpec.- Raise
com.vmware.vapi.std.errors_client.Errorif the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.InvalidArgumentif theCompliance.FilterSpec.statusattribute contains a value that is not supported by the server.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorizedif the user doesn’t have the required privileges.
-
class
com.vmware.vcenter.storage.policies_client.StubFactory(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBaseInitialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
-
class
com.vmware.vcenter.storage.policies_client.VM(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterfaceThe
VMclass provides methods managing the storage policy association for a virtual machine and its virtual disks. This class was added in vSphere API 6.7.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
-
class
Info(vm_home=None, disks=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructThe
VM.Infoclass contains information about a virtual machine and its virtual disks that are associated with the given storage policy. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vm_home (
bool) – Flag to indicate whether or not the virtual machine home is associated with the given storage policy. This attribute was added in vSphere API 6.7.disks (
listofstr) – List of the virtual disks that are associated with the given storage policy. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.vm.hardware.Disk. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.vm.hardware.Disk.
-
list(policy)¶ Returns information about the virtual machines and/or their virtual disks that are associated with the given storage policy. This method was added in vSphere API 6.7.
- Parameters
policy (
str) – storage policy identifier. The parameter must be an identifier for the resource type:com.vmware.vcenter.StoragePolicy.- Return type
dictofstrandVM.Info- Returns
Information about the virtual machines and/or their virtual disks that are associated with the given storage policy. The key in the return value
dictwill be an identifier for the resource type:VirtualMachine.- Raise
com.vmware.vapi.std.errors_client.NotFoundif there is no policy associated withpolicyin the system.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResourceif more than 1000 virtual machines are associated with the specified policy.- Raise
com.vmware.vapi.std.errors_client.Unauthenticatedif the user cannot be authenticated.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailableif the system is unable to communicate with a service necessary to complete the request.- Raise
com.vmware.vapi.std.errors_client.Errorif the backend server encounters some an error while processing the request.- Raise
com.vmware.vapi.std.errors_client.Unauthorizedif the user does not have the required priveleges.