diff --git a/cinder/exception.py b/cinder/exception.py index dbd9b380204..86c2bfdf55d 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -1389,3 +1389,8 @@ class ErrorInHyperScaleVersion(VolumeDriverException): class ErrorInParsingArguments(VolumeDriverException): message = _("Error in parsing message arguments : Invalid Payload") + + +# GPFS driver +class GPFSDriverUnsupportedOperation(VolumeBackendAPIException): + message = _("GPFS driver unsupported operation: %(msg)s") diff --git a/cinder/tests/unit/volume/drivers/test_gpfs.py b/cinder/tests/unit/volume/drivers/test_gpfs.py index 42f907e11a3..8d67a2dd7a0 100644 --- a/cinder/tests/unit/volume/drivers/test_gpfs.py +++ b/cinder/tests/unit/volume/drivers/test_gpfs.py @@ -1647,6 +1647,19 @@ class GPFSDriverTestCase(test.TestCase): self.assertRaises(exception.VolumeBackendAPIException, self.driver.delete_consistencygroup, ctxt, group, []) + def test_update_consistencygroup(self): + ctxt = self.context + group = self._fake_group() + self.assertRaises(exception.GPFSDriverUnsupportedOperation, + self.driver.update_consistencygroup, ctxt, group) + + def test_create_consisgroup_from_src(self): + ctxt = self.context + group = self._fake_group() + self.assertRaises(exception.GPFSDriverUnsupportedOperation, + self.driver.create_consistencygroup_from_src, + ctxt, group, []) + @mock.patch('cinder.volume.drivers.ibm.gpfs.GPFSDriver.create_snapshot') def test_create_cgsnapshot(self, mock_create_snap): ctxt = self.context diff --git a/cinder/volume/drivers/ibm/gpfs.py b/cinder/volume/drivers/ibm/gpfs.py index b4d6fc82a37..8dcead8a33d 100644 --- a/cinder/volume/drivers/ibm/gpfs.py +++ b/cinder/volume/drivers/ibm/gpfs.py @@ -1240,6 +1240,20 @@ class GPFSDriver(driver.CloneableImageVD, return model_update, snapshots_model_update + def update_consistencygroup(self, context, group, + add_volumes=None, remove_volumes=None): + msg = _('Updating a consistency group is not supported.') + LOG.error(msg) + raise exception.GPFSDriverUnsupportedOperation(msg=msg) + + def create_consistencygroup_from_src(self, context, group, volumes, + cgsnapshot=None, snapshots=None, + source_cg=None, source_vols=None): + msg = _('Creating a consistency group from any source consistency' + 'group or consistency group snapshot is not supported.') + LOG.error(msg) + raise exception.GPFSDriverUnsupportedOperation(msg=msg) + @interface.volumedriver class GPFSRemoteDriver(GPFSDriver, san.SanDriver):