Skip compute connectivity tests when public is absent on computes

Closes-Bug: #1272349

Change-Id: Icb83c646bbb64a95032944ee8e8f2a7a232db223
This commit is contained in:
Aleksey Kasatkin 2014-08-20 13:00:26 +03:00 committed by Artem Roma
parent c6ecd0137b
commit 907f25f8fa
5 changed files with 24 additions and 9 deletions

View File

@ -89,7 +89,7 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
1. Execute ping 8.8.8.8 command from a compute node.
Duration: 100 s.
Deployment tags: qemu | kvm
Deployment tags: qemu | kvm, public_on_all_nodes | nova_network
"""
if not self.computes:
self.skipTest('There are no compute nodes')
@ -118,7 +118,7 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
4. Check google.com host was successfully resolved.
Duration: 120 s.
Deployment tags: qemu | kvm
Deployment tags: qemu | kvm, public_on_all_nodes | nova_network
"""
if not self.computes:
self.skipTest('There are no computes nodes')

View File

@ -145,6 +145,11 @@ def _get_cluster_depl_tags(cluster_id, token=None):
request_url += '/' + 'attributes'
response = REQ_SES.get(request_url).json()
public_assignment = response['editable'].get('public_network_assignment')
if not public_assignment or \
public_assignment['assign_to_all_nodes']['value']:
deployment_tags.add('public_on_all_nodes')
additional_components = \
response['editable'].get('additional_components', dict())

View File

@ -26,7 +26,8 @@ cluster_fixture = {
},
'cluster_attributes': {
'editable': {
'additional_components': {}
'additional_components': {},
'common': {}
}
}
},
@ -40,7 +41,8 @@ cluster_fixture = {
},
'cluster_attributes': {
'editable': {
'additional_components': {}
'additional_components': {},
'common': {}
}
}
},
@ -61,7 +63,8 @@ cluster_fixture = {
'sahara': {
'value': False
}
}
},
'common': {}
}
}
},
@ -75,7 +78,8 @@ cluster_fixture = {
},
'cluster_attributes': {
'editable': {
'additional_components': {}
'additional_components': {},
'common': {}
}
}
},
@ -89,7 +93,8 @@ cluster_fixture = {
},
'cluster_attributes': {
'editable': {
'additional_components': {}
'additional_components': {},
'common': {}
}
}
}

View File

@ -38,7 +38,8 @@ class BaseWSGITest(unittest2.TestCase):
cls.expected = {
'cluster': {
'id': 1,
'deployment_tags': set(['ha', 'rhel', 'nova_network'])
'deployment_tags': set(['ha', 'rhel', 'nova_network',
'public_on_all_nodes'])
},
'test_sets': ['general_test',
'stopped_test', 'ha_deployment_test',

View File

@ -14,17 +14,21 @@
import unittest
from fuel_plugin.ostf_adapter import config
from fuel_plugin.ostf_adapter import mixins
class TestDeplTagsGetter(unittest.TestCase):
def setUp(self):
config.init_config([])
def test_get_cluster_depl_tags(self):
expected = {
'cluster_id': 3,
'depl_tags': set(
['ha', 'rhel', 'additional_components',
'murano', 'nova_network']
'murano', 'nova_network', 'public_on_all_nodes']
)
}