Added and fixed rules

master
Luca Frosini 4 years ago
parent 34935414ea
commit f379063638

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

@ -38,4 +38,5 @@ SDI,GeoNetwork,/srv/eng/xml.schema.info
SDI,GeoNetwork,/srv/fre/info
SDI,GeoNetwork,/srv/fre/info@json
SDI,GeoNetwork,/srv/fre/xml.config.info
SDI,GeoNetwork,/srv/fre/xml.config.info@json
SDI,GeoNetwork,/srv/fre/xml.config.info@json
SDI,GeoNetwork,read@json
1 SDI GeoNetwork /srv/en/csw.config.get
38 SDI GeoNetwork /srv/fre/info
39 SDI GeoNetwork /srv/fre/info@json
40 SDI GeoNetwork /srv/fre/xml.config.info
41 SDI GeoNetwork /srv/fre/xml.config.info@json
42 SDI GeoNetwork read@json

@ -0,0 +1,3 @@
InformationSystem,QuotaManager,/gcube/service/quotaStatus/detail
InformationSystem,QuotaManager,/gcube/service/quotaStatus/detail/
InformationSystem,QuotaManager,/gcube/service/quotaStatus/list/
1 InformationSystem QuotaManager /gcube/service/quotaStatus/detail
2 InformationSystem QuotaManager /gcube/service/quotaStatus/detail/
3 InformationSystem QuotaManager /gcube/service/quotaStatus/list/

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "(InformationSystem)|(Accounting)",
"serviceNameRegex": "QuotaManager",
"calledMethodRegex": ".*"
},
"replace": {
"serviceClass": "Accounting",
"serviceName": "QuotaManager",
"calledMethod": "OTHER"
}
}

@ -0,0 +1,2 @@
Portal,SocialNetworking,OTHER
Portal,SocialNetworking,/rest
1 Portal SocialNetworking OTHER
2 Portal SocialNetworking /rest

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "Portal",
"serviceNameRegex": "SocialNetworking",
"calledMethodRegex": "(\/{0,1}(rest))|OTHER"
},
"replace": {
"serviceClass": "Portal",
"serviceName": "SocialNetworking",
"calledMethod": "OTHER"
}
}

@ -0,0 +1,38 @@
Portal,SocialNetworking,/rest/1/users/get-usernames-by-global-role
Portal,SocialNetworking,/rest/2/comments/get-comments-user
Portal,SocialNetworking,/rest/2/full-text-search/search-by-query
Portal,SocialNetworking,/rest/2/hashtags/get-hashtags-and-occurrences
Portal,SocialNetworking,/rest/2/messages/get-received-messages
Portal,SocialNetworking,/rest/2/messages/get-send-messages
Portal,SocialNetworking,/rest/2/messages/get-sent-messages
Portal,SocialNetworking,/rest/2/messages/send-message
Portal,SocialNetworking,/rest/2/messages/write-message
Portal,SocialNetworking,/rest/2/messages/writeMessageToUsers
Portal,SocialNetworking,/rest/2/notifications/get-range-notifications
Portal,SocialNetworking,/rest/2/notifications/notify-job-status
Portal,SocialNetworking,/rest/2/people/profile
Portal,SocialNetworking,/rest/2/posts/get-posts-vre
Portal,SocialNetworking,/rest/2/posts/get-vre-posts
Portal,SocialNetworking,/rest/2/posts/write-post-app
Portal,SocialNetworking,/rest/2/posts/write-post-user
Portal,SocialNetworking,/rest/2/send-message
Portal,SocialNetworking,/rest/2/tokens/generate-application-token
Portal,SocialNetworking,/rest/2/users/get-all-fullnames-and-usernames
Portal,SocialNetworking,/rest/2/users/get-all-usernames
Portal,SocialNetworking,/rest/2/users/get-all-users
Portal,SocialNetworking,/rest/2/users/get-fullname
Portal,SocialNetworking,/rest/2/users/get-profile
Portal,SocialNetworking,/rest/2/users/get-received-messages
Portal,SocialNetworking,/rest/2/users/get-usernames-by-global-role
Portal,SocialNetworking,/rest/2/users/get-usernames-by-role
Portal,SocialNetworking,/rest/2/users/get-usernames-byl-role
Portal,SocialNetworking,/rest/2/users/user-exists
Portal,SocialNetworking,/rest/2/vers/get-my-vres
Portal,SocialNetworking,/rest/2/vres/get-my-vres
Portal,SocialNetworking,/rest/messages/write-message
Portal,SocialNetworking,/rest/messages/writeMessageToUsers
Portal,SocialNetworking,/rest/users/2/get-usernames-by-global-role
Portal,SocialNetworking,/rest/users/get-all-usernames
Portal,SocialNetworking,/rest/users/get-usernames-by-global-role
Portal,SocialNetworking,/rest/users/getUserEmail
Portal,SocialNetworking,/rest/users/getUserFullname
1 Portal SocialNetworking /rest/1/users/get-usernames-by-global-role
2 Portal SocialNetworking /rest/2/comments/get-comments-user
3 Portal SocialNetworking /rest/2/full-text-search/search-by-query
4 Portal SocialNetworking /rest/2/hashtags/get-hashtags-and-occurrences
5 Portal SocialNetworking /rest/2/messages/get-received-messages
6 Portal SocialNetworking /rest/2/messages/get-send-messages
7 Portal SocialNetworking /rest/2/messages/get-sent-messages
8 Portal SocialNetworking /rest/2/messages/send-message
9 Portal SocialNetworking /rest/2/messages/write-message
10 Portal SocialNetworking /rest/2/messages/writeMessageToUsers
11 Portal SocialNetworking /rest/2/notifications/get-range-notifications
12 Portal SocialNetworking /rest/2/notifications/notify-job-status
13 Portal SocialNetworking /rest/2/people/profile
14 Portal SocialNetworking /rest/2/posts/get-posts-vre
15 Portal SocialNetworking /rest/2/posts/get-vre-posts
16 Portal SocialNetworking /rest/2/posts/write-post-app
17 Portal SocialNetworking /rest/2/posts/write-post-user
18 Portal SocialNetworking /rest/2/send-message
19 Portal SocialNetworking /rest/2/tokens/generate-application-token
20 Portal SocialNetworking /rest/2/users/get-all-fullnames-and-usernames
21 Portal SocialNetworking /rest/2/users/get-all-usernames
22 Portal SocialNetworking /rest/2/users/get-all-users
23 Portal SocialNetworking /rest/2/users/get-fullname
24 Portal SocialNetworking /rest/2/users/get-profile
25 Portal SocialNetworking /rest/2/users/get-received-messages
26 Portal SocialNetworking /rest/2/users/get-usernames-by-global-role
27 Portal SocialNetworking /rest/2/users/get-usernames-by-role
28 Portal SocialNetworking /rest/2/users/get-usernames-byl-role
29 Portal SocialNetworking /rest/2/users/user-exists
30 Portal SocialNetworking /rest/2/vers/get-my-vres
31 Portal SocialNetworking /rest/2/vres/get-my-vres
32 Portal SocialNetworking /rest/messages/write-message
33 Portal SocialNetworking /rest/messages/writeMessageToUsers
34 Portal SocialNetworking /rest/users/2/get-usernames-by-global-role
35 Portal SocialNetworking /rest/users/get-all-usernames
36 Portal SocialNetworking /rest/users/get-usernames-by-global-role
37 Portal SocialNetworking /rest/users/getUserEmail
38 Portal SocialNetworking /rest/users/getUserFullname

@ -0,0 +1,12 @@
{
"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\\-]*)"
},
"replace": {
"serviceClass": "Portal",
"serviceName": "SocialNetworking",
"calledMethod": "${Method}"
}
}

@ -0,0 +1,12 @@
{
"match": {
"serviceClassRegex": "DataTransfer",
"serviceNameRegex": "data-transfer-service",
"calledMethodRegex": "(\/{0,1}gcube\/service\/(REST|application.wadl))|OTHER"
},
"replace": {
"serviceClass": "DataTransfer",
"serviceName": "data-transfer-service",
"calledMethod": "OTHER"
}
}
Loading…
Cancel
Save