Display missing key name in error message
This patch will display the key name that is missing in the parameters while creating the VNF. Change-Id: I0629fec1be7cba8593c03c11de46f206023b3881 Closes-Bug: #1501858
This commit is contained in:
parent
605b163afb
commit
c2791db98b
@ -86,7 +86,7 @@ class ParamYAMLNotWellFormed(exceptions.InvalidInput):
|
|||||||
|
|
||||||
|
|
||||||
class InputValuesMissing(exceptions.InvalidInput):
|
class InputValuesMissing(exceptions.InvalidInput):
|
||||||
message = _("Input values missing for 'get_input")
|
message = _("Parameter input values missing for the key '%(key)s'")
|
||||||
|
|
||||||
|
|
||||||
class ParamYAMLInputMissing(exceptions.InvalidInput):
|
class ParamYAMLInputMissing(exceptions.InvalidInput):
|
||||||
|
@ -111,13 +111,13 @@ class DeviceHeat(abstract_driver.DeviceAbstractDriver):
|
|||||||
self._update_params(value, paramvalues[key], False)
|
self._update_params(value, paramvalues[key], False)
|
||||||
else:
|
else:
|
||||||
LOG.debug('Key missing Value: %s', key)
|
LOG.debug('Key missing Value: %s', key)
|
||||||
raise vnfm.InputValuesMissing()
|
raise vnfm.InputValuesMissing(key=key)
|
||||||
elif 'get_input' in value:
|
elif 'get_input' in value:
|
||||||
if value['get_input'] in paramvalues:
|
if value['get_input'] in paramvalues:
|
||||||
original[key] = paramvalues[value['get_input']]
|
original[key] = paramvalues[value['get_input']]
|
||||||
else:
|
else:
|
||||||
LOG.debug('Key missing Value: %s', key)
|
LOG.debug('Key missing Value: %s', key)
|
||||||
raise vnfm.InputValuesMissing()
|
raise vnfm.InputValuesMissing(key=key)
|
||||||
else:
|
else:
|
||||||
self._update_params(value, paramvalues, True)
|
self._update_params(value, paramvalues, True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user