com.vmware.nsx_policy.global_infra.realized_state package

Submodules

com.vmware.nsx_policy.global_infra.realized_state.enforcement_points_client module

class com.vmware.nsx_policy.global_infra.realized_state.enforcement_points_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.nsx_policy.global_infra.realized_state.enforcement_points_client.Vifs(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Parameters

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

list(enforcement_point_name, cursor=None, included_fields=None, lport_attachment_id=None, page_size=None, sort_ascending=None, sort_by=None)

This API lists VIFs from the specified NSX Manager.

Parameters
  • enforcement_point_name (str) – (required)

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

  • lport_attachment_id (str or None) – LPort attachment ID of the VIF. (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.VirtualNetworkInterfaceListResult

Returns

com.vmware.nsx_policy.model.VirtualNetworkInterfaceListResult

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.global_infra.realized_state.enforcement_points_client.VirtualMachines(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Parameters

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

list(enforcement_point_name, cursor=None, dsl=None, included_fields=None, page_size=None, query=None, sort_ascending=None, sort_by=None)

This API filters objects of type virtual machines from the specified NSX Manager. This API has been deprecated. Please use the new API GET /infra/realized-state/virtual-machines

Parameters
  • enforcement_point_name (str) – (required)

  • cursor (str or None) – Opaque cursor to be used for getting next page of records (supplied by current result page) (optional)

  • dsl (str or None) – Search DSL (domain specific language) query (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)

  • query (str or None) – Search query (optional)

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

Returns

com.vmware.nsx_policy.model.SearchResponse

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

updatetags(enforcement_point_name, virtual_machine_tags_update)

Allows an admin to apply multiple tags to a virtual machine. This operation does not store the intent on the policy side. It applies the tag directly on the specified enforcement point. This operation will replace the existing tags on the virtual machine with the ones that have been passed. If the application of tag fails on the enforcement point, then an error is reported. The admin will have to retry the operation again. Policy framework does not perform a retry. Failure could occur due to multiple reasons. For e.g enforcement point is down, Enforcement point could not apply the tag due to constraints like max tags limit exceeded, etc.

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