com.vmware.vcenter.namespace_management package¶
Submodules¶
com.vmware.vcenter.namespace_management.software_client module¶
The com.vmware.vcenter.namespace_management.software_client module provides
classes for managing namespaces software components.
- 
class com.vmware.vcenter.namespace_management.software_client.Clusters(config)¶
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Clustersclass provides methods to upgrade the vSphere clusters.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - 
class Info(current_version=None, available_versions=None, last_upgraded_date=None, messages=None, state=None, upgrade_status=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.Infoclass contains detailed information about the cluster upgrade status and related information.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- current_version ( - str) – Current version of the cluster.
- available_versions ( - listof- str) – Set of available versions can be upgraded to.
- last_upgraded_date ( - datetime.datetimeor- None) – Date of last successful upgrade. If None, the cluster has not yet been upgraded.
- messages ( - listof- Clusters.Message) – Current set of messages associated with the cluster version.
- state ( - Clusters.State) – Current state of the upgrade.
- upgrade_status ( - Clusters.UpgradeStatusor- None) – Information about upgrade in progress. If None, the cluster upgrade is not in progress.
 
 
 - 
class Message(severity=None, details=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.Messageclass contains the information about the object configuration.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- severity ( - Clusters.Message.Severity) – Type of the message.
- details ( - com.vmware.vapi.std_client.LocalizableMessage) – Details about the message.
 
 - 
class Severity(string)¶
- Bases: - vmware.vapi.bindings.enum.Enum- The - Clusters.Message.Severityclass represents the severity of the message.- 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- Severityinstance.
 - 
ERROR= Severity(string='ERROR')¶
- Error message. This is accompanied by vCenter event and/or alarm. 
 - 
INFO= Severity(string='INFO')¶
- Informational message. This may be accompanied by vCenter event. 
 - 
WARNING= Severity(string='WARNING')¶
- Warning message. This may be accompanied by vCenter event. 
 
 
 - 
class Result(res=None, exception=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.Resultclass contains the result of batch upgrade method.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- res ( - Clusters.Result.Res) – The result of batch upgrade method.
- exception ( - Exception) – Exception when cluster pre-check failed during upgrade invocation. This attribute is optional and it is only relevant when the value of- resis- Clusters.Result.Res.REJECTED.
 
 - 
class Res(string)¶
- Bases: - vmware.vapi.bindings.enum.Enum- The - Clusters.Result.Resclass represents the upgrade invocation result for each cluster.- 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- Resinstance.
 - 
REJECTED= Res(string='REJECTED')¶
- Upgrade is rejected. This implies pre-check failed when invoking upgrade of the cluster. 
 - 
STARTED= Res(string='STARTED')¶
- Upgrade is started. 
 
 
 - 
class State(string)¶
- Bases: - vmware.vapi.bindings.enum.Enum- The - Clusters.Stateclass describes the state of the upgrade.- 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- Stateinstance.
 - 
ERROR= State(string='ERROR')¶
- Upgrade failed and need user intervention. 
 - 
PENDING= State(string='PENDING')¶
- Upgrade is in progress. 
 - 
READY= State(string='READY')¶
- Cluster is ready when there is no upgrade or upgrade is completed. 
 
 - 
class Summary(cluster=None, cluster_name=None, current_version=None, available_versions=None, last_upgraded_date=None, desired_version=None, state=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.Summaryclass contains basic information about the cluster upgrade related information.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- cluster ( - str) – Identifier for the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- ClusterComputeResource.
- cluster_name ( - str) – Name of the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- ClusterComputeResource.name. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- ClusterComputeResource.name.
- current_version ( - str) – Current version of the cluster.
- available_versions ( - listof- str) – Set of versions available for upgrade.
- last_upgraded_date ( - datetime.datetimeor- None) – Date of last successful upgrade. If None, the cluster has not yet been upgraded.
- desired_version ( - stror- None) – Desired version the cluster will be upgraded to. If None, the cluster upgrade is not in progress.
- state ( - Clusters.State) – Current state of the upgrade.
 
 
 - 
class UpgradeProgress(total=None, completed=None, message=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.UpgradeProgressclass contains detailed information about the cluster upgrade progess.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- total ( - long) – Total amount of the work for the operation. The work here represents the number of master nodes in the cluster need to be upgraded.
- completed ( - long) – The amount of work completed for the operation. The value can only be incremented. The number or master nodes which upgrade completed.
- message ( - com.vmware.vapi.std_client.LocalizableMessage) – Message about the work progress.
 
 
 - 
class UpgradeSpec(desired_version=None, ignore_precheck_warnings=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.UpgradeSpecclass contains the specification required to upgrade a cluster.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- desired_version ( - str) – Version number the cluster is going to be upgraded to.
- ignore_precheck_warnings ( - boolor- None) – If true, the upgrade workflow will ignore any pre-check warnings and proceed with the upgrade. If None, the upgrade workflow will not ignore pre-check warnings and fail the upgrade. It is equivalent to setting the value to false. The workflow adopts a conservative approach of failing the upgrade if None to solely let the user decide whether to force the upgrade despite the warnings.
 
 
 - 
class UpgradeStatus(desired_version=None, messages=None, progress=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- The - Clusters.UpgradeStatusclass contains detailed information about the cluster when upgraded is in progress.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- desired_version ( - stror- None) – Desired version the cluster will be upgraded to. If None, the cluster upgrade is not in progress.
- messages ( - listof- Clusters.Message) – Current set of messages associated with the upgrade state.
- progress ( - Clusters.UpgradeProgressor- None) – Information about upgrade progess. If None, the cluster upgrade is not in progress.
 
 
 - 
get(cluster)¶
- Returns upgrade related information of a specific cluster. - Parameters
- cluster ( - str) – Identifier for the cluster which will be upgraded. The parameter must be an identifier for the resource type:- ClusterComputeResource.
- Return type
- Returns
- Information about the upgrade of the specified WCP enabled cluster. 
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif cluster could not be located.
- 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.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user does not have System.Read privilege.
 
 - 
list()¶
- Returns upgrade related information about all WCP enabled clusters. - Return type
- Returns
- List of upgrade summary of all WCP enabled clusters. 
- 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.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user does not have System.Read privilege.
 
 - 
upgrade(cluster, spec)¶
- Upgrade the cluster to a specific version. This operation upgrades the components on control plane VMs and worker plane hosts based on the selected version. Before upgrading, this operation performs pre-checks and sets the evaluation response in Info.UpgradeStatus.messages with various Message.Severity levels. Depending on the severity, the upgrade may or may not proceed beyond prechecks. Here is a list of severities and corresponding behavior: - ERROR: Upgrade does not proceed beyond precheck operation - WARNING: Upgrade proceeds beyond precheck operation only if UpgradeSpec.ignorePrecheckWarnings is set to true - INFO: Upgrade proceeds beyond precheck operation uninterrupted - Parameters
- cluster ( - str) – Identifier for the cluster which will be upgraded. The parameter must be an identifier for the resource type:- ClusterComputeResource.
- spec ( - Clusters.UpgradeSpec) – Specification for upgrading the cluster.
 
- 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.Unsupportedif pre-check failed of the cluster.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif cluster could not be located.
- 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 Namespaces.Manage privilege.
 
 - 
upgrade_multiple(specs)¶
- Upgrade a set of clusters to its corresponding specific version. - Parameters
- specs ( - dictof- strand- Clusters.UpgradeSpec) – Specifications for upgrading selected clusters. The key in the parameter- dictmust be an identifier for the resource type:- ClusterComputeResource.
- Return type
- dictof- strand- Clusters.Result
- Returns
- Pre-check result when invoking upgrade for each cluster. The key in the return value - dictwill be an identifier for the resource type:- ClusterComputeResource.
- 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.Unauthenticatedif the user can not be authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif the user does not have Namespaces.Manage privilege on all specified clusters.
 
 
- 
class com.vmware.vcenter.namespace_management.software_client.StubFactory(stub_config)¶
- Bases: - vmware.vapi.bindings.stub.StubFactoryBase- Initialize StubFactoryBase - Parameters
- stub_config ( - vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance
 
com.vmware.vcenter.namespace_management.stats_client module¶
The com.vmware.vcenter.namespace_management.stats_client module provides
classes for gathering statistics related to various Namespaces related
components.
- 
class com.vmware.vcenter.namespace_management.stats_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.namespace_management.stats_client.TimeSeries(config)¶
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - TimeSeriesclass provides methods to gather statistical values for clusters, namespaces and pods.- Parameters
- config ( - vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
 - 
class PodIdentifier(namespace=None, pod_name=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- Pod identifier. These are the fields required to uniquely identify a pod. - Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- namespace ( - str) – The namespace that the pod is running in. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.namespaces.Instance. 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.namespaces.Instance.
- pod_name ( - str) – The name of the pod itself.
 
 
 - 
class Spec(obj_type=None, pod=None, namespace=None, cluster=None, start=None, end=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- This structure is sent in a request for TimeSeries data and is used to specify what object stats should be returned for. - Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- obj_type ( - TimeSeries.Spec.ObjType) – Type of statistics object that the request is operating on.
- pod ( - TimeSeries.PodIdentifier) – Pod Identifier for queries on an individual pod. This attribute is optional and it is only relevant when the value of- objTypeis- TimeSeries.Spec.ObjType.POD.
- namespace ( - str) – Namespace name for queries for a namespace. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- com.vmware.vcenter.namespaces.Instance. 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.namespaces.Instance. This attribute is optional and it is only relevant when the value of- objTypeis- TimeSeries.Spec.ObjType.NAMESPACE.
- cluster ( - str) – Cluster identifier for queries for a cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:- ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:- ClusterComputeResource. This attribute is optional and it is only relevant when the value of- objTypeis- TimeSeries.Spec.ObjType.CLUSTER.
- start ( - long) – UNIX timestamp value indicating when the requested series of statistical samples should begin. https://en.wikipedia.org/wiki/Unix_time
- end ( - long) – UNIX timestamp value indicating when the requested series of statistical samples should end. https://en.wikipedia.org/wiki/Unix_time
 
 - 
class ObjType(string)¶
- Bases: - vmware.vapi.bindings.enum.Enum- Type of statistics object that this request is operating on. - 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- ObjTypeinstance.
 - 
CLUSTER= ObjType(string='CLUSTER')¶
- The CLUSTER object type is used when specifying a vSphere cluster. 
 - 
NAMESPACE= ObjType(string='NAMESPACE')¶
- The NAMESPACE object type is used to specify a namespace. 
 - 
POD= ObjType(string='POD')¶
- The POD object type is used to specify an individual pod within a namespace. 
 
 
 - 
class TimeSeries(counter=None, time_stamps=None, values=None)¶
- Bases: - vmware.vapi.bindings.struct.VapiStruct- A set of timestamps and statistical values representing a time series. The lengths of - TimeSeries.TimeSeries.time_stampsand- TimeSeries.TimeSeries.valueswill always match each other.- Tip - The arguments are used to initialize data attributes with the same names. - Parameters
- counter ( - str) – Counter identifier.
- time_stamps ( - listof- long) – Sequence of UNIX timestamp values at which statistical values were sampled. https://en.wikipedia.org/wiki/Unix_time
- values ( - listof- long) – Sequence of sampled values corresponding to the timestamps in tss.
 
 
 - 
get(spec)¶
- Gather statistical values for a cluster, namespace, or pod. - Parameters
- spec ( - TimeSeries.Spec) – Specification of the statistical values that should be returned.
- Return type
- listof- TimeSeries.TimeSeries
- Returns
- A list of TimeSeries values for each counter specified in the request. 
- 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 the start time in- TimeSeries.Spec.startis invalid, or the end time in- TimeSeries.Spec.endis invalid.
- Raise
- com.vmware.vapi.std.errors_client.NotFoundif the specified cluster in- TimeSeries.Spec.clusteror the namespace in- TimeSeries.Spec.namespaceor- TimeSeries.Spec.poddoes not exist.
- Raise
- com.vmware.vapi.std.errors_client.Unsupportedif the specified cluster in- TimeSeries.Spec.clusteris not enabled for Namespaces.
- 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 System.Read privilege.