The vmware_nsx.nsxlib.mh.router Module

vmware_nsx.nsxlib.mh.router.create_explicit_route_lrouter(cluster, router_id, route)
vmware_nsx.nsxlib.mh.router.create_explicit_routing_lrouter(cluster, neutron_router_id, tenant_id, display_name, nexthop, distributed=None)
vmware_nsx.nsxlib.mh.router.create_implicit_routing_lrouter(cluster, neutron_router_id, tenant_id, display_name, nexthop)

Create a NSX logical router on the specified cluster.

Parameters:
  • cluster – The target NSX cluster
  • tenant_id – Identifier of the Openstack tenant for which

the logical router is being created :param display_name: Descriptive name of this logical router :param nexthop: External gateway IP address for the logical router :raise NsxApiException: if there is a problem while communicating with the NSX controller

vmware_nsx.nsxlib.mh.router.create_implicit_routing_lrouter_with_distribution(cluster, neutron_router_id, tenant_id, display_name, nexthop, distributed=None)

Create a NSX logical router on the specified cluster.

This function also allows for creating distributed lrouters :param cluster: The target NSX cluster :param tenant_id: Identifier of the Openstack tenant for which the logical router is being created :param display_name: Descriptive name of this logical router :param nexthop: External gateway IP address for the logical router :param distributed: True for distributed logical routers :raise NsxApiException: if there is a problem while communicating with the NSX controller

vmware_nsx.nsxlib.mh.router.create_lrouter_dnat_rule_v2(cluster, router_id, dst_ip, to_dst_port=None, match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_dnat_rule_v3(cluster, router_id, dst_ip, to_dst_port=None, order=None, match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_nodnat_rule_v2(cluster, _router_id, _match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_nodnat_rule_v3(cluster, router_id, order=None, match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_nosnat_rule_v2(cluster, _router_id, _match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_nosnat_rule_v3(cluster, router_id, order=None, match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_snat_rule_v2(cluster, router_id, min_src_ip, max_src_ip, match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_lrouter_snat_rule_v3(cluster, router_id, min_src_ip, max_src_ip, order=None, match_criteria=None)
vmware_nsx.nsxlib.mh.router.create_router_lport(cluster, lrouter_uuid, tenant_id, neutron_port_id, display_name, admin_status_enabled, ip_addresses, mac_address=None)

Creates a logical port on the assigned logical router.

vmware_nsx.nsxlib.mh.router.delete_explicit_route_lrouter(cluster, router_id, route_id)
vmware_nsx.nsxlib.mh.router.delete_lrouter(cluster, lrouter_id)
vmware_nsx.nsxlib.mh.router.delete_nat_rules_by_match(cluster, router_id, rule_type, max_num_expected, min_num_expected=0, raise_on_len_mismatch=True, **kwargs)
vmware_nsx.nsxlib.mh.router.delete_peer_router_lport(cluster, lr_uuid, ls_uuid, lp_uuid)
vmware_nsx.nsxlib.mh.router.delete_router_lport(cluster, lrouter_uuid, lport_uuid)

Creates a logical port on the assigned logical router.

vmware_nsx.nsxlib.mh.router.delete_router_nat_rule(cluster, router_id, rule_id)
vmware_nsx.nsxlib.mh.router.find_router_gw_port(context, cluster, router_id)

Retrieves the external gateway port for a NSX logical router.

vmware_nsx.nsxlib.mh.router.get_default_route_explicit_routing_lrouter_v32(cluster, router_id)
vmware_nsx.nsxlib.mh.router.get_default_route_explicit_routing_lrouter_v33(cluster, router_id)
vmware_nsx.nsxlib.mh.router.get_explicit_routes_lrouter(cluster, router_id, protocol_type='static')
vmware_nsx.nsxlib.mh.router.get_lrouter(cluster, lrouter_id)
vmware_nsx.nsxlib.mh.router.get_lrouters(cluster, tenant_id, fields=None, filters=None)
vmware_nsx.nsxlib.mh.router.plug_router_port_attachment(cluster, router_id, port_id, attachment_uuid, nsx_attachment_type, attachment_vlan=None)

Attach a router port to the given attachment.

Current attachment types:
  • PatchAttachment [-> logical switch port uuid]
  • L3GatewayAttachment [-> L3GatewayService uuid]

For the latter attachment type a VLAN ID can be specified as well.

vmware_nsx.nsxlib.mh.router.query_lrouter_lports(cluster, lr_uuid, fields='*', filters=None, relations=None)
vmware_nsx.nsxlib.mh.router.query_lrouters(cluster, fields=None, filters=None)
vmware_nsx.nsxlib.mh.router.query_nat_rules(cluster, router_id, fields='*', filters=None)
vmware_nsx.nsxlib.mh.router.update_default_gw_explicit_routing_lrouter(cluster, router_id, next_hop)
vmware_nsx.nsxlib.mh.router.update_explicit_routes_lrouter(cluster, router_id, routes)
vmware_nsx.nsxlib.mh.router.update_explicit_routing_lrouter(cluster, router_id, display_name, next_hop, routes=None)
vmware_nsx.nsxlib.mh.router.update_implicit_routing_lrouter(cluster, r_id, display_name, nexthop)
vmware_nsx.nsxlib.mh.router.update_lrouter_port_ips(cluster, lrouter_id, lport_id, ips_to_add, ips_to_remove)
vmware_nsx.nsxlib.mh.router.update_router_lport(cluster, lrouter_uuid, lrouter_port_uuid, tenant_id, neutron_port_id, display_name, admin_status_enabled, ip_addresses)

Updates a logical port on the assigned logical router.

Previous topic

The vmware_nsx.nsxlib.mh.queue Module

Next topic

The vmware_nsx.nsxlib.mh.secgroup Module

This Page