aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal/bundleconfig-local
diff options
context:
space:
mode:
authorThreefoot, Jane (jt6620) <jt6620@att.com>2017-09-01 13:31:50 -0400
committerThreefoot, Jane (jt6620) <jt6620@att.com>2017-09-01 13:36:17 -0400
commite96bde2aaf8a134ce07660c024fc5699e4bdc872 (patch)
treecba64ab408bdaf1916b81c42c921fa028c7350ff /aai-traversal/bundleconfig-local
parent9699babd198a0d4cd738cc5bb906be1a353cb812 (diff)
added new queries for vce resiliency automation
Issue-ID: AAI-258 Change-Id: I648dc6f51e8801a29324d6e56e357bdefc957ae3 Signed-off-by: Threefoot, Jane (jt6620) <jt6620@att.com>
Diffstat (limited to 'aai-traversal/bundleconfig-local')
-rw-r--r--aai-traversal/bundleconfig-local/etc/query/stored-queries.properties35
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()