apigeecli 0.53.4__tar.gz → 0.53.6__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.
- {apigeecli-0.53.4/apigeecli.egg-info → apigeecli-0.53.6}/PKG-INFO +11 -29
- {apigeecli-0.53.4 → apigeecli-0.53.6}/README.rst +10 -28
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/__init__.py +1 -1
- {apigeecli-0.53.4 → apigeecli-0.53.6/apigeecli.egg-info}/PKG-INFO +11 -29
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigeecli.egg-info/SOURCES.txt +0 -1
- apigeecli-0.53.4/apigee/apis/pull.py +0 -255
- {apigeecli-0.53.4 → apigeecli-0.53.6}/LICENSE +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/NOTICE +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/__main__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apiproducts/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apiproducts/apiproducts.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apiproducts/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apiproducts/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apis/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apis/api_puller_with_dependency_extraction.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apis/apis.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apis/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apis/deploy.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apis/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apps/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apps/apps.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apps/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/apps/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/auth.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/backups/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/backups/backups.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/backups/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/caches/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/caches/caches.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/caches/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/caches/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/cls.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/configure/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/configure/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/console.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/crypto.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/deployments/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/deployments/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/deployments/deployments.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/deployments/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/developers/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/developers/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/developers/developers.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/developers/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/encryption_utils.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/exceptions.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keystores/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keystores/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keystores/keystores.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keystores/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keyvaluemaps/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keyvaluemaps/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keyvaluemaps/keyvaluemaps.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/keyvaluemaps/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/maskconfigs/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/maskconfigs/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/maskconfigs/maskconfigs.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/maskconfigs/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/permissions/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/permissions/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/permissions/permissions.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/permissions/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/plugins/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/plugins/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/prefix.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/references/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/references/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/references/references.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/references/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/sharedflows/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/sharedflows/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/sharedflows/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/sharedflows/sharedflows.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/silent.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/targetservers/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/targetservers/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/targetservers/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/targetservers/targetservers.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/types.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/userroles/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/userroles/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/userroles/userroles.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/utils.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/utils_init.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/verbose.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/virtualhosts/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/virtualhosts/commands.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/virtualhosts/serializer.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigee/virtualhosts/virtualhosts.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigeecli.egg-info/dependency_links.txt +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigeecli.egg-info/entry_points.txt +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigeecli.egg-info/requires.txt +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/apigeecli.egg-info/top_level.txt +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/setup.cfg +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/setup.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/tests/__init__.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/tests/test_auth.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/tests/test_echo.py +0 -0
- {apigeecli-0.53.4 → apigeecli-0.53.6}/tests/test_encryption_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apigeecli
|
|
3
|
-
Version: 0.53.
|
|
3
|
+
Version: 0.53.6
|
|
4
4
|
Summary: The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication.
|
|
5
5
|
Home-page: https://github.com/darumatic/apigee-cli
|
|
6
6
|
Author: Matthew Delotavo
|
|
@@ -23,7 +23,7 @@ License-File: NOTICE
|
|
|
23
23
|
apigee-cli
|
|
24
24
|
==========
|
|
25
25
|
|
|
26
|
-
|
|
|
26
|
+
|Python version| |Downloads| |License|
|
|
27
27
|
|
|
28
28
|
.. warning::
|
|
29
29
|
|
|
@@ -31,15 +31,15 @@ apigee-cli
|
|
|
31
31
|
|
|
32
32
|
The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication.
|
|
33
33
|
|
|
34
|
-
Initially developed for Darumatic clients, this project remains available as a
|
|
34
|
+
Initially developed for Darumatic clients, this project remains available as a functional proof of concept and has proven reliable in production CI/CD pipelines. I do not plan to maintain this public version, but you're welcome to explore and learn from the code. The custom plugins feature will continue to work even if the Apigee Edge APIs become unavailable.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
*If you’re up for a challenge, try updating the code to work with Apigee X*
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
-----------------------------------------
|
|
39
|
+
Why use this instead of the official tool
|
|
40
|
+
-----------------------------------------
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**apigee-cli** is highly experimental and is not affiliated with Apigee or Google.
|
|
42
|
+
The `official Apigee CLI`_ is powerful and may suit your needs. However, I built this version to better support our CI/CD processes, self-service operations, and DevOps workflows that are difficult to manage with the official tool.
|
|
43
43
|
|
|
44
44
|
------------
|
|
45
45
|
Installation
|
|
@@ -126,25 +126,6 @@ Run the following command to get a list of API proxies in your ``default`` Apige
|
|
|
126
126
|
$ apigee apis list
|
|
127
127
|
["helloworld", "oauth"]
|
|
128
128
|
|
|
129
|
-
--------------------
|
|
130
|
-
Why does this exist?
|
|
131
|
-
--------------------
|
|
132
|
-
|
|
133
|
-
It is intended for general administrative use from your shell, as a package for developers,
|
|
134
|
-
and to support automation for common development tasks, such as test automation
|
|
135
|
-
or Continuous Integration/Continuous Deployment (CI/CD).
|
|
136
|
-
|
|
137
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
138
|
-
When to use this over the official tool
|
|
139
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
140
|
-
|
|
141
|
-
Apigee Corporation maintains their own `fully-featured CLI`_ for the Apigee Management API
|
|
142
|
-
that can be used as an SDK to orchestrate tasks and may be more than suitable for your needs.
|
|
143
|
-
|
|
144
|
-
We built and use the Apigee CLI to implement and distribute features that allow our clients
|
|
145
|
-
to manage CI/CD, perform self-service operations and promote our DevOps workflows
|
|
146
|
-
which are difficult to perform using official tools.
|
|
147
|
-
|
|
148
129
|
-------------
|
|
149
130
|
Running Tests
|
|
150
131
|
-------------
|
|
@@ -182,10 +163,11 @@ For further questions, feel free to contact us at hello@darumatic.com.
|
|
|
182
163
|
----------
|
|
183
164
|
Disclaimer
|
|
184
165
|
----------
|
|
185
|
-
|
|
166
|
+
|
|
167
|
+
This tool is not affiliated with Apigee or Google and is highly experimental.
|
|
186
168
|
|
|
187
169
|
|
|
188
|
-
.. _`
|
|
170
|
+
.. _`official Apigee CLI`: https://github.com/apigee/apigeetool-node
|
|
189
171
|
|
|
190
172
|
.. |Upload Python Package badge| image:: https://github.com/mdelotavo/apigee-cli/workflows/Upload%20Python%20Package/badge.svg
|
|
191
173
|
:target: https://github.com/mdelotavo/apigee-cli/actions?query=workflow%3A%22Upload+Python+Package%22
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
apigee-cli
|
|
3
3
|
==========
|
|
4
4
|
|
|
5
|
-
|
|
|
5
|
+
|Python version| |Downloads| |License|
|
|
6
6
|
|
|
7
7
|
.. warning::
|
|
8
8
|
|
|
@@ -10,15 +10,15 @@ apigee-cli
|
|
|
10
10
|
|
|
11
11
|
The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication.
|
|
12
12
|
|
|
13
|
-
Initially developed for Darumatic clients, this project remains available as a
|
|
13
|
+
Initially developed for Darumatic clients, this project remains available as a functional proof of concept and has proven reliable in production CI/CD pipelines. I do not plan to maintain this public version, but you're welcome to explore and learn from the code. The custom plugins feature will continue to work even if the Apigee Edge APIs become unavailable.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
*If you’re up for a challenge, try updating the code to work with Apigee X*
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
-----------------------------------------
|
|
18
|
+
Why use this instead of the official tool
|
|
19
|
+
-----------------------------------------
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**apigee-cli** is highly experimental and is not affiliated with Apigee or Google.
|
|
21
|
+
The `official Apigee CLI`_ is powerful and may suit your needs. However, I built this version to better support our CI/CD processes, self-service operations, and DevOps workflows that are difficult to manage with the official tool.
|
|
22
22
|
|
|
23
23
|
------------
|
|
24
24
|
Installation
|
|
@@ -105,25 +105,6 @@ Run the following command to get a list of API proxies in your ``default`` Apige
|
|
|
105
105
|
$ apigee apis list
|
|
106
106
|
["helloworld", "oauth"]
|
|
107
107
|
|
|
108
|
-
--------------------
|
|
109
|
-
Why does this exist?
|
|
110
|
-
--------------------
|
|
111
|
-
|
|
112
|
-
It is intended for general administrative use from your shell, as a package for developers,
|
|
113
|
-
and to support automation for common development tasks, such as test automation
|
|
114
|
-
or Continuous Integration/Continuous Deployment (CI/CD).
|
|
115
|
-
|
|
116
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
117
|
-
When to use this over the official tool
|
|
118
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
119
|
-
|
|
120
|
-
Apigee Corporation maintains their own `fully-featured CLI`_ for the Apigee Management API
|
|
121
|
-
that can be used as an SDK to orchestrate tasks and may be more than suitable for your needs.
|
|
122
|
-
|
|
123
|
-
We built and use the Apigee CLI to implement and distribute features that allow our clients
|
|
124
|
-
to manage CI/CD, perform self-service operations and promote our DevOps workflows
|
|
125
|
-
which are difficult to perform using official tools.
|
|
126
|
-
|
|
127
108
|
-------------
|
|
128
109
|
Running Tests
|
|
129
110
|
-------------
|
|
@@ -161,10 +142,11 @@ For further questions, feel free to contact us at hello@darumatic.com.
|
|
|
161
142
|
----------
|
|
162
143
|
Disclaimer
|
|
163
144
|
----------
|
|
164
|
-
|
|
145
|
+
|
|
146
|
+
This tool is not affiliated with Apigee or Google and is highly experimental.
|
|
165
147
|
|
|
166
148
|
|
|
167
|
-
.. _`
|
|
149
|
+
.. _`official Apigee CLI`: https://github.com/apigee/apigeetool-node
|
|
168
150
|
|
|
169
151
|
.. |Upload Python Package badge| image:: https://github.com/mdelotavo/apigee-cli/workflows/Upload%20Python%20Package/badge.svg
|
|
170
152
|
:target: https://github.com/mdelotavo/apigee-cli/actions?query=workflow%3A%22Upload+Python+Package%22
|
|
@@ -6,7 +6,7 @@ from apigee import utils_init
|
|
|
6
6
|
|
|
7
7
|
APP = "apigeecli"
|
|
8
8
|
CMD = "apigee"
|
|
9
|
-
__version__ = "0.53.
|
|
9
|
+
__version__ = "0.53.6"
|
|
10
10
|
description = "The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication."
|
|
11
11
|
long_description = """This tool is no longer actively maintained. Initially developed for Darumatic clients, this project remains available as a working proof of concept, proven reliable in production CI/CD pipelines. The custom plugins feature will remain functional even if Apigee Edge APIs stop working."""
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apigeecli
|
|
3
|
-
Version: 0.53.
|
|
3
|
+
Version: 0.53.6
|
|
4
4
|
Summary: The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication.
|
|
5
5
|
Home-page: https://github.com/darumatic/apigee-cli
|
|
6
6
|
Author: Matthew Delotavo
|
|
@@ -23,7 +23,7 @@ License-File: NOTICE
|
|
|
23
23
|
apigee-cli
|
|
24
24
|
==========
|
|
25
25
|
|
|
26
|
-
|
|
|
26
|
+
|Python version| |Downloads| |License|
|
|
27
27
|
|
|
28
28
|
.. warning::
|
|
29
29
|
|
|
@@ -31,15 +31,15 @@ apigee-cli
|
|
|
31
31
|
|
|
32
32
|
The Apigee Edge command-line interface is an unofficial Python command-line tool built to simplify and automate Apigee Edge API usage, with support for SSO, MFA, and basic authentication.
|
|
33
33
|
|
|
34
|
-
Initially developed for Darumatic clients, this project remains available as a
|
|
34
|
+
Initially developed for Darumatic clients, this project remains available as a functional proof of concept and has proven reliable in production CI/CD pipelines. I do not plan to maintain this public version, but you're welcome to explore and learn from the code. The custom plugins feature will continue to work even if the Apigee Edge APIs become unavailable.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
*If you’re up for a challenge, try updating the code to work with Apigee X*
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
-----------------------------------------
|
|
39
|
+
Why use this instead of the official tool
|
|
40
|
+
-----------------------------------------
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**apigee-cli** is highly experimental and is not affiliated with Apigee or Google.
|
|
42
|
+
The `official Apigee CLI`_ is powerful and may suit your needs. However, I built this version to better support our CI/CD processes, self-service operations, and DevOps workflows that are difficult to manage with the official tool.
|
|
43
43
|
|
|
44
44
|
------------
|
|
45
45
|
Installation
|
|
@@ -126,25 +126,6 @@ Run the following command to get a list of API proxies in your ``default`` Apige
|
|
|
126
126
|
$ apigee apis list
|
|
127
127
|
["helloworld", "oauth"]
|
|
128
128
|
|
|
129
|
-
--------------------
|
|
130
|
-
Why does this exist?
|
|
131
|
-
--------------------
|
|
132
|
-
|
|
133
|
-
It is intended for general administrative use from your shell, as a package for developers,
|
|
134
|
-
and to support automation for common development tasks, such as test automation
|
|
135
|
-
or Continuous Integration/Continuous Deployment (CI/CD).
|
|
136
|
-
|
|
137
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
138
|
-
When to use this over the official tool
|
|
139
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
140
|
-
|
|
141
|
-
Apigee Corporation maintains their own `fully-featured CLI`_ for the Apigee Management API
|
|
142
|
-
that can be used as an SDK to orchestrate tasks and may be more than suitable for your needs.
|
|
143
|
-
|
|
144
|
-
We built and use the Apigee CLI to implement and distribute features that allow our clients
|
|
145
|
-
to manage CI/CD, perform self-service operations and promote our DevOps workflows
|
|
146
|
-
which are difficult to perform using official tools.
|
|
147
|
-
|
|
148
129
|
-------------
|
|
149
130
|
Running Tests
|
|
150
131
|
-------------
|
|
@@ -182,10 +163,11 @@ For further questions, feel free to contact us at hello@darumatic.com.
|
|
|
182
163
|
----------
|
|
183
164
|
Disclaimer
|
|
184
165
|
----------
|
|
185
|
-
|
|
166
|
+
|
|
167
|
+
This tool is not affiliated with Apigee or Google and is highly experimental.
|
|
186
168
|
|
|
187
169
|
|
|
188
|
-
.. _`
|
|
170
|
+
.. _`official Apigee CLI`: https://github.com/apigee/apigeetool-node
|
|
189
171
|
|
|
190
172
|
.. |Upload Python Package badge| image:: https://github.com/mdelotavo/apigee-cli/workflows/Upload%20Python%20Package/badge.svg
|
|
191
173
|
:target: https://github.com/mdelotavo/apigee-cli/actions?query=workflow%3A%22Upload+Python+Package%22
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import os
|
|
3
|
-
import xml.etree.ElementTree as et
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
from apigee import console
|
|
7
|
-
from apigee.apis.apis import Apis
|
|
8
|
-
from apigee.caches.caches import Caches
|
|
9
|
-
from apigee.keyvaluemaps.keyvaluemaps import Keyvaluemaps
|
|
10
|
-
from apigee.targetservers.targetservers import Targetservers
|
|
11
|
-
from apigee.utils import (extract_zip, make_dirs, path_exists, paths_exist,
|
|
12
|
-
run_func_on_dir_files, run_func_on_iterable)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class PullApis:
|
|
16
|
-
def __init__(self, auth, org_name, revision_number, environment, work_tree=None):
|
|
17
|
-
self.auth = auth
|
|
18
|
-
self.org_name = org_name
|
|
19
|
-
self.work_tree = work_tree
|
|
20
|
-
self.revision_number = revision_number
|
|
21
|
-
self.environment = environment
|
|
22
|
-
self.keyvaluemaps_dir = "keyvaluemaps"
|
|
23
|
-
self.targetservers_dir = "targetservers"
|
|
24
|
-
self.caches_dir = "caches"
|
|
25
|
-
self._apiproxy_dir = self.work_tree
|
|
26
|
-
self.zip_file = str(Path(self.apiproxy_dir).with_suffix(".zip"))
|
|
27
|
-
|
|
28
|
-
def __call__(self, *args, **kwargs):
|
|
29
|
-
self.pull(*args, **kwargs)
|
|
30
|
-
|
|
31
|
-
@property
|
|
32
|
-
def auth(self):
|
|
33
|
-
return self._auth
|
|
34
|
-
|
|
35
|
-
@auth.setter
|
|
36
|
-
def auth(self, value):
|
|
37
|
-
self._auth = value
|
|
38
|
-
|
|
39
|
-
@property
|
|
40
|
-
def org_name(self):
|
|
41
|
-
return self._org_name
|
|
42
|
-
|
|
43
|
-
@org_name.setter
|
|
44
|
-
def org_name(self, value):
|
|
45
|
-
self._org_name = value
|
|
46
|
-
|
|
47
|
-
@property
|
|
48
|
-
def revision_number(self):
|
|
49
|
-
return self._revision_number
|
|
50
|
-
|
|
51
|
-
@revision_number.setter
|
|
52
|
-
def revision_number(self, value):
|
|
53
|
-
self._revision_number = value
|
|
54
|
-
|
|
55
|
-
@property
|
|
56
|
-
def environment(self):
|
|
57
|
-
return self._environment
|
|
58
|
-
|
|
59
|
-
@environment.setter
|
|
60
|
-
def environment(self, value):
|
|
61
|
-
self._environment = value
|
|
62
|
-
|
|
63
|
-
@property
|
|
64
|
-
def work_tree(self):
|
|
65
|
-
return self._work_tree
|
|
66
|
-
|
|
67
|
-
@work_tree.setter
|
|
68
|
-
def work_tree(self, value):
|
|
69
|
-
if value:
|
|
70
|
-
if not os.path.exists(value):
|
|
71
|
-
os.makedirs(value)
|
|
72
|
-
self._work_tree = str(Path(value).resolve())
|
|
73
|
-
else:
|
|
74
|
-
self._work_tree = os.getcwd()
|
|
75
|
-
|
|
76
|
-
@property
|
|
77
|
-
def keyvaluemaps_dir(self):
|
|
78
|
-
return self._keyvaluemaps_dir
|
|
79
|
-
|
|
80
|
-
@keyvaluemaps_dir.setter
|
|
81
|
-
def keyvaluemaps_dir(self, value):
|
|
82
|
-
self._keyvaluemaps_dir = str(Path(self.work_tree) / value / self.environment)
|
|
83
|
-
|
|
84
|
-
@property
|
|
85
|
-
def targetservers_dir(self):
|
|
86
|
-
return self._targetservers_dir
|
|
87
|
-
|
|
88
|
-
@targetservers_dir.setter
|
|
89
|
-
def targetservers_dir(self, value):
|
|
90
|
-
self._targetservers_dir = str(Path(self.work_tree) / value / self.environment)
|
|
91
|
-
|
|
92
|
-
@property
|
|
93
|
-
def caches_dir(self):
|
|
94
|
-
return self._caches_dir
|
|
95
|
-
|
|
96
|
-
@caches_dir.setter
|
|
97
|
-
def caches_dir(self, value):
|
|
98
|
-
self._caches_dir = str(Path(self.work_tree) / value / self.environment)
|
|
99
|
-
|
|
100
|
-
@property
|
|
101
|
-
def apiproxy_dir(self):
|
|
102
|
-
return self._apiproxy_dir
|
|
103
|
-
|
|
104
|
-
@apiproxy_dir.setter
|
|
105
|
-
def apiproxy_dir(self, value):
|
|
106
|
-
self._apiproxy_dir = str(Path(self.work_tree) / value)
|
|
107
|
-
|
|
108
|
-
@property
|
|
109
|
-
def zip_file(self):
|
|
110
|
-
return self._zip_file
|
|
111
|
-
|
|
112
|
-
@zip_file.setter
|
|
113
|
-
def zip_file(self, value):
|
|
114
|
-
self._zip_file = value
|
|
115
|
-
|
|
116
|
-
# def call_export_method(self, resource_type, files, environment, dependencies=[], force=True):
|
|
117
|
-
def call_export_method(self, resource_type, files, environment, force=True):
|
|
118
|
-
resource_files = getattr(self, f"get_{resource_type}_dependencies")(files)
|
|
119
|
-
# dependencies.extend(resource_files)
|
|
120
|
-
getattr(self, f"export_{resource_type}_dependencies")(
|
|
121
|
-
environment, resource_files, force=force
|
|
122
|
-
)
|
|
123
|
-
# return dependencies
|
|
124
|
-
return resource_files
|
|
125
|
-
|
|
126
|
-
def get_apiproxy_files(self, directory):
|
|
127
|
-
return run_func_on_dir_files(str(Path(directory) / "apiproxy"), lambda f: f)
|
|
128
|
-
|
|
129
|
-
def get_keyvaluemap_dependencies(self, files):
|
|
130
|
-
def _func(f, _state):
|
|
131
|
-
try:
|
|
132
|
-
root = et.parse(f).getroot()
|
|
133
|
-
if (
|
|
134
|
-
root.tag == "KeyValueMapOperations"
|
|
135
|
-
and root.attrib["mapIdentifier"] not in _state
|
|
136
|
-
):
|
|
137
|
-
_state.add(root.attrib["mapIdentifier"])
|
|
138
|
-
return root.attrib["mapIdentifier"]
|
|
139
|
-
except Exception as e:
|
|
140
|
-
logging.warning(f"{e}; file={f}", exc_info=True)
|
|
141
|
-
|
|
142
|
-
return run_func_on_iterable(files, _func, args=(set(),))
|
|
143
|
-
|
|
144
|
-
def export_keyvaluemap_dependencies(
|
|
145
|
-
self, environment, keyvaluemaps, force=False, expc_verbosity=1
|
|
146
|
-
):
|
|
147
|
-
make_dirs(self._keyvaluemaps_dir)
|
|
148
|
-
|
|
149
|
-
def _func(kvm):
|
|
150
|
-
kvm_file = str(Path(self._keyvaluemaps_dir) / f"{kvm}.json")
|
|
151
|
-
if not force:
|
|
152
|
-
path_exists(os.path.relpath(kvm_file))
|
|
153
|
-
resp = (
|
|
154
|
-
Keyvaluemaps(self._auth, self._org_name, kvm)
|
|
155
|
-
.get_keyvaluemap_in_an_environment(environment)
|
|
156
|
-
.text
|
|
157
|
-
)
|
|
158
|
-
console.echo(resp, expc_verbosity=1)
|
|
159
|
-
with open(kvm_file, "w") as f:
|
|
160
|
-
f.write(resp)
|
|
161
|
-
|
|
162
|
-
return run_func_on_iterable(keyvaluemaps, _func)
|
|
163
|
-
|
|
164
|
-
def get_targetserver_dependencies(self, files):
|
|
165
|
-
def _func(f, _state):
|
|
166
|
-
try:
|
|
167
|
-
root = et.parse(f).getroot()
|
|
168
|
-
for child in root.iter("Server"):
|
|
169
|
-
if child.attrib["name"] not in _state:
|
|
170
|
-
_state.add(child.attrib["name"])
|
|
171
|
-
return child.attrib["name"]
|
|
172
|
-
except Exception as e:
|
|
173
|
-
logging.warning(f"{e}; file={f}", exc_info=True)
|
|
174
|
-
|
|
175
|
-
return run_func_on_iterable(files, _func, args=(set(),))
|
|
176
|
-
|
|
177
|
-
def export_targetserver_dependencies(
|
|
178
|
-
self, environment, targetservers, force=False, expc_verbosity=1
|
|
179
|
-
):
|
|
180
|
-
make_dirs(self._targetservers_dir)
|
|
181
|
-
|
|
182
|
-
def _func(ts):
|
|
183
|
-
ts_file = str(Path(self._targetservers_dir) / f"{ts}.json")
|
|
184
|
-
if not force:
|
|
185
|
-
path_exists(os.path.relpath(ts_file))
|
|
186
|
-
resp = (
|
|
187
|
-
Targetservers(self._auth, self._org_name, ts)
|
|
188
|
-
.get_targetserver(environment)
|
|
189
|
-
.text
|
|
190
|
-
)
|
|
191
|
-
console.echo(resp, expc_verbosity=1)
|
|
192
|
-
with open(ts_file, "w") as f:
|
|
193
|
-
f.write(resp)
|
|
194
|
-
|
|
195
|
-
return run_func_on_iterable(targetservers, _func)
|
|
196
|
-
|
|
197
|
-
def get_cache_dependencies(self, files):
|
|
198
|
-
def _func(f, _state):
|
|
199
|
-
try:
|
|
200
|
-
name = et.parse(f).find(".//CacheResource").text
|
|
201
|
-
if name and name not in _state:
|
|
202
|
-
_state.add(name)
|
|
203
|
-
return name
|
|
204
|
-
except Exception as e:
|
|
205
|
-
logging.warning(f"{e}; file={f}", exc_info=True)
|
|
206
|
-
|
|
207
|
-
return run_func_on_iterable(files, _func, args=(set(),))
|
|
208
|
-
|
|
209
|
-
def export_cache_dependencies(
|
|
210
|
-
self, environment, caches, force=False, expc_verbosity=1
|
|
211
|
-
):
|
|
212
|
-
make_dirs(self._caches_dir)
|
|
213
|
-
|
|
214
|
-
def _func(cache):
|
|
215
|
-
cache_file = str(Path(self._caches_dir) / f"{cache}.json")
|
|
216
|
-
if not force:
|
|
217
|
-
path_exists(os.path.relpath(cache_file))
|
|
218
|
-
resp = (
|
|
219
|
-
Caches(self._auth, self._org_name, cache)
|
|
220
|
-
.get_information_about_a_cache(environment)
|
|
221
|
-
.text
|
|
222
|
-
)
|
|
223
|
-
console.echo(resp, expc_verbosity=1)
|
|
224
|
-
with open(cache_file, "w") as f:
|
|
225
|
-
f.write(resp)
|
|
226
|
-
|
|
227
|
-
return run_func_on_iterable(caches, _func)
|
|
228
|
-
|
|
229
|
-
# def pull(self, api_name, dependencies=[], force=False, prefix=None, basepath=None):
|
|
230
|
-
def pull(self, api_name, force=False):
|
|
231
|
-
# dependencies.append(api_name)
|
|
232
|
-
make_dirs(self.work_tree)
|
|
233
|
-
self.apiproxy_dir = api_name
|
|
234
|
-
if not force:
|
|
235
|
-
paths_exist(
|
|
236
|
-
(os.path.relpath(self.zip_file), os.path.relpath(self.apiproxy_dir))
|
|
237
|
-
)
|
|
238
|
-
exported_api = Apis(self.auth, self.org_name).export_api_proxy(
|
|
239
|
-
api_name, self.revision_number, fs_write=True, output_file=self.zip_file
|
|
240
|
-
)
|
|
241
|
-
make_dirs(self.apiproxy_dir)
|
|
242
|
-
extract_zip(self.zip_file, self.apiproxy_dir)
|
|
243
|
-
os.remove(self.zip_file)
|
|
244
|
-
files = self.get_apiproxy_files(self.apiproxy_dir)
|
|
245
|
-
for resource_type in ("keyvaluemap", "targetserver", "cache"):
|
|
246
|
-
self.call_export_method(
|
|
247
|
-
# resource_type, files, self.environment, dependencies=dependencies, force=force
|
|
248
|
-
resource_type,
|
|
249
|
-
files,
|
|
250
|
-
self.environment,
|
|
251
|
-
force=force,
|
|
252
|
-
)
|
|
253
|
-
# print(dependencies)
|
|
254
|
-
# return exported_api, dependencies
|
|
255
|
-
return exported_api
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|