]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes the use of exception.InvalidInput with the wrong arguments
authorKIYOHIRO ADACHI <adachi@mxs.nes.nec.co.jp>
Fri, 13 Sep 2013 05:13:53 +0000 (14:13 +0900)
committerKIYOHIRO ADACHI <adachi@mxs.nes.nec.co.jp>
Fri, 13 Sep 2013 05:17:44 +0000 (14:17 +0900)
A mapping key of 'message' in exception.InvalidInput is 'reason'.
cinder/volume/drivers/netapp/iscsi.py and
cinder/volume/drivers/netapp/utils.py had used 'data'.

Change-Id: Ie40fc2f954984350827414edee9226adc80c8033
Closes-Bug: #1224790

cinder/volume/drivers/netapp/iscsi.py
cinder/volume/drivers/netapp/utils.py

index 943a7bc64145afd306179c9f48359db3dbdb2ddb..da9859092aecf6dc05b1a3e2d11517a8f6777df1 100644 (file)
@@ -129,7 +129,7 @@ class NetAppDirectISCSIDriver(driver.ISCSIDriver):
         for flag in required_flags:
             if not getattr(self.configuration, flag, None):
                 msg = _('%s is not set') % flag
-                raise exception.InvalidInput(data=msg)
+                raise exception.InvalidInput(reason=msg)
 
     def do_setup(self, context):
         """Setup the NetApp Volume driver.
index 1c59c5249d808e7ab495248699021c98b1d84429..f2cf389fea3a2ab4c83eec0a1a59d1f0ff5ec0af 100644 (file)
@@ -146,7 +146,7 @@ def invoke_api(na_server, api_name, api_family='cm', query=None,
     record_step = 50
     if not (na_server or isinstance(na_server, NaServer)):
         msg = _("Requires an NaServer instance.")
-        raise exception.InvalidInput(data=msg)
+        raise exception.InvalidInput(reason=msg)
     server = copy.copy(na_server)
     if api_family == 'cm':
         server.set_vserver(tunnel)