Fixed rules

This commit is contained in:
Luca Frosini 2020-03-31 18:00:51 +02:00
parent f379063638
commit 4bdb6f8ae3
15 changed files with 86 additions and 50 deletions

View File

@ -219,8 +219,8 @@ public class TestRules extends ContextTest {
public void testSingleRule() throws Exception {
allRules();
File rulesDirectory = getRulesDirectory();
File rulesDirFile = new File(rulesDirectory, "SocialNetworking");
File rulesFile = new File(rulesDirFile, "SocialNetworking-all.json");
File rulesDirFile = new File(rulesDirectory, "DataMiner");
File rulesFile = new File(rulesDirFile, "DataMiner-all.json");
testRule(rulesFile);
}

View File

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "(Data-Catalogue)|(DataPublishing)",
"serviceNameRegex": "Catalogue-WS",
"calledMethodRegex": "^\/rest\/(api\/){0,1}licen(c|s)es\/(?<Action>(create|show|purge|delete))(\/{0,1})"
},
"replace": {
"serviceClass": "DataPublishing",
"serviceName": "Catalogue-WS",
"calledMethod": "${Action}License"
}
}

View File

@ -3,4 +3,13 @@ Data-Catalogue,Catalogue-WS,/rest/api/licenses/list
Data-Catalogue,Catalogue-WS,/rest/api/licences/list
Data-Catalogue,Catalogue-WS,/rest/api/licenses/list/
Data-Catalogue,Catalogue-WS,/rest/api/licences/list
Data-Catalogue,Catalogue-WS,/rest/api/licenses/list/
Data-Catalogue,Catalogue-WS,/rest/api/licenses/list/
Data-Catalogue Catalogue-WS /rest/api/licenses/show
Data-Catalogue Catalogue-WS /rest/api/namespaces/show
Data-Catalogue Catalogue-WS /rest/api/profiles/namespaces
Data-Catalogue Catalogue-WS /rest/api/profiles/profile
Data-Catalogue Catalogue-WS /rest/api/profiles/profile_names
1 Data-Catalogue Data-Catalogue,Catalogue-WS,/rest/licenses/list Catalogue-WS /rest/licenses/list
3 Data-Catalogue Data-Catalogue,Catalogue-WS,/rest/api/licences/list Catalogue-WS /rest/api/licences/list
4 Data-Catalogue Data-Catalogue,Catalogue-WS,/rest/api/licenses/list/ Catalogue-WS /rest/api/licenses/list/
5 Data-Catalogue Data-Catalogue,Catalogue-WS,/rest/api/licences/list Catalogue-WS /rest/api/licences/list
6 Data-Catalogue Data-Catalogue,Catalogue-WS,/rest/api/licenses/list/ Catalogue-WS /rest/api/licenses/list/
7 Data-Catalogue Catalogue-WS /rest/api/licenses/show
8 Data-Catalogue Catalogue-WS /rest/api/namespaces/show
9 Data-Catalogue Catalogue-WS /rest/api/profiles/namespaces
10 Data-Catalogue Catalogue-WS /rest/api/profiles/profile
11 Data-Catalogue Catalogue-WS /rest/api/profiles/profile_names
12
13
14
15

View File

@ -1,5 +1,3 @@
WPS,DataMiner,/WebProcessingService
WPS,DataMiner,WebProcessingService
WPS,DataMiner,UNKNOWN
WPS,DataMiner,OTHER
WPS,DataMiner,gcube/resource/scopes
1 WPS DataMiner /WebProcessingService UNKNOWN
WPS DataMiner /WebProcessingService
WPS DataMiner WebProcessingService
1 WPS DataMiner UNKNOWN UNKNOWN
2 WPS DataMiner OTHER OTHER
3 WPS DataMiner gcube/resource/scopes gcube/resource/scopes

View File

@ -2,7 +2,7 @@
"match": {
"serviceClassRegex": "(WPS)|(DataAnalysis)",
"serviceNameRegex": "DataMiner",
"calledMethodRegex": "^\/{0,1}(WebProcessingService|UNKNOWN|OTHER|(gcube\/resource\/scopes)).*"
"calledMethodRegex": "^\/{0,1}(UNKNOWN|OTHER|(gcube\/resource\/scopes)).*"
},
"replace": {
"serviceClass": "DataAnalysis",

View File

@ -1,3 +1,13 @@
WPS,DataMiner,GetCapabilities
WPS,DataMiner,/GetCapabilities
WPS,DataMiner,RetrieveResultServlet
WPS,DataMiner,/RetrieveResultServlet
WPS,DataMiner,DescribeProcess
WPS,DataMiner,/DescribeProcess
WPS,DataMiner,WebProcessingService
WPS,DataMiner,/WebProcessingService
WPS,DataMiner,CancelComputationServlet
WPS,DataMiner,/CancelComputationServlet
WPS,DataMiner,Execute
WPS,DataMiner,Execute - org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN
WPS,DataMiner,Execute - org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.KMEANS
1 WPS DataMiner Execute GetCapabilities
1 WPS DataMiner GetCapabilities
2 WPS DataMiner /GetCapabilities
3 WPS DataMiner RetrieveResultServlet
4 WPS DataMiner /RetrieveResultServlet
5 WPS DataMiner DescribeProcess
6 WPS DataMiner /DescribeProcess
7 WPS DataMiner WebProcessingService
8 WPS DataMiner /WebProcessingService
9 WPS DataMiner CancelComputationServlet
10 WPS DataMiner /CancelComputationServlet
11 WPS DataMiner Execute Execute
12 WPS DataMiner Execute - org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN Execute - org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN
13 WPS DataMiner Execute - org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.KMEANS Execute - org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.KMEANS

View File

@ -2,11 +2,11 @@
"match": {
"serviceClassRegex": "(WPS)|(DataAnalysis)",
"serviceNameRegex": "DataMiner",
"calledMethodRegex": "^/{0,1}GetCapabilities.*"
"calledMethodRegex": "^\/{0,1}(?<Method>(?!(UNKNOWN|OTHER|(gcube\/resource\/scopes))).*)"
},
"replace": {
"serviceClass": "DataAnalysis",
"serviceName": "DataMiner",
"calledMethod": "getCapabilities"
"calledMethod": "${Method}"
}
}

View File

@ -1 +0,0 @@
WPS,DataMiner,DescribeProcess
1 WPS DataMiner DescribeProcess

View File

@ -1,12 +0,0 @@
{
"match": {
"serviceClassRegex": "(WPS)|(DataAnalysis)",
"serviceNameRegex": "DataMiner",
"calledMethodRegex": "^/{0,1}DescribeProcess.*"
},
"replace": {
"serviceClass": "DataAnalysis",
"serviceName": "DataMiner",
"calledMethod": "describeProcess"
}
}

View File

@ -1 +0,0 @@
WPS,DataMiner,GetCapabilities
1 WPS DataMiner GetCapabilities

View File

@ -1,2 +0,0 @@
WPS,DataMiner,/RetrieveResultServlet
WPS,DataMiner,RetrieveResultServlet
1 WPS DataMiner /RetrieveResultServlet
2 WPS DataMiner RetrieveResultServlet

View File

@ -1,12 +0,0 @@
{
"match": {
"serviceClassRegex": "(WPS)|(DataAnalysis)",
"serviceNameRegex": "DataMiner",
"calledMethodRegex": "^/{0,1}RetrieveResult.*"
},
"replace": {
"serviceClass": "DataAnalysis",
"serviceName": "DataMiner",
"calledMethod": "getResult"
}
}

View File

@ -1,2 +0,0 @@
WPS,DataMiner,/CancelComputationServlet
WPS,DataMiner,CancelComputationServlet
1 WPS DataMiner /CancelComputationServlet
2 WPS DataMiner CancelComputationServlet

View File

@ -1,12 +0,0 @@
{
"match": {
"serviceClassRegex": "(WPS)|(DataAnalysis)",
"serviceNameRegex": "DataMiner",
"calledMethodRegex": "^/{0,1}CancelComputation.*"
},
"replace": {
"serviceClass": "DataAnalysis",
"serviceName": "DataMiner",
"calledMethod": "stop"
}
}

View File

@ -97,3 +97,52 @@ DataAccess,HomeLibraryWebapp,post/MoveToTrashIds
DataAccess,HomeLibraryWebapp,post/RemoveItem
DataAccess,HomeLibraryWebapp,post/SaveAccountingItem
DataAccess,HomeLibraryWebapp,post/SaveItem
DataAccess,HomeLibraryWebapp,/CanAddChildren
DataAccess,HomeLibraryWebapp,/CanDelete
DataAccess,HomeLibraryWebapp,/CanModifyProperties
DataAccess,HomeLibraryWebapp,/CanReadNode
DataAccess,HomeLibraryWebapp,/CreateSession
DataAccess,HomeLibraryWebapp,/CreateUserServlet
DataAccess,HomeLibraryWebapp,/DeleteAcesServlet
DataAccess,HomeLibraryWebapp,/GetAccountingById
DataAccess,HomeLibraryWebapp,/GetDisplayNameServlet
DataAccess,HomeLibraryWebapp,/GetVersionServlet
DataAccess,HomeLibraryWebapp,/GroupMembershipServlet
DataAccess,HomeLibraryWebapp,/IsGroupServlet
DataAccess,HomeLibraryWebapp,/ListGroupsServlet
DataAccess,HomeLibraryWebapp,/ModifyAceServlet
DataAccess,HomeLibraryWebapp,/ReleaseSession
DataAccess,HomeLibraryWebapp,/SetVersionServlet
DataAccess,HomeLibraryWebapp,/UpdateGroupServlet
DataAccess,HomeLibraryWebapp,/acl/GetACL
DataAccess,HomeLibraryWebapp,/acl/GetACLByUser
DataAccess,HomeLibraryWebapp,/acl/GetEACL
DataAccess,HomeLibraryWebapp,/get/Clone
DataAccess,HomeLibraryWebapp,/get/Copy
DataAccess,HomeLibraryWebapp,/get/ExecuteQuery
DataAccess,HomeLibraryWebapp,/get/GetChildrenById
DataAccess,HomeLibraryWebapp,/get/GetChildrenCount
DataAccess,HomeLibraryWebapp,/get/GetItemById
DataAccess,HomeLibraryWebapp,/get/GetItemByPath
DataAccess,HomeLibraryWebapp,/get/GetParentsById
DataAccess,HomeLibraryWebapp,/get/IsLocked
DataAccess,HomeLibraryWebapp,/get/LockSession
DataAccess,HomeLibraryWebapp,/get/Move
DataAccess,HomeLibraryWebapp,/get/SearchItems
DataAccess,HomeLibraryWebapp,/get/UnlockSession
DataAccess,HomeLibraryWebapp,/post/ChangePrimaryType
DataAccess,HomeLibraryWebapp,/post/CreateFolder
DataAccess,HomeLibraryWebapp,/post/MoveToTrashIds
DataAccess,HomeLibraryWebapp,/post/RemoveItem
DataAccess,HomeLibraryWebapp,/post/SaveAccountingItem
DataAccess,HomeLibraryWebapp,/post/SaveItem
DataAccess,HomeLibraryWebapp,/rest/GetPublicLink
DataAccess,HomeLibraryWebapp,/rest/Upload
DataAccess,HomeLibraryWebapp,/trash/DeleteFromTrash
DataAccess,HomeLibraryWebapp,/trash/EmptyTrash
DataAccess,HomeLibraryWebapp,/versioning/GetCurrentVersion
DataAccess,HomeLibraryWebapp,/versioning/GetVersion
DataAccess,HomeLibraryWebapp,/versioning/RemoveVersion
DataAccess,HomeLibraryWebapp,/versioning/RestoreVersion
DataAccess,HomeLibraryWebapp,/versioning/SaveCurrentVersion
DataAccess,HomeLibraryWebapp,/versioning/VersionHistory
1 DataAccess HomeLibraryWebapp /CanAddChildren
97 DataAccess HomeLibraryWebapp post/RemoveItem
98 DataAccess HomeLibraryWebapp post/SaveAccountingItem
99 DataAccess HomeLibraryWebapp post/SaveItem
100 DataAccess HomeLibraryWebapp /CanAddChildren
101 DataAccess HomeLibraryWebapp /CanDelete
102 DataAccess HomeLibraryWebapp /CanModifyProperties
103 DataAccess HomeLibraryWebapp /CanReadNode
104 DataAccess HomeLibraryWebapp /CreateSession
105 DataAccess HomeLibraryWebapp /CreateUserServlet
106 DataAccess HomeLibraryWebapp /DeleteAcesServlet
107 DataAccess HomeLibraryWebapp /GetAccountingById
108 DataAccess HomeLibraryWebapp /GetDisplayNameServlet
109 DataAccess HomeLibraryWebapp /GetVersionServlet
110 DataAccess HomeLibraryWebapp /GroupMembershipServlet
111 DataAccess HomeLibraryWebapp /IsGroupServlet
112 DataAccess HomeLibraryWebapp /ListGroupsServlet
113 DataAccess HomeLibraryWebapp /ModifyAceServlet
114 DataAccess HomeLibraryWebapp /ReleaseSession
115 DataAccess HomeLibraryWebapp /SetVersionServlet
116 DataAccess HomeLibraryWebapp /UpdateGroupServlet
117 DataAccess HomeLibraryWebapp /acl/GetACL
118 DataAccess HomeLibraryWebapp /acl/GetACLByUser
119 DataAccess HomeLibraryWebapp /acl/GetEACL
120 DataAccess HomeLibraryWebapp /get/Clone
121 DataAccess HomeLibraryWebapp /get/Copy
122 DataAccess HomeLibraryWebapp /get/ExecuteQuery
123 DataAccess HomeLibraryWebapp /get/GetChildrenById
124 DataAccess HomeLibraryWebapp /get/GetChildrenCount
125 DataAccess HomeLibraryWebapp /get/GetItemById
126 DataAccess HomeLibraryWebapp /get/GetItemByPath
127 DataAccess HomeLibraryWebapp /get/GetParentsById
128 DataAccess HomeLibraryWebapp /get/IsLocked
129 DataAccess HomeLibraryWebapp /get/LockSession
130 DataAccess HomeLibraryWebapp /get/Move
131 DataAccess HomeLibraryWebapp /get/SearchItems
132 DataAccess HomeLibraryWebapp /get/UnlockSession
133 DataAccess HomeLibraryWebapp /post/ChangePrimaryType
134 DataAccess HomeLibraryWebapp /post/CreateFolder
135 DataAccess HomeLibraryWebapp /post/MoveToTrashIds
136 DataAccess HomeLibraryWebapp /post/RemoveItem
137 DataAccess HomeLibraryWebapp /post/SaveAccountingItem
138 DataAccess HomeLibraryWebapp /post/SaveItem
139 DataAccess HomeLibraryWebapp /rest/GetPublicLink
140 DataAccess HomeLibraryWebapp /rest/Upload
141 DataAccess HomeLibraryWebapp /trash/DeleteFromTrash
142 DataAccess HomeLibraryWebapp /trash/EmptyTrash
143 DataAccess HomeLibraryWebapp /versioning/GetCurrentVersion
144 DataAccess HomeLibraryWebapp /versioning/GetVersion
145 DataAccess HomeLibraryWebapp /versioning/RemoveVersion
146 DataAccess HomeLibraryWebapp /versioning/RestoreVersion
147 DataAccess HomeLibraryWebapp /versioning/SaveCurrentVersion
148 DataAccess HomeLibraryWebapp /versioning/VersionHistory