com.vmware.vcenter.vm.storage package

Submodules

com.vmware.vcenter.vm.storage.policy_client module

class com.vmware.vcenter.vm.storage.policy_client.Compliance(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Compliance class provides methods that return the compliance status of virtual machine entities(virtual machine home directory and virtual disks) that specify storage policy requirements. This class was added in vSphere API 6.7

class CheckSpec(vm_home=None, disks=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Compliance.CheckSpec class contains attributes used to specify the entities on which the storage policy compliance check is to be invoked. This class was added in vSphere API 6.7

Tip

The arguments are used to initialize data attributes with the same names.

class Info(overall_compliance=None, vm_home=None, disks=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Compliance.Info class contains information about the storage policy compliance of a virtual machine, including information about it’s home directory and/or it’s virtual disks. This class was added in vSphere API 6.7

Tip

The arguments are used to initialize data attributes with the same names.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The Compliance.Status class defines the storage compliance status of a virtual machine and its applicable entities. 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.

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 requirements that apply to the datastore on which it is placed. This class attribute was added in vSphere API 6.7

OUT_OF_DATE = Status(string='OUT_OF_DATE')

The Compliance status becomes out-of-date when the profile associated with the entity is edited but not applied. The compliance status remains out-of-date until the edited policy is applied to the entity. This class attribute was added in vSphere API 6.7

UNKNOWN_COMPLIANCE = Status(string='UNKNOWN_COMPLIANCE')

Compliance status of the entity is not known. This class attribute was added in vSphere API 6.7

class VmComplianceInfo(status=None, check_time=None, policy=None, failure_cause=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Compliance.VmComplianceInfo class contains information about storage policy compliance associated with a virtual machine. This class was added in vSphere API 6.7

Tip

The arguments are used to initialize data attributes with the same names.

check(vm, check_spec=None)

Returns the storage policy Compliance Compliance.Info of a virtual machine after explicitly re-computing compliance check. This method was added in vSphere API 6.7

Parameters:
  • vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
  • check_spec (Compliance.CheckSpec or None) – Parameter specifies the entities on which storage policy compliance check is to be invoked. The storage compliance Info Compliance.Info is returned. If None, the behavior is equivalent to a Compliance.CheckSpec with CheckSpec#vmHome set to true and CheckSpec#disks populated with all disks attached to the virtual machine.
Return type:

Compliance.Info or None

Returns:

Virtual machine storage policy compliance Compliance.Info class . If None, neither the virtual machine home directory nor any of it’s virtual disks are associated with a storage policy.

Raise:

com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service necessary to complete the request.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the user cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have the required privileges.

get(vm)

Returns the cached storage policy compliance information of a virtual machine. This method was added in vSphere API 6.7

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
Return type:Compliance.Info or None
Returns:Virtual machine storage policy compliance Info Compliance.Info. If None, neither the virtual machine home directory nor any of it’s virtual disks are associated with a storage policy.
Raise:com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.
Raise:com.vmware.vapi.std.errors_client.Unauthenticated if the user cannot be authenticated.
Raise:com.vmware.vapi.std.errors_client.Unauthorized if the user does not have the required privileges.
class com.vmware.vcenter.vm.storage.policy_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase