com.vmware.vcenter.phm package

Submodules

com.vmware.vcenter.phm.hardware_support_managers_client module

The com.vmware.vcenter.phm.hardware_support_managers_client module provides classes for proactive hardware management (PHM) in vCenter.

class com.vmware.vcenter.phm.hardware_support_managers_client.ManagedHosts(config)

Bases: VapiInterface

The ManagedHosts class contains operations related to the managed host list maintained by each hardware support managers (HSM).

Parameters:

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

class ListResult(managed_hosts=None)

Bases: VapiStruct

The ManagedHosts.ListResult class contains a list of managed hosts stored by proactive hardware management, see ManagedHosts.list().

Tip

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

Parameters:

managed_hosts (list of str) – All managed hosts stored at PHM side. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

class UpdateSpec(hosts_to_add=None, hosts_to_remove=None)

Bases: VapiStruct

The ManagedHosts.UpdateSpec class specifies a list of managed hosts added or removed by a proactive hardware management, see ManagedHosts.update().

Tip

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

Parameters:
  • hosts_to_add (list of str or None) – A list of managed hosts added by an HSM. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem. This attribute may be None meaning this update does not contain any newly added managed hosts.

  • hosts_to_remove (list of str or None) – A list of managed hosts removed by an HSM. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem. This attribute may be None meaning this update does not contain any removed managed hosts.

list(key)

Get ManagedHosts.ListResult class, the list of managed hosts of a specified HSM.

Parameters:

key (str) – HSM key of the targeted hardware support manager The parameter must be an identifier for the resource type: com.vmware.vcenter.phm.HardwareSupportManager.

Return type:

ManagedHosts.ListResult

Returns:

ManagedHosts.ListResult contains managed hosts of a specified HSM.

Raise:

com.vmware.vapi.std.errors_client.NotFound if specified key does not exist.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if user has not provided adequate credentials.

Raise:

com.vmware.vapi.std.errors_client.Error if PHM service hits an internal error.

update(key, spec)

Modify the list of HSM managed hosts stored at PHM side. The managed hosts are the resources created and owned by HSM. Whenever there is any change in the managed host list, HSM uses this API to inform PHM.

Parameters:
  • key (str) – HSM key of the targeted hardware support manager The parameter must be an identifier for the resource type: com.vmware.vcenter.phm.HardwareSupportManager.

  • spec (ManagedHosts.UpdateSpec) – update spec on the change of managed host list

Raise:

com.vmware.vapi.std.errors_client.NotFound if the specified key does not exist.

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if the specified spec is invalid.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if user has not provided adequate credentials.

Raise:

com.vmware.vapi.std.errors_client.Error if PHM service hits an internal error.

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable if PHM service is not able to handle request.

class com.vmware.vcenter.phm.hardware_support_managers_client.ResourceBundle(config)

Bases: VapiInterface

The ResourceBundle class contains operations related to the message resource bundle maintained by each hardware support managers (HSM).

Parameters:

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

class Info(vendor_resource_infos=None)

Bases: VapiStruct

The ResourceBundle.Info class contains a vendor’s resource bundle stored by proactive hardware management, see ResourceBundle.get().

Tip

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

Parameters:

vendor_resource_infos (list of ResourceBundle.ResourceInfo) – Entire vendor’s resource bundle - a list of ResourceBundle.ResourceInfo stored at PHM side.

class ResourceInfo(locale=None, messages=None)

Bases: VapiStruct

The ResourceBundle.ResourceInfo class encapsulates the message resources for a locale.

Tip

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

Parameters:
  • locale (str) – Locale for the message definitions. The locale specification needs to comply with RFC4646 language subtags. For common subtags, see https://en.wikipedia.org/wiki/IETF_language_tag

  • messages (dict of str and str) – Message definitions

class UpdateSpec(bundle_to_change=None)

Bases: VapiStruct

The ResourceBundle.UpdateSpec class describes the changes in the resource bundle provided by an HSM. See ResourceBundle.update().

Tip

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

Parameters:

bundle_to_change (list of ResourceBundle.ResourceInfo or None) – Changes in resouce bundle. This attribute may be None meaning no change in resource bundle.

get(key)

Get ResourceBundle.Info class, the resource bundle of a specified HSM.

Parameters:

key (str) – HSM key of the targeted hardware support manager The parameter must be an identifier for the resource type: com.vmware.vcenter.phm.HardwareSupportManager.

Return type:

ResourceBundle.Info

Returns:

ResourceBundle.Info contains resource bundle of a specified HSM.

Raise:

com.vmware.vapi.std.errors_client.NotFound if specified key does not exist.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if user has not provided adequate credentials.

Raise:

com.vmware.vapi.std.errors_client.Error if PHM service hits an internal error.

update(key, spec)

Modify the vendor resource bundle of an HSM maintained at PHM side. A vendor’s resource bundle is owned and provided by the vendor’s HSM. Whenever there is any change in the resource bundle, HSM uses this API to inform PHM about the change.

Parameters:
  • key (str) – HSM key of the targeted hardware support manager The parameter must be an identifier for the resource type: com.vmware.vcenter.phm.HardwareSupportManager.

  • spec (ResourceBundle.UpdateSpec) – update spec on the change of resource bundle

Raise:

com.vmware.vapi.std.errors_client.NotFound if the specified key does not exist.

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if the specified spec is invalid.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if user has not provided adequate credentials.

Raise:

com.vmware.vapi.std.errors_client.Error if PHM service hits an internal error.

class com.vmware.vcenter.phm.hardware_support_managers_client.StubFactory(stub_config)

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

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