com.vmware package

Subpackages

Submodules

com.vmware.nsx_policy_client module

class com.vmware.nsx_policy_client.Batch(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

create(batch_request, atomic=None)

Enables you to make multiple API requests using a single request. The batch API takes in an array of logical HTTP requests represented as JSON arrays. Each request has a method (GET, PUT, POST, or DELETE), a relative_url (the portion of the URL after https://<nsx-mgr>/api/), optional headers array (corresponding to HTTP headers) and an optional body (for POST and PUT requests). The batch API returns an array of logical HTTP responses represented as JSON arrays. Each response has a status code, an optional headers array and an optional body (which is a JSON-encoded string).

Parameters:
Return type:

com.vmware.nsx_policy.model_client.BatchResponse

Returns:

com.vmware.nsx_policy.model.BatchResponse

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable

Raise:

com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed

Raise:

com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error

Raise:

com.vmware.vapi.std.errors_client.Unauthorized Forbidden

Raise:

com.vmware.vapi.std.errors_client.NotFound Not Found

class com.vmware.nsx_policy_client.Cluster(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

backuptoremote()

Request one-time backup. The backup will be uploaded using the same server configuration as for automatic backup.

Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
get()

Returns information about the NSX cluster configuration. An NSX cluster has two functions or purposes, commonly referred to as "roles." These two roles are control and management. Each NSX installation has a single cluster. Separate NSX clusters do not share data. In other words, a given data-plane node is attached to only one cluster, not to multiple clusters.

Return type:com.vmware.nsx_policy.model_client.ClusterConfig
Returns:com.vmware.nsx_policy.model.ClusterConfig
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
summarizeinventorytoremote()

Request one-time inventory summary. The backup will be uploaded using the same server configuration as for an automatic backup.

Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
update(cluster_config)

Modifies the NSX cluster configuration.

Parameters:cluster_config (com.vmware.nsx_policy.model_client.ClusterConfig) – (required)
Return type:com.vmware.nsx_policy.model_client.ClusterConfig
Returns:com.vmware.nsx_policy.model.ClusterConfig
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
class com.vmware.nsx_policy_client.ErrorResolver(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

get(error_id)

Returns some metadata about the given error_id. This includes information of whether there is a resolver present for the given error_id and its associated user input data

Parameters:error_id (str) – (required)
Return type:com.vmware.nsx_policy.model_client.ErrorResolverInfo
Returns:com.vmware.nsx_policy.model.ErrorResolverInfo
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
list()

Returns a list of metadata for all the error resolvers registered.

Return type:com.vmware.nsx_policy.model_client.ErrorResolverInfoList
Returns:com.vmware.nsx_policy.model.ErrorResolverInfoList
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
resolveerror(error_resolver_metadata_list)

Invokes the corresponding error resolver for the given error(s) present in the payload

Parameters:error_resolver_metadata_list (com.vmware.nsx_policy.model_client.ErrorResolverMetadataList) – (required)
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
class com.vmware.nsx_policy_client.Infra(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

get(filter=None)

Read infra. Returns only the infra related properties. Inner object are not populated.

Parameters:filter (str or None) – Filter string as java regex (optional)
Return type:com.vmware.nsx_policy.model_client.Infra
Returns:com.vmware.nsx_policy.model.Infra
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
patch(infra)

Update the infra including all the nested entities

Parameters:infra (com.vmware.nsx_policy.model_client.Infra) – (required)
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
update(infra)

Update the infra including all the nested entities

Parameters:infra (com.vmware.nsx_policy.model_client.Infra) – (required)
Return type:com.vmware.nsx_policy.model_client.Infra
Returns:com.vmware.nsx_policy.model.Infra
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
class com.vmware.nsx_policy_client.Licenses(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

create(license)

This will add a license key to the system. The API supports adding only one license key for each license edition type - Standard, Advanced or Enterprise. If a new license key is tried to add for an edition for which the license key already exists, then this API will return an error.

Parameters:license (com.vmware.nsx_policy.model_client.License) – (required)
Return type:com.vmware.nsx_policy.model_client.License
Returns:com.vmware.nsx_policy.model.License
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
delete(license_key)

Deprecated. Use POST /licenses?action=delete API instead.

Parameters:license_key (str) – (required)
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
delete_0(license)

This will delete the license key identified in the request body by "license_key" and its properties from the system. Attempting to delete the last license key will result in an error.

Parameters:license (com.vmware.nsx_policy.model_client.License) – (required)
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
get()

Deprecated. Use the GET /licenses API instead.

Return type:com.vmware.nsx_policy.model_client.License
Returns:com.vmware.nsx_policy.model.License
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
getlicensebykey(license_key)

Deprecated. Use GET /licenses API instead.

Parameters:license_key (str) – (required)
Return type:com.vmware.nsx_policy.model_client.License
Returns:com.vmware.nsx_policy.model.License
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
list()

Returns all licenses.

Return type:com.vmware.nsx_policy.model_client.LicensesListResult
Returns:com.vmware.nsx_policy.model.LicensesListResult
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
update(license)

Deprecated. Use the POST /licenses API instead

Parameters:license (com.vmware.nsx_policy.model_client.License) – (required)
Return type:com.vmware.nsx_policy.model_client.License
Returns:com.vmware.nsx_policy.model.License
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
class com.vmware.nsx_policy_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

class com.vmware.nsx_policy_client.Tasks(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

get(task_id)

Get information about the specified task

Parameters:task_id (str) – ID of task to read (required)
Return type:com.vmware.nsx_policy.model_client.TaskProperties
Returns:com.vmware.nsx_policy.model.TaskProperties
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
list(cursor=None, included_fields=None, page_size=None, request_uri=None, sort_ascending=None, sort_by=None, status=None, user=None)

Get information about all tasks

Parameters:
  • cursor (str or None) – Opaque cursor to be used for getting next page of records (supplied by current result page) (optional)
  • included_fields (str or None) – Comma separated list of fields that should be included in query result (optional)
  • page_size (long or None) – Maximum number of results to return in this page (server may return fewer) (optional, default to 1000)
  • request_uri (str or None) – Request URI(s) to include in query result (optional)
  • sort_ascending (bool or None) – (optional)
  • sort_by (str or None) – Field by which records are sorted (optional)
  • status (str or None) – Status(es) to include in query result (optional)
  • user (str or None) – Names of users to include in query result (optional)
Return type:

com.vmware.nsx_policy.model_client.TaskListResult

Returns:

com.vmware.nsx_policy.model.TaskListResult

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable

Raise:

com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed

Raise:

com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error

Raise:

com.vmware.vapi.std.errors_client.Unauthorized Forbidden

Raise:

com.vmware.vapi.std.errors_client.NotFound Not Found

class com.vmware.nsx_policy_client.Templates(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

delete(template_id)

Delete a template.

Parameters:template_id (str) – Template identifier (required)
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
deploy(template_id, policy_template_parameters)

Read a template, populate the placeholders’ fields with the parameters’ values, and deploy the template body by creating or updating all the nested policy objects inside the AbstractSpace object.

Parameters:
Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable

Raise:

com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed

Raise:

com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error

Raise:

com.vmware.vapi.std.errors_client.Unauthorized Forbidden

Raise:

com.vmware.vapi.std.errors_client.NotFound Not Found

get(template_id)

Read a template and returns the template properties for a given template identifier.

Parameters:template_id (str) – Template identifier (required)
Return type:com.vmware.nsx_policy.model_client.PolicyTemplate
Returns:com.vmware.nsx_policy.model.PolicyTemplate
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found
list(cursor=None, included_fields=None, page_size=None, sort_ascending=None, sort_by=None)

List Policy Templates

Parameters:
  • cursor (str or None) – Opaque cursor to be used for getting next page of records (supplied by current result page) (optional)
  • included_fields (str or None) – Comma separated list of fields that should be included in query result (optional)
  • page_size (long or None) – Maximum number of results to return in this page (server may return fewer) (optional, default to 1000)
  • sort_ascending (bool or None) – (optional)
  • sort_by (str or None) – Field by which records are sorted (optional)
Return type:

com.vmware.nsx_policy.model_client.PolicyTemplateListResult

Returns:

com.vmware.nsx_policy.model.PolicyTemplateListResult

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable

Raise:

com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed

Raise:

com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error

Raise:

com.vmware.vapi.std.errors_client.Unauthorized Forbidden

Raise:

com.vmware.vapi.std.errors_client.NotFound Not Found

patch(template_id, policy_template)

Create a new template if the specified template id does not correspond to an existing template. Update the template if otherwise.

Parameters:
Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable

Raise:

com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed

Raise:

com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error

Raise:

com.vmware.vapi.std.errors_client.Unauthorized Forbidden

Raise:

com.vmware.vapi.std.errors_client.NotFound Not Found

class com.vmware.nsx_policy_client.TrustManagement(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

get()

Returns information about the supported algorithms and key sizes.

Return type:com.vmware.nsx_policy.model_client.TrustManagementData
Returns:com.vmware.nsx_policy.model.TrustManagementData
Raise:com.vmware.vapi.std.errors_client.ServiceUnavailable Service Unavailable
Raise:com.vmware.vapi.std.errors_client.InvalidRequest Bad Request, Precondition Failed
Raise:com.vmware.vapi.std.errors_client.InternalServerError Internal Server Error
Raise:com.vmware.vapi.std.errors_client.Unauthorized Forbidden
Raise:com.vmware.vapi.std.errors_client.NotFound Not Found