diff options
author | LaMont, William(wl2432) <wl2432@att.com> | 2020-06-22 12:50:38 -0400 |
---|---|---|
committer | LaMont, William(wl2432) <wl2432@att.com> | 2020-06-22 12:51:08 -0400 |
commit | bd4c050748ac957f6bb6684915233e478d71c0a1 (patch) | |
tree | d5c9254a1123e49c18e7ef3e97aa7b9ca9afab2e /aai-traversal/src/main/resources | |
parent | 02b1b37d795f0bccf4500e14de5586891e78d306 (diff) |
traversal support for v20
Issue-ID: AAI-2933
Change-Id: I76f970d15ef911a3dd14d97f2fa050c8b6e29e96
Signed-off-by: LaMont, William(wl2432) <wl2432@att.com>
Diffstat (limited to 'aai-traversal/src/main/resources')
5 files changed, 12 insertions, 10 deletions
diff --git a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 index 3ba370c..29f6e3f 100644 --- a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 +++ b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v1/AAIDsl.g4 @@ -5,14 +5,14 @@ grammar AAIDsl; aaiquery: startStatement limit?; -startStatement: (vertex ) (traversal)* ; +startStatement: (vertex|unionVertex ) (traversal)* ; nestedStatement: (vertex|unionVertex ) (traversal)* ; vertex: label store? (filter)?; traversal: (edge (vertex|unionVertex)); -filter: (propertyFilter)* whereFilter?; +filter: (propertyFilter)* whereFilter*; propertyFilter: (not? '(' key (',' (key | num | bool))* ')'); bool: BOOL; diff --git a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 index 453c0fe..5d923e1 100644 --- a/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 +++ b/aai-traversal/src/main/resources/antlr4/org/onap/aai/dsl/v2/AAIDsl.g4 @@ -5,7 +5,7 @@ grammar AAIDsl; aaiquery: startStatement limit?; -startStatement: (vertex ) (traversal)* ; +startStatement: (vertex|unionVertex ) (traversal)* ; nestedStatement: (traversal)+ ; vertex: label store? (filter)?; @@ -13,14 +13,15 @@ vertex: label store? (filter)?; //traversal: ( vertex|unionVertex edge); traversal: (edge* (vertex|unionVertex)); -filter: (selectFilter)* (propertyFilter)* whereFilter?; +filter: (selectFilter)* (propertyFilter)* whereFilter*; propertyFilter: (not? '(' key (',' (key | num | bool))* ')'); -selectFilter: (not? '{' key (',' key)* '}'); +selectFilter: ( '{' key (',' key)* '}'); bool: BOOL; whereFilter: (not? '(' nestedStatement ')' ); -unionVertex: '[' ( nestedStatement ( comma (nestedStatement))*) ']' store?; +//unionVertex: '[' ( nestedStatement ( comma (nestedStatement))*) ']' store?; +unionVertex: '[' ( (edgeFilter)* nestedStatement ( comma ( (edgeFilter)* nestedStatement))*) ']' store?; comma: ','; edge: ( TRAVERSE|DIRTRAVERSE) (edgeFilter)?; diff --git a/aai-traversal/src/main/resources/application.properties b/aai-traversal/src/main/resources/application.properties index 48fdd46..6e4f3be 100644 --- a/aai-traversal/src/main/resources/application.properties +++ b/aai-traversal/src/main/resources/application.properties @@ -46,7 +46,7 @@ server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) server.ssl.trust-store=${server.certs.location}${server.truststore.name} server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) -schema.version.list=v10,v11,v12,v13,v14,v15,v16,v17,v18,v19 +schema.version.list=v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20 # Specifies which component should the oxm be looking at schema.source.name=onap # End of Internal Specific Properties @@ -83,7 +83,7 @@ schema.version.namespace.change.start=v12 # Specifies from which version should the client start seeing the edge label in payload schema.version.edge.label.start=v12 # Specifies the version that the application should default to -schema.version.api.default=v19 +schema.version.api.default=v20 schema.translator.list=config schema.service.base.url=https://localhost:8452/aai/schema-service/v1/ diff --git a/aai-traversal/src/main/resources/etc/appprops/error.properties b/aai-traversal/src/main/resources/etc/appprops/error.properties index 52de6ac..076fa32 100644 --- a/aai-traversal/src/main/resources/etc/appprops/error.properties +++ b/aai-traversal/src/main/resources/etc/appprops/error.properties @@ -72,6 +72,7 @@ AAI_4016=4:0:WARN:4016:400:3000:The depth parameter must be a number or the stri AAI_4017=5:2:INFO:4017:400:3000:Could not set property:300 AAI_4018=5:2:WARN:4018:400:3000:Unable to convert the string to integer:300 AAI_4019=5:4:ERROR:4018:400:3000:Invalid start time sent to history formats:300 +AAI_4020=5:4:ERROR:4020:400:3002:Unexpected data type for property key:400 #--- aaidbmap: 5102-5199 AAI_5102=5:4:FATAL:5102:500:3002:Graph database is null after open:400 diff --git a/aai-traversal/src/main/resources/schema/onap/query/stored-queries.json b/aai-traversal/src/main/resources/schema/onap/query/stored-queries.json index 327a0b5..ad6cabb 100644 --- a/aai-traversal/src/main/resources/schema/onap/query/stored-queries.json +++ b/aai-traversal/src/main/resources/schema/onap/query/stored-queries.json @@ -298,11 +298,11 @@ } },{ "getClfiRoadmTailSummary":{ - "stored-query":"builder.store('x').union(builder.newInstance().createEdgeTraversal(EdgeType.COUSIN,'logical-link', 'p-interface').store('x').createEdgeTraversal(EdgeType.TREE,'p-interface', 'pnf').store('x'), builder.newInstance().createEdgeTraversal(EdgeType.COUSIN,'logical-link', 'logical-link').createEdgeTraversal(EdgeType.COUSIN,'logical-link', '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()" + "stored-query":"builder.createEdgeTraversal(EdgeType.COUSIN,'logical-link', 'p-interface').createEdgeTraversal(EdgeType.TREE,'p-interface', 'pnf').tree()" } },{ "getRouterRoadmTailSummary":{ - "stored-query":"builder.store('x').createEdgeTraversal(EdgeType.TREE,'pnf', 'p-interface').store('x').createEdgeTraversal(EdgeType.COUSIN,'p-interface', 'logical-link').store('x').union(builder.newInstance().createEdgeTraversal(EdgeType.COUSIN,'logical-link', 'p-interface').store('x').createEdgeTraversal(EdgeType.TREE,'p-interface', 'pnf').store('x'), builder.newInstance().createEdgeTraversal(EdgeType.COUSIN,'logical-link', 'logical-link').createEdgeTraversal(EdgeType.COUSIN,'logical-link', '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()" + "stored-query":"builder.createEdgeTraversal(EdgeType.TREE,'pnf', 'p-interface').createEdgeTraversal(EdgeType.COUSIN,'p-interface', 'logical-link').createEdgeTraversal(EdgeType.COUSIN,'logical-link', 'p-interface').createEdgeTraversal(EdgeType.TREE,'p-interface', 'pnf').tree()" } },{ "topology-summary-fromCloudRegion":{ |