summaryrefslogtreecommitdiffstats
path: root/aai-traversal/bundleconfig-local/etc/query
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2017-05-25 10:21:33 -0400
committerVenkata Harish K Kajur <vk250x@att.com>2017-05-25 10:22:04 -0400
commit1320a79c29b2e0bacbf32af1ee348e55ccf08e7c (patch)
tree8845bda0a19e6821607de2dd51fb85f9c989273d /aai-traversal/bundleconfig-local/etc/query
parent9b9fd83426efaa48c4919910bbeba94d3c54a2b3 (diff)
Update the traversal to the latest internal code
Change-Id: I47f3bbbb953f9c1f2247758dda33b90d0aa56074 Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'aai-traversal/bundleconfig-local/etc/query')
-rw-r--r--aai-traversal/bundleconfig-local/etc/query/stored-queries.properties91
1 files changed, 91 insertions, 0 deletions
diff --git a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
index e69de29..31154a1 100644
--- a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
+++ b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
@@ -0,0 +1,91 @@
+ucpe-instance=store('x').union(\
+ __.out('locatedIn').has('aai-node-type', 'complex'),\
+ __.out('locatedIn').has('aai-node-type', 'cloud-region').out('locatedIn').has('aai-node-type', 'complex')\
+ ).store('x').cap('x').unfold().dedup()
+cloud-region-sites=has('aai-node-type', 'cloud-region').has('cloud-owner', owner).store('x').out('locatedIn').store('x').cap('x').unfold()
+service-sites=has('global-customer-id', customerId).out('subscribesTo')\
+ .has('service-type', type).out('hasInstance').store('x').in('hasInstance').has('aai-node-type', 'generic-vnf').store('x')\
+ .out('runsOnVserver').union(\
+ __.out('runsOnPserver').out('locatedIn'),\
+ __.in('owns').in('has').has('aai-node-type', 'cloud-region')\
+ ).store('x')\
+ .cap('x').unfold().dedup()
+edge-tag=repeat(__.union(bothE().has(tag, true), __.bothE().has(tag + '-REV', true)).bothV().dedup().store('x'))\
+ .until(__.union(bothE().has(tag, true), __.bothE().has(tag + '-REV', true)).count().is(0)).cap('x').unfold()
+ucpe-topology=store('x').union(\
+ __.out('hasPinterface').has('aai-node-type', 'p-interface')\
+ .where(__.outE('usesPhysicalLink')).as('item').store('x')\
+ .out('usesPhysicalLink').has('aai-node-type','physical-link').store('x')\
+ .in('usesPhysicalLink').has('aai-node-type','p-interface').where(__.not(__.cap('item'))).store('x')\
+ .in('hasPinterface').has('aai-node-type','pnf').store('x'),\
+ __.in('runsOnPserver').has('aai-node-type', 'generic-vnf').store('x')\
+ .as('vnf').out('usesVnfImage').has('aai-node-type', 'vnf-image').store('x')\
+ .select('vnf')\
+ .out('hasInstance').has('aai-node-type', 'service-instance').store('x')\
+ .in('hasInstance').has('aai-node-type', 'service-subscription').store('x')\
+ .in('subscribesTo').has('aai-node-type', 'customer').store('x'),\
+ __.out('locatedIn').store('x'),\
+ __.in('runsOnPserver').has('aai-node-type', 'vserver').in('runsOnVserver').has('aai-node-type', 'generic-vnf').store('x')\
+ .as('vnf').out('usesVnfImage').has('aai-node-type', 'vnf-image').store('x')\
+ .select('vnf')\
+ .out('hasInstance').has('aai-node-type', 'service-instance').store('x')\
+ .in('hasInstance').has('aai-node-type', 'service-subscription').store('x')\
+ .in('subscribesTo').has('aai-node-type', 'customer').store('x')\
+ ).cap('x').unfold().dedup()
+pnf-topology=store('x').union(\
+ __.out('hasPinterface').has('aai-node-type', 'p-interface').where(__.outE('usesPhysicalLink')).as('item').store('x')\
+ .out('usesPhysicalLink').has('aai-node-type','physical-link').store('x')\
+ .in('usesPhysicalLink').has('aai-node-type','p-interface').where(__.not(__.cap('item'))).store('x')\
+ .in('hasPinterface').has('aai-node-type', P.within('pserver', 'pnf')).store('x'),\
+ __.out('locatedIn').store('x')\
+ ).cap('x').unfold().dedup()
+topology-summary=store('x').union(\
+ __.out('uses').has('aai-node-type', 'vnfc').store('x'),\
+ __.out('runsOnVserver').store('x').union(\
+ __.out('hosts').has('aai-node-type', 'vnfc').store('x'),\
+ __.in('owns').has('aai-node-type', 'tenant').store('x').in('has').has('aai-node-type', 'cloud-region').store('x'),\
+ __.out('hasImage').store('x'),\
+ __.out('hasFlavor').store('x'),\
+ __.out('runsOnPserver').store('x').out('locatedIn').store('x'))\
+ ).cap('x').unfold().dedup()
+v2-legacy-subgraph=store('x').union(\
+ __.out('hasFlavor'), \
+ __.out('hasImage'), \
+ __.out('runsOnPserver').store('x').out('locatedIn').has('aai-node-type', 'complex')\
+ ).store('x').cap('x').unfold()
+
+sites-byCountryFilterCloudRegionVer=where(\
+ __.out('usesL3Network').has('aai-node-type', 'l3-network')\
+ .in('uses').has('aai-node-type', 'cloud-region').has('cloud-region-version', cloudRegionVersion))\
+ .store('x').cap('x').unfold().dedup()
+
+sites-byCloudRegionId=out('uses').has('aai-node-type', 'l3-network')\
+ .in('usesL3Network').has('aai-node-type', 'complex')\
+ .store('x').cap('x').unfold().dedup()
+
+site-l3network-cloudRegion=store('x')\
+ .out('usesL3Network').store('x')\
+ .in('uses').has('aai-node-type', 'cloud-region').store('x').cap('x').unfold()
+
+sites-byCountryFilterCloudRegionId=where(\
+ __.out('usesL3Network').in('uses').has('aai-node-type', 'cloud-region').has('cloud-region-id', cloudRegionId))\
+ .store('x').cap('x').unfold().dedup()
+
+complex-fromVnf=store('x').union(\
+ __.out('runsOnPserver').has('aai-node-type', 'pserver').store('x')\
+ .out('locatedIn').has('aai-node-type','complex'),\
+ __.out('runsOnVserver').has('aai-node-type','vserver')\
+ .out('runsOnPserver').has('aai-node-type', 'pserver').store('x')\
+ .out('locatedIn').has('aai-node-type','complex')\
+ ).store('x').cap('x').unfold().dedup()
+
+colocated-devices=store('x').union(\
+ __.out('hasPinterface').store('x').out('usesPhysicalLink').store('x'),\
+ __.out('locatedIn').has('aai-node-type', 'complex')\
+ .union(\
+ __.in('locatedIn').has('aai-node-type', 'pserver').store('x')\
+ .out('hasPinterface').store('x').out('usesPhysicalLink').store('x'),\
+ __.in('locatedIn').has('aai-node-type', 'pnf').store('x')\
+ .out('hasPinterface').store('x').out('usesPhysicalLink').store('x')\
+ )).cap('x').unfold().dedup()
+ \ No newline at end of file