From 7784d82d95e767a7ed61c7591762d47ba5f7e0e4 Mon Sep 17 00:00:00 2001 From: Srinivasan Ramanathan Date: Fri, 17 Jan 2020 11:17:44 +0000 Subject: Changes for MDONS usecase Updated schema for p-interface, logical-link, esr-thirdparty-sdnc, service-instance Updated DbEdgeRules for the usecase Updated stored-queries for new custom queries needed for the usecase Change-Id: If052355944c7c1cd72b54e83323909733de21c98 Issue-ID: AAI-2683 Signed-off-by: Srinivasan Ramanathan --- .../schema/onap/query/stored-queries.json | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'aai-queries') diff --git a/aai-queries/src/main/resources/schema/onap/query/stored-queries.json b/aai-queries/src/main/resources/schema/onap/query/stored-queries.json index 5bd2716..ba2825c 100644 --- a/aai-queries/src/main/resources/schema/onap/query/stored-queries.json +++ b/aai-queries/src/main/resources/schema/onap/query/stored-queries.json @@ -33,6 +33,34 @@ "pnf-topology":{ "stored-query":"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').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()" } + },{ + "getDomainController": { + "query":{ + "required-properties":["portid"] + }, + "stored-query":"builder.createEdgeTraversal(EdgeType.TREE, 'pnf', 'p-interface').getVerticesByProperty('interface-name',portid).createEdgeTraversal(EdgeType.TREE, 'p-interface', 'pnf').createEdgeTraversal(EdgeType.COUSIN, 'pnf', 'network-resource').createEdgeTraversal(EdgeType.COUSIN, 'network-resource', 'esr-thirdparty-sdnc').store('x').cap('x').unfold().dedup()" + } + },{ + "getInterfaceTypes": { + "query":{ + "required-properties":["porttype"] + }, + "stored-query":"builder.createEdgeTraversal(EdgeType.TREE, 'pnf', 'p-interface').getVerticesByProperty('network-interface-type',porttype).store('x').cap('x').unfold().dedup()" + } + },{ + "getInterDomainLink": { + "query":{ + "required-properties":["linktype","controller1","controller2"] + }, + "stored-query":"builder.createEdgeTraversal(EdgeType.COUSIN,'network-resource','esr-thirdparty-sdnc').getVerticesByProperty('thirdparty-sdnc-id',controller1).createEdgeTraversal(EdgeType.COUSIN,'esr-thirdparty-sdnc','network-resource').createEdgeTraversal(EdgeType.COUSIN,'network-resource','pnf').createEdgeTraversal(EdgeType.TREE,'pnf','p-interface').createEdgeTraversal(EdgeType.COUSIN,'p-interface','logical-link').store('x').getVerticesByProperty('link-type',linktype).where(builder.store('x').createEdgeTraversal(EdgeType.COUSIN,'logical-link','p-interface').createEdgeTraversal(EdgeType.TREE,'p-interface','pnf').createEdgeTraversal(EdgeType.COUSIN,'pnf','network-resource').createEdgeTraversal(EdgeType.COUSIN,'network-resource','esr-thirdparty-sdnc').getVerticesByProperty('thirdparty-sdnc-id',controller2)).cap('x').unfold().dedup()" + } + },{ + "getInterfaceDetails": { + "query":{ + "required-properties":["portid"] + }, + "stored-query": "builder.createEdgeTraversal(EdgeType.COUSIN, 'esr-thirdparty-sdnc','network-resource').createEdgeTraversal(EdgeType.COUSIN,'network-resource','pnf').createEdgeTraversal(EdgeType.TREE,'pnf','p-interface').getVerticesByProperty('interface-name', portid).store('x').cap('x').unfold().dedup()" + } },{ "so-request-vfModule":{ "stored-query":"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()" -- cgit 1.2.3-korg