Merge "enable query graph with root and depth"

This commit is contained in:
Jenkins 2017-08-09 13:55:42 +00:00 committed by Gerrit Code Review
commit 0431b626f6

View File

@ -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.")