From: Eric Harney Date: Mon, 27 Jan 2014 23:46:26 +0000 (-0500) Subject: Add create_iscsi_target stub to TargetAdmin X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a56ace019b2ed24181d8d8658d67f6557352cfeb;p=openstack-build%2Fcinder-build.git Add create_iscsi_target stub to TargetAdmin This should be defined in TargetAdmin, as it is assumed to be present in all subclasses by callers. IetAdm and LioAdm may need additional work to behave as desired in all circumstances (such as volume extend), but this should at least stabilize things in the meantime. Closes-Bug: 1273480 Change-Id: Iac1381286ea07982e6db7f7c7abf3f9100e4be50 --- diff --git a/cinder/brick/iscsi/iscsi.py b/cinder/brick/iscsi/iscsi.py index ceac1b9c2..9aa83c9f9 100644 --- a/cinder/brick/iscsi/iscsi.py +++ b/cinder/brick/iscsi/iscsi.py @@ -53,6 +53,10 @@ class TargetAdmin(executor.Executor): """Create a iSCSI target and logical unit.""" raise NotImplementedError() + def update_iscsi_target(self, name): + """Update an iSCSI target.""" + raise NotImplementedError() + def remove_iscsi_target(self, tid, lun, vol_id, vol_name, **kwargs): """Remove a iSCSI target and logical unit.""" raise NotImplementedError() @@ -368,6 +372,9 @@ class IetAdm(TargetAdmin): raise exception.ISCSITargetCreateFailed(volume_id=vol_id) return tid + def update_iscsi_target(self, name): + pass + def remove_iscsi_target(self, tid, lun, vol_id, vol_name, **kwargs): LOG.info(_('Removing iscsi_target for volume: %s') % vol_id) self._delete_logicalunit(tid, lun, **kwargs) @@ -525,6 +532,9 @@ class LioAdm(TargetAdmin): return tid + def update_iscsi_target(self, name): + pass + def remove_iscsi_target(self, tid, lun, vol_id, vol_name, **kwargs): LOG.info(_('Removing iscsi_target: %s') % vol_id) vol_uuid_name = vol_name