From 17257dba2c02b600c5a9a5e4149569d72b6ae25a Mon Sep 17 00:00:00 2001 From: "Maharajh, Robby (rx2202)" Date: Fri, 23 Mar 2018 14:23:40 -0400 Subject: Add to traversal custom query to get parent path Issue-ID: AAI-963 Change-Id: I3b323a42519de29980337ab80d9d0b68f16878c3 Signed-off-by: Maharajh, Robby (rx2202) --- aai-traversal/src/main/resources/etc/query/stored-queries.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'aai-traversal/src/main/resources/etc/query') diff --git a/aai-traversal/src/main/resources/etc/query/stored-queries.json b/aai-traversal/src/main/resources/etc/query/stored-queries.json index 6c61246..d511e5a 100644 --- a/aai-traversal/src/main/resources/etc/query/stored-queries.json +++ b/aai-traversal/src/main/resources/etc/query/stored-queries.json @@ -262,5 +262,10 @@ "gfp-vnf-data":{ "stored-query":"builder.store('x').union(builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'l-interface').union(builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x'),builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv6-address-list').store('x'),builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'vlan').store('x').union(builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vlan', 'l3-interface-ipv4-address-list').store('x'),builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vlan', 'l3-interface-ipv6-address-list').store('x'))),builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'lag-interface').createEdgeTraversal(EdgeType.TREE, 'lag-interface', 'l-interface').store('x').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'vlan').union(builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vlan', 'l3-interface-ipv4-address-list').store('x'),builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vlan', 'l3-interface-ipv6-address-list').store('x')),builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vnf-image').store('x'),builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'network-profile').store('x')).cap('x').unfold().dedup()" } - }] -} \ No newline at end of file + },{ + "containment-path":{ + "stored-query":"builder.until(builder.newInstance().not(builder.newInstance().getParentEdge())).repeat(builder.newInstance().getParentVertex()).path()" + } + } + ] +} -- cgit 1.2.3-korg