Cisco's unplug_iface refers to non existing exception
Bug #1006226 An extra exception,InvalidDetach has been added to cisco_exception.py and unplug_iface has been redirected to this exception Change-Id: I5d1e4070fd0cb60a973e55e5645509aef58e8083
This commit is contained in:
parent
681d096ef2
commit
4ac3207927
@ -183,3 +183,9 @@ class InvalidAttach(exceptions.QuantumException):
|
|||||||
"attachment ID with port ID happens implicitly when "
|
"attachment ID with port ID happens implicitly when "
|
||||||
"VM is instantiated; attach operation can be "
|
"VM is instantiated; attach operation can be "
|
||||||
"performed subsequently.")
|
"performed subsequently.")
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidDetach(exceptions.QuantumException):
|
||||||
|
message = _("Unable to unplug the attachment %(att_id)s from port "
|
||||||
|
"%(port_id)s for network %(net_id)s. The attachment "
|
||||||
|
"%(att_id)s does not exist.")
|
||||||
|
@ -288,7 +288,7 @@ class L2Network(QuantumPluginBase):
|
|||||||
port = db.port_get(net_id, port_id)
|
port = db.port_get(net_id, port_id)
|
||||||
attachment_id = port[const.INTERFACEID]
|
attachment_id = port[const.INTERFACEID]
|
||||||
if attachment_id is None:
|
if attachment_id is None:
|
||||||
raise exc.InvalidDetach(port_id=port_id, net_id=net_id,
|
raise cexc.InvalidDetach(port_id=port_id, net_id=net_id,
|
||||||
att_id=remote_interface_id)
|
att_id=remote_interface_id)
|
||||||
self._invoke_device_plugins(self._func_name(), [tenant_id, net_id,
|
self._invoke_device_plugins(self._func_name(), [tenant_id, net_id,
|
||||||
port_id])
|
port_id])
|
||||||
|
Loading…
Reference in New Issue
Block a user