Added rules for Catalogue-WS refs #18056

This commit is contained in:
Luca Frosini 2019-11-15 16:42:11 +01:00
parent 0f7fbaf79f
commit 7eaa611767
8 changed files with 50 additions and 14 deletions

View File

@ -24,6 +24,9 @@ public class TestRules {
"AuthorizationService-generate",
"AuthorizationService-retrieve",
"AuthorizationService-scopes",
"Catalogue-WS-licenses",
"Catalogue-WS-organizations",
"Catalogue-WS-UNKNOWN",
"CkanConnector-connect",
"CkanConnector-disconnect",
"FullTextIndexNode-delete",
@ -54,10 +57,10 @@ public class TestRules {
String[] splittedLine = line.split(",");
boolean matched = matcherReplace.check(splittedLine[0],splittedLine[1],splittedLine[2]);
if(matched) {
logger.info("{} -> {},{},{}", line, replacer.getServiceClass(), replacer.getServiceName(), replacer.getCalledMethod());
logger.info("{} --> {},{},{}", line, replacer.getServiceClass(), replacer.getServiceName(), replacer.getCalledMethod());
} else {
logger.error("{} does not match {}. This MUST not occur.", line, matcherReplace.getMultiMatcher().toString());
throw new Exception(line + " does not match "+ matcherReplace.getMultiMatcher().toString() + ". This MUST not occur.");
throw new Exception();
}
}
@ -68,7 +71,7 @@ public class TestRules {
@Test
public void testSingleRule() throws Exception {
testRule("FullTextIndexNode-listCollections");
testRule("Catalogue-WS-licenses");
}
}

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "Data-Catalogue",
"serviceNameRegex": "Catalogue-WS",
"calledMethodRegex": "^\/rest$|^UNKNOWN$"
},
"replace": {
"serviceClass": "Data-Catalogue",
"serviceName": "Catalogue-WS",
"calledMethod": "UNKNOWN"
}
}

View File

@ -0,0 +1,2 @@
Data-Catalogue,Catalogue-WS,/rest
Data-Catalogue,Catalogue-WS,UNKNOWN
1 Data-Catalogue Catalogue-WS /rest
2 Data-Catalogue Catalogue-WS UNKNOWN

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "Data-Catalogue",
"serviceNameRegex": "Catalogue-WS",
"calledMethodRegex": "^\/rest\/(api\/){0,1}licenses\/list"
},
"replace": {
"serviceClass": "Data-Catalogue",
"serviceName": "Catalogue-WS",
"calledMethod": "/rest/api/licenses/list"
}
}

View File

@ -0,0 +1,2 @@
Data-Catalogue,Catalogue-WS,/rest/licenses/list
Data-Catalogue,Catalogue-WS,/rest/api/licenses/list
1 Data-Catalogue Catalogue-WS /rest/licenses/list
2 Data-Catalogue Catalogue-WS /rest/api/licenses/list

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "Data-Catalogue",
"serviceNameRegex": "Catalogue-WS",
"calledMethodRegex": "^\/rest\/api\/organi(s|z)ation(s){0,1}\/list"
},
"replace": {
"serviceClass": "Data-Catalogue",
"serviceName": "Catalogue-WS",
"calledMethod": "/rest/api/organizations/list"
}
}

View File

@ -0,0 +1,4 @@
Data-Catalogue,Catalogue-WS,/rest/api/organisations/list
Data-Catalogue,Catalogue-WS,/rest/api/organizations/list
Data-Catalogue,Catalogue-WS,/rest/api/organisation/list
Data-Catalogue,Catalogue-WS,/rest/api/organization/list
1 Data-Catalogue Catalogue-WS /rest/api/organisations/list
2 Data-Catalogue Catalogue-WS /rest/api/organizations/list
3 Data-Catalogue Catalogue-WS /rest/api/organisation/list
4 Data-Catalogue Catalogue-WS /rest/api/organization/list

View File

@ -1,11 +0,0 @@
Index,FullTextIndexNode,getJSONTransformer
Index,FullTextIndexNode,setJSONTransformer
Index,FullTextIndexNode,getAllCollectionFields
Index,FullTextIndexNode,setCollectionFieldsAlias
Index,FullTextIndexNode,/getCollectionFieldsAlias
Index,FullTextIndexNode,/collectionsDocCount
Index,FullTextIndexNode,/getCompleteCollectionInfo
Index,FullTextIndexNode,/setCompleteCollectionInfo
Index,FullTextIndexNode,/deleteCompleteCollectionInfo
Index,FullTextIndexNode,/insertWithRecID
Index,FullTextIndexNode,/reIndex
1 Index FullTextIndexNode getJSONTransformer
2 Index FullTextIndexNode setJSONTransformer
3 Index FullTextIndexNode getAllCollectionFields
4 Index FullTextIndexNode setCollectionFieldsAlias
5 Index FullTextIndexNode /getCollectionFieldsAlias
6 Index FullTextIndexNode /collectionsDocCount
7 Index FullTextIndexNode /getCompleteCollectionInfo
8 Index FullTextIndexNode /setCompleteCollectionInfo
9 Index FullTextIndexNode /deleteCompleteCollectionInfo
10 Index FullTextIndexNode /insertWithRecID
11 Index FullTextIndexNode /reIndex