# License for the specific language governing permissions and limitations
# under the License.
+import sys
+
import mock
from oslo_config import cfg
'display_description': ''}))
self.mock_client_service.service.createVol.assert_called_once_with(
request={
- 'attr': {'snap-quota': 1073741824, 'warn-level': 858993459,
+ 'attr': {'snap-quota': sys.maxsize,
+ 'warn-level': 858993459,
'name': 'testvolume', 'reserve': 0,
'online': True, 'pool-name': 'default',
'size': 1073741824, 'quota': 1073741824,
self.mock_client_service.service.createVol.assert_called_once_with(
request={
- 'attr': {'snap-quota': 1073741824, 'warn-level': 858993459,
+ 'attr': {'snap-quota': sys.maxsize,
+ 'warn-level': 858993459,
'name': 'testvolume-encryption', 'reserve': 0,
'online': True, 'pool-name': 'default',
'size': 1073741824, 'quota': 1073741824,
self.mock_client_service.service.createVol.assert_called_once_with(
request={
- 'attr': {'snap-quota': 1073741824, 'warn-level': 858993459,
+ 'attr': {'snap-quota': sys.maxsize,
+ 'warn-level': 858993459,
'name': 'testvolume-perfpolicy', 'reserve': 0,
'online': True, 'pool-name': 'default',
'size': 1073741824, 'quota': 1073741824,
self.driver.extend_volume({'name': 'testvolume'}, 5)
self.mock_client_service.service.editVol.assert_called_once_with(
request={'attr': {'size': 5368709120,
- 'snap-quota': 5368709120,
+ 'snap-quota': sys.maxsize,
'warn-level': 4294967296,
'reserve': 0,
'quota': 5368709120},
- 'mask': 628,
+ 'mask': 884,
'name': 'testvolume',
'sid': 'a9b9aba7'})
mock.call.service.cloneVol(
request={
'snap-name': 'openstack-clone-volume-abcdefghijkl',
- 'attr': {'snap-quota': 5368709120,
+ 'attr': {'snap-quota': sys.maxsize,
'name': 'volume',
'quota': 5368709120,
'reserve': 5368709120,
def test_get_volume_stats(self):
self.mock_client_service.service.getGroupConfig.return_value = \
FAKE_POSITIVE_GROUP_CONFIG_RESPONSE
- expected_res = {'driver_version': '1.1.1',
+ expected_res = {'driver_version': '1.1.2',
'total_capacity_gb': 7466.30419921875,
'QoS_support': False,
'reserved_percentage': 0,
expected_calls = [
mock.call.service.cloneVol(
request={'snap-name': 'testvolume-snap1',
- 'attr': {'snap-quota': 1073741824,
+ 'attr': {'snap-quota': sys.maxsize,
'name': 'clone-testvolume',
'quota': 1073741824,
'online': True,
'sid': 'a9b9aba7'}),
mock.call.service.editVol(
request={'attr': {'size': 2147483648,
- 'snap-quota': 2147483648,
+ 'snap-quota': sys.maxsize,
'warn-level': 1717986918,
'reserve': 0,
'quota': 2147483648},
- 'mask': 628,
+ 'mask': 884,
'name': 'clone-testvolume',
'sid': 'a9b9aba7'})]
self.mock_client_service.assert_has_calls(expected_calls)
import re
import six
import string
+import sys
from oslo_config import cfg
from oslo_log import log as logging
from cinder.volume import volume_types
-DRIVER_VERSION = '1.1.1'
+DRIVER_VERSION = '1.1.2'
AES_256_XTS_CIPHER = 2
DEFAULT_CIPHER = 3
EXTRA_SPEC_ENCRYPTION = 'nimble:encryption'
EXTRA_SPEC_PERF_POLICY = 'nimble:perfpol-name'
DEFAULT_PERF_POLICY_SETTING = 'default'
DEFAULT_ENCRYPTION_SETTING = 'no'
-VOL_EDIT_MASK = 4 + 16 + 32 + 64 + 512
+DEFAULT_SNAP_QUOTA = sys.maxsize
+VOL_EDIT_MASK = 4 + 16 + 32 + 64 + 256 + 512
SOAP_PORT = 5391
SM_ACL_APPLY_TO_BOTH = 3
SM_ACL_CHAP_USER_ANY = '*'
1.0 - Initial driver
1.1.0 - Added Extra Spec Capability
1.1.1 - Updated VERSION to Nimble driver version
-
+ 1.1.2 - Update snap-quota to unlimited
"""
VERSION = DRIVER_VERSION
'reserve': reserve_size,
'warn-level': int(vol_size * WARN_LEVEL),
'quota': vol_size,
- 'snap-quota': vol_size})
+ 'snap-quota': DEFAULT_SNAP_QUOTA})
return self._get_model_info(volume['name'])
def create_cloned_volume(self, volume, src_vref):
'reserve': reserve_size,
'warn-level': int(vol_size * WARN_LEVEL),
'quota': vol_size,
- 'snap-quota': vol_size})
+ 'snap-quota': DEFAULT_SNAP_QUOTA})
def _create_igroup_for_initiator(self, initiator_name):
"""Creates igroup for an initiator and returns the igroup name."""
'reserve': reserve_size,
'warn-level': int(volume_size * WARN_LEVEL),
'quota': volume_size,
- 'snap-quota': volume_size,
+ 'snap-quota': DEFAULT_SNAP_QUOTA,
'online': True,
'pool-name': pool_name,
'perfpol-name': perf_policy_name,
'reserve': reserve_size,
'warn-level': int(clone_size * WARN_LEVEL),
'quota': clone_size,
- 'snap-quota': clone_size,
+ 'snap-quota': DEFAULT_SNAP_QUOTA,
'online': True},
'snap-name': snap_name})