Ejemplo n.º 1
0
 def delete_port(self, tenant_id, net_id, port_id, **kwargs):
     """
     Deletes a port on a specified Virtual Network,
     if the port contains a remote interface attachment,
     the remote interface should first be un-plugged and
     then the port can be deleted.
     """
     LOG.debug("UCSVICPlugin:delete_port() called\n")
     self._set_ucsm(kwargs[const.DEVICE_IP])
     ucs_inventory = kwargs[const.UCS_INVENTORY]
     chassis_id = kwargs[const.CHASSIS_ID]
     blade_id = kwargs[const.BLADE_ID]
     interface_dn = kwargs[const.BLADE_INTF_DN]
     port_binding = udb.get_portbinding(port_id)
     profile_name = port_binding[const.PORTPROFILENAME]
     self._delete_port_profile(port_id, profile_name)
     ucs_inventory.unreserve_blade_interface(self._ucsm_ip, chassis_id,
                                             blade_id, interface_dn)
     return udb.remove_portbinding(port_id)
Ejemplo n.º 2
0
 def delete_port(self, tenant_id, net_id, port_id, **kwargs):
     """
     Deletes a port on a specified Virtual Network,
     if the port contains a remote interface attachment,
     the remote interface should first be un-plugged and
     then the port can be deleted.
     """
     LOG.debug("UCSVICPlugin:delete_port() called\n")
     self._set_ucsm(kwargs[const.DEVICE_IP])
     ucs_inventory = kwargs[const.UCS_INVENTORY]
     chassis_id = kwargs[const.CHASSIS_ID]
     blade_id = kwargs[const.BLADE_ID]
     interface_dn = kwargs[const.BLADE_INTF_DN]
     port_binding = udb.get_portbinding(port_id)
     profile_name = port_binding[const.PORTPROFILENAME]
     self._delete_port_profile(port_id, profile_name)
     ucs_inventory.unreserve_blade_interface(self._ucsm_ip, chassis_id,
                                             blade_id, interface_dn)
     return udb.remove_portbinding(port_id)