com.vmware.vcenter.compute package

Subpackages

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: 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()).

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

The Capabilities.Info class contains information about a compute policy capability.

Tip

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

Parameters:
  • name (str) – Name of the capability.

  • description (str) – Description of the capability.

  • 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(). 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(). 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.

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

Bases: VapiStruct

The Capabilities.Summary class contains commonly used information about a compute policy capability.

Tip

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

Parameters:
  • capability (str) – Identifier of the capability. 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 (str) – Name of the capability.

  • description (str) – Description of the capability.

get(capability)

Returns information about a specific compute policy capability.

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.

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(capability=None, name=None, description=None)

Bases: VapiStruct

The CreateSpec class contains common information used to create a new policy.

Tip

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

Parameters:
  • capability (str) – Identifier of the capability this policy is based on. 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 (str) – Name of the policy. The name needs to be unique within this vCenter server.

  • description (str) – Description of the policy.

property capability

Return the discriminator value

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

Bases: VapiStruct

The Info class contains common information about a compute policy.

Tip

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

Parameters:
  • name (str) – Name of the policy.

  • description (str) – Description of the policy.

  • capability (str) – Identifier of the capability this policy is based on. 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.

property capability

Return the discriminator value

class com.vmware.vcenter.compute.policies_client.ObjectCompliance(string)

Bases: Enum

The ObjectCompliance class defines the compliance states a policy can be in on a particular object.

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 ObjectCompliance instance.

COMPLIANT = ObjectCompliance(string='COMPLIANT')

The policy is in compliance on the object.

NOT_APPLICABLE = ObjectCompliance(string='NOT_APPLICABLE')

The object is in a state for which the policy does not apply.

NOT_COMPLIANT = ObjectCompliance(string='NOT_COMPLIANT')

The policy is not in compliance on the object.

UNKNOWN = ObjectCompliance(string='UNKNOWN')

The object has an unknown compliance state.

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

Bases: VapiStruct

The Status class describes the current status of a compute policy.

Tip

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

Parameters:

status (ObjectCompliance) – The compliance status of the policy on a specified object.

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

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

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

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

Bases: VapiInterface

The TagUsage class provides methods to query which tags are used by policies.

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

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

The TagUsage.Summary class contains common information about a tag used by a policy.

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

  • category_name (str) – Name of the category that has TagUsage.Summary.tag.

list(filter=None)

Returns information about the tags used by policies available in this vCenter server matching the TagUsage.FilterSpec.

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.