diff options
Diffstat (limited to 'aai-traversal/bundleconfig-local')
-rw-r--r-- | aai-traversal/bundleconfig-local/etc/query/stored-queries.properties | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties index f29518e..bf4753a 100644 --- a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties +++ b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties @@ -238,4 +238,37 @@ spaas-topology-fromServiceInstance=builder.createEdgeTraversal(EdgeType.COUSIN, vnfs-fromServiceInstance=builder.createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'generic-vnf')\ .store('x').cap('x').unfold().dedup() -
\ No newline at end of file + + +vnfs-fromPserver=builder.where(\ + builder.newInstance().union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'pserver').getVerticesByProperty('hostname', hostname),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').getVerticesByProperty('hostname', hostname)\ + )\ + ).store('x').cap('x').unfold().dedup() + +linked-devices=builder.store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'l-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'lag-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'newvce', 'l-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface')\ + ).dedup()\ + .until(builder.newInstance().getVerticesByProperty('aai-node-type', new ArrayList<>(Arrays.asList('generic-vnf','newvce','vserver'))))\ + .repeat(builder.newInstance()\ + .union(\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'lag-interface', 'l-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'lag-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'vlan'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vlan', 'l-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'lag-interface', 'logical-link'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'logical-link', 'lag-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'l-interface', 'logical-link'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'logical-link', 'l-interface'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vlan', 'logical-link'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'logical-link', 'vlan'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'generic-vnf'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'lag-interface', 'generic-vnf'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'newvce'),\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'vserver')\ + ).dedup().simplePath()\ + ).store('x').cap('x').unfold().dedup() |