def delete_port_precommit(self, mech_context):
        """Delete logical port on the switch (db update)."""

        LOG.debug(_("delete_port_precommit: called"))
        port = mech_context.current
        port_id = port['id']

        context = mech_context._plugin_context

        try:
            brocade_db.delete_port(context, port_id)
        except Exception:
            LOG.exception(_("Brocade Mechanism: failed to delete port in db"))
            raise Exception(
                _("Brocade Mechanism: delete_port_precommit failed"))
Beispiel #2
0
    def delete_port_precommit(self, mech_context):
        """Delete logical port on the switch (db update)."""

        LOG.debug(_("delete_port_precommit: called"))
        port = mech_context.current
        port_id = port['id']

        context = mech_context._plugin_context

        try:
            brocade_db.delete_port(context, port_id)
        except Exception:
            LOG.exception(_("Brocade Mechanism: failed to delete port in db"))
            raise Exception(
                _("Brocade Mechanism: delete_port_precommit failed"))