From c6dfef80f1055174d8c581cba466e84acb3c85ec Mon Sep 17 00:00:00 2001 From: Alexey Weyl Date: Tue, 12 Jul 2016 09:53:33 +0300 Subject: [PATCH] tempests changes Change-Id: I2a845fed8eeb06f52a0e3859242aae9106ead4f2 --- devstack/gate_hook.sh | 2 +- devstack/settings | 2 +- vitrage_tempest_tests/tests/api/base.py | 30 +++++++++---------- .../tests/api/topology/test_topology.py | 19 ++++++------ 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/devstack/gate_hook.sh b/devstack/gate_hook.sh index 9b7515f27..6454595f0 100644 --- a/devstack/gate_hook.sh +++ b/devstack/gate_hook.sh @@ -61,7 +61,7 @@ notification_driver = messagingv2 [[post-config|\$VITRAGE_CONF]] [datasources] -snapshots_interval = 7200 +snapshots_interval = 180 EOF $GATE_DEST/devstack-gate/devstack-vm-gate.sh diff --git a/devstack/settings b/devstack/settings index 782ceaeb6..e5630bb0e 100644 --- a/devstack/settings +++ b/devstack/settings @@ -24,7 +24,7 @@ VITRAGE_USE_MOD_WSGI=${VITRAGE_USE_MOD_WSGI:-${ENABLE_HTTPD_MOD_WSGI_SERVICES}} # Toggle for deploying Vitrage with/without nagios VITRAGE_USE_NAGIOS=$(trueorfalse False VITRAGE_USE_NAGIOS) -VITRAGE_DEFAULT_DATASOURCES=${VITRAGE_DEFAULT_DATASOURCES:-nova.host,nova.instance,nova.zone,nagios,static_physical,aodh,cinder.volume} +VITRAGE_DEFAULT_DATASOURCES=${VITRAGE_DEFAULT_DATASOURCES:-nova.host,nova.instance,nova.zone,nagios,static_physical,aodh,cinder.volume,neutron.network,neutron.port} # Tell Tempest this project is present diff --git a/vitrage_tempest_tests/tests/api/base.py b/vitrage_tempest_tests/tests/api/base.py index 2e7751da5..78b28be09 100644 --- a/vitrage_tempest_tests/tests/api/base.py +++ b/vitrage_tempest_tests/tests/api/base.py @@ -257,24 +257,22 @@ class BaseApiTest(base.BaseTestCase): validation_data.append(props) # switch - if kwargs.get('switch_entities') is not None: - props = {VProps.CATEGORY: EntityCategory.RESOURCE, - VProps.TYPE: SWITCH, - self.NUM_VERTICES_PER_TYPE: kwargs.get( - 'switch_entities', 0), - self.NUM_EDGES_PER_TYPE: kwargs.get( - 'switch_edges', 0)} - validation_data.append(props) + props = {VProps.CATEGORY: EntityCategory.RESOURCE, + VProps.TYPE: SWITCH, + self.NUM_VERTICES_PER_TYPE: kwargs.get( + 'switch_entities', 0), + self.NUM_EDGES_PER_TYPE: kwargs.get( + 'switch_edges', 0)} + validation_data.append(props) # aodh - if kwargs.get('aodh_entities') is not None: - props = {VProps.CATEGORY: EntityCategory.ALARM, - VProps.TYPE: AODH_DATASOURCE, - self.NUM_VERTICES_PER_TYPE: kwargs.get( - 'aodh_entities', 0), - self.NUM_EDGES_PER_TYPE: kwargs.get( - 'aodh_edges', 0)} - validation_data.append(props) + props = {VProps.CATEGORY: EntityCategory.ALARM, + VProps.TYPE: AODH_DATASOURCE, + self.NUM_VERTICES_PER_TYPE: kwargs.get( + 'aodh_entities', 0), + self.NUM_EDGES_PER_TYPE: kwargs.get( + 'aodh_edges', 0)} + validation_data.append(props) # neutron.network if kwargs.get('network_entities') is not None: diff --git a/vitrage_tempest_tests/tests/api/topology/test_topology.py b/vitrage_tempest_tests/tests/api/topology/test_topology.py index 04f1e3b9e..28b69e6fc 100644 --- a/vitrage_tempest_tests/tests/api/topology/test_topology.py +++ b/vitrage_tempest_tests/tests/api/topology/test_topology.py @@ -226,22 +226,20 @@ class TestTopology(BaseTopologyTest): """ try: # create entities - self._create_entities(num_instances=NUM_INSTANCE, - num_volumes=NUM_VOLUME) + self._create_entities(num_instances=NUM_INSTANCE) api_graph = self.vitrage_client.topology.get( - limit=4, root='RESOURCE:openstack.cluster') + limit=3, root='RESOURCE:openstack.cluster') self.assertIsNotNone(api_graph) graph = self._create_graph_from_graph_dictionary(api_graph) entities = self._entities_validation_data( host_entities=1, host_edges=NUM_INSTANCE + 1, instance_entities=NUM_INSTANCE, - instance_edges=NUM_INSTANCE + NUM_VOLUME, - volume_entities=NUM_VOLUME, - volume_edges=NUM_VOLUME) - self._validate_graph_correctness( - graph, 3 + NUM_INSTANCE + NUM_VOLUME, - 2 + NUM_INSTANCE + NUM_VOLUME, entities) + instance_edges=NUM_INSTANCE) + self._validate_graph_correctness(graph, + 3 + NUM_INSTANCE, + 2 + NUM_INSTANCE, + entities) except Exception as e: LOG.exception(e) finally: @@ -256,7 +254,8 @@ class TestTopology(BaseTopologyTest): try: # create entities self._create_entities(num_instances=3, num_volumes=1) - self.vitrage_client.topology.get(limit=2) + self.vitrage_client.topology.get(limit=2, + root='RESOURCE:openstack.cluster') except ClientException as e: self.assertEqual(403, e.code) self.assertEqual(