summaryrefslogtreecommitdiffstats
path: root/aai-traversal/bundleconfig-local
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
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')
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/error.properties1
-rw-r--r--aai-traversal/bundleconfig-local/etc/query/stored-queries.properties91
2 files changed, 92 insertions, 0 deletions
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/error.properties b/aai-traversal/bundleconfig-local/etc/appprops/error.properties
index 11416ca..20827e6 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/error.properties
+++ b/aai-traversal/bundleconfig-local/etc/appprops/error.properties
@@ -27,6 +27,7 @@ AAI_3006=5:6:WARN:3006:404:3001:Node cannot be directly accessed for write, must
AAI_3007=5:6:INFO:3007:410:3007:This version (%1) of the API is retired, please migrate to %2
AAI_3008=5:6:ERROR:3008:400:3008:URI is not encoded in UTF-8
AAI_3009=5:6:ERROR:3009:400:3002:Malformed URL
+AAI_3010=5:6:ERROR:3010:400:3002:Cannot write via this URL
# pol errors
AAI_3100=5:1:WARN:3100:400:3100:Unsupported operation %1
AAI_3101=5:1:WARN:3101:403:3101:Attempt by client %1 to execute API %2
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