def _add_bindings_to_db(self, npbs): """Adds a list of port bindings to the Nexus database.""" for npb in npbs: nexus_db_v2.add_nexusport_binding( npb.port, npb.vlan, npb.vni, npb.switch, npb.instance, npb.is_provider_vlan, npb.channel_group, npb.is_native_vlan)
def _add_binding_to_db(self, npb): """Adds a port binding to the Nexus database.""" return nexus_db_v2.add_nexusport_binding(npb.port, npb.vlan, npb.vni, npb.switch, npb.instance, npb.is_provider_vlan, npb.channel_group, npb.is_native_vlan)
def _configure_nxos_db(self, vlan_id, device_id, host_id, vni, is_provider_vlan): """Create the nexus database entry. Called during update precommit port event. """ host_connections = self._get_switch_info(host_id) for switch_ip, intf_type, nexus_port in host_connections: port_id = '%s:%s' % (intf_type, nexus_port) try: nxos_db.get_nexusport_binding(port_id, vlan_id, switch_ip, device_id) except excep.NexusPortBindingNotFound: nxos_db.add_nexusport_binding(port_id, str(vlan_id), str(vni), switch_ip, device_id, is_provider_vlan)
def _configure_nxos_db(self, vlan_id, device_id, host_id, vni, is_provider_vlan): """Create the nexus database entry. Called during update precommit port event. """ host_connections = self._get_switch_info(host_id) for switch_ip, intf_type, nexus_port in host_connections: port_id = '%s:%s' % (intf_type, nexus_port) try: nxos_db.get_nexusport_binding(port_id, vlan_id, switch_ip, device_id) except excep.NexusPortBindingNotFound: nxos_db.add_nexusport_binding(port_id, str(vlan_id), str(vni), switch_ip, device_id, is_provider_vlan)
def _add_binding_to_db(self, npb): """Adds a port binding to the Nexus database.""" return nexus_db_v2.add_nexusport_binding( npb.port, npb.vlan, npb.vni, npb.switch, npb.instance, npb.is_provider_vlan, npb.channel_group, npb.is_native_vlan)