com.vmware.vcenter.storage package

Submodules

com.vmware.vcenter.storage.policies_client module

class com.vmware.vcenter.storage.policies_client.Compliance(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Compliance class provides methods related to all the associated entities of given compliance statuses. This class was added in vSphere API 6.7

class FilterSpec(status=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Compliance.FilterSpec class contains complianceStatus used to filter the results when listing entities (see Compliance.list()). 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

This 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.

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.VapiStruct

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

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:list of Compliance.Summary
Returns:compliance information about entities matching the filter Compliance.FilterSpec.
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 Compliance.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 doesn’t have the required privileges.
class com.vmware.vcenter.storage.policies_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

class com.vmware.vcenter.storage.policies_client.VM(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The VM class provides methods managing the storage policy association for a virtual machine and its virtual disks. This class was added in vSphere API 6.7

class Info(vm_home=None, disks=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The VM.Info class 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.

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:dict of str and VM.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 dict will be an identifier for the resource type: VirtualMachine.
Raise:com.vmware.vapi.std.errors_client.NotFound if there is no policy associated with policy in the system.
Raise:com.vmware.vapi.std.errors_client.UnableToAllocateResource if more than 1000 virtual machines are associated with the specified policy.
Raise:com.vmware.vapi.std.errors_client.Unauthenticated if the user cannot be authenticated.
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.Error if the backend server encounters some an error while processing the request.
Raise:com.vmware.vapi.std.errors_client.Unauthorized if the user does not have the required priveleges.