The networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2 Module

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.add_host_mapping(host_id, nexus_ip, interface, ch_grp, is_static)

Add Host to interface mapping entry into mapping data base.

Parameters:
  • host_id – is the name of the host to add
  • interface – is the interface for this host
  • nexus_ip – is the ip addr of the nexus switch for this interface
  • ch_grp – is the port channel this interface belos
  • is_static – whether this is from conf file or learned from baremetal.
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.add_nexusnve_binding(vni, switch_ip, device_id, mcast_group)

Adds a nexus nve binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.add_nexusport_binding(port_id, vlan_id, vni, switch_ip, instance_id, is_native=False, ch_grp=0)

Adds a nexusport binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.add_provider_network(network_id, vlan_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.add_reserved_switch_binding(switch_ip, state)

Add a reserved switch binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.alloc_vpcid(nexus_ips)

Allocate a vpc id for the given list of switch_ips.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.delete_provider_network(network_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.free_vpcid_for_switch(vpc_id, nexus_ip)

Free a vpc id for the given switch_ip.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.free_vpcid_for_switch_list(vpc_id, nexus_ips)

Free a vpc id for the given list of switch_ips.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_active_switch_vpc_allocs(switch_ip)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_all_host_mappings()
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_all_switch_vpc_allocs(switch_ip)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_free_switch_vpc_allocs(switch_ip)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_host_mappings(host_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nexus_switchport_binding(port_id, switch_ip)

Lists all bindings for this switch & port.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nexusport_binding(port_id, vlan_id, switch_ip, instance_id)

Lists a nexusport binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nexusport_switch_bindings(switch_ip)

Lists all Nexus port switch bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nexussvi_bindings()

Lists nexus svi bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nexusvlan_binding(vlan_id, switch_ip)

Lists a vlan and switch binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nexusvm_bindings(vlan_id, instance_id)

Lists nexusvm bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nve_switch_bindings(switch_ip)

Return all the nexus nve bindings for one switch.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nve_vni_deviceid_bindings(vni, device_id)

Return all the nexus nve bindings for one vni/one device_id.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nve_vni_member_bindings(vni, switch_ip, device_id)

Return the nexus nve binding per switch and device_id.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_nve_vni_switch_bindings(vni, switch_ip)

Return the nexus nve binding(s) per switch.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_port_switch_bindings(port_id, switch_ip)

List all vm/vlan bindings on a Nexus switch port.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_port_vlan_switch_binding(port_id, vlan_id, switch_ip)

Lists nexusvm bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_reserved_bindings(vlan_id, instance_id, switch_ip=None, port_id=None)

Lists reserved bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_reserved_switch_binding(switch_ip=None)

Get a reserved switch binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_switch_and_host_mappings(host_id, switch_ip)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_switch_host_mappings(switch_ip)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_switch_if_host_mappings(switch_ip, if_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_switch_vpc_alloc(switch_ip, vpc_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.get_switch_vpc_count_min_max(switch_ip)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.init_vpc_entries(nexus_ip, vpc_start, vpc_end)

Initialize switch/vpc entries in vpc alloc data base.

param: nexus_ip is the ip addr of the nexus switch for this interface param: vpc_start is the starting vpc id param: vpc_end is the ending vpc id

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.is_provider_network(network_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.is_provider_vlan(vlan_id)
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.is_reserved_binding(binding)

Identifies switch & port operational bindings.

There are two types of reserved bindings.

  1. The Switch binding purpose is to keep track of the switch state for when replay is enabled. Keeping it in the db, allows for all processes to determine known state of each switch.
  2. The reserved port binding is used with baremetal transactions which don’t rely on host to interface mapping in the ini file. It is learned from the transaction and kept in the data base for further reference.
networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_all_nexusnve_bindings()

Removes all nexusnve bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_all_nexusport_bindings()

Removes all nexusport bindings.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_all_static_host_mappings()

Remove all entries defined in config file from mapping data base.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_host_mapping(interface, nexus_ip)

Remove host to interface mapping entry from mapping data base.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_nexusnve_binding(vni, switch_ip, device_id)

Remove the nexus nve binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_nexusport_binding(port_id, vlan_id, vni, switch_ip, instance_id)

Removes a nexusport binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.remove_reserved_binding(vlan_id, switch_ip, instance_id, port_id)

Removes reserved binding.

This overloads port bindings to support reserved Switch binding used to maintain the state of a switch so it can be viewed by all other neutron processes. There’s also the case of a reserved port binding to keep switch information on a given interface. The values of these arguments is as follows: :param vlan_id: 0 :param switch_ip: ip address of the switch :param instance_id: fixed string RESERVED_NEXUS_SWITCH_DEVICE_ID_R1 :param port_id: switch-state of ACTIVE, RESTORE_S1, RESTORE_S2, INACTIVE : port-expected port_id

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.update_host_mapping(host_id, interface, nexus_ip, new_ch_grp)

Change channel_group in host/interface mapping data base.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.update_nexusport_binding(port_id, new_vlan_id)

Updates nexusport binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.update_reserved_binding(vlan_id, switch_ip, instance_id, port_id, is_switch_binding=True, is_native=False, ch_grp=0)

Updates reserved binding.

This overloads port bindings to support reserved Switch binding used to maintain the state of a switch so it can be viewed by all other neutron processes. There’s also the case of a reserved port binding to keep switch information on a given interface.

The values of these arguments is as follows: :param vlan_id: 0 :param switch_ip: ip address of the switch :param instance_id: fixed string RESERVED_NEXUS_SWITCH_DEVICE_ID_R1 :param port_id: switch-state of ACTIVE, RESTORE_S1, RESTORE_S2, INACTIVE : port-expected port_id :param ch_grp: 0 if no port-channel else non-zero integer

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.update_reserved_switch_binding(switch_ip, state)

Update a reserved switch binding.

networking_cisco.plugins.ml2.drivers.cisco.nexus.nexus_db_v2.update_vpc_entry(nexus_ips, vpc_id, learned, active)

Change active state in vpc_allocate data base.