From: Victor Rodionov Date: Fri, 13 Sep 2013 16:51:14 +0000 (+0400) Subject: nms.folder.create_with_opts not supported on Nexenta 3.1.4.2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2cae463f18a8a0a579e6dd22ec918af79934ac00;p=openstack-build%2Fcinder-build.git nms.folder.create_with_opts not supported on Nexenta 3.1.4.2 nms.folder.create_with_opts method not supported on early NexentaStor version (3.1.4.2). replace if with create_with_props. Closes-Bug: #1225094 Change-Id: I0c861ae8d966d53c6484e7ded8cab71f395fa059 --- diff --git a/cinder/tests/test_nexenta.py b/cinder/tests/test_nexenta.py index b301395fe..0965cdcd0 100644 --- a/cinder/tests/test_nexenta.py +++ b/cinder/tests/test_nexenta.py @@ -451,7 +451,7 @@ class TestNexentaNfsDriver(test.TestCase): compression = self.configuration.nexenta_volume_compression self.nms_mock.server.get_prop('volroot').AndReturn('/volumes') - self.nms_mock.folder.create_with_opts( + self.nms_mock.folder.create_with_props( 'stack', 'share/volume-1', {'compression': compression}) self.nms_mock.netstorsvc.share_folder(self.TEST_SHARE_SVC, 'stack/share/volume-1', @@ -470,7 +470,7 @@ class TestNexentaNfsDriver(test.TestCase): self.mox.ResetAll() self.nms_mock.server.get_prop('volroot').AndReturn('/volumes') - self.nms_mock.folder.create_with_opts( + self.nms_mock.folder.create_with_props( 'stack', 'share/volume-1', {'compression': compression}) self.nms_mock.netstorsvc.share_folder( self.TEST_SHARE_SVC, 'stack/share/volume-1', diff --git a/cinder/volume/drivers/nexenta/nfs.py b/cinder/volume/drivers/nexenta/nfs.py index 2aa7f938d..e3b298159 100644 --- a/cinder/volume/drivers/nexenta/nfs.py +++ b/cinder/volume/drivers/nexenta/nfs.py @@ -102,7 +102,7 @@ class NexentaNfsDriver(nfs.NfsDriver): # pylint: disable=R0921 vol, dataset = self._get_share_datasets(nfs_share) folder = '%s/%s' % (dataset, volume['name']) LOG.debug(_('Creating folder on Nexenta Store %s'), folder) - nms.folder.create_with_opts( + nms.folder.create_with_props( vol, folder, {'compression': self.configuration.nexenta_volume_compression} )