Added OTHER rule for Thredds

This commit is contained in:
Luca Frosini 2020-01-13 16:53:35 +01:00
parent 2d8ca8e1f3
commit 7655b4089d
3 changed files with 13 additions and 3 deletions

View File

@ -192,7 +192,6 @@ public class TestRules extends ContextTest {
try {
asur.aggregate(sur);
throw new Exception("The record has been aggregated and it should NOT");
} catch(NotAggregatableRecordsExceptions e) {
//logger.trace("{} is not aggragable as expected", sur);
}
@ -212,7 +211,7 @@ public class TestRules extends ContextTest {
allRules();
File rulesDirectory = getRulesDirectory();
File rulesDirFile = new File(rulesDirectory, "Thredds");
File rulesFile = new File(rulesDirFile, "Thredds_METADATA::COLLECTION.json");
File rulesFile = new File(rulesDirFile, "Thredds_OTHER.json");
testRule(rulesFile);
}

View File

@ -1,4 +1,3 @@
Service Class,Service Name,Called Method
SDI,Thredds,/style/ncss/layout.css
SDI,Thredds,/tds.css
SDI,Thredds,/folder.gif

1 Service Class SDI Service Name Thredds Called Method /style/ncss/layout.css
Service Class Service Name Called Method
1 SDI Thredds /style/ncss/layout.css /style/ncss/layout.css
2 SDI Thredds /tds.css /tds.css
3 SDI Thredds /folder.gif /folder.gif

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "SDI",
"serviceNameRegex": "Thredds",
"calledMethodRegex": "^(?!.*((\/public\/netcdf\/)|(::))).*$"
},
"replace": {
"serviceClass": "SDI",
"serviceName": "Thredds",
"calledMethod": "OTHER"
}
}