Disable instance with file creation if ceph is use

In kilo files injection is disabled if ceph is using,
so  that we need display tests only for
deployments without ceph

Change-Id: I6b1a1ff786b6452542a42b6032eb377eadb32021
Related-Bug: #1473164
This commit is contained in:
Tatyana Leontovich 2015-07-10 00:07:20 +03:00
parent cfaf2733dd
commit a94d5592b0
4 changed files with 35 additions and 2 deletions

View File

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

View File

@ -127,7 +127,18 @@ def _get_cluster_attrs(cluster_id, token=None):
cfg.CONF.adapter.nailgun_host, cfg.CONF.adapter.nailgun_port,
'api/releases/{0}'.format(release_id))
nodes_url = URL.format(
cfg.CONF.adapter.nailgun_host, cfg.CONF.adapter.nailgun_port,
'api/nodes?cluster_id={0}'.format(cluster_id))
nodes_response = REQ_SES.get(nodes_url).json()
if 'objects' in nodes_response:
nodes_response = nodes_response['objects']
enable_without_ceph = filter(lambda node: 'ceph-osd' in node['roles'],
nodes_response)
deployment_tags = set()
if not enable_without_ceph:
deployment_tags.add('enable_without_ceph')
fuel_version = response.get('fuel_version')
if fuel_version:

View File

@ -42,6 +42,8 @@ CLUSTERS = {
'operating_system': 'rhel',
'version': '2015.2-1.0',
},
'cluster_node': {
},
'cluster_attributes': {
'editable': {
'additional_components': {},
@ -58,6 +60,8 @@ CLUSTERS = {
'operating_system': 'ubuntu',
'version': '2015.2-1.0',
},
'cluster_node': {
},
'cluster_attributes': {
'editable': {
'additional_components': {},
@ -74,6 +78,8 @@ CLUSTERS = {
'operating_system': 'rhel',
'version': '2015.2-1.0',
},
'cluster_node': {
},
'cluster_attributes': {
'editable': {
'additional_components': {
@ -97,6 +103,8 @@ CLUSTERS = {
'operating_system': 'none',
'version': '2015.2-1.0',
},
'cluster_node': {
},
'cluster_attributes': {
'editable': {
'additional_components': {},
@ -113,6 +121,8 @@ CLUSTERS = {
'operating_system': 'none',
'version': '2015.2-1.0',
},
'cluster_node': {
},
'cluster_attributes': {
'editable': {
'additional_components': {},
@ -129,6 +139,8 @@ CLUSTERS = {
'operating_system': '',
'version': '2015.2-6.0',
},
'cluster_node': {
},
'cluster_attributes': {
'editable': {
'additional_components': {},
@ -202,6 +214,11 @@ class BaseIntegrationTest(BaseUnitTest):
'/api/releases/{0}'.format(release_id),
json=cluster['release_data'])
self.requests_mock.register_uri(
'GET',
'/api/nodes?cluster_id={0}'.format(cluster_id),
json=cluster['cluster_node'])
self.requests_mock.register_uri(
'GET',
'/api/clusters/{0}/attributes'.format(cluster_id),
@ -217,7 +234,8 @@ class BaseWSGITest(BaseIntegrationTest):
'cluster': {
'id': 1,
'deployment_tags': set(['ha', 'rhel', 'nova_network',
'public_on_all_nodes'])
'public_on_all_nodes',
'enable_without_ceph'])
},
'test_sets': ['general_test',
'stopped_test', 'ha_deployment_test',

View File

@ -30,7 +30,8 @@ class TestDeplTagsGetter(base.BaseUnitTest):
'attrs': {
'deployment_tags': set(
['ha', 'rhel', 'additional_components',
'murano', 'nova_network', 'public_on_all_nodes']),
'murano', 'nova_network', 'public_on_all_nodes',
'enable_without_ceph']),
'release_version': '2015.2-1.0'
}
}
@ -43,6 +44,8 @@ class TestDeplTagsGetter(base.BaseUnitTest):
json=cluster['cluster_attributes'])
m.register_uri('GET', '/api/releases/3',
json=cluster['release_data'])
m.register_uri('GET', '/api/nodes?cluster_id=3',
json=cluster['cluster_node'])
res = mixins._get_cluster_attrs(expected['cluster_id'])
self.assertEqual(res, expected['attrs'])