summaryrefslogtreecommitdiffstats
path: root/aai-traversal/bundleconfig-local/etc/query
diff options
context:
space:
mode:
authorLin, Jerry (jl319x) <jl319x@att.com>2017-08-14 12:47:28 -0400
committerLin, Jerry (jl319x) <jl319x@att.com>2017-08-14 12:54:04 -0400
commite82cd004e6f3f80bac4b7c9a00a453a27fca7790 (patch)
tree6c47c9aed0e343ed2ba9e43b0d8b6ee1d0109504 /aai-traversal/bundleconfig-local/etc/query
parentc97cd7981fe0c68477623af9e1268a50d6f279d6 (diff)
[AAI-147 Amsterdam] add custom queries
Change-Id: I0f03b5c63629a305d1156ff62902f872d50ff92d Signed-off-by: Lin, Jerry (jl319x) <jl319x@att.com>
Diffstat (limited to 'aai-traversal/bundleconfig-local/etc/query')
-rw-r--r--aai-traversal/bundleconfig-local/etc/query/stored-queries.properties56
1 files changed, 55 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 541cbc9..bc23513 100644
--- a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
+++ b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
@@ -180,4 +180,58 @@ cloudRegion-fromNfTypeVendorVersion=builder.createEdgeTraversal(EdgeType.COUSIN,
.store('x').cap('x').unfold().dedup()
vnf-instances-fromServiceInstancebyModelVersion=builder.createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'generic-vnf')\
.getVerticesByProperty('vnf-type', vnfType).getVerticesByProperty('model-version-id-local', modelVersionId)\
- .store('x').cap('x').unfold().dedup() \ No newline at end of file
+ .store('x').cap('x').unfold().dedup()
+
+topology-fromCloudRegionIdandServiceId=builder.createEdgeTraversal(EdgeType.TREE, 'cloud-region', 'availability-zone')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'availability-zone', 'generic-vnf').getVerticesByProperty('service-id',serviceId).union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'flavor').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'image').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'volume').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'vnfc').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'snapshot').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'vf-module').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'l-interface', 'logical-link').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', 'subnet').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'subnet', 'l3-network').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv6-address-list').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv6-address-list', 'subnet').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'subnet', 'l3-network').store('x')\
+ )\
+ )\
+ ).cap('x').unfold().dedup()
+vserverlogicallink-frompServer=builder.createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'vserver').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l-interface', 'logical-link')\
+ .store('x').cap('x').unfold().dedup()
+
+service-fromPserverandSubsName=builder.createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'vserver')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'generic-vnf')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').where(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'service-subscription').where(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-subscription', 'customer').getVerticesByProperty('subscriber-name', subscriberName)\
+ ).store('x')\
+ ).store('x').cap('x').unfold().dedup()
+
+spaas-topology-fromServiceInstance=builder.createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'generic-vnf')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'flavor').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'image').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'l-interface', 'logical-link').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', 'subnet').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'subnet', 'l3-network').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv6-address-list').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv6-address-list', 'subnet').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'subnet', 'l3-network').store('x')\
+ ),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'pserver', 'p-interface')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link').store('x')\
+ )\
+ ).cap('x').unfold().dedup()