From 57636bedd8a26b1acbd9e167b2d0ad7073c84c4d Mon Sep 17 00:00:00 2001 From: "Lin, Jerry (jl319x)" Date: Tue, 19 Sep 2017 17:10:30 -0400 Subject: Add custom queries Issue-ID: AAI-339 Change-Id: Ic93ef73daaa8c4e24168be62414bd67bad5b2a8b Signed-off-by: Lin, Jerry (jl319x) --- .../etc/query/stored-queries.properties | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) (limited to 'aai-traversal/bundleconfig-local') diff --git a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties index bf4753a..243c218 100644 --- a/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties +++ b/aai-traversal/bundleconfig-local/etc/query/stored-queries.properties @@ -272,3 +272,81 @@ linked-devices=builder.store('x').union(\ builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'l-interface', 'vserver')\ ).dedup().simplePath()\ ).store('x').cap('x').unfold().dedup() +topology-detail-fromVserver=builder.store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').store('x').union(\ + 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.TREE, 'vserver', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'generic-vnf').store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'platform').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'line-of-business').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance')\ + .union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'owning-entity').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'project').store('x')\ + ),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vnfc').store('x')\ + )\ +).cap('x').unfold().dedup() + +topology-detail=builder.store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'platform').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'line-of-business').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance')\ + .union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'owning-entity').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'project').store('x')\ + ),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vnfc').store('x').\ + createEdgeTraversal(EdgeType.COUSIN, 'vnfc', 'vserver').store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vserver', 'l-interface').store('x').union(\ + 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.TREE, 'vserver', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vserver', 'pserver').createEdgeTraversal(EdgeType.COUSIN, 'pserver', 'complex').store('x')\ + )\ + ).cap('x').unfold().dedup() + +pending-topology-detail=builder.store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'platform').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'line-of-business').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance')\ + .union(\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'owning-entity').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'service-instance', 'project').store('x')\ + ),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'vnfc').store('x')\ + .union(\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vnfc', '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, 'vnfc', '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, 'vnfc', 'vip-ipv4-address-list').store('x')\ + .createEdgeTraversal(EdgeType.COUSIN, 'vip-ipv4-address-list', 'subnet').store('x')\ + .createEdgeTraversal(EdgeType.TREE, 'subnet', 'l3-network').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vnfc', 'vip-ipv6-address-list').store('x')\ + .createEdgeTraversal(EdgeType.COUSIN, 'vip-ipv6-address-list', 'subnet').store('x')\ + .createEdgeTraversal(EdgeType.TREE, 'subnet', 'l3-network').store('x')\ + ).dedup()\ + ).cap('x').unfold().dedup() + +so-request-vfModule=builder.store('x').union(\ + builder.newInstance().createEdgeTraversal(EdgeType.TREE, 'vf-module', 'generic-vnf').store('x')\ + .createEdgeTraversal(EdgeType.COUSIN, 'generic-vnf', 'service-instance').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vf-module', 'vserver')\ + .createEdgeTraversal(EdgeType.TREE, 'vserver', 'tenant').createEdgeTraversal(EdgeType.TREE, 'tenant', 'cloud-region').store('x'),\ + builder.newInstance().createEdgeTraversal(EdgeType.COUSIN, 'vf-module', 'volume-group').store('x')\ + ).cap('x').unfold().dedup() \ No newline at end of file -- cgit 1.2.3-korg