The vmware_nsx.db.db Module

vmware_nsx.db.db.add_l2gw_connection_mapping(session, connection_id, bridge_endpoint_id, port_id)
vmware_nsx.db.db.add_network_binding(session, network_id, binding_type, phy_uuid, vlan_id)
vmware_nsx.db.db.add_neutron_nsx_dhcp_binding(session, port_id, subnet_id, ip_address, service_id, binding_id)

Store DHCP binding of each Neutron port.

Parameters:
  • session – database session object
  • port_id – identifier of Neutron port with DHCP binding
  • subnet_id – identifier of Neutron subnet for the port
  • ip_address – IP address for the port in this subnet.
  • service_id – identifier of NSX DHCP service
  • binding_id – identifier of NSX DHCP binding
vmware_nsx.db.db.add_neutron_nsx_network_mapping(session, neutron_id, nsx_switch_id, dvs_id=None)
vmware_nsx.db.db.add_neutron_nsx_port_mapping(session, neutron_id, nsx_switch_id, nsx_port_id)
vmware_nsx.db.db.add_neutron_nsx_router_mapping(session, neutron_id, nsx_router_id)
vmware_nsx.db.db.add_neutron_nsx_security_group_mapping(session, neutron_id, nsx_id)

Map a Neutron security group to a NSX security profile.

Parameters:
  • session – a valid database session object
  • neutron_id – a neutron security group identifier
  • nsx_id – a nsx security profile identifier
vmware_nsx.db.db.add_neutron_nsx_service_binding(session, network_id, port_id, service_type, service_id)

Store enabled NSX services on each Neutron network.

Parameters:
  • session – database session object
  • network_id – identifier of Neutron network enabling the service
  • port_id – identifier of Neutron port providing the service
  • service_type – type of NSX service
  • service_id – identifier of NSX service
vmware_nsx.db.db.add_port_mirror_session_mapping(session, tf_id, pm_session_id)
vmware_nsx.db.db.add_qos_policy_profile_mapping(session, qos_policy_id, switch_profile_id)
vmware_nsx.db.db.delete_network_bindings(session, network_id)
vmware_nsx.db.db.delete_neutron_nsx_dhcp_binding(session, port_id, binding_id)
vmware_nsx.db.db.delete_neutron_nsx_dhcp_bindings_by_service_id(session, service_id)
vmware_nsx.db.db.delete_neutron_nsx_port_mapping(session, neutron_id)
vmware_nsx.db.db.delete_neutron_nsx_router_mapping(session, neutron_id)
vmware_nsx.db.db.delete_neutron_nsx_service_binding(session, network_id, service_type)
vmware_nsx.db.db.delete_port_mirror_session_mapping(session, tf_id)
vmware_nsx.db.db.get_l2gw_connection_mapping(session, connection_id)
vmware_nsx.db.db.get_net_ids(session, nsx_id)
vmware_nsx.db.db.get_network_bindings(session, network_id)
vmware_nsx.db.db.get_network_bindings_by_vlanid_and_physical_net(session, vlan_id, phy_uuid)
vmware_nsx.db.db.get_nsx_dhcp_bindings(session, port_id)
vmware_nsx.db.db.get_nsx_dhcp_bindings_by_service(session, service_id)
vmware_nsx.db.db.get_nsx_network_mapping_for_nsx_id(session, nsx_id)
vmware_nsx.db.db.get_nsx_networks_mapping(session)
vmware_nsx.db.db.get_nsx_router_id(session, neutron_id)
vmware_nsx.db.db.get_nsx_security_group_id(session, neutron_id)

Return the id of a security group in the NSX backend.

Note: security groups are called ‘security profiles’ in NSX

vmware_nsx.db.db.get_nsx_security_group_ids(session, neutron_ids)

Return list of ids of a security groups in the NSX backend.

vmware_nsx.db.db.get_nsx_service_binding(session, network_id, service_type)
vmware_nsx.db.db.get_nsx_switch_and_port_id(session, neutron_id)
vmware_nsx.db.db.get_nsx_switch_id_for_dvs(session, neutron_id, dvs_id)

Retrieve the NSX switch ID for a given DVS ID and neutron network.

vmware_nsx.db.db.get_nsx_switch_ids(session, neutron_id)
vmware_nsx.db.db.get_port_mirror_session_mapping(session, tf_id)
vmware_nsx.db.db.get_sg_mappings(session, sg_id)
vmware_nsx.db.db.get_sg_rule_mapping(session, rule_id)
vmware_nsx.db.db.get_switch_profile_by_qos_policy(session, qos_policy_id)
vmware_nsx.db.db.is_multiprovider_network(session, network_id)
vmware_nsx.db.db.save_sg_mappings(session, sg_id, nsgroup_id, section_id)
vmware_nsx.db.db.save_sg_rule_mappings(session, rules)
vmware_nsx.db.db.set_default_network_gateway(session, gw_id)
vmware_nsx.db.db.set_multiprovider_network(session, network_id)
vmware_nsx.db.db.unset_default_network_gateways(session)

Previous topic

The vmware_nsx.common.utils Module

Next topic

The vmware_nsx.db.distributedrouter Module

This Page