[share] Add support for thin_provisioning
Since some of backends support thin_provisioning, it's necessary to have a new parameter for skipping the test in unsupported environments. Change-Id: I9164a9f9d7d0dc913a1b91eb0efa741db8d523b8
This commit is contained in:
parent
a8aaad54f6
commit
684db64bf1
@ -55,6 +55,7 @@ class ShareService(VersionedService):
|
|||||||
dhss = set()
|
dhss = set()
|
||||||
capability_snapshot_support = set()
|
capability_snapshot_support = set()
|
||||||
capability_create_share_from_snapshot_support = set()
|
capability_create_share_from_snapshot_support = set()
|
||||||
|
capability_thin_provisioning = set()
|
||||||
for pool in pools:
|
for pool in pools:
|
||||||
backends.add(pool['backend'])
|
backends.add(pool['backend'])
|
||||||
pool_capabilities = pool['capabilities']
|
pool_capabilities = pool['capabilities']
|
||||||
@ -65,6 +66,11 @@ class ShareService(VersionedService):
|
|||||||
pool_capabilities['snapshot_support'])
|
pool_capabilities['snapshot_support'])
|
||||||
capability_create_share_from_snapshot_support.add(
|
capability_create_share_from_snapshot_support.add(
|
||||||
pool_capabilities['create_share_from_snapshot_support'])
|
pool_capabilities['create_share_from_snapshot_support'])
|
||||||
|
thin_provisioning = pool_capabilities.get('thin_provisioning')
|
||||||
|
thin_provisioning = ([thin_provisioning]
|
||||||
|
if not isinstance(thin_provisioning, list)
|
||||||
|
else thin_provisioning)
|
||||||
|
capability_thin_provisioning.add(any(thin_provisioning))
|
||||||
|
|
||||||
conf.set('share', 'backend_names', ','.join(backends))
|
conf.set('share', 'backend_names', ','.join(backends))
|
||||||
conf.set('share', 'enable_protocols', ','.join(enable_protocols))
|
conf.set('share', 'enable_protocols', ','.join(enable_protocols))
|
||||||
@ -82,6 +88,8 @@ class ShareService(VersionedService):
|
|||||||
str(any(capability_snapshot_support)))
|
str(any(capability_snapshot_support)))
|
||||||
conf.set('share', 'capability_create_share_from_snapshot_support',
|
conf.set('share', 'capability_create_share_from_snapshot_support',
|
||||||
str(any(capability_create_share_from_snapshot_support)))
|
str(any(capability_create_share_from_snapshot_support)))
|
||||||
|
conf.set('share', 'capability_thin_provisioned',
|
||||||
|
str(any(capability_thin_provisioning)))
|
||||||
|
|
||||||
if len(backends) > 1:
|
if len(backends) > 1:
|
||||||
conf.set('share', 'multi_backend', 'True')
|
conf.set('share', 'multi_backend', 'True')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user