com.vmware.nsx_policy.infra.networks package

Submodules

com.vmware.nsx_policy.infra.networks.nat_client module

class com.vmware.nsx_policy.infra.networks.nat_client.NatRules(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

delete(network_name, nat_id, nat_rule_id)

Delete NAT Rule.

Parameters:
  • network_name (str) – Network ID (required)
  • nat_id (str) – NAT id (required)
  • nat_rule_id (str) – Rule ID (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(network_name, nat_id, nat_rule_id)

Get NAT Rule.

Parameters:
  • network_name (str) – Network ID (required)
  • nat_id (str) – NAT id (required)
  • nat_rule_id (str) – Rule ID (required)
Return type:

com.vmware.nsx_policy.model_client.PolicyNatRule

Returns:

com.vmware.nsx_policy.model.PolicyNatRule

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(network_name, nat_id, cursor=None, included_fields=None, page_size=None, sort_ascending=None, sort_by=None)

List NAT Rules.

Parameters:
  • network_name (str) – Network ID (required)
  • nat_id (str) – NAT id (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)
  • 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.PolicyNatRuleListResult

Returns:

com.vmware.nsx_policy.model.PolicyNatRuleListResult

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(network_name, nat_id, nat_rule_id, policy_nat_rule)

If a NAT Rule is not already present on Network denoted by Network ID, create a new NAT Rule. If it already exists, update the NAT Rule.

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

update(network_name, nat_id, nat_rule_id, policy_nat_rule)

Update NAT Rule.

Parameters:
Return type:

com.vmware.nsx_policy.model_client.PolicyNatRule

Returns:

com.vmware.nsx_policy.model.PolicyNatRule

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.infra.networks.nat_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

com.vmware.nsx_policy.infra.networks.segments_client module

class com.vmware.nsx_policy.infra.networks.segments_client.StaticArp(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

delete(network_id, segment_id)

Delete static ARP config

Parameters:
  • network_id (str) – Network ID (required)
  • segment_id (str) – Segment ID (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(network_id, segment_id)

Read static ARP config

Parameters:
  • network_id (str) – Network ID (required)
  • segment_id (str) – Segment ID (required)
Return type:

com.vmware.nsx_policy.model_client.StaticARPConfig

Returns:

com.vmware.nsx_policy.model.StaticARPConfig

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(network_id, segment_id, static_arp_config)

Create static ARP config with network and segment IDs provided if it doesn’t exist, update with provided config if it’s already created.

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

update(network_id, segment_id, static_arp_config)

Create static ARP config with network and segment IDs provided if it doesn’t exist, update with provided config if it’s already created.

Parameters:
Return type:

com.vmware.nsx_policy.model_client.StaticARPConfig

Returns:

com.vmware.nsx_policy.model.StaticARPConfig

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.infra.networks.segments_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase