From a56ace019b2ed24181d8d8658d67f6557352cfeb Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Mon, 27 Jan 2014 18:46:26 -0500 Subject: [PATCH] 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 --- cinder/brick/iscsi/iscsi.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.45.2