]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add create_iscsi_target stub to TargetAdmin
authorEric Harney <eharney@redhat.com>
Mon, 27 Jan 2014 23:46:26 +0000 (18:46 -0500)
committerEric Harney <eharney@redhat.com>
Tue, 28 Jan 2014 14:47:12 +0000 (09:47 -0500)
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

index ceac1b9c2c4be0eb7cdb52800b36b55bb05095e5..9aa83c9f9ad5fa1ba7bd82d952903beeb179f7b7 100644 (file)
@@ -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