Merge "Skip 2 health checks if no computes w/o DPDK"

This commit is contained in:
Jenkins 2016-04-28 11:10:09 +00:00 committed by Gerrit Code Review
commit ee779a49c7
6 changed files with 32 additions and 11 deletions

View File

@ -53,7 +53,7 @@ class TestDPDK(neutronmanager.NeutronBaseTest, nmanager.SmokeChecksTest):
18. Remove network
Duration: 300 s.
Deployment tags: dpdk
Deployment tags: computes_with_dpdk
"""
if not self.config.compute.dpdk_compute_fqdn:
self.skipTest('There are no compute nodes with DPDK')

View File

@ -56,7 +56,7 @@ class TestNeutron(neutronmanager.NeutronBaseTest):
Duration: 300 s.
Deployment tags: neutron
Deployment tags: neutron, computes_without_dpdk
"""
if not self.config.compute.compute_nodes:
self.skipTest('There are no compute nodes')

View File

@ -304,7 +304,7 @@ class TestNovaNetwork(nmanager.NovaNetworkScenarioTest):
5. Delete floating ip.
6. Delete instance.
Duration: 200 s.
Deployment tags: enable_without_ceph
Deployment tags: enable_without_ceph, computes_without_dpdk
Available since release: 2014.2-6.1
"""
self.check_image_exists()

View File

@ -184,7 +184,9 @@ def _get_cluster_attrs(cluster_id, token=None):
deployment_tags.add('sriov')
if dpdk_compute_ids:
deployment_tags.add('dpdk')
deployment_tags.add('computes_with_dpdk')
if not dpdk_compute_ids or set(compute_ids) - set(dpdk_compute_ids):
deployment_tags.add('computes_without_dpdk')
if not enable_without_ceph:
deployment_tags.add('enable_without_ceph')

View File

@ -204,8 +204,13 @@ CLUSTERS = {
'id': "1",
'roles': "compute"
},
{
"hostname": "node-2",
'id': "2",
'roles': "compute"
},
],
'node_interfaces': [
'node-1_interfaces': [
{
'interface_properties': {
'dpdk': {
@ -213,7 +218,17 @@ CLUSTERS = {
}
}
},
],
'node-2_interfaces': [
{
'interface_properties': {
'dpdk': {
'available': 'false'
}
}
},
],
'cluster_attributes': {
'editable': {

View File

@ -31,7 +31,7 @@ class TestDeplTagsGetter(base.BaseUnitTest):
'deployment_tags': set(
['ha', 'rhel', 'additional_components',
'murano', 'nova_network', 'public_on_all_nodes',
'enable_without_ceph']),
'enable_without_ceph', 'computes_without_dpdk']),
'release_version': '2015.2-1.0'
}
}
@ -57,7 +57,8 @@ class TestDeplTagsGetter(base.BaseUnitTest):
'deployment_tags': set(
['ha', 'rhel', 'additional_components',
'murano', 'nova_network', 'public_on_all_nodes',
'enable_without_ceph', 'sriov']),
'enable_without_ceph', 'sriov',
'computes_without_dpdk']),
'release_version': '2015.2-1.0'
}
}
@ -83,8 +84,9 @@ class TestDeplTagsGetter(base.BaseUnitTest):
'cluster_id': 8,
'attrs': {
'deployment_tags': set(
['dpdk', 'neutron', 'enable_without_ceph', 'ha',
'public_on_all_nodes', 'rhel']),
['computes_with_dpdk', 'neutron', 'enable_without_ceph',
'ha', 'public_on_all_nodes', 'rhel',
'computes_without_dpdk']),
'release_version': '2015.2-1.0'
}
}
@ -100,7 +102,9 @@ class TestDeplTagsGetter(base.BaseUnitTest):
m.register_uri('GET', '/api/nodes?cluster_id=8',
json=cluster['cluster_node'])
m.register_uri('GET', '/api/nodes/1/interfaces',
json=cluster['node_interfaces'])
json=cluster['node-1_interfaces'])
m.register_uri('GET', '/api/nodes/2/interfaces',
json=cluster['node-2_interfaces'])
res = mixins._get_cluster_attrs(expected['cluster_id'])
self.assertEqual(res, expected['attrs'])