Passing the error message as keyword argument
as expected by the base exception class (OpenstackException) which does not accept any positional arguments Fixes: bug #1204321 Change-Id: I320807f6f629fc337a612ad2f9c55ae2c156cfd9
This commit is contained in:
parent
60bd2997f2
commit
8f81d21ef1
@ -118,7 +118,7 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("PLUMgrid NOS communication failed")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
# return created network
|
||||
return net
|
||||
@ -150,7 +150,7 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("PLUMgrid NOS communication failed")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
# return updated network
|
||||
return new_network
|
||||
@ -174,7 +174,7 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("PLUMgrid NOS communication failed")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
def create_port(self, context, port):
|
||||
"""Create port core Neutron API."""
|
||||
@ -233,7 +233,7 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("PLUMgrid NOS communication failed: ")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
return subnet
|
||||
|
||||
@ -256,7 +256,7 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("PLUMgrid NOS communication failed: ")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
return del_subnet
|
||||
|
||||
@ -288,7 +288,7 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("PLUMgrid NOS communication failed: ")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
return new_subnet
|
||||
|
||||
@ -321,5 +321,5 @@ class NeutronPluginPLUMgridV2(db_base_plugin_v2.NeutronDbPluginV2):
|
||||
except Exception:
|
||||
err_message = _("Network Admin State Validation Falied: ")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
return network
|
||||
|
@ -84,7 +84,7 @@ class RestConnection(object):
|
||||
except ValueError:
|
||||
err_message = _("PLUMgrid HTTP Connection Failed: ")
|
||||
LOG.Exception(err_message)
|
||||
raise plum_excep.PLUMgridException(err_message)
|
||||
raise plum_excep.PLUMgridException(err_msg=err_message)
|
||||
|
||||
ret = (resp.status, resp.reason, resp_str)
|
||||
except urllib2.HTTPError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user