diff options
author | Ghe Rivero <ghe.rivero@hp.com> | 2014-07-22 15:23:44 +0000 |
---|---|---|
committer | Ghe Rivero <ghe.rivero@hp.com> | 2014-08-12 20:05:59 +0000 |
commit | 3419b38b1128a44147733b3ff003cdf0f61bebc6 (patch) | |
tree | f2cc61f121d3ec7a5d3d2207364dd137063d696e /ironic/drivers/modules/fake.py | |
parent | e8fc1cf7c54b8d67c6737c7f7f0deb3c9a38e178 (diff) | |
download | ironic-3419b38b1128a44147733b3ff003cdf0f61bebc6.tar.gz |
Raise MissingParameterValue instead of Invalid
There are several functions that were raising InvalidParameterValue,
when it should be a MissingParamenteValue. This way we can differentiate
both exceptions when needed.
Change-Id: Ia5ce05e30b3fb00261854857aeef46238a8b00f8
Diffstat (limited to 'ironic/drivers/modules/fake.py')
-rw-r--r-- | ironic/drivers/modules/fake.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ironic/drivers/modules/fake.py b/ironic/drivers/modules/fake.py index e2ea7aceb..6474a8d92 100644 --- a/ironic/drivers/modules/fake.py +++ b/ironic/drivers/modules/fake.py @@ -35,7 +35,7 @@ def _raise_unsupported_error(method=None): raise exception.InvalidParameterValue(_( "Unsupported method (%s) passed through to vendor extension.") % method) - raise exception.InvalidParameterValue(_( + raise exception.MissingParameterValue(_( "Method not specified when calling vendor extension.")) @@ -100,7 +100,7 @@ class FakeVendorA(base.VendorInterface): if method == 'first_method': bar = kwargs.get('bar') if not bar: - raise exception.InvalidParameterValue(_( + raise exception.MissingParameterValue(_( "Parameter 'bar' not passed to method 'first_method'.")) return _raise_unsupported_error(method) @@ -128,7 +128,7 @@ class FakeVendorB(base.VendorInterface): if method == 'second_method': bar = kwargs.get('bar') if not bar: - raise exception.InvalidParameterValue(_( + raise exception.MissingParameterValue(_( "Parameter 'bar' not passed to method 'second_method'.")) return _raise_unsupported_error(method) |