From b25b4955363fd1fde0a64728c40c7d2c0cdcc2fb Mon Sep 17 00:00:00 2001 From: emalin Date: Wed, 9 Aug 2017 12:45:31 +0300 Subject: [PATCH] enable query graph with root and depth Change-Id: I746fe965150777e5273a9cb3c4ac74dabbc1b2ac --- vitrage/api_handler/apis/topology.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vitrage/api_handler/apis/topology.py b/vitrage/api_handler/apis/topology.py index 2b624cad1..d9b0288c2 100644 --- a/vitrage/api_handler/apis/topology.py +++ b/vitrage/api_handler/apis/topology.py @@ -46,7 +46,8 @@ class TopologyApis(EntityGraphApisBase): is_admin_project = ctx.get(self.IS_ADMIN_PROJECT_PROPERTY, False) ga = self.entity_graph.algo - if graph_type == 'tree': + if graph_type == 'tree' or \ + ((root is not None) and (depth is not None)): if not query: LOG.error("Graph-type 'tree' requires a filter.") raise Exception("Graph-type 'tree' requires a filter.")