Beispiel #1
0
 def delete_port_binding(self, port_id):
     """delete port binding"""
     try:
         res = ucs_db.remove_portbinding(port_id)
         LOG.debug("Deleted port binding : %s" % res.port_id)
         port_bind_dict = {}
         port_bind_dict["port-id"] = res.port_id
         return port_bind_dict
     except Exception, exc:
         raise Exception("Failed to delete port profile: %s" % str(exc))
Beispiel #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)
Beispiel #3
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)