aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal/bundleconfig-local
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal/bundleconfig-local')
-rw-r--r--aai-traversal/bundleconfig-local/etc/query/stored-queries.properties296
1 files changed, 151 insertions, 145 deletions
diff --git a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
index 808f16f..541cbc9 100644
--- a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
+++ b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties
@@ -1,177 +1,183 @@
-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')\
+ucpe-instance=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'cloud-region').createEdgeTraversal(EdgeType.COUSIN, 'cloud-region', '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')\
+cloud-region-sites=builder.getVerticesByProperty('aai-node-type', 'cloud-region').getVerticesByProperty('cloud-owner', owner).store('x').createEdgeTraversal(EdgeType.COUSIN, 'cloud-region', 'complex').store('x').cap('x').unfold()
+service-sites=builder.getVerticesByProperty('global-customer-id', customerId).createEdgeTraversal(EdgeType.TREE, 'customer', 'service-subscription')\
+ .getVerticesByProperty('service-type', type).createEdgeTraversal(EdgeType.TREE, 'service-subscription', 'service-instance').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'generic-vnf').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region')\
).store('x')\
.cap('x').unfold().dedup()
-edge-tag=emit().repeat(__.union(__.outE().has(tag, true).inV(), __.inE().has(tag + "-REV", true).outV()).dedup())
-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')\
+edge-tag=builder.emit().repeat(builder.newInstance().union(builder.newInstance().outE().getVerticesByProperty(tag, "OUT").inV(), builder.newInstance().inE().getVerticesByProperty(tag, "IN").outV()).dedup())
+ucpe-topology=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'pserver', 'p-interface')\
+ .where(builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link')).as('item').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'physical-link', 'p-interface').where(builder.newInstance().not(builder.newInstance().cap('item'))).store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'p-interface', 'pnf').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'generic-vnf').store('x')\
+ .as('vnf').createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', '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')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'service-instance', 'service-subscription').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'service-subscription', 'customer').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'vserver').createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'generic-vnf').store('x')\
+ .as('vnf').createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', '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')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'service-instance', 'service-subscription').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'service-subscription', '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')\
+pnf-topology=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'pnf', 'p-interface').where(builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link')).as('item').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'physical-link', 'p-interface').where(builder.newInstance().not(builder.newInstance().cap('item'))).store('x')\
+ .union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'p-interface', 'pserver').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'p-interface', 'pnf').store('x')\
+ ),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pnf', 'complex').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'))\
+topology-summary=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vnfc').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'vnfc').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').store('x').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'image').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'flavor').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x').createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex').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')\
+v2-legacy-subgraph=builder.newInstance().store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'flavor'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'image'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x').createEdgeTraversal(EdgeType.COUSIN, 'pserver', '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))\
+sites-byCountryFilterCloudRegionVer=builder.where(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'complex', 'l3-network')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-network', 'cloud-region').getVerticesByProperty('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')\
+sites-byCloudRegionId=builder.createEdgeTraversal(EdgeType.COUSIN, 'cloud-region', 'l3-network')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-network', '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()
+site-l3network-cloudRegion=builder.store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'complex', 'l3-network').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-network', '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))\
+sites-byCountryFilterCloudRegionId=builder.where(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'complex', 'l3-network')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'l3-network', 'cloud-region').getVerticesByProperty('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')\
+complex-fromVnf=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'pserver').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN,'pserver', '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')\
+colocated-devices=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'pserver', 'p-interface').store('x').createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'pserver', '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')\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'complex', 'pserver').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'pserver', 'p-interface').store('x').createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'complex', 'pnf').store('x')\
+ .createEdgeTraversal(EdgeType.TREE, 'pnf', 'p-interface').store('x').createEdgeTraversal(EdgeType.COUSIN, 'p-interface', 'physical-link').store('x')\
)).cap('x').unfold().dedup()
-
-pservers-fromVnf=union(\
- __.out('runsOnPserver').store('x'),\
- __.out('runsOnVserver').out('runsOnPserver').store('x')\
+
+pservers-fromVnf=builder.union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'pserver').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x')\
).cap('x').unfold().dedup()
-
-cloudRegion-fromNfType=out('runsOnVserver').in('owns').has('aai-node-type', 'tenant').in('has').has('aai-node-type','cloud-region')\
+
+cloudRegion-fromNfType=builder.createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region')\
.store('x').cap('x').unfold().dedup()
-
-nfType-fromCloudRegion=out('has').has('aai-node-type','tenant').out('owns').has('aai-node-type','vserver').in('runsOnVserver').has('aai-node-type','generic-vnf')\
+
+nfType-fromCloudRegion=builder.createEdgeTraversal(EdgeType.TREE, 'cloud-region', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'vserver').createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'generic-vnf')\
.store('x').cap('x').unfold().dedup()
-vnf-topology-fromServiceInstance=store('x').union(\
- __.in('hasInstance').has('aai-node-type', 'service-subscription').in('subscribesTo').has('aai-node-type','customer').store('x'),\
- __.out('has').has('aai-node-type','allotted-resource').store('x'),\
- __.in('hasInstance').has('aai-node-type', 'generic-vnf').store('x').union(\
- __.out('has').has('aai-node-type','vf-module').store('x'),\
- __.out('uses').has('aai-node-type','volume-group').store('x'),\
- __.out('hasLInterface').has ('aai-node-type','l-interface').union(\
- __.out('hasIpAddress').has('aai-node-type','l3-interface-ipv4-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x'),\
- __.out('hasIpAddress').has('aai-node-type','l3-interface-ipv6-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x')\
+cloudRegion-fromCountry=builder.createEdgeTraversal(EdgeType.COUSIN, 'complex', 'cloud-region')\
+ .store('x').cap('x').unfold().dedup()
+
+locationNetTypeNetRole-fromCloudRegion=builder.store('x').createEdgeTraversal(EdgeType.COUSIN, 'cloud-region', 'complex').store('x')\
+ .createEdgeTraversal(EdgeType.COUSIN, 'complex', 'l3-network')\
+ .store('x').cap('x').unfold().dedup()
+cloudRegion-fromCountryCloudRegionVersion=builder.createEdgeTraversal(EdgeType.COUSIN, 'complex', 'cloud-region').getVerticesByProperty('cloud-region-version', cloudRegionVersion)\
+ .store('x').cap('x').unfold().dedup()
+vnf-topology-fromServiceInstance=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'service-subscription').createEdgeTraversal(EdgeType.TREE, 'service-subscription', 'customer').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'allotted-resource').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'generic-vnf').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'vf-module').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'volume-group').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'l-interface').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', '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', 'l3-network').store('x')\
),\
- __.out('runsOnVserver').has('aai-node-type','vserver').store('x').union(\
- __.in('owns').has('aai-node-type','tenant').store('x').in('has').has('aai-node-type','cloud-region').store('x'),\
- __.out('runsOnPserver').has('aai-node-type','pserver').store('x'),\
- __.out('hasLInterface').has('aai-node-type','l-interface').out('hasIpAddress').has('aai-node-type','l3-interface-ipv4-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x'),\
- __.out('hasLInterface').has('aai-node-type','l-interface').out('hasIpAddress').has('aai-node-type','l3-interface-ipv6-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x')\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').store('x').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', 'l3-network').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv6-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv6-address-list', 'l3-network').store('x')\
)\
)\
).cap('x').unfold().dedup()
+
+vnf-topology-fromVnf=builder.store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'service-subscription').createEdgeTraversal(EdgeType.TREE, 'service-subscription', 'customer').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'allotted-resource').store('x')\
+ ),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'vf-module').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'volume-group').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'l-interface').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', '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', 'l3-network').store('x'),\
+ ),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').store('x').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', 'l3-network').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv6-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv6-address-list', 'l3-network').store('x'),\
+ )\
+ ).cap('x').unfold().dedup()
-vnf-topology-fromVnf=store('x').union(\
- __.out('hasInstance').has('aai-node-type', 'service-instance').store('x').union(\
- __.in('hasInstance').has('aai-node-type', 'service-subscription').in('subscribesTo').has('aai-node-type','customer').store('x'),\
- __.out('has').has('aai-node-type','allotted-resource').store('x')\
- ),\
- __.out('has').has('aai-node-type','vf-module').store('x'),\
- __.out('uses').has('aai-node-type','volume-group').store('x'),\
- __.out('hasLInterface').has ('aai-node-type','l-interface').union(\
- __.out('hasIpAddress').has('aai-node-type','l3-interface-ipv4-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x'),\
- __.out('hasIpAddress').has('aai-node-type','l3-interface-ipv6-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x')\
- ),\
- __.out('runsOnVserver').has('aai-node-type','vserver').store('x').union(\
- __.in('owns').has('aai-node-type','tenant').store('x').in('has').has('aai-node-type','cloud-region').store('x'),\
- __.out('runsOnPserver').has('aai-node-type','pserver').store('x'),\
- __.out('hasLInterface').has('aai-node-type','l-interface').out('hasIpAddress').has('aai-node-type','l3-interface-ipv4-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x'),\
- __.out('hasLInterface').has('aai-node-type','l-interface').out('hasIpAddress').has('aai-node-type','l3-interface-ipv6-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x')\
- )\
- ).cap('x').unfold().dedup()
-
-vnf-topology-fromVfModule=in('has').has('aai-node-type', 'generic-vnf').store('x').union(\
- __.out('hasInstance').has('aai-node-type', 'service-instance').store('x').union(\
- __.in('hasInstance').has('aai-node-type', 'service-subscription').in('subscribesTo').has('aai-node-type','customer').store('x'),\
- __.out('has').has('aai-node-type','allotted-resource').store('x')\
- ),\
- __.out('has').has('aai-node-type','vf-module').store('x'),\
- __.out('uses').has('aai-node-type','volume-group').store('x'),\
- __.out('hasLInterface').has ('aai-node-type','l-interface').union(\
- __.out('hasIpAddress').has('aai-node-type','l3-interface-ipv4-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x'),\
- __.out('hasIpAddress').has('aai-node-type','l3-interface-ipv6-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x')\
- ),\
- __.out('runsOnVserver').has('aai-node-type','vserver').store('x').union(\
- __.in('owns').has('aai-node-type','tenant').store('x').in('has').has('aai-node-type','cloud-region').store('x'),\
- __.out('runsOnPserver').has('aai-node-type','pserver').store('x'),\
- __.out('hasLInterface').has('aai-node-type','l-interface').out('hasIpAddress').has('aai-node-type','l3-interface-ipv4-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x'),\
- __.out('hasLInterface').has('aai-node-type','l-interface').out('hasIpAddress').has('aai-node-type','l3-interface-ipv6-address-list').store('x').out('isMemberOf').has('aai-node-type','l3-network').store('x')\
- )\
- ).cap('x').unfold().dedup()
-
-cloudRegion-fromCountry = in('locatedIn').has('aai-node-type','cloud-region')\
- .store('x').cap('x').unfold().dedup()
-cloudRegion-fromCountryCloudRegionVersion=in('locatedIn').has('aai-node-type','cloud-region').has('cloud-region-version', cloudRegionVersion)\
- .store('x').cap('x').unfold().dedup()
-locationNetTypeNetRole-fromCloudRegion=store('x').out('locatedIn').has('aai-node-type','complex').store('x')\
- .out('usesL3Network').has('aai-node-type','l3-network')\
- .store('x').cap('x').unfold().dedup()
-images-fromCloudRegionNfType=out('has').has('aai-node-type','tenant')\
- .out('owns').has('aai-node-type','vserver').where(\
- __.in('runsOnVserver').has('aai-node-type','generic-vnf').has('nf-type',nfType)\
- ).out('hasImage').has('aai-node-type','image').store('x').cap('x').unfold().dedup()
+vnf-topology-fromVfModule=builder.createEdgeTraversal(EdgeType.TREE, 'vf-module', 'generic-vnf').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'service-subscription').createEdgeTraversal(EdgeType.TREE, 'service-subscription', 'customer').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'service-instance', 'allotted-resource').store('x')\
+ ),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'vf-module').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'volume-group').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'generic-vnf', 'l-interface').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', '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', 'l3-network').store('x'),\
+ ),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vserver').store('x').union(\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').store('x').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv4-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv4-address-list', 'l3-network').store('x'),\
+ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').createEdgeTraversal(EdgeType.TREE, 'l-interface', 'l3-interface-ipv6-address-list').store('x').createEdgeTraversal(EdgeType.COUSIN, 'l3-interface-ipv6-address-list', 'l3-network').store('x'),\
+ )\
+ ).cap('x').unfold().dedup()
+
+images-fromCloudRegionNfType=builder.createEdgeTraversal(EdgeType.TREE, 'cloud-region', 'tenant')\
+ .createEdgeTraversal(EdgeType.TREE, 'tenant', 'vserver').where(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'generic-vnf').getVerticesByProperty('nf-type',nfType)\
+ ).createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'image').store('x').cap('x').unfold().dedup()
-cloudRegion-fromNfTypeVendorVersion=in('hasImage').has('aai-node-type','vserver').where(\
- __.in('runsOnVserver').has('aai-node-type','generic-vnf').has('nf-type',nfType)\
- ).in('owns').has('aai-node-type','tenant').in('has').has('aai-node-type','cloud-region')\
+cloudRegion-fromNfTypeVendorVersion=builder.createEdgeTraversal(EdgeType.COUSIN, 'image', 'vserver').where(\
+ builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'generic-vnf').getVerticesByProperty('nf-type',nfType)\
+ ).createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region')\
.store('x').cap('x').unfold().dedup()
-vnf-instances-fromServiceInstancebyModelVersion=in('hasInstance').has('aai-node-type', 'generic-vnf')\
- .has('vnf-type', vnfType).has('model-version-id-local', modelVersionId)\
- .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