From e025a0acf79825fd977acf7fe4cd815642f1e682 Mon Sep 17 00:00:00 2001 From: Alexey Weyl Date: Tue, 14 Mar 2017 13:16:01 +0000 Subject: [PATCH] fix for running nosetests locally on devstack Change-Id: Icf6fa3352826fc6c3f826dfbdbacf10d60637037 --- doc/source/vitrage-api.rst | 2 +- vitrage_tempest_tests/tests/api/topology/test_topology.py | 7 ++++--- vitrage_tempest_tests/tests/utils.py | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/source/vitrage-api.rst b/doc/source/vitrage-api.rst index 6457ba0d5..75199d055 100644 --- a/doc/source/vitrage-api.rst +++ b/doc/source/vitrage-api.rst @@ -135,7 +135,7 @@ Consists of a topology request definition which has the following properties: * depth - (int, optional) the depth of the topology graph. defaults to max depth * graph_type-(string, optional) can be either tree or graph. defaults to graph * query - (string, optional) a json query filter to filter the graph components. defaults to return all the graph -* all_tenants - +* all_tenants - shows the entities of all the tenants in the graph (in case the user has the permissions). query expression ================ diff --git a/vitrage_tempest_tests/tests/api/topology/test_topology.py b/vitrage_tempest_tests/tests/api/topology/test_topology.py index 66493b6ee..0ad2a9eda 100644 --- a/vitrage_tempest_tests/tests/api/topology/test_topology.py +++ b/vitrage_tempest_tests/tests/api/topology/test_topology.py @@ -50,9 +50,10 @@ class TestTopology(BaseTopologyTest): This test validate correctness of topology graph: cli via api """ - api_graph = self.vitrage_client.topology.get() - cli_graph = utils.run_vitrage_command('vitrage topology show', - self.conf) + api_graph = self.vitrage_client.topology.get(all_tenants=True) + cli_graph = utils.run_vitrage_command( + 'vitrage topology show --all-tenants', + self.conf) self._compare_graphs(api_graph, cli_graph) @utils.tempest_logger diff --git a/vitrage_tempest_tests/tests/utils.py b/vitrage_tempest_tests/tests/utils.py index f27206137..27e740741 100644 --- a/vitrage_tempest_tests/tests/utils.py +++ b/vitrage_tempest_tests/tests/utils.py @@ -12,6 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +from functools import wraps + import socket from oslo_config import cfg @@ -115,6 +117,7 @@ def uni2str(text): def tempest_logger(func): func_name = func.func_name + @wraps(func) def func_name_print_func(*args, **kwargs): LOG.info('Test Start: ' + func_name) result = func(*args, **kwargs)