You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a set of Python tools for helping with the migration from FOLIO OKAPI platform to FOLIO Eureka platform.
3
+
This is a set of Python tools for helping with the migration from FOLIO OKAPI platform to FOLIO Eureka platform. A lot of the scripts need to be ran in the order presented below as they build upon each other. I purposely did not combine them into a single function as to allow for the review of data at each step.
4
4
5
-
##Installation
5
+
# Installation
6
6
7
7
```bash
8
8
source .venv/bin/activate
9
9
pip install -r requirements.txt
10
10
```
11
11
12
-
## Scripts
13
-
### Get OKAPI Permissions
12
+
# Scripts
13
+
14
+
## Get OKAPI Permissions
15
+
14
16
!!! Run First !!!
15
17
This script needs to be ran first to pull all the permission sets from an OKAPI instance of FOLIO. By Default Ramsons BugFest has been added to the .env file.
16
18
17
-
####Running the script:
19
+
### Running the script:
18
20
19
21
```bash
20
22
python ./pullOkapiPermissions.py
21
23
```
22
24
23
-
### Get Eureka Permissions
24
-
**_Not Functional_**
25
+
## Get Eureka Permissions
26
+
27
+
!!! Run First !!!
25
28
26
29
This script pulls the Capabilities and Capability Sets from the Eureka platform and saves them in JSON format to be used later.
27
30
28
31
-_At this time i can not log in via the API, so the JSON was pulled via the web interface and saved into a JSON file._
29
32
30
-
####Running the script:
33
+
### Running the script:
31
34
32
35
```bash
33
-
python ./pullEurekaCapabilities.py
36
+
python ./pullOkapiPermissions.py
34
37
```
35
-
### Compare
38
+
39
+
## Get Production Permission Sets
40
+
41
+
This script pulls the current permission sets form your reference system and saves them in JSON format.
42
+
43
+
### Running the script:
44
+
45
+
```bash
46
+
python ./pullReferenceData.py
47
+
```
48
+
49
+
## Compare OKAPI to Eureka
36
50
37
51
This script pulls the Capability Sets and uses the published names to match them to a OKAPI permission set. It expands on the included capabilities and permissions to show the names and UUIDS. Two files are generated:
38
52
`FILE_COMPARED_SETS_TO_PERMISSIONS`: JSON file with all the collected data
@@ -46,25 +60,76 @@ This script pulls the Capability Sets and uses the published names to match them
46
60
47
61
**OKAPI sub permissions (if a Matching permission set is found)**: _okapiSubPermissions.name okapiSubPermissions.description okapiSubPermissions.permissionName_
48
62
49
-
#### Running the script:
63
+
### Running the script:
64
+
65
+
```bash
66
+
python ./compareOkapiToEureka.py
67
+
```
68
+
69
+
## Expanded Capability Sets
70
+
71
+
This scripts takes the Capability set data and expands out the linked capabilities.
72
+
73
+
### Files generated:
74
+
75
+
-`FILE_EUREKA_CAPABILITY_SETS_EXPANDED`: JSON file listing all the capability sets and the capabilities assigned to that set
76
+
-`FILE_EUREKA_CAPABILITY_SETS_EXPANDED_CSV`: CSV file of the same data set.
77
+
-`FILE_EUREKA_CAPABILITY_SETS_EXPANDED_HTML`: HTML Table view that can be opened directly in the browser or saved to Confluence.
78
+
79
+
### Running the script:
50
80
51
81
```bash
52
-
python ./compare.py
82
+
python ./expandCapabilitySets.py
53
83
```
54
84
55
-
## Contributing
85
+
## Compare Current Permissions to Capability Sets
86
+
87
+
This script takes current permission sets in the reference environment (visible, and mutable) expands the sub permissions. During this process it adds the supervision name, and description if they are included. it also looks to see if there is a matching capability, and lists that data.
88
+
This should allow a user to re-create a permission set using just capabilities.
89
+
90
+
### Files generated:
91
+
92
+
-`FILE_COMPARED_CURRENT_TO_CAPABILITIES`: JSON version of the expanded data
93
+
-`FILE_COMPARED_CURRENT_TO_CAPABILITIES_CSV`: CSV version of the same data set
94
+
95
+
96
+
97
+
### Running the script:
98
+
99
+
```bash
100
+
python ./compareCurrentToCapabilities.py
101
+
```
102
+
103
+
## Find possible compatibility sets
104
+
105
+
This script will look that the JSON generated from `compareCurrentToCapabilities.py` and compare the assigned Compatibility sets and rank what set may bes fit in a new role that will match the Permission Set. It does this by looking at the capability Sets individual capabilitys and then matches thos to the ones in the permission set. The fallowing data will be added:
106
+
107
+
**Total** - Total number of capabilities in the set
108
+
109
+
**Matching** - Number of matching Capabilities to the permission set
110
+
111
+
**Ranking** - based on the percentage of total number of capabilities that match
112
+
113
+
Items with a rank of 0 or lower then X will be ignored.
114
+
115
+
### Files generated:
116
+
117
+
-`FILE_COMPARED_CURRENT_TO_CAPABILITIES`: JSON version of the expanded data
118
+
-`FILE_COMPARED_CURRENT_TO_CAPABILITIES_CSV`: CSV version of the same data set
119
+
120
+
# Contributing
56
121
57
122
Pull requests are welcome. For major changes, please open an issue first
58
123
to discuss what you would like to change.
59
124
60
125
Please also fork as needed.
61
126
62
-
##.env File
127
+
# .env File
63
128
FILE_OKAPI_PERMISSIONS: Location of the OKAPI permissions JSON file. This will be used fro reading and writing depending on the script ran.
64
129
FILE_EUREKA_CAPABILITY_SETS = Location of the Eureka Capability Sets JSON file. This will be used fro reading and writing depending on the script ran.
65
130
FILE_EUREKA_CAPABILITIES = Location of the Eureka Capabilities JSON file. This will be used fro reading and writing depending on the script ran.
66
131
FILE_COMPARED_SETS_TO_PERMISSIONS = Location of the OKAPI to Eureka Capability Set comparisons JSON file. This will be used fro reading and writing depending on the script ran.
0 commit comments