summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorMotoKen <motokentsai@gmail.com>2012-09-25 12:43:26 +0800
committerMotoKen <motokentsai@gmail.com>2012-09-25 13:13:23 +0800
commit8ab365c5a9302d9770807e9ee8a6ed4100304298 (patch)
tree5751e7a44bcd1640b06897b46b152ef1a91ad135 /nova
parentbd9767b1aa664e25ca905b40bd9de4ead2f6a959 (diff)
Fixes remove_export for IetAdm
* Corrects indentation. * Uses specific iqn as keyword argument. Fixes bug 1055401 Change-Id: I1267be37a7e7adcd2a18ffb719326c5f68296523
Diffstat (limited to 'nova')
-rw-r--r--nova/volume/driver.py2
-rw-r--r--nova/volume/iscsi.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/nova/volume/driver.py b/nova/volume/driver.py
index 498216a2c..0781d65f9 100644
--- a/nova/volume/driver.py
+++ b/nova/volume/driver.py
@@ -396,7 +396,7 @@ class ISCSIDriver(VolumeDriver):
except exception.NotFound:
LOG.info(_("Skipping remove_export. No iscsi_target "
"provisioned for volume: %s"), volume['id'])
- return
+ return
else:
iscsi_target = 0
diff --git a/nova/volume/iscsi.py b/nova/volume/iscsi.py
index 8742c1de3..24d5eb412 100644
--- a/nova/volume/iscsi.py
+++ b/nova/volume/iscsi.py
@@ -75,7 +75,7 @@ class TargetAdmin(object):
"""Delete a target."""
raise NotImplementedError()
- def show_target(self, tid, **kwargs):
+ def show_target(self, tid, iqn=None, **kwargs):
"""Query the given target ID."""
raise NotImplementedError()
@@ -168,9 +168,7 @@ class TgtAdm(TargetAdmin):
os.unlink(volume_path)
- def show_target(self, tid, **kwargs):
- iqn = kwargs.get('iqn', None)
-
+ def show_target(self, tid, iqn=None, **kwargs):
if iqn is None:
raise exception.InvalidParameterValue(
err=_('valid iqn needed for show_target'))
@@ -207,7 +205,7 @@ class IetAdm(TargetAdmin):
'--tid=%s' % tid,
**kwargs)
- def show_target(self, tid, **kwargs):
+ def show_target(self, tid, iqn=None, **kwargs):
self._run('--op', 'show',
'--tid=%s' % tid,
**kwargs)