Skip to content

Commit

Permalink
Fixes the use of exception.InvalidInput with the wrong arguments
Browse files Browse the repository at this point in the history
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
  • Loading branch information
KIYOHIRO ADACHI committed Sep 13, 2013
1 parent ae75e3f commit 996f7f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cinder/volume/drivers/netapp/iscsi.py
Expand Up @@ -129,7 +129,7 @@ def _check_flags(self):
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.
Expand Down
2 changes: 1 addition & 1 deletion cinder/volume/drivers/netapp/utils.py
Expand Up @@ -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)
Expand Down

0 comments on commit 996f7f9

Please sign in to comment.