-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-dynpeps.re
62 lines (45 loc) · 1.67 KB
/
example-dynpeps.re
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
# example-dynpeps.re - example iRODS rulebase for using the pep_api_data_obj-* dynamic PEPs
#
# Author: Ilari Korhonen, KTH Royal Institute of Technology
# Copyright (C) 2021 KTH Royal Institute of Technology. All rights reserved.
pep_api_data_obj_put_post(*INSTANCE_NAME, *COMM, *DATAOBJINP, *BUFFER, *PORTAL_OPR_OUT)
{
auditLog("api_data_obj_put_post", *DATAOBJINP);
*objPath = *DATAOBJINP.obj_path
doASyncChksumAndRepl(*objPath);
}
pep_api_data_obj_get_post(*INSTANCE_NAME, *COMM, *DATAOBJINP, *BUFFER, *PORTAL_OPR_OUT)
{
auditLog("api_data_obj_get_post", *DATAOBJINP);
}
pep_api_data_obj_create_post(*INSTANCE_NAME, *COMM, *DATAOBJINP)
{
auditLog("api_data_obj_create_post", *DATAOBJINP);
*objPath = *DATAOBJINP.obj_path;
msiGetOpenDataObjL1Inx(*objPath, *l1descInx);
msiAddKeyVal(temporaryStorage, str(*l1descInx), *objPath);
}
pep_api_data_obj_open_post(*INSTANCE_NAME, *COMM, *DATAOBJINP)
{
auditLog("api_data_obj_open_post", *DATAOBJINP);
*objPath = *DATAOBJINP.obj_path;
*openFlags = *DATAOBJINP.open_flags;
if (int(*openFlags) != 0)
{
msiGetOpenDataObjL1Inx(*objPath, *l1descInx);
msiAddKeyVal(temporaryStorage, str(*l1descInx), *objPath);
}
}
pep_api_data_obj_close_post(*INSTANCE_NAME, *COMM, *DATAOBJCLOSEINP)
{
auditLog("api_data_obj_close_post", *DATAOBJCLOSEINP);
*l1descInx = *DATAOBJCLOSEINP.l1descInx;
if (errorcode(msiGetValByKey(temporaryStorage, str(*l1descInx), *objPath)) == 0)
{
if (strlen(*objPath) > 0 && *objPath != "null")
{
doASyncChksumAndRepl(*objPath);
temporaryStorage.*l1descInx = "null";
}
}
}