Merge "Allow visibility of external subnet as shared ones"
This commit is contained in:
commit
4bae4b08cc
@ -389,17 +389,20 @@ class NetworksTest(BaseNetworkTestResources):
|
|||||||
# belong to other tests and their state may have changed during this
|
# belong to other tests and their state may have changed during this
|
||||||
# test
|
# test
|
||||||
body = self.subnets_client.list_subnets(network_id=public_network_id)
|
body = self.subnets_client.list_subnets(network_id=public_network_id)
|
||||||
|
extensions = [
|
||||||
|
ext['alias'] for ext in
|
||||||
|
self.network_extensions_client.list_extensions()['extensions']]
|
||||||
|
is_sen_ext = 'subnet-external-network' in extensions
|
||||||
|
|
||||||
# check subnet visibility of external_network
|
# check subnet visibility of external_network
|
||||||
if external_network['shared']:
|
if external_network['shared'] or is_sen_ext:
|
||||||
self.assertNotEmpty(body['subnets'], "Subnets should be visible "
|
self.assertNotEmpty(body['subnets'],
|
||||||
"for shared public network %s"
|
'Subnets should be visible for shared or '
|
||||||
% public_network_id)
|
'external networks %s' % public_network_id)
|
||||||
else:
|
else:
|
||||||
self.assertEmpty(body['subnets'], "Subnets should not be visible "
|
self.assertEmpty(body['subnets'],
|
||||||
"for non-shared public "
|
'Subnets should not be visible for non-shared or'
|
||||||
"network %s"
|
'non-external networks %s' % public_network_id)
|
||||||
% public_network_id)
|
|
||||||
|
|
||||||
@decorators.idempotent_id('c72c1c0c-2193-4aca-ccc4-b1442640bbbb')
|
@decorators.idempotent_id('c72c1c0c-2193-4aca-ccc4-b1442640bbbb')
|
||||||
@utils.requires_ext(extension="standard-attr-description",
|
@utils.requires_ext(extension="standard-attr-description",
|
||||||
|
Loading…
Reference in New Issue
Block a user