From 996f7f949002d3d23048550b69579889f4e1c5a2 Mon Sep 17 00:00:00 2001 From: KIYOHIRO ADACHI Date: Fri, 13 Sep 2013 14:13:53 +0900 Subject: [PATCH] Fixes the use of exception.InvalidInput with the wrong arguments 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 | 2 +- cinder/volume/drivers/netapp/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/netapp/iscsi.py b/cinder/volume/drivers/netapp/iscsi.py index 943a7bc64..da9859092 100644 --- a/cinder/volume/drivers/netapp/iscsi.py +++ b/cinder/volume/drivers/netapp/iscsi.py @@ -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. diff --git a/cinder/volume/drivers/netapp/utils.py b/cinder/volume/drivers/netapp/utils.py index 1c59c5249..f2cf389fe 100644 --- a/cinder/volume/drivers/netapp/utils.py +++ b/cinder/volume/drivers/netapp/utils.py @@ -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) -- 2.45.2