com.vmware.vcenter.storage.policies package

Submodules

com.vmware.vcenter.storage.policies.compliance_client module

class com.vmware.vcenter.storage.policies.compliance_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

class com.vmware.vcenter.storage.policies.compliance_client.VM(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The VM class provides methods related to query virtual machines of given compliance statuses. This class was added in vSphere API 6.7

class FilterSpec(status=None, vms=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The VM.FilterSpec class contains Status used to filter the results when listing virtual machines (see VM.list()). This class was added in vSphere API 6.7

Tip

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

class Info(vm_home=None, disks=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Provides the compliance 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.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The {\@Status} class defines he valid compliance status values for a virtual machine or virtual disk. 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')

The virtual machine or virtual disk is in compliance. This class attribute was added in vSphere API 6.7

NON_COMPLIANT = Status(string='NON_COMPLIANT')

The virtual machine or virtual disk is in not in compliance. This class attribute was added in vSphere API 6.7

NOT_APPLICABLE = Status(string='NOT_APPLICABLE')

Compliance computation is not applicable for this virtual machine or disk 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 virtual machine or disk is edited and not applied. The compliance status will remain out of date until the latest policy is applied. This class attribute was added in vSphere API 6.7

UNKNOWN_COMPLIANCE = Status(string='UNKNOWN_COMPLIANCE')

Compliance status of the virtual machine or virtual disk is not known. This class attribute was added in vSphere API 6.7

list(filter)

Returns compliance information about at most 1000 virtual machines matching the filter VM.FilterSpec. If there are no virtual machines matching the VM.FilterSpec an empty List is returned. Virtual machines without storage policy association are not returned. This method was added in vSphere API 6.7

Parameters:filter (VM.FilterSpec) – compliance status of matching virtual machines for which information should be returned.
Return type:dict of str and VM.Info
Returns:compliance information about virtual machines matching the filter VM.FilterSpec. The key in the return value dict will be an identifier for the resource type: VirtualMachine.
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.InvalidArgument if the VM.FilterSpec.status attribute contains a value that is not supported by the server.
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 can not be authenticated.
Raise:com.vmware.vapi.std.errors_client.Unauthorized if the user does not have the required privileges.
Raise:com.vmware.vapi.std.errors_client.Unsupported if the API is invoked against vCenter Server version is less than 6.5
Raise:com.vmware.vapi.std.errors_client.UnableToAllocateResource If more than 1000 results match the VM.FilterSpec