Adding and fixing rules
This commit is contained in:
parent
02854fab2c
commit
e5ffc25d34
|
@ -219,8 +219,8 @@ public class TestRules extends ContextTest {
|
|||
public void testSingleRule() throws Exception {
|
||||
allRules();
|
||||
File rulesDirectory = getRulesDirectory();
|
||||
File rulesDirFile = new File(rulesDirectory, "StorageHub");
|
||||
File ruleFile = new File(rulesDirFile, "StorageHub-createItem(FILE).json");
|
||||
File rulesDirFile = new File(rulesDirectory, "SmartExecutor");
|
||||
File ruleFile = new File(rulesDirFile, "SmartExecutor-getAvailablePlugins.json");
|
||||
testRule(ruleFile);
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ public class TestRules extends ContextTest {
|
|||
public void testAllRuleInAdirectory() throws Exception {
|
||||
allRules();
|
||||
File rulesDirectory = getRulesDirectory();
|
||||
File rulesDirFile = new File(rulesDirectory, "StorageHub");
|
||||
File rulesDirFile = new File(rulesDirectory, "SmartExecutor");
|
||||
|
||||
FilenameFilter filenameFilter = new FilenameFilter() {
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
InformationSystem,ICProxy,/gcube/service/GCoreEndpoint/Application/perform-service
|
||||
InformationSystem,ICProxy,/gcube/service/GCoreEndpoint/InformationSystem/ICProxy
|
||||
InformationSystem,ICProxy,/gcube/service/HostingNode
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"match": {
|
||||
"serviceClassRegex": "InformationSystem",
|
||||
"serviceNameRegex": "ICProxy",
|
||||
"calledMethodRegex": "^(\/){0,1}gcube\/service\/(GCoreEndpoint|HostingNode|RuntimeResource|GenericResource).*"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "InformationSystem",
|
||||
"serviceName": "ICProxy",
|
||||
"calledMethod": "query"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
InformationSystem,ICProxy,/gcube/service/&gcube-token=d730d65f-073a-4600-8c7b-326752d61ebf-98187548
|
||||
InformationSystem,ICProxy,/gcube/service/23d827cd-ba8e-4d8c-9ab4-6303bdb7d1db
|
||||
InformationSystem,ICProxy,/gcube/service/56ec4876-999f-4afc-a9e3-efbda5f5c8bc
|
||||
InformationSystem,ICProxy,/gcube/service/78fb3c26-0411-49e3-a244-581591413fa3
|
||||
InformationSystem,ICProxy,/gcube/service/9151fd89-ae33-4ddb-ac6b-c4e4c85376d6-98187548
|
||||
InformationSystem,ICProxy,/gcube/service/a074d80d-d339-490c-a9bb-1055576530a9
|
||||
InformationSystem,ICProxy,/gcube/service/ab9d32c9-...
|
||||
InformationSystem,ICProxy,/gcube/service/ab9d32c9-9425-42f1-99d7-50d68e651e9c
|
||||
InformationSystem,ICProxy,/gcube/service/c96d4477-236c-4f98-ba7d-7897991ef412
|
||||
InformationSystem,ICProxy,/gcube/service/cdc52c27-6d7b-4d55-b4cd-314d7cc2e224
|
||||
InformationSystem,ICProxy,/gcube/service/dc8cc938-24f9-4aaf-aac2-397817b8798a
|
||||
InformationSystem,ICProxy,/gcube/service/df24b57c-0a9d-40fe-846e-ef0a94b89389
|
||||
InformationSystem,ICProxy,/gcube/service/resource/c96d4477-236c-4f98-ba7d-7897991ef412
|
||||
InformationSystem,ICProxy,/gcube/service/Resource/c0594b4e-107c-4c9f-bd00-818b68298aa4
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"match": {
|
||||
"serviceClassRegex": "InformationSystem",
|
||||
"serviceNameRegex": "ICProxy",
|
||||
"calledMethodRegex": "^(\/){0,1}gcube\/service\/(?!GCoreEndpoint|HostingNode|RuntimeResource|GenericResource).*"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "InformationSystem",
|
||||
"serviceName": "ICProxy",
|
||||
"calledMethod": "read"
|
||||
}
|
||||
}
|
|
@ -3,4 +3,5 @@ VREManagement,SmartExecutor,GET /plugins
|
|||
VREManagement,SmartExecutor,GET /plugins/
|
||||
VREManagement,smart-executor,getAvailablePlugins
|
||||
VREManagement,smart-executor,GET /plugins
|
||||
VREManagement,smart-executor,GET /plugins/
|
||||
VREManagement,smart-executor,GET /plugins/
|
||||
VREManagement,SmartExecutor,/plugins
|
||||
|
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "VREManagement",
|
||||
"serviceNameRegex": "(SmartExecutor)|(smart-executor)",
|
||||
"calledMethodRegex": ".*((getAvailablePlugins.*)|(GET \/plugins(\/){0,1}$))"
|
||||
"calledMethodRegex": ".*((getAvailablePlugins.*)|(^(GET ){0,1}(\/){0,1}plugins(\/){0,1}$))"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "VREManagement",
|
||||
|
|
|
@ -5,4 +5,6 @@ VREManagement,smart-executor,getScheduledExecution
|
|||
VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions
|
||||
VREManagement,smart-executor,GET /plugins/accounting-dashboard-harvester-se-plugin/executions/
|
||||
VREManagement,SmartExecutor,/rest/plugins/HelloWorld
|
||||
VREManagement,SmartExecutor,/plugins/HelloWorld
|
||||
VREManagement,SmartExecutor,/plugins/HelloWorld
|
||||
VREManagement,SmartExecutor,/plugins/social-data-indexer-plugin/executions
|
||||
VREManagement,SmartExecutor,/plugins/social-data-indexer-plugin/executions/ORPHAN
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "VREManagement",
|
||||
"serviceNameRegex": "(SmartExecutor)|(smart-executor)",
|
||||
"calledMethodRegex": ".*((getScheduledExecution.*)|(GET .*executions(\/){0,1}$))|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[a-zA-Z]{1,})"
|
||||
"calledMethodRegex": ".*((getScheduledExecution.*)|((GET ){0,1}.*executions(\/(ORPHAN){0,1}){0,1}()$))|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[0-9a-zA-Z%\\-_]{1,})"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "VREManagement",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "VREManagement",
|
||||
"serviceNameRegex": "(SmartExecutor)|(smart-executor)",
|
||||
"calledMethodRegex": ".*((getStateEvolution)|(getState)|(GET .*executions\/.{1,})).*|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[a-zA-Z]{1,}\/.*)"
|
||||
"calledMethodRegex": ".*((getStateEvolution)|(getState)|(GET .*executions\/(?!executions).{1,})).*|((GET ){0,1}(\/){0,1}(rest\/){0,1}plugins\/[0-9a-zA-Z%\\-_]{1,}\/(?!executions).*)"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "VREManagement",
|
||||
|
|
|
@ -70,4 +70,5 @@ Portal,SocialNetworking,/rest/2/users/user-exists
|
|||
Portal,SocialNetworking,/rest/2/vres/get-my-vres
|
||||
Portal,SocialNetworking,/rest/messages/writeMessageToUsers
|
||||
Portal,SocialNetworking,/rest/users/getUserEmail
|
||||
Portal,SocialNetworking,/rest/users/getUserFullname
|
||||
Portal,SocialNetworking,/rest/users/getUserFullname
|
||||
Portal,SocialNetworking,/gcube/service/&gcube-token=d730d65f-073a-4600-8c7b-326752d61ebf-98187548
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "Portal",
|
||||
"serviceNameRegex": "SocialNetworking",
|
||||
"calledMethodRegex": "\/{0,1}rest\/((1|2)\/){0,1}(((users(\/2){0,1})|comments|full-text-search|hashtags|messages|notifications|people|posts|tokens|vres|vers)\/){0,1}(?<Method>[a-zA-Z\\-]*(\/){0,1})"
|
||||
"calledMethodRegex": "\/{0,1}rest\/((1|2)\/){0,1}(((people){0,1}(users(\/2){0,1})|comments|full-text-search|hashtags|messages|notifications|people|posts|tokens|vres|vers)\/){0,1}(?<Method>[a-zA-Z\\-]*(\/){0,1})"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "Portal",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"match": {
|
||||
"serviceClassRegex": "SDI",
|
||||
"serviceClassRegex": "SDI|DataAnalysis",
|
||||
"serviceNameRegex": "Thredds",
|
||||
"calledMethodRegex": "^(?!.*((\/public\/netcdf\/)|(::))).*$"
|
||||
},
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
DataAnalysis,data-analytics-visualization,/
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"match": {
|
||||
"serviceClassRegex": "DataAnalysis",
|
||||
"serviceNameRegex": "data-analytics-visualization",
|
||||
"calledMethodRegex": ".*"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "DataAnalysis",
|
||||
"serviceName": "data-analytics-visualization",
|
||||
"calledMethod": "OTHER"
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
|
||||
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
|
||||
"calledMethodRegex": "(\/index)|OTHER|UNKNOWN"
|
||||
"calledMethodRegex": "(^\/index$)|OTHER|UNKNOWN"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "DataPublishing",
|
||||
|
|
|
@ -8,6 +8,11 @@ DataCatalogue,science-catalogue,/items/restful_transaction_model
|
|||
DataCatalogue,science-catalogue,/organizations/algorithms
|
||||
DataCatalogue,science-catalogue,/organizations/aquamaps1
|
||||
DataCatalogue,science-catalogue,/profiles/Empty%20Profile
|
||||
DataCatalogue,science-catalogue,/rest/api/items/create
|
||||
DataCatalogue,gcat,/profiles/SoBigData.eu%3A%20Application%20Metadata
|
||||
DataCatalogue,gcat,/profiles/SoBigData.eu%3A%20Dataset%20Metadata
|
||||
DataCatalogue,gcat,/profiles/SoBigData.eu%3A%20Method%20Metadata
|
||||
DataCatalogue,gcat,/profiles/SoBigData.eu%3A%2520Dataset%2520Metadata
|
||||
DataCatalogue,gcat,/profiles/SoBigData.eu%3A+Dataset+Metadata
|
||||
DataCatalogue,gcat,/profiles/SoBigData.eu:%20Dataset%20Metadata
|
||||
DataCatalogue,science-catalogue,/users/andrearossi
|
||||
DataCatalogue,science-catalogue,/users/luca_frosini
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
|
||||
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
|
||||
"calledMethodRegex": "(\/){0,1}(rest\/(api\/){0,1}){0,1}(?<Collection>group|item|license|namespace|organization|profile|user)s\/(?!list)[%0-9a-zA-Z\\-_]*$"
|
||||
"calledMethodRegex": "^(\/){0,1}(rest\/(api\/){0,1}){0,1}(?<Collection>group|item|license|namespace|organization|profile|user)s\/(?!list|create)[%0-9a-zA-Z\\-_.+:]*$"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "DataPublishing",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
|
||||
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
|
||||
"calledMethodRegex": "(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_]*\/resources\/[%0-9a-zA-Z\\-_]*$"
|
||||
"calledMethodRegex": "^(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_]*\/resources\/[%0-9a-zA-Z\\-_.+:]*$"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "DataPublishing",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"match": {
|
||||
"serviceClassRegex": "(DataCatalogue)|(DataPublishing)",
|
||||
"serviceNameRegex": "(science-catalogue)|(gcat)|(gCat)",
|
||||
"calledMethodRegex": "(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_]*\/resources$"
|
||||
"calledMethodRegex": "^(\/){0,1}(rest\/(api\/){0,1}){0,1}items\/[%0-9a-zA-Z\\-_.+:]*\/resources$"
|
||||
},
|
||||
"replace": {
|
||||
"serviceClass": "DataPublishing",
|
||||
|
|
Loading…
Reference in New Issue