com.vmware.vcenter.compute package

Submodules

com.vmware.vcenter.compute.policies_client module

The com.vmware.vcenter.compute.policies_client module provides classes for managing compute policies.

class com.vmware.vcenter.compute.policies_client.Capabilities(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Capabilities class provides methods to manage compute policy capabilities. The description of the capability provides information about the intent of a policy based on this capability. A capability provides a type to create a policy (see com.vmware.vcenter.compute_client.Policies.create()). A capability also provides a type that describes the information returned when retrieving information about a policy (see com.vmware.vcenter.compute_client.Policies.get()). Warning: This class is available as technical preview. It may be changed in a future release.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(name=None, description=None, create_spec_type=None, info_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Capabilities.Info class contains information about a compute policy capability. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters
  • name (com.vmware.vapi.std_client.LocalizableMessage) – Name of the capability. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • description (com.vmware.vapi.std_client.LocalizableMessage) – Description of the capability. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • create_spec_type (str) – Identifier of the class used to create a policy based on this capability. See com.vmware.vcenter.compute_client.Policies.create(). Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure.

  • info_type (str) – Identifier of the class returned when retrieving information about a policy based on this capability. See com.vmware.vcenter.compute_client.Policies.get(). Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure.

RESOURCE_TYPE = 'com.vmware.vcenter.compute.policies.Capability'

The resource type for the compute policy capability. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class Summary(capability=None, name=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Capabilities.Summary class contains commonly used information about a compute policy capability. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters
  • capability (str) – Identifier of the capability. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.compute.policies.Capability. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.compute.policies.Capability.

  • name (com.vmware.vapi.std_client.LocalizableMessage) – Name of the capability. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • description (com.vmware.vapi.std_client.LocalizableMessage) – Description of the capability. Warning: This attribute is available as technical preview. It may be changed in a future release.

get(capability)

Returns information about a specific compute policy capability. Warning: This method is available as technical preview. It may be changed in a future release.

Parameters

capability (str) – Identifier of the capability for which information should be retrieved. The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.policies.Capability.

Return type

Capabilities.Info

Returns

Detailed information about the capability.

Raise

com.vmware.vapi.std.errors_client.NotFound if a capability with this identifier does not exist.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

list()

Returns information about the compute policy capabilities available in this vCenter server. Warning: This method is available as technical preview. It may be changed in a future release.

Return type

list of Capabilities.Summary

Returns

The list of compute policy capabilities available on this vCenter server.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

class com.vmware.vcenter.compute.policies_client.CreateSpec(name=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CreateSpec class contains common information used to create a new policy. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters
  • name (str) – Name of the policy. The name needs to be unique within this vCenter server. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • description (str) – Description of the policy. Warning: This attribute is available as technical preview. It may be changed in a future release.

class com.vmware.vcenter.compute.policies_client.Info(name=None, description=None, capability=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Info class contains common information about a compute policy. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters
  • name (str) – Name of the policy. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • description (str) – Description of the policy. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • capability (str) – Identifier of the capability this policy is based on. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.compute.policies.Capability. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.compute.policies.Capability.

class com.vmware.vcenter.compute.policies_client.Status(status=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Status class describes the current status of a compute policy. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters

status (Status.Compliance) – The compliance status of the policy on a specified object. Warning: This attribute is available as technical preview. It may be changed in a future release.

class Compliance(string)

Bases: vmware.vapi.bindings.enum.Enum

The Status.Compliance class defines the compliance states a policy can be in on a particular object. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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 the Compliance instance.

COMPLIANT = Compliance(string='COMPLIANT')

The policy is in compliance on the object. Warning: This class attribute is available as technical preview. It may be changed in a future release.

NOT_APPLICABLE = Compliance(string='NOT_APPLICABLE')

The object is in a state for which the policy does not apply. Warning: This class attribute is available as technical preview. It may be changed in a future release.

NOT_COMPLIANT = Compliance(string='NOT_COMPLIANT')

The policy is not in compliance on the object. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class com.vmware.vcenter.compute.policies_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.compute.policies_client.TagUsage(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The TagUsage class provides methods to query which tags are used by policies. Warning: This class is available as technical preview. It may be changed in a future release.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class FilterSpec(policies=None, tags=None, tag_types=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TagUsage.FilterSpec class contains attributes used to filter the results when listing the tags used by policies as available in this vCenter server (see TagUsage.list()). If multiple attributes are specified, only the tags used by policies that match an element of each attribute match the filter. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters
  • policies (set of str or None) – Identifiers that compute policies must have to match the filter. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.compute.Policy. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.compute.Policy. If None or empty, then tags used by any policy match this filter.

  • tags (set of str or None) – Identifiers that tags must have to match the filter. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.cis.tagging.Tag. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.cis.tagging.Tag. If None or empty, then tags with any tag identifier match this filter.

  • tag_types (set of str or None) – Identifiers that tag types must have to match the filter. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vapi.resource. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vapi.resource. If None or empty, then tags of any type match this filter.

class Summary(policy=None, tag_type=None, tag=None, tag_name=None, category_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TagUsage.Summary class contains common information about a tag used by a policy. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

Parameters
  • policy (str) – Identifier of the policy that uses the tag indicated by TagUsage.Summary.tag. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.compute.Policy. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.compute.Policy.

  • tag_type (str) – Identifier of the tag type used by the policy indicated by TagUsage.Summary.policy. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.resource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.resource.

  • tag (str) – Identifier of the tag used by the policy indicated by TagUsage.Summary.policy. Warning: This attribute is available as technical preview. It may be changed in a future release. When clients pass a value of this class as a parameter, the attribute tagType must contain the actual resource type. When methods return a value of this class as a return value, the attribute tagType will contain the actual resource type.

  • tag_name (str) – Name of the tag used by the policy indicated by TagUsage.Summary.policy. Warning: This attribute is available as technical preview. It may be changed in a future release.

  • category_name (str) – Name of the category that has TagUsage.Summary.tag. Warning: This attribute is available as technical preview. It may be changed in a future release.

list(filter=None)

Returns information about the tags used by policies available in this vCenter server matching the TagUsage.FilterSpec. Warning: This method is available as technical preview. It may be changed in a future release.

Parameters

filter (TagUsage.FilterSpec or None) – Specification for matching tags used by policies. If None, the behavior is equivalent to a TagUsage.FilterSpec with all attributes None, which means all tags used by policies match the filter.

Return type

list of TagUsage.Summary

Returns

The list of tags used by policies available on this vCenter server matching the TagUsage.FilterSpec.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.