Merge "Fixes remove_export for IetAdm"

This commit is contained in:
Jenkins 2012-09-26 00:47:28 +00:00 committed by Gerrit Code Review
commit c367fa5e4a
2 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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()
@ -170,9 +170,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'))
@ -209,7 +207,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)