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.VapiInterfaceThe
VMclass 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.VapiStructThe
VM.FilterSpecclass contains Status used to filter the results when listing virtual machines (seeVM.list()). This class was added in vSphere API 6.7Tip
The arguments are used to initialize data attributes with the same names.
-
class
Info(vm_home=None, disks=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStructProvides 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.EnumThe {\@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 theVM.FilterSpecan empty List is returned. Virtual machines without storage policy association are not returned. This method was added in vSphere API 6.7Parameters: filter ( VM.FilterSpec) – compliance status of matching virtual machines for which information should be returned.Return type: dictofstrandVM.InfoReturns: compliance information about virtual machines matching the filter VM.FilterSpec. The key in the return valuedictwill be an identifier for the resource type:VirtualMachine.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 theVM.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 does not have the required privileges.Raise: com.vmware.vapi.std.errors_client.Unsupportedif the API is invoked against vCenter Server version is less than 6.5Raise: com.vmware.vapi.std.errors_client.UnableToAllocateResourceIf more than 1000 results match theVM.FilterSpec
-
class