Added new rules and fixed existing ones

master
Luca Frosini 4 years ago
parent 1b3008e654
commit 650244485c

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

@ -0,0 +1,14 @@
DataAccess,ShareLatex,UNKNOWN
DataAccess,SpeciesProductsDiscovery,UNKNOWN
DataAnalysis,TabularData,UNKNOWN
InformationSystem,ICProxy,UNKNOWN
InformationSystem,IS-Collector,UNKNOWN
InformationSystem,IS-Notifier,UNKNOWN
InformationSystem,IS-Registry,UNKNOWN
Portal,SocialNetworking,UNKNOWN
ResourceManagement,FHNManager,UNKNOWN
VREManagement,ResourceManager,UNKNOWN
dataanalysis,dataminer-pool-manager,UNKNOWN
WPS,DataMiner,UNKNOWN
VREManagement,SmartExecutor,UNKNOWN
VREManagement,smart-executor,UNKNOWN
1 DataAccess ShareLatex UNKNOWN
2 DataAccess SpeciesProductsDiscovery UNKNOWN
3 DataAnalysis TabularData UNKNOWN
4 InformationSystem ICProxy UNKNOWN
5 InformationSystem IS-Collector UNKNOWN
6 InformationSystem IS-Notifier UNKNOWN
7 InformationSystem IS-Registry UNKNOWN
8 Portal SocialNetworking UNKNOWN
9 ResourceManagement FHNManager UNKNOWN
10 VREManagement ResourceManager UNKNOWN
11 dataanalysis dataminer-pool-manager UNKNOWN
12 WPS DataMiner UNKNOWN
13 VREManagement SmartExecutor UNKNOWN
14 VREManagement smart-executor UNKNOWN

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "(?<ServiceClass>.*)",
"serviceNameRegex": "(?<ServiceName>.*)",
"calledMethodRegex": "UNKNOWN"
},
"replace": {
"serviceClass": "${ServiceClass}",
"serviceName": "${ServiceName}",
"calledMethod": "OTHER"
}
}

@ -0,0 +1 @@
DataAccess,ShareLatex,OTHER
1 DataAccess ShareLatex OTHER

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "DataAccess",
"serviceNameRegex": "ShareLatex",
"calledMethodRegex": "^(?!(\/{0,1}gcube\/service\/){0,1}((connect)|(disconnect)|(project))).*"
},
"replace": {
"serviceClass": "DataAccess",
"serviceName": "ShareLatex",
"calledMethod": "OTHER"
}
}

@ -0,0 +1,7 @@
DataAccess,ShareLatex,/gcube/service/project/
DataAccess,ShareLatex,/gcube/service/project/2343243342/invite
DataAccess,ShareLatex,/gcube/service/project/5926cd131d8237585a012852
DataAccess,ShareLatex,/gcube/service/project/5926cd131d8237585a012852/invite
DataAccess,ShareLatex,/gcube/service/project/5926cd131d8237585a012852/invite/592ebd049184d8d801ae79b8
DataAccess,ShareLatex,/gcube/service/project/5926cd131d8237585a012852/invite/592ebd049184d8d801ae79b8/resend
DataAccess,ShareLatex,/gcube/service/projects/1233223/invite
1 DataAccess ShareLatex /gcube/service/project/
2 DataAccess ShareLatex /gcube/service/project/2343243342/invite
3 DataAccess ShareLatex /gcube/service/project/5926cd131d8237585a012852
4 DataAccess ShareLatex /gcube/service/project/5926cd131d8237585a012852/invite
5 DataAccess ShareLatex /gcube/service/project/5926cd131d8237585a012852/invite/592ebd049184d8d801ae79b8
6 DataAccess ShareLatex /gcube/service/project/5926cd131d8237585a012852/invite/592ebd049184d8d801ae79b8/resend
7 DataAccess ShareLatex /gcube/service/projects/1233223/invite

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "DataAccess",
"serviceNameRegex": "ShareLatex",
"calledMethodRegex": "^\/{0,1}gcube\/service\/project.*"
},
"replace": {
"serviceClass": "DataAccess",
"serviceName": "ShareLatex",
"calledMethod": "project"
}
}

@ -6,7 +6,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "execute"
}
}

@ -6,7 +6,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "getAvailablePlugins"
}
}

@ -6,7 +6,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "getScheduledExecution"
}
}

@ -6,7 +6,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "getState"
}
}

@ -6,7 +6,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "stop"
}
}

@ -1,5 +1,16 @@
[
{
"match": {
"serviceClassRegex": "(?<ServiceClass>.*)",
"serviceNameRegex": "(?<ServiceName>.*)",
"calledMethodRegex": "UNKNOWN"
},
"replace": {
"serviceClass": "${ServiceClass}",
"serviceName": "${ServiceName}",
"calledMethod": "OTHER"
}
},{
"match": {
"serviceClassRegex": "Common",
"serviceNameRegex": "AuthorizationService",
@ -429,6 +440,28 @@
"serviceName": "ShareLatex",
"calledMethod": "disconnect"
}
},{
"match": {
"serviceClassRegex": "DataAccess",
"serviceNameRegex": "ShareLatex",
"calledMethodRegex": "^(?!(\/{0,1}gcube\/service\/){0,1}((connect)|(disconnect)|(project))).*"
},
"replace": {
"serviceClass": "DataAccess",
"serviceName": "ShareLatex",
"calledMethod": "OTHER"
}
},{
"match": {
"serviceClassRegex": "DataAccess",
"serviceNameRegex": "ShareLatex",
"calledMethodRegex": "^\/{0,1}gcube\/service\/project.*"
},
"replace": {
"serviceClass": "DataAccess",
"serviceName": "ShareLatex",
"calledMethod": "project"
}
},{
"match": {
"serviceClassRegex": "(Search)|(DataRetrieval)",
@ -448,7 +481,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "execute"
}
},{
@ -459,7 +492,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "getAvailablePlugins"
}
},{
@ -470,7 +503,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "getScheduledExecution"
}
},{
@ -481,7 +514,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "getState"
}
},{
@ -503,7 +536,7 @@
},
"replace": {
"serviceClass": "VREManagement",
"serviceName": "smart-executor",
"serviceName": "SmartExecutor",
"calledMethod": "stop"
}
},{

File diff suppressed because one or more lines are too long

@ -1,5 +1,6 @@
#!/bin/bash
echo "[" > allRules.json
cat ./AllServices-OTHER.json >> allRules.json
cat **/*.json >> allRules.json
echo "]" >> allRules.json
sed -i 's/}{/},{/g' allRules.json

Loading…
Cancel
Save