-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpods_test.krl
110 lines (94 loc) · 2.86 KB
/
pods_test.krl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
ruleset pods_test {
meta {
name "Pods Test"
}
rule test_connect_pod {
select when test connect_storage
pods:connectStorage(event:attrs.get("storageURL"),
event:attrs.get("clientID"),
event:attrs.get("clientSecret"),
event:attrs.get("tokenURL"))
}
rule test_disconnect_storage {
select when test disconnect_storage
pods:disconnectStorage()
}
rule test_authenticate_storage {
select when test authenticate_storage
pods:authenticate()
}
rule test_store_file {
select when test store_file
pods:store(event:attrs.get("originURL"), event:attrs.get("destinationURL"), event:attrs.get("doAutoAuth"))
}
rule test_overwrite_file {
select when test overwrite_file
pods:overwrite(event:attrs.get("originURL"), event:attrs.get("destinationURL"), event:attrs.get("doAutoAuth"))
}
rule test_remove_file {
select when test remove_file
pods:removeFile(event:attrs.get("fileURL"), event:attrs.get("doAutoAuth"))
}
rule test_copy_file {
select when test copy_file
pods:copyFile(event:attrs.get("fetchFileURL"),
event:attrs.get("storeLocation"),
event:attrs.get("doAutoAuth"))
}
rule test_fetch_file {
select when test fetch_file
pre {
dataURL = pods:fetch(event:attrs.get("fileURL"), event:attrs.get("doAutoAuth"))
}
send_directive(dataURL)
}
rule test_create_folder {
select when test create_folder
pods:createFolder(event:attrs.get("containerURL"), event:attrs.get("doAutoAuth"))
}
rule test_remove_folder {
select when test remove_folder
pods:removeFolder(event:attrs.get("containerURL"), event:attrs.get("doAutoAuth"))
}
rule test_grant_agent_access {
select when test grant_agent_access
pods:grantAgentAccess(event:attrs.get("resourceURL"), event:attrs.get("webID"), event:attrs.get("doAutoAuth"))
}
rule test_remove_agent_access {
select when test remove_agent_access
pods:removeAgentAccess(event:attrs.get("resourceURL"), event:attrs.get("webID"), event:attrs.get("doAutoAuth"))
}
rule test_grant_access {
select when test grant_access
pods:grantPublicAccess(event:attrs.get("resourceURL"), event:attrs.get("doAutoAuth"))
}
rule test_remove_access {
select when test remove_access
pods:removePublicAccess(event:attrs.get("resourceURL"), event:attrs.get("doAutoAuth"))
}
rule test_ls {
select when test ls
pre {
list = pods:listItems(event:attrs.get("directoryURL"), event:attrs.get("doAutoAuth"))
}
send_directive(list)
}
rule test_find {
select when test find
pods:findFile(event:attrs.get("fileName"), event:attrs.get("doAutoAuth"))
}
rule test_get_storage {
select when test get_storage
pre {
storeURL = pods:getStorage()
}
send_directive("Store URL found", {"store_url":storeURL})
}
rule test_storage_entity {
select when test storage_entity
pre {
storeURL = ent:__pods_storageURL
}
send_directive("Store URL found", {"store_url":storeURL})
}
}