Example #1
0
    def _configure_nxos_db(self, vlan_id, device_id, host_id):
        """Create the nexus database entry.

        Called during update precommit port event.
        """
        port_id, switch_ip = self._get_switch_info(host_id)
        nxos_db.add_nexusport_binding(port_id, str(vlan_id), switch_ip,
                                      device_id)
    def _configure_nxos_db(self, vlan_id, device_id, host_id):
        """Create the nexus database entry.

        Called during update precommit port event.
        """
        port_id, switch_ip = self._get_switch_info(host_id)
        nxos_db.add_nexusport_binding(port_id, str(vlan_id), switch_ip,
                                      device_id)
Example #3
0
    def _configure_nxos_db(self, vlan_id, device_id, host_id):
        """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)
            nxos_db.add_nexusport_binding(port_id, str(vlan_id), switch_ip,
                                          device_id)
Example #4
0
    def _configure_nxos_db(self, vlan_id, device_id, host_id):
        """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)
            nxos_db.add_nexusport_binding(port_id, str(vlan_id), switch_ip,
                                          device_id)
 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.switch,
                                           npb.instance)
 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.switch, npb.instance)
Example #7
0
 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.switch, npb.instance)
Example #8
0
 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.switch, npb.instance)