Merge "Use 'False' as default value for "compression" common capability"

This commit is contained in:
Jenkins 2015-10-14 15:19:15 +00:00 committed by Gerrit Code Review
commit cd4f0ef569
2 changed files with 17 additions and 0 deletions

View File

@ -126,6 +126,7 @@ class HostState(object):
self.snapshot_support = True
self.consistency_group_support = False
self.dedupe = False
self.compression = False
# PoolState for all pools
self.pools = {}
@ -288,6 +289,9 @@ class HostState(object):
if 'dedupe' not in pool_cap:
pool_cap['dedupe'] = self.dedupe
if 'compression' not in pool_cap:
pool_cap['compression'] = self.compression
def update_backend(self, capability):
self.share_backend_name = capability.get('share_backend_name')
self.vendor_name = capability.get('vendor_name')
@ -359,6 +363,8 @@ class PoolState(HostState):
'thin_provisioning', False)
self.dedupe = capability.get(
'dedupe', False)
self.compression = capability.get(
'compression', False)
def update_pools(self, capability):
# Do nothing, since we don't have pools within pool, yet

View File

@ -197,6 +197,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': False,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
}, {
'name': 'host2@back1#BBB',
@ -219,6 +220,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
}, {
'name': 'host2@back2#CCC',
@ -241,6 +243,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
},
]
@ -285,6 +288,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
}, {
'name': 'host2@BBB#pool2',
@ -308,6 +312,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
}, {
'name': 'host3@CCC#pool3',
@ -331,6 +336,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': 'pool',
'dedupe': False,
'compression': False,
},
}, {
'name': 'host4@DDD#pool4a',
@ -354,6 +360,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': 'host',
'dedupe': False,
'compression': False,
},
}, {
'name': 'host4@DDD#pool4b',
@ -377,6 +384,7 @@ class HostManagerTestCase(test.TestCase):
'snapshot_support': True,
'consistency_group_support': 'host',
'dedupe': False,
'compression': False,
},
},
]
@ -433,6 +441,7 @@ class HostManagerTestCase(test.TestCase):
'thin_provisioning': False,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
}, {
'name': 'host2@back1#BBB',
@ -455,6 +464,7 @@ class HostManagerTestCase(test.TestCase):
'thin_provisioning': True,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
},
]
@ -503,6 +513,7 @@ class HostManagerTestCase(test.TestCase):
'storage_protocol': None,
'consistency_group_support': False,
'dedupe': False,
'compression': False,
},
},
]