Improved rules for data-transfer-service

This commit is contained in:
Luca Frosini 2020-03-26 15:10:49 +01:00
parent a59c89ae8f
commit ead2ad393b
8 changed files with 38 additions and 14 deletions

View File

@ -216,8 +216,8 @@ public class TestRules extends ContextTest {
public void testSingleRule() throws Exception {
allRules();
File rulesDirectory = getRulesDirectory();
File rulesDirFile = new File(rulesDirectory, "geoanalytics-gos");
File rulesFile = new File(rulesDirFile, "geoanalytics-gos-OTHER.json");
File rulesDirFile = new File(rulesDirectory, "data-transfer-service");
File rulesFile = new File(rulesDirFile, "data-transfer-service-transfer.json");
testRule(rulesFile);
}

View File

@ -179,7 +179,7 @@
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": ".*Capabilities.*"
"calledMethodRegex": ".*(c|C)apabilities.*"
},
"replace": {
"serviceClass": "DataTransfer",
@ -190,12 +190,23 @@
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": ".*FileUpload.*"
"calledMethodRegex": ".*TransferStatus.*"
},
"replace": {
"serviceClass": "DataTransfer",
"serviceName": "data-transfer-service",
"calledMethod": "upload"
"calledMethod": "getTransferStatus"
}
},{
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": "\/{0,1}gcube\/service\/REST\/.*"
},
"replace": {
"serviceClass": "DataTransfer",
"serviceName": "data-transfer-service",
"calledMethod": "transfer"
}
},{
"match": {

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": ".*Capabilities.*"
"calledMethodRegex": ".*(c|C)apabilities.*"
},
"replace": {
"serviceClass": "DataTransfer",

View File

@ -0,0 +1,3 @@
DataTransfer,data-transfer-service,/gcube/service/TransferStatus/338d5081-f507-49fc-94ea-6514b6b98425
DataTransfer,data-transfer-service,gcube/service/TransferStatus/338d5081-f507-49fc-94ea-6514b6b98425
DataTransfer,data-transfer-service,getTransferStatus
1 DataTransfer data-transfer-service /gcube/service/TransferStatus/338d5081-f507-49fc-94ea-6514b6b98425
2 DataTransfer data-transfer-service gcube/service/TransferStatus/338d5081-f507-49fc-94ea-6514b6b98425
3 DataTransfer data-transfer-service getTransferStatus

View File

@ -2,11 +2,11 @@
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": ".*FileUpload.*"
"calledMethodRegex": ".*TransferStatus.*"
},
"replace": {
"serviceClass": "DataTransfer",
"serviceName": "data-transfer-service",
"calledMethod": "upload"
"calledMethod": "getTransferStatus"
}
}

View File

@ -8,8 +8,6 @@ DataTransfer,data-transfer-service,gcube/service/REST/FileUpload/data-transfer-s
DataTransfer,data-transfer-service,gcube/service/REST/FileUpload/data-transfer-service/testFolder
DataTransfer,data-transfer-service,gcube/service/REST/FileUpload/thredds/public/netcdf/Oscar
DataTransfer,data-transfer-service,gcube/service/REST/FileUpload/thredds/public/netcdf/myCatalog
DataTransfer,data-transfer-service,fdgdgfdgf/FileUpload/c81a9e00-a27c-4fc3-8db8-d0c82f6633c5
DataTransfer,data-transfer-service,gfdgfgfgff/FileUpload/data-transfer-service
DataTransfer,data-transfer-service,bnvmcfh/FileUpload/data-transfer-service/testFolder
DataTransfer,data-transfer-service,truizdh/FileUpload/thredds/public/netcdf/Oscar
DataTransfer,data-transfer-service,sgfdhhjj/FileUpload/thredds/public/netcdf/myCatalog
DataTransfer,data-transfer-service,/gcube/service/REST/thredds/catalog.xml
DataTransfer,data-transfer-service,/gcube/service/REST/thredds/public/netcdf/CMEMS
DataTransfer,data-transfer-service,/gcube/service/REST/thredds/public/netcdf/Oscar
1 DataTransfer data-transfer-service /gcube/service/REST/FileUpload/c81a9e00-a27c-4fc3-8db8-d0c82f6633c5
8 DataTransfer data-transfer-service gcube/service/REST/FileUpload/data-transfer-service/testFolder
9 DataTransfer data-transfer-service gcube/service/REST/FileUpload/thredds/public/netcdf/Oscar
10 DataTransfer data-transfer-service gcube/service/REST/FileUpload/thredds/public/netcdf/myCatalog
11 DataTransfer data-transfer-service fdgdgfdgf/FileUpload/c81a9e00-a27c-4fc3-8db8-d0c82f6633c5 /gcube/service/REST/thredds/catalog.xml
12 DataTransfer data-transfer-service gfdgfgfgff/FileUpload/data-transfer-service /gcube/service/REST/thredds/public/netcdf/CMEMS
13 DataTransfer data-transfer-service bnvmcfh/FileUpload/data-transfer-service/testFolder /gcube/service/REST/thredds/public/netcdf/Oscar
DataTransfer data-transfer-service truizdh/FileUpload/thredds/public/netcdf/Oscar
DataTransfer data-transfer-service sgfdhhjj/FileUpload/thredds/public/netcdf/myCatalog

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": "\/{0,1}gcube\/service\/REST\/.*"
},
"replace": {
"serviceClass": "DataTransfer",
"serviceName": "data-transfer-service",
"calledMethod": "transfer"
}
}