Merge pull request #868 from gnuoy/fix-swift-replica-tests
Respect model in get_swift_storage_topology
This commit is contained in:
@@ -93,7 +93,7 @@ class TestSwiftUtils(ut_utils.BaseTestCase):
|
||||
self.patch_object(zaza.model, 'get_units')
|
||||
self.patch_object(zaza.model, 'get_unit_public_address')
|
||||
|
||||
def _get_unit_public_address(u):
|
||||
def _get_unit_public_address(u, model_name=None):
|
||||
return u.public_address
|
||||
|
||||
self.get_unit_public_address.side_effect = _get_unit_public_address
|
||||
|
||||
@@ -207,7 +207,10 @@ def get_swift_storage_topology(model_name=None):
|
||||
region = app_config['storage-region']['value']
|
||||
zone = app_config['zone']['value']
|
||||
for unit in zaza.model.get_units(app_name, model_name=model_name):
|
||||
topology[zaza.model.get_unit_public_address(unit)] = {
|
||||
unit_ip = zaza.model.get_unit_public_address(
|
||||
unit,
|
||||
model_name=model_name)
|
||||
topology[unit_ip] = {
|
||||
'app_name': app_name,
|
||||
'unit': unit,
|
||||
'region': region,
|
||||
|
||||
Reference in New Issue
Block a user