Пример #1
0
    def disassociate_portprofile(self, tenant_id, net_id, port_id, portprofile_id):
        """Disassociate port profile"""
        LOG.debug("disassociate_portprofile() called\n")
        try:
            portprofile = cdb.get_portprofile(tenant_id, portprofile_id)
        except Exception:
            raise cexc.PortProfileNotFound(tenant_id=tenant_id, portprofile_id=portprofile_id)

        cdb.remove_pp_binding(tenant_id, port_id, portprofile_id)
Пример #2
0
    def disassociate_portprofile(self, tenant_id, net_id,
                                 port_id, portprofile_id):
        """Disassociate port profile"""
        LOG.debug("disassociate_portprofile() called\n")
        try:
            portprofile = cdb.get_portprofile(tenant_id, portprofile_id)
        except Exception:
            raise cexc.PortProfileNotFound(tenant_id=tenant_id,
                                      portprofile_id=portprofile_id)

        cdb.remove_pp_binding(tenant_id, port_id, portprofile_id)
Пример #3
0
 def delete_pp_binding(self, tenant_id, port_id, pp_id):
     """Delete a portprofile binding"""
     try:
         res = l2network_db.remove_pp_binding(tenant_id, port_id, pp_id)
         LOG.debug("Deleted port profile binding : %s" % res.portprofile_id)
         ppbinding_dict = {}
         ppbinding_dict["portprofile-id"] = str(res.portprofile_id)
         return ppbinding_dict
     except Exception, exc:
         raise Exception("Failed to delete port profile: %s" % str(exc))