midpoint-cli 1.1.0__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. midpoint_cli-1.2.0/PKG-INFO +233 -0
  2. midpoint_cli-1.2.0/README.md +210 -0
  3. midpoint_cli-1.2.0/midpoint_cli.egg-info/PKG-INFO +233 -0
  4. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/midpoint_cli.egg-info/SOURCES.txt +3 -0
  5. midpoint_cli-1.2.0/midpoint_cli.egg-info/requires.txt +6 -0
  6. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/setup.py +16 -1
  7. midpoint_cli-1.2.0/src/midpoint-cli +67 -0
  8. midpoint_cli-1.2.0/src/midpoint_cli/__init__.py +1 -0
  9. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/client/__init__.py +37 -48
  10. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/client/objects.py +29 -0
  11. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/__init__.py +16 -0
  12. midpoint_cli-1.2.0/src/midpoint_cli/prompt/base.py +5 -0
  13. midpoint_cli-1.2.0/src/midpoint_cli/prompt/configuration.py +49 -0
  14. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/org.py +6 -2
  15. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/resource.py +16 -3
  16. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/script.py +6 -2
  17. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/task.py +11 -5
  18. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/user.py +18 -7
  19. midpoint_cli-1.2.0/test/test_client_api.py +43 -0
  20. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/test/test_client_model.py +8 -4
  21. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/test/test_client_put.py +5 -4
  22. midpoint_cli-1.2.0/test/test_environment.py +54 -0
  23. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/test/test_parser.py +2 -2
  24. midpoint-cli-1.1.0/PKG-INFO +0 -15
  25. midpoint-cli-1.1.0/midpoint_cli.egg-info/PKG-INFO +0 -15
  26. midpoint-cli-1.1.0/midpoint_cli.egg-info/requires.txt +0 -3
  27. midpoint-cli-1.1.0/src/midpoint-cli +0 -52
  28. midpoint-cli-1.1.0/src/midpoint_cli/__init__.py +0 -1
  29. midpoint-cli-1.1.0/src/midpoint_cli/prompt/base.py +0 -3
  30. midpoint-cli-1.1.0/test/test_client_api.py +0 -47
  31. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/LICENSE +0 -0
  32. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/midpoint_cli.egg-info/dependency_links.txt +0 -0
  33. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/midpoint_cli.egg-info/top_level.txt +0 -0
  34. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/setup.cfg +0 -0
  35. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/client/observer.py +0 -0
  36. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/client/patch.py +0 -0
  37. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/client/progress.py +0 -0
  38. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/client/session.py +0 -0
  39. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/complete.py +0 -0
  40. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/console.py +0 -0
  41. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/delete.py +0 -0
  42. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/get.py +0 -0
  43. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/src/midpoint_cli/prompt/put.py +0 -0
  44. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/test/test_patch.py +0 -0
  45. {midpoint-cli-1.1.0 → midpoint_cli-1.2.0}/test/test_script.py +0 -0
@@ -0,0 +1,233 @@
1
+ Metadata-Version: 2.1
2
+ Name: midpoint-cli
3
+ Version: 1.2.0
4
+ Summary: A command line client to Midpoint Identity Management system.
5
+ Home-page: https://gitlab.com/alcibiade/midpoint-cli
6
+ Author: Yannick Kirschhoffer
7
+ Author-email: alcibiade@alcibiade.org
8
+ License: MIT
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: System Administrators
12
+ Classifier: Topic :: System :: Systems Administration
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: clint>=0.5
18
+ Requires-Dist: tabulate>=0.9
19
+ Requires-Dist: unidecode>=1.3
20
+ Requires-Dist: requests>=2.31
21
+ Requires-Dist: urllib3>=2.0
22
+ Requires-Dist: setuptools>=68.0
23
+
24
+ ## Midpoint CLI
25
+
26
+ This project is a command line client interface used to drive an Evolveum Midpoint identity management server.
27
+
28
+ The objectives of this tool are to enable:
29
+
30
+ * Administrator access to run tasks and review data
31
+ * Scripting for remote controlled automation
32
+ * Test scenarios implementation
33
+
34
+ The client currently supports:
35
+
36
+ * Users and Organizational units display
37
+ * User search
38
+ * Running tasks synchronously
39
+ * Retrieving object definitions of any kind
40
+ * Uploading objects from local files and applying patches
41
+
42
+ Features currently under development:
43
+
44
+ * Auto completion to search of IDs or task names
45
+ * Improved task results display: retrieve and display a human readable status output
46
+ * Any other tasks that would be sumbitted in the issue tracker of this project on Gitlab
47
+
48
+ The strong points of this project are:
49
+
50
+ * All commands can be run directly or using an interactive prompt session
51
+ * Colorful output
52
+ * A user-friendly bash compatible command line history management
53
+ * Full interactive help system
54
+ * A classical midpoint-cli [command] [command options] syntax
55
+
56
+ ## Usage
57
+
58
+ ### General syntax
59
+
60
+ ```bash
61
+ usage: midpoint-cli [-h] [-v] [-u USERNAME] [-p PASSWORD] [-U URL]
62
+ [command] [arg [arg ...]]
63
+
64
+ An interactive Midpoint command line client.
65
+
66
+ positional arguments:
67
+ command Optional command to be executed immediately.
68
+ arg Optional command arguments.
69
+
70
+ optional arguments:
71
+ -h, --help show this help message and exit
72
+ -v, --version Set the username to authenticate this session.
73
+ -u USERNAME, --username USERNAME
74
+ Set the username to authenticate this session.
75
+ -p PASSWORD, --password PASSWORD
76
+ Set the password to authenticate this session.
77
+ -U URL, --url URL Midpoint base URL
78
+
79
+ Available commands:
80
+ get Get an XML definition from the server from an existing OID reference.
81
+ put Create/Update a server object based on an XML structure.
82
+ delete Delete a server object based on its type and OID.
83
+
84
+ task Manage server tasks.
85
+ resource Manage resources on the server.
86
+
87
+ org Manage organizations.
88
+ user Manage users.
89
+
90
+ Midpoint-cli version 0.7.0, created and maintained by Yannick Kirschhoffer alcibiade@alcibiade.org
91
+ ```
92
+
93
+ ### Exernal configuration files (since v1.2)
94
+
95
+ Settings can be provided from an external configuration file. It can be either:
96
+
97
+ * .midpoint-cli.cfg in the home directory of the current user
98
+ * midpoint-cli.cfg in the current working directory
99
+
100
+ The syntax is as follows:
101
+
102
+ ```
103
+ [Midpoint]
104
+ url = https://localhost:8080/midpoint/
105
+ username = administrator
106
+ password = ...
107
+ ```
108
+
109
+ ### Environment variables (since v1.2)
110
+
111
+ The script will scan environment variables to read input parameters. This is
112
+ particularily useful for injection of password or in-container execution.
113
+
114
+ The variables are:
115
+
116
+ * MIDPOINT_URL
117
+ * MIDPOINT_USERNAME
118
+ * MIDPOINT_PASSWORD
119
+
120
+ ## Requirements
121
+
122
+ This program is compatible with Python version 3.7 or above.
123
+
124
+ ## Installation
125
+
126
+ ### Through PyPI
127
+
128
+ The most common way to install midpoint-cli on your own computer is to use the PyPI repository:
129
+
130
+ ```bash
131
+ yk@lunar:~$ pip3 install midpoint-cli
132
+ Collecting midpoint-cli
133
+ Downloading https://files.pythonhosted.org/packages/91/03/eaebde078e3560dfa919924d0a7c395f07a2e3fc9740223ea53db3afad05/midpoint-cli-0.7.0.tar.gz
134
+
135
+ [...]
136
+
137
+ Successfully built midpoint-cli clint tabulate args
138
+ Installing collected packages: args, clint, idna, urllib3, chardet, certifi, requests, tabulate, midpoint-cli
139
+ Successfully installed args-0.1.0 certifi-2019.9.11 chardet-3.0.4 clint-0.5.1 idna-2.8 midpoint-cli-0.7.0 requests-2.22.0 tabulate-0.8.5 urllib3-1.25.6
140
+
141
+ ```
142
+
143
+ ### Development build
144
+
145
+ To install the current development version from GIT:
146
+
147
+ ```bash
148
+ yk@lunar:~/dev$ git clone https://gitlab.com/alcibiade/midpoint-cli.git
149
+ Cloning into 'midpoint-cli'...
150
+ remote: Enumerating objects: 374, done.
151
+ remote: Counting objects: 100% (374/374), done.
152
+ remote: Compressing objects: 100% (176/176), done.
153
+ remote: Total 374 (delta 229), reused 299 (delta 175)
154
+ Receiving objects: 100% (374/374), 62.84 KiB | 0 bytes/s, done.
155
+ Resolving deltas: 100% (229/229), done.
156
+
157
+ yk@lunar:~/dev$ pip3 install midpoint-cli/
158
+ Processing ./midpoint-cli
159
+ Collecting clint (from midpoint-cli===0.8-snapshot)
160
+ Collecting requests (from midpoint-cli===0.8-snapshot)
161
+ Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
162
+ Collecting tabulate (from midpoint-cli===0.8-snapshot)
163
+ Collecting args (from clint->midpoint-cli===0.8-snapshot)
164
+ Collecting chardet<3.1.0,>=3.0.2 (from requests->midpoint-cli===0.8-snapshot)
165
+ Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
166
+ Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->midpoint-cli===0.8-snapshot)
167
+ Using cached https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl
168
+ Collecting certifi>=2017.4.17 (from requests->midpoint-cli===0.8-snapshot)
169
+ Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
170
+ Collecting idna<2.9,>=2.5 (from requests->midpoint-cli===0.8-snapshot)
171
+ Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
172
+ Building wheels for collected packages: midpoint-cli
173
+ Running setup.py bdist_wheel for midpoint-cli ... done
174
+ Stored in directory: /home/yk/.cache/pip/wheels/2a/5a/d6/54312f2db19e2a44cea90e4e1c186e7c1beb7192b4974db759
175
+ Successfully built midpoint-cli
176
+ Installing collected packages: args, clint, chardet, urllib3, certifi, idna, requests, tabulate, midpoint-cli
177
+ Successfully installed args-0.1.0 certifi-2019.9.11 chardet-3.0.4 clint-0.5.1 idna-2.8 midpoint-cli-0.7.0 requests-2.22.0 tabulate-0.8.5 urllib3-1.25.6
178
+
179
+ yk@lunar:~/dev$ midpoint-cli -v
180
+ Midpoint CLI Version 0.8-snapshot
181
+ ```
182
+
183
+ ### Anaconda
184
+
185
+ Anaconda packages are not available yet.
186
+
187
+ ## Setting up a sanbox environment
188
+
189
+ If you wish to test this project locally and don’t have a midpoint server available, you can use the
190
+ following instructions.
191
+
192
+ ### Using the Evolveum managed Docker image
193
+
194
+ Pull the image locally:
195
+
196
+ ```bash
197
+ yk@lunar:~$ docker pull evolveum/midpoint
198
+ Using default tag: latest
199
+ latest: Pulling from evolveum/midpoint
200
+
201
+ [...]
202
+
203
+ Digest: sha256:1e29b7e891d17bf7b1cf1853c84609e414c3a71d5c420aa38927200b2bdecc8e
204
+ Status: Downloaded newer image for evolveum/midpoint:latest
205
+ docker.io/evolveum/midpoint:latest
206
+
207
+
208
+ ```
209
+
210
+ Then run the server and bind the port 8080:
211
+
212
+ ```bash
213
+ yk@lunar:~$ docker run -d --name midpoint-1 -p8080:8080 evolveum/midpoint
214
+ c048d519395ca48c8e94e361a2239b1c35c5e5305a29600895056e030d6a576f
215
+
216
+ yk@lunar:~$ midpoint-cli
217
+ Welcome to Midpoint client ! Type ? for a list of commands
218
+ midpoint> users
219
+ OID Name Title FullName Status EmpNo Email OU
220
+ ------------------------------------ ------------- ------- ---------------------- -------- ------- ------- ----
221
+ 00000000-0000-0000-0000-000000000002 administrator midPoint Administrator enabled
222
+ midpoint>
223
+
224
+ yk@lunar:~$ docker stop midpoint-1
225
+ midpoint-1
226
+ ```
227
+
228
+ ## Deployment of a new version
229
+
230
+ * Update revision in src/midpoint_cli/__init__.py
231
+ * Commit and tag with corresponding version number
232
+ * Build distribution: python setup.py sdist
233
+ * Upload distribution to PyPI: twine upload dist/*
@@ -0,0 +1,210 @@
1
+ ## Midpoint CLI
2
+
3
+ This project is a command line client interface used to drive an Evolveum Midpoint identity management server.
4
+
5
+ The objectives of this tool are to enable:
6
+
7
+ * Administrator access to run tasks and review data
8
+ * Scripting for remote controlled automation
9
+ * Test scenarios implementation
10
+
11
+ The client currently supports:
12
+
13
+ * Users and Organizational units display
14
+ * User search
15
+ * Running tasks synchronously
16
+ * Retrieving object definitions of any kind
17
+ * Uploading objects from local files and applying patches
18
+
19
+ Features currently under development:
20
+
21
+ * Auto completion to search of IDs or task names
22
+ * Improved task results display: retrieve and display a human readable status output
23
+ * Any other tasks that would be sumbitted in the issue tracker of this project on Gitlab
24
+
25
+ The strong points of this project are:
26
+
27
+ * All commands can be run directly or using an interactive prompt session
28
+ * Colorful output
29
+ * A user-friendly bash compatible command line history management
30
+ * Full interactive help system
31
+ * A classical midpoint-cli [command] [command options] syntax
32
+
33
+ ## Usage
34
+
35
+ ### General syntax
36
+
37
+ ```bash
38
+ usage: midpoint-cli [-h] [-v] [-u USERNAME] [-p PASSWORD] [-U URL]
39
+ [command] [arg [arg ...]]
40
+
41
+ An interactive Midpoint command line client.
42
+
43
+ positional arguments:
44
+ command Optional command to be executed immediately.
45
+ arg Optional command arguments.
46
+
47
+ optional arguments:
48
+ -h, --help show this help message and exit
49
+ -v, --version Set the username to authenticate this session.
50
+ -u USERNAME, --username USERNAME
51
+ Set the username to authenticate this session.
52
+ -p PASSWORD, --password PASSWORD
53
+ Set the password to authenticate this session.
54
+ -U URL, --url URL Midpoint base URL
55
+
56
+ Available commands:
57
+ get Get an XML definition from the server from an existing OID reference.
58
+ put Create/Update a server object based on an XML structure.
59
+ delete Delete a server object based on its type and OID.
60
+
61
+ task Manage server tasks.
62
+ resource Manage resources on the server.
63
+
64
+ org Manage organizations.
65
+ user Manage users.
66
+
67
+ Midpoint-cli version 0.7.0, created and maintained by Yannick Kirschhoffer alcibiade@alcibiade.org
68
+ ```
69
+
70
+ ### Exernal configuration files (since v1.2)
71
+
72
+ Settings can be provided from an external configuration file. It can be either:
73
+
74
+ * .midpoint-cli.cfg in the home directory of the current user
75
+ * midpoint-cli.cfg in the current working directory
76
+
77
+ The syntax is as follows:
78
+
79
+ ```
80
+ [Midpoint]
81
+ url = https://localhost:8080/midpoint/
82
+ username = administrator
83
+ password = ...
84
+ ```
85
+
86
+ ### Environment variables (since v1.2)
87
+
88
+ The script will scan environment variables to read input parameters. This is
89
+ particularily useful for injection of password or in-container execution.
90
+
91
+ The variables are:
92
+
93
+ * MIDPOINT_URL
94
+ * MIDPOINT_USERNAME
95
+ * MIDPOINT_PASSWORD
96
+
97
+ ## Requirements
98
+
99
+ This program is compatible with Python version 3.7 or above.
100
+
101
+ ## Installation
102
+
103
+ ### Through PyPI
104
+
105
+ The most common way to install midpoint-cli on your own computer is to use the PyPI repository:
106
+
107
+ ```bash
108
+ yk@lunar:~$ pip3 install midpoint-cli
109
+ Collecting midpoint-cli
110
+ Downloading https://files.pythonhosted.org/packages/91/03/eaebde078e3560dfa919924d0a7c395f07a2e3fc9740223ea53db3afad05/midpoint-cli-0.7.0.tar.gz
111
+
112
+ [...]
113
+
114
+ Successfully built midpoint-cli clint tabulate args
115
+ Installing collected packages: args, clint, idna, urllib3, chardet, certifi, requests, tabulate, midpoint-cli
116
+ Successfully installed args-0.1.0 certifi-2019.9.11 chardet-3.0.4 clint-0.5.1 idna-2.8 midpoint-cli-0.7.0 requests-2.22.0 tabulate-0.8.5 urllib3-1.25.6
117
+
118
+ ```
119
+
120
+ ### Development build
121
+
122
+ To install the current development version from GIT:
123
+
124
+ ```bash
125
+ yk@lunar:~/dev$ git clone https://gitlab.com/alcibiade/midpoint-cli.git
126
+ Cloning into 'midpoint-cli'...
127
+ remote: Enumerating objects: 374, done.
128
+ remote: Counting objects: 100% (374/374), done.
129
+ remote: Compressing objects: 100% (176/176), done.
130
+ remote: Total 374 (delta 229), reused 299 (delta 175)
131
+ Receiving objects: 100% (374/374), 62.84 KiB | 0 bytes/s, done.
132
+ Resolving deltas: 100% (229/229), done.
133
+
134
+ yk@lunar:~/dev$ pip3 install midpoint-cli/
135
+ Processing ./midpoint-cli
136
+ Collecting clint (from midpoint-cli===0.8-snapshot)
137
+ Collecting requests (from midpoint-cli===0.8-snapshot)
138
+ Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
139
+ Collecting tabulate (from midpoint-cli===0.8-snapshot)
140
+ Collecting args (from clint->midpoint-cli===0.8-snapshot)
141
+ Collecting chardet<3.1.0,>=3.0.2 (from requests->midpoint-cli===0.8-snapshot)
142
+ Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
143
+ Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->midpoint-cli===0.8-snapshot)
144
+ Using cached https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl
145
+ Collecting certifi>=2017.4.17 (from requests->midpoint-cli===0.8-snapshot)
146
+ Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
147
+ Collecting idna<2.9,>=2.5 (from requests->midpoint-cli===0.8-snapshot)
148
+ Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
149
+ Building wheels for collected packages: midpoint-cli
150
+ Running setup.py bdist_wheel for midpoint-cli ... done
151
+ Stored in directory: /home/yk/.cache/pip/wheels/2a/5a/d6/54312f2db19e2a44cea90e4e1c186e7c1beb7192b4974db759
152
+ Successfully built midpoint-cli
153
+ Installing collected packages: args, clint, chardet, urllib3, certifi, idna, requests, tabulate, midpoint-cli
154
+ Successfully installed args-0.1.0 certifi-2019.9.11 chardet-3.0.4 clint-0.5.1 idna-2.8 midpoint-cli-0.7.0 requests-2.22.0 tabulate-0.8.5 urllib3-1.25.6
155
+
156
+ yk@lunar:~/dev$ midpoint-cli -v
157
+ Midpoint CLI Version 0.8-snapshot
158
+ ```
159
+
160
+ ### Anaconda
161
+
162
+ Anaconda packages are not available yet.
163
+
164
+ ## Setting up a sanbox environment
165
+
166
+ If you wish to test this project locally and don’t have a midpoint server available, you can use the
167
+ following instructions.
168
+
169
+ ### Using the Evolveum managed Docker image
170
+
171
+ Pull the image locally:
172
+
173
+ ```bash
174
+ yk@lunar:~$ docker pull evolveum/midpoint
175
+ Using default tag: latest
176
+ latest: Pulling from evolveum/midpoint
177
+
178
+ [...]
179
+
180
+ Digest: sha256:1e29b7e891d17bf7b1cf1853c84609e414c3a71d5c420aa38927200b2bdecc8e
181
+ Status: Downloaded newer image for evolveum/midpoint:latest
182
+ docker.io/evolveum/midpoint:latest
183
+
184
+
185
+ ```
186
+
187
+ Then run the server and bind the port 8080:
188
+
189
+ ```bash
190
+ yk@lunar:~$ docker run -d --name midpoint-1 -p8080:8080 evolveum/midpoint
191
+ c048d519395ca48c8e94e361a2239b1c35c5e5305a29600895056e030d6a576f
192
+
193
+ yk@lunar:~$ midpoint-cli
194
+ Welcome to Midpoint client ! Type ? for a list of commands
195
+ midpoint> users
196
+ OID Name Title FullName Status EmpNo Email OU
197
+ ------------------------------------ ------------- ------- ---------------------- -------- ------- ------- ----
198
+ 00000000-0000-0000-0000-000000000002 administrator midPoint Administrator enabled
199
+ midpoint>
200
+
201
+ yk@lunar:~$ docker stop midpoint-1
202
+ midpoint-1
203
+ ```
204
+
205
+ ## Deployment of a new version
206
+
207
+ * Update revision in src/midpoint_cli/__init__.py
208
+ * Commit and tag with corresponding version number
209
+ * Build distribution: python setup.py sdist
210
+ * Upload distribution to PyPI: twine upload dist/*
@@ -0,0 +1,233 @@
1
+ Metadata-Version: 2.1
2
+ Name: midpoint-cli
3
+ Version: 1.2.0
4
+ Summary: A command line client to Midpoint Identity Management system.
5
+ Home-page: https://gitlab.com/alcibiade/midpoint-cli
6
+ Author: Yannick Kirschhoffer
7
+ Author-email: alcibiade@alcibiade.org
8
+ License: MIT
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: System Administrators
12
+ Classifier: Topic :: System :: Systems Administration
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: clint>=0.5
18
+ Requires-Dist: tabulate>=0.9
19
+ Requires-Dist: unidecode>=1.3
20
+ Requires-Dist: requests>=2.31
21
+ Requires-Dist: urllib3>=2.0
22
+ Requires-Dist: setuptools>=68.0
23
+
24
+ ## Midpoint CLI
25
+
26
+ This project is a command line client interface used to drive an Evolveum Midpoint identity management server.
27
+
28
+ The objectives of this tool are to enable:
29
+
30
+ * Administrator access to run tasks and review data
31
+ * Scripting for remote controlled automation
32
+ * Test scenarios implementation
33
+
34
+ The client currently supports:
35
+
36
+ * Users and Organizational units display
37
+ * User search
38
+ * Running tasks synchronously
39
+ * Retrieving object definitions of any kind
40
+ * Uploading objects from local files and applying patches
41
+
42
+ Features currently under development:
43
+
44
+ * Auto completion to search of IDs or task names
45
+ * Improved task results display: retrieve and display a human readable status output
46
+ * Any other tasks that would be sumbitted in the issue tracker of this project on Gitlab
47
+
48
+ The strong points of this project are:
49
+
50
+ * All commands can be run directly or using an interactive prompt session
51
+ * Colorful output
52
+ * A user-friendly bash compatible command line history management
53
+ * Full interactive help system
54
+ * A classical midpoint-cli [command] [command options] syntax
55
+
56
+ ## Usage
57
+
58
+ ### General syntax
59
+
60
+ ```bash
61
+ usage: midpoint-cli [-h] [-v] [-u USERNAME] [-p PASSWORD] [-U URL]
62
+ [command] [arg [arg ...]]
63
+
64
+ An interactive Midpoint command line client.
65
+
66
+ positional arguments:
67
+ command Optional command to be executed immediately.
68
+ arg Optional command arguments.
69
+
70
+ optional arguments:
71
+ -h, --help show this help message and exit
72
+ -v, --version Set the username to authenticate this session.
73
+ -u USERNAME, --username USERNAME
74
+ Set the username to authenticate this session.
75
+ -p PASSWORD, --password PASSWORD
76
+ Set the password to authenticate this session.
77
+ -U URL, --url URL Midpoint base URL
78
+
79
+ Available commands:
80
+ get Get an XML definition from the server from an existing OID reference.
81
+ put Create/Update a server object based on an XML structure.
82
+ delete Delete a server object based on its type and OID.
83
+
84
+ task Manage server tasks.
85
+ resource Manage resources on the server.
86
+
87
+ org Manage organizations.
88
+ user Manage users.
89
+
90
+ Midpoint-cli version 0.7.0, created and maintained by Yannick Kirschhoffer alcibiade@alcibiade.org
91
+ ```
92
+
93
+ ### Exernal configuration files (since v1.2)
94
+
95
+ Settings can be provided from an external configuration file. It can be either:
96
+
97
+ * .midpoint-cli.cfg in the home directory of the current user
98
+ * midpoint-cli.cfg in the current working directory
99
+
100
+ The syntax is as follows:
101
+
102
+ ```
103
+ [Midpoint]
104
+ url = https://localhost:8080/midpoint/
105
+ username = administrator
106
+ password = ...
107
+ ```
108
+
109
+ ### Environment variables (since v1.2)
110
+
111
+ The script will scan environment variables to read input parameters. This is
112
+ particularily useful for injection of password or in-container execution.
113
+
114
+ The variables are:
115
+
116
+ * MIDPOINT_URL
117
+ * MIDPOINT_USERNAME
118
+ * MIDPOINT_PASSWORD
119
+
120
+ ## Requirements
121
+
122
+ This program is compatible with Python version 3.7 or above.
123
+
124
+ ## Installation
125
+
126
+ ### Through PyPI
127
+
128
+ The most common way to install midpoint-cli on your own computer is to use the PyPI repository:
129
+
130
+ ```bash
131
+ yk@lunar:~$ pip3 install midpoint-cli
132
+ Collecting midpoint-cli
133
+ Downloading https://files.pythonhosted.org/packages/91/03/eaebde078e3560dfa919924d0a7c395f07a2e3fc9740223ea53db3afad05/midpoint-cli-0.7.0.tar.gz
134
+
135
+ [...]
136
+
137
+ Successfully built midpoint-cli clint tabulate args
138
+ Installing collected packages: args, clint, idna, urllib3, chardet, certifi, requests, tabulate, midpoint-cli
139
+ Successfully installed args-0.1.0 certifi-2019.9.11 chardet-3.0.4 clint-0.5.1 idna-2.8 midpoint-cli-0.7.0 requests-2.22.0 tabulate-0.8.5 urllib3-1.25.6
140
+
141
+ ```
142
+
143
+ ### Development build
144
+
145
+ To install the current development version from GIT:
146
+
147
+ ```bash
148
+ yk@lunar:~/dev$ git clone https://gitlab.com/alcibiade/midpoint-cli.git
149
+ Cloning into 'midpoint-cli'...
150
+ remote: Enumerating objects: 374, done.
151
+ remote: Counting objects: 100% (374/374), done.
152
+ remote: Compressing objects: 100% (176/176), done.
153
+ remote: Total 374 (delta 229), reused 299 (delta 175)
154
+ Receiving objects: 100% (374/374), 62.84 KiB | 0 bytes/s, done.
155
+ Resolving deltas: 100% (229/229), done.
156
+
157
+ yk@lunar:~/dev$ pip3 install midpoint-cli/
158
+ Processing ./midpoint-cli
159
+ Collecting clint (from midpoint-cli===0.8-snapshot)
160
+ Collecting requests (from midpoint-cli===0.8-snapshot)
161
+ Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
162
+ Collecting tabulate (from midpoint-cli===0.8-snapshot)
163
+ Collecting args (from clint->midpoint-cli===0.8-snapshot)
164
+ Collecting chardet<3.1.0,>=3.0.2 (from requests->midpoint-cli===0.8-snapshot)
165
+ Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
166
+ Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->midpoint-cli===0.8-snapshot)
167
+ Using cached https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl
168
+ Collecting certifi>=2017.4.17 (from requests->midpoint-cli===0.8-snapshot)
169
+ Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
170
+ Collecting idna<2.9,>=2.5 (from requests->midpoint-cli===0.8-snapshot)
171
+ Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
172
+ Building wheels for collected packages: midpoint-cli
173
+ Running setup.py bdist_wheel for midpoint-cli ... done
174
+ Stored in directory: /home/yk/.cache/pip/wheels/2a/5a/d6/54312f2db19e2a44cea90e4e1c186e7c1beb7192b4974db759
175
+ Successfully built midpoint-cli
176
+ Installing collected packages: args, clint, chardet, urllib3, certifi, idna, requests, tabulate, midpoint-cli
177
+ Successfully installed args-0.1.0 certifi-2019.9.11 chardet-3.0.4 clint-0.5.1 idna-2.8 midpoint-cli-0.7.0 requests-2.22.0 tabulate-0.8.5 urllib3-1.25.6
178
+
179
+ yk@lunar:~/dev$ midpoint-cli -v
180
+ Midpoint CLI Version 0.8-snapshot
181
+ ```
182
+
183
+ ### Anaconda
184
+
185
+ Anaconda packages are not available yet.
186
+
187
+ ## Setting up a sanbox environment
188
+
189
+ If you wish to test this project locally and don’t have a midpoint server available, you can use the
190
+ following instructions.
191
+
192
+ ### Using the Evolveum managed Docker image
193
+
194
+ Pull the image locally:
195
+
196
+ ```bash
197
+ yk@lunar:~$ docker pull evolveum/midpoint
198
+ Using default tag: latest
199
+ latest: Pulling from evolveum/midpoint
200
+
201
+ [...]
202
+
203
+ Digest: sha256:1e29b7e891d17bf7b1cf1853c84609e414c3a71d5c420aa38927200b2bdecc8e
204
+ Status: Downloaded newer image for evolveum/midpoint:latest
205
+ docker.io/evolveum/midpoint:latest
206
+
207
+
208
+ ```
209
+
210
+ Then run the server and bind the port 8080:
211
+
212
+ ```bash
213
+ yk@lunar:~$ docker run -d --name midpoint-1 -p8080:8080 evolveum/midpoint
214
+ c048d519395ca48c8e94e361a2239b1c35c5e5305a29600895056e030d6a576f
215
+
216
+ yk@lunar:~$ midpoint-cli
217
+ Welcome to Midpoint client ! Type ? for a list of commands
218
+ midpoint> users
219
+ OID Name Title FullName Status EmpNo Email OU
220
+ ------------------------------------ ------------- ------- ---------------------- -------- ------- ------- ----
221
+ 00000000-0000-0000-0000-000000000002 administrator midPoint Administrator enabled
222
+ midpoint>
223
+
224
+ yk@lunar:~$ docker stop midpoint-1
225
+ midpoint-1
226
+ ```
227
+
228
+ ## Deployment of a new version
229
+
230
+ * Update revision in src/midpoint_cli/__init__.py
231
+ * Commit and tag with corresponding version number
232
+ * Build distribution: python setup.py sdist
233
+ * Upload distribution to PyPI: twine upload dist/*
@@ -1,4 +1,5 @@
1
1
  LICENSE
2
+ README.md
2
3
  setup.cfg
3
4
  setup.py
4
5
  midpoint_cli.egg-info/PKG-INFO
@@ -17,6 +18,7 @@ src/midpoint_cli/client/session.py
17
18
  src/midpoint_cli/prompt/__init__.py
18
19
  src/midpoint_cli/prompt/base.py
19
20
  src/midpoint_cli/prompt/complete.py
21
+ src/midpoint_cli/prompt/configuration.py
20
22
  src/midpoint_cli/prompt/console.py
21
23
  src/midpoint_cli/prompt/delete.py
22
24
  src/midpoint_cli/prompt/get.py
@@ -29,6 +31,7 @@ src/midpoint_cli/prompt/user.py
29
31
  test/test_client_api.py
30
32
  test/test_client_model.py
31
33
  test/test_client_put.py
34
+ test/test_environment.py
32
35
  test/test_parser.py
33
36
  test/test_patch.py
34
37
  test/test_script.py