catalystwan 2.0.0a2__tar.gz → 2.0.0a3__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 (41) hide show
  1. catalystwan-2.0.0a3/PKG-INFO +343 -0
  2. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/README.md +12 -16
  3. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/pyproject.toml +5 -3
  4. catalystwan-2.0.0a3/src/catalystwan/core/loader.py +20 -0
  5. catalystwan-2.0.0a3/src/catalystwan/core/tests.py +15 -0
  6. catalystwan-2.0.0a3/src/catalystwan.egg-info/PKG-INFO +343 -0
  7. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan.egg-info/SOURCES.txt +2 -0
  8. catalystwan-2.0.0a3/src/catalystwan.egg-info/entry_points.txt +2 -0
  9. catalystwan-2.0.0a2/PKG-INFO +0 -147
  10. catalystwan-2.0.0a2/src/catalystwan/core/loader.py +0 -37
  11. catalystwan-2.0.0a2/src/catalystwan.egg-info/PKG-INFO +0 -147
  12. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/LICENSE +0 -0
  13. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/setup.cfg +0 -0
  14. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/__init__.py +0 -0
  15. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/abstractions.py +0 -0
  16. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/apigw_auth.py +0 -0
  17. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/client.py +0 -0
  18. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/encoder.py +0 -0
  19. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/exceptions.py +0 -0
  20. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/metadata.py +0 -0
  21. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/models/__init__.py +0 -0
  22. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/models/deserialize.py +0 -0
  23. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/models/serialize.py +0 -0
  24. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/models/utils.py +0 -0
  25. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/py.typed +0 -0
  26. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/request_adapter.py +0 -0
  27. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/request_limiter.py +0 -0
  28. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/response.py +0 -0
  29. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/session.py +0 -0
  30. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/types.py +0 -0
  31. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/version.py +0 -0
  32. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan/core/vmanage_auth.py +0 -0
  33. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan.egg-info/dependency_links.txt +0 -0
  34. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan.egg-info/requires.txt +0 -0
  35. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/src/catalystwan.egg-info/top_level.txt +0 -0
  36. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/tests/test_ft_deserialize.py +0 -0
  37. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/tests/test_ft_serialize.py +0 -0
  38. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/tests/test_model_deserialize.py +0 -0
  39. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/tests/test_model_serialize.py +0 -0
  40. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/tests/test_parcel_deserialize.py +0 -0
  41. {catalystwan-2.0.0a2 → catalystwan-2.0.0a3}/tests/test_parcel_serialize.py +0 -0
@@ -0,0 +1,343 @@
1
+ Metadata-Version: 2.1
2
+ Name: catalystwan
3
+ Version: 2.0.0a3
4
+ Summary: Cisco Catalyst WAN SDK for Python
5
+ License: Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity authorized by
17
+ the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all
20
+ other entities that control, are controlled by, or are under common
21
+ control with that entity. For the purposes of this definition,
22
+ "control" means (i) the power, direct or indirect, to cause the
23
+ direction or management of such entity, whether by contract or
24
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
+ outstanding shares, or (iii) beneficial ownership of such entity.
26
+
27
+ "You" (or "Your") shall mean an individual or Legal Entity
28
+ exercising permissions granted by this License.
29
+
30
+ "Source" form shall mean the preferred form for making modifications,
31
+ including but not limited to software source code, documentation
32
+ source, and configuration files.
33
+
34
+ "Object" form shall mean any form resulting from mechanical
35
+ transformation or translation of a Source form, including but
36
+ not limited to compiled object code, generated documentation,
37
+ and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or
40
+ Object form, made available under the License, as indicated by a
41
+ copyright notice that is included in or attached to the work
42
+ (an example is provided in the Appendix below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object
45
+ form, that is based on (or derived from) the Work and for which the
46
+ editorial revisions, annotations, elaborations, or other modifications
47
+ represent, as a whole, an original work of authorship. For the purposes
48
+ of this License, Derivative Works shall not include works that remain
49
+ separable from, or merely link (or bind by name) to the interfaces of,
50
+ the Work and Derivative Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including
53
+ the original version of the Work and any modifications or additions
54
+ to that Work or Derivative Works thereof, that is intentionally
55
+ submitted to Licensor for inclusion in the Work by the copyright owner
56
+ or by an individual or Legal Entity authorized to submit on behalf of
57
+ the copyright owner. For the purposes of this definition, "submitted"
58
+ means any form of electronic, verbal, or written communication sent
59
+ to the Licensor or its representatives, including but not limited to
60
+ communication on electronic mailing lists, source code control systems,
61
+ and issue tracking systems that are managed by, or on behalf of, the
62
+ Licensor for the purpose of discussing and improving the Work, but
63
+ excluding communication that is conspicuously marked or otherwise
64
+ designated in writing by the copyright owner as "Not a Contribution."
65
+
66
+ "Contributor" shall mean Licensor and any individual or Legal Entity
67
+ on behalf of whom a Contribution has been received by Licensor and
68
+ subsequently incorporated within the Work.
69
+
70
+ 2. Grant of Copyright License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ copyright license to reproduce, prepare Derivative Works of,
74
+ publicly display, publicly perform, sublicense, and distribute the
75
+ Work and such Derivative Works in Source or Object form.
76
+
77
+ 3. Grant of Patent License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ (except as stated in this section) patent license to make, have made,
81
+ use, offer to sell, sell, import, and otherwise transfer the Work,
82
+ where such license applies only to those patent claims licensable
83
+ by such Contributor that are necessarily infringed by their
84
+ Contribution(s) alone or by combination of their Contribution(s)
85
+ with the Work to which such Contribution(s) was submitted. If You
86
+ institute patent litigation against any entity (including a
87
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
88
+ or a Contribution incorporated within the Work constitutes direct
89
+ or contributory patent infringement, then any patent licenses
90
+ granted to You under this License for that Work shall terminate
91
+ as of the date such litigation is filed.
92
+
93
+ 4. Redistribution. You may reproduce and distribute copies of the
94
+ Work or Derivative Works thereof in any medium, with or without
95
+ modifications, and in Source or Object form, provided that You
96
+ meet the following conditions:
97
+
98
+ (a) You must give any other recipients of the Work or
99
+ Derivative Works a copy of this License; and
100
+
101
+ (b) You must cause any modified files to carry prominent notices
102
+ stating that You changed the files; and
103
+
104
+ (c) You must retain, in the Source form of any Derivative Works
105
+ that You distribute, all copyright, patent, trademark, and
106
+ attribution notices from the Source form of the Work,
107
+ excluding those notices that do not pertain to any part of
108
+ the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright (c) 2024 Cisco Systems, Inc. and/or its affiliates
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+
207
+ Project-URL: Homepage, https://github.com/cisco-en-programmability/catalystwan-sdk-next-python
208
+ Classifier: Development Status :: 3 - Alpha
209
+ Classifier: Intended Audience :: Developers
210
+ Classifier: Programming Language :: Python
211
+ Classifier: Programming Language :: Python :: 3
212
+ Classifier: Programming Language :: Python :: 3.8
213
+ Classifier: Programming Language :: Python :: 3.9
214
+ Classifier: Programming Language :: Python :: 3.10
215
+ Classifier: Programming Language :: Python :: 3.11
216
+ Classifier: Programming Language :: Python :: 3.12
217
+ Classifier: Operating System :: OS Independent
218
+ Classifier: Topic :: Internet
219
+ Requires-Python: >=3.8
220
+ Description-Content-Type: text/markdown
221
+ License-File: LICENSE
222
+ Requires-Dist: packaging>=23.0
223
+ Requires-Dist: requests>=2.32.3
224
+ Requires-Dist: typing-extensions>=4.12.2
225
+ Requires-Dist: urllib3>=2.2.2
226
+ Requires-Dist: catalystwan-types==2.0.0a0
227
+ Requires-Dist: catalystwan-v20-15==2.0.0a1
228
+ Requires-Dist: catalystwan-v20-16==2.0.0a1
229
+ Provides-Extra: test
230
+ Requires-Dist: pytest>=8.2.2; extra == "test"
231
+ Provides-Extra: ver-all
232
+ Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-all"
233
+ Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-all"
234
+ Provides-Extra: ver-2015
235
+ Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-2015"
236
+ Provides-Extra: ver-2016
237
+ Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-2016"
238
+
239
+ Cisco Catalyst WAN SDK 2.0
240
+ ==========================
241
+
242
+ Welcome to the official documentation for the Cisco Catalyst WAN SDK, a package designed for creating simple and parallel automatic requests via the official SD-WAN Manager API.
243
+
244
+ Overview
245
+ --------
246
+
247
+ Cisco Catalyst WAN SDK serves as a multiple session handler (provider, provider as a tenant, tenant) and is environment-independent. You just need a connection to any SD-WAN Manager.
248
+
249
+ Supported Catalystwan WAN Server Versions
250
+ -----------------------------------------
251
+
252
+ - 20.15
253
+ - 20.16
254
+
255
+ Cisco Catalyst WAN SDK – Early Access Release
256
+ ---------------------------------------------
257
+
258
+ We are excited to introduce the Cisco Catalyst WAN SDK in its early access release phase,
259
+ marking an important step in enabling developers to harness the full potential of Cisco's
260
+ networking solutions. This release provides a unique opportunity to explore and experiment
261
+ with the SDK's capabilities as we continue to refine and enhance its features.
262
+
263
+ As this version is part of an early development stage, it is provided "as is" and is still
264
+ undergoing active testing and iteration. While we are committed to supporting your experience
265
+ on a best-effort basis, we recommend exercising caution and conducting thorough testing before
266
+ deploying it in a production environment.
267
+
268
+ Your feedback during this phase is invaluable in shaping the SDK to meet the needs of our developer
269
+ community. Thank you for partnering with us on this journey to innovate and advance networking automation.
270
+
271
+ Not recommend to use in production environments.
272
+ ------------------------------------------------
273
+ Cisco Catalyst WAN SDK in its `pre-alpha` release phase. This marks a significant milestone
274
+ in empowering developers to unlock the full capabilities of Cisco's networking solutions.
275
+ Please note that, as a pre-alpha release, this version of the SDK is still in active development
276
+ and testing. It is provided "as is," with limited support offered on a best-effort basis.
277
+
278
+
279
+ Supported Python Versions
280
+ -------------------------
281
+
282
+ Python >= 3.8
283
+
284
+ > If you don't have a specific version, you can just use [Pyenv](https://github.com/pyenv/pyenv) to manage Python versions.
285
+
286
+
287
+ Installation
288
+ ------------
289
+
290
+ To install the SDK, run the following command:
291
+
292
+ ```bash
293
+ pip install catalystwan==2.0.0a0
294
+ ```
295
+
296
+ To manually install the necessary Python packages in editable mode, you can use the `pip install -e` command.
297
+
298
+ ```bash
299
+ pip install -e ./packages/catalystwan-types \
300
+ -e ./packages/catalystwan-core \
301
+ -e ./versions/catalystwan-v20_15 \
302
+ -e ./versions/catalystwan-v20_16
303
+ ```
304
+
305
+
306
+ Getting Started
307
+ ---------------
308
+
309
+ To execute SDK APIs, you need to create a `ApiClient`. Use the `create_client()` method to configure a session, perform authentication, and obtain a `ApiClient` instance in an operational state.
310
+
311
+ ### Example Usage
312
+
313
+ Here's a quick example of how to use the SDK:
314
+
315
+ ```python
316
+ from catalystwan.core import create_client
317
+
318
+ url = "example.com"
319
+ username = "admin"
320
+ password = "password123"
321
+
322
+ with create_client(url=url, username=username, password=password) as client:
323
+ result = client.health.devices.get_devices_health()
324
+ print(result)
325
+ ```
326
+
327
+ If you need to preform more complex operations that require models, they can utilize an alias: `m`.
328
+ ```python
329
+
330
+ with create_client(...) as client:
331
+ result = client.admin.aaa.update_aaa_config(
332
+ client.admin.aaa.m.Aaa(
333
+ accounting: True,
334
+ admin_auth_order: False,
335
+ audit_disable: False,
336
+ auth_fallback: False,
337
+ auth_order: ["local"]
338
+ )
339
+ )
340
+ print(result)
341
+ ```
342
+
343
+ Using an alias allows for easier access and management of models, simplifying workflows and improving efficiency. This approach helps streamline operations without requiring direct integration with underlying models, making them more user-friendly and scalable.
@@ -14,25 +14,21 @@ Supported Catalystwan WAN Server Versions
14
14
  - 20.15
15
15
  - 20.16
16
16
 
17
+ Cisco Catalyst WAN SDK – Early Access Release
18
+ ---------------------------------------------
17
19
 
18
- Important Notice: Version Incompatibility
19
- -----------------------------------------
20
-
21
- We are excited to announce the release of Cisco Catalyst WAN SDK version 2.0.
22
- This new version introduces a range of enhancements and features designed
23
- to improve performance and usability. However, it is important to note that version 2.0
24
- is not compatible with any previous legacy versions of the SDK.
25
-
26
-
27
- Actions Recommended:
28
- Backup: Ensure you have backups of your current projects before attempting to upgrade.
29
- Review Documentation: Carefully review the updated documentation and release notes for guidance on migration and new features.
30
- Test Thoroughly: Test your projects thoroughly in a development environment before deploying version 2.0 in production.
31
-
32
- We appreciate your understanding and cooperation as we continue to enhance the Cisco Catalyst WAN SDK. Should you have any questions or require assistance, please reach out through our support channels.
20
+ We are excited to introduce the Cisco Catalyst WAN SDK in its early access release phase,
21
+ marking an important step in enabling developers to harness the full potential of Cisco's
22
+ networking solutions. This release provides a unique opportunity to explore and experiment
23
+ with the SDK's capabilities as we continue to refine and enhance its features.
33
24
 
34
- Thank you for your continued support and feedback!
25
+ As this version is part of an early development stage, it is provided "as is" and is still
26
+ undergoing active testing and iteration. While we are committed to supporting your experience
27
+ on a best-effort basis, we recommend exercising caution and conducting thorough testing before
28
+ deploying it in a production environment.
35
29
 
30
+ Your feedback during this phase is invaluable in shaping the SDK to meet the needs of our developer
31
+ community. Thank you for partnering with us on this journey to innovate and advance networking automation.
36
32
 
37
33
  Not recommend to use in production environments.
38
34
  ------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "catalystwan"
3
- version = "2.0.0a2"
3
+ version = "2.0.0a3"
4
4
  description = "Cisco Catalyst WAN SDK for Python"
5
5
  dependencies = [
6
6
  "packaging >= 23.0",
@@ -12,8 +12,7 @@ dependencies = [
12
12
  "catalystwan-v20-16 == 2.0.0a1"
13
13
  ]
14
14
  readme = "README.md"
15
- license = "Apache-2.0"
16
- license-files = ["LICENSE"]
15
+ license = { file = "LICENSE"}
17
16
 
18
17
  requires-python = ">= 3.8"
19
18
  classifiers = [
@@ -81,3 +80,6 @@ exclude="loader\\.py$"
81
80
  mypy_path = "$MYPY_CONFIG_FILE_DIR/src/"
82
81
  namespace_packages = true
83
82
  explicit_package_bases = true
83
+
84
+ [project.entry-points.pytest11]
85
+ catalystwan = "catalystwan.core.tests"
@@ -0,0 +1,20 @@
1
+ # This file is autogenerated and cannot be modified manually.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing as t
6
+
7
+ if t.TYPE_CHECKING:
8
+ from catalystwan.versions.v20_15.api_client import ApiClient as ApiClientV20_15
9
+
10
+ ApiClient = t.Union[ApiClientV20_15]
11
+
12
+ VERSIONS = ["20.15"]
13
+
14
+
15
+ def load_client(version: str) -> t.Type[ApiClient]:
16
+ if version == "20.15":
17
+ from catalystwan.versions.v20_15.api_client import ApiClient as ApiClientV20_15
18
+
19
+ return ApiClientV20_15
20
+ raise RuntimeError("Unsupported version: {}".format(version))
@@ -0,0 +1,15 @@
1
+ import os
2
+ import pytest
3
+
4
+ from catalystwan.core.session import create_manager_session
5
+ from catalystwan.core.request_adapter import RequestAdapter
6
+
7
+ @pytest.fixture(scope="package")
8
+ def catalystwan_requests():
9
+ url = os.environ["SDWAN_URL"]
10
+ port = int(os.environ["SDWAN_PORT"])
11
+ username = os.environ["SDWAN_USERNAME"]
12
+ password = os.environ["SDWAN_PASSWORD"]
13
+ print(f"Connecting to {url}:{port}...")
14
+ with create_manager_session(url, username, password, port) as session:
15
+ yield RequestAdapter(session=session)
@@ -0,0 +1,343 @@
1
+ Metadata-Version: 2.1
2
+ Name: catalystwan
3
+ Version: 2.0.0a3
4
+ Summary: Cisco Catalyst WAN SDK for Python
5
+ License: Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity authorized by
17
+ the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all
20
+ other entities that control, are controlled by, or are under common
21
+ control with that entity. For the purposes of this definition,
22
+ "control" means (i) the power, direct or indirect, to cause the
23
+ direction or management of such entity, whether by contract or
24
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
+ outstanding shares, or (iii) beneficial ownership of such entity.
26
+
27
+ "You" (or "Your") shall mean an individual or Legal Entity
28
+ exercising permissions granted by this License.
29
+
30
+ "Source" form shall mean the preferred form for making modifications,
31
+ including but not limited to software source code, documentation
32
+ source, and configuration files.
33
+
34
+ "Object" form shall mean any form resulting from mechanical
35
+ transformation or translation of a Source form, including but
36
+ not limited to compiled object code, generated documentation,
37
+ and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or
40
+ Object form, made available under the License, as indicated by a
41
+ copyright notice that is included in or attached to the work
42
+ (an example is provided in the Appendix below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object
45
+ form, that is based on (or derived from) the Work and for which the
46
+ editorial revisions, annotations, elaborations, or other modifications
47
+ represent, as a whole, an original work of authorship. For the purposes
48
+ of this License, Derivative Works shall not include works that remain
49
+ separable from, or merely link (or bind by name) to the interfaces of,
50
+ the Work and Derivative Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including
53
+ the original version of the Work and any modifications or additions
54
+ to that Work or Derivative Works thereof, that is intentionally
55
+ submitted to Licensor for inclusion in the Work by the copyright owner
56
+ or by an individual or Legal Entity authorized to submit on behalf of
57
+ the copyright owner. For the purposes of this definition, "submitted"
58
+ means any form of electronic, verbal, or written communication sent
59
+ to the Licensor or its representatives, including but not limited to
60
+ communication on electronic mailing lists, source code control systems,
61
+ and issue tracking systems that are managed by, or on behalf of, the
62
+ Licensor for the purpose of discussing and improving the Work, but
63
+ excluding communication that is conspicuously marked or otherwise
64
+ designated in writing by the copyright owner as "Not a Contribution."
65
+
66
+ "Contributor" shall mean Licensor and any individual or Legal Entity
67
+ on behalf of whom a Contribution has been received by Licensor and
68
+ subsequently incorporated within the Work.
69
+
70
+ 2. Grant of Copyright License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ copyright license to reproduce, prepare Derivative Works of,
74
+ publicly display, publicly perform, sublicense, and distribute the
75
+ Work and such Derivative Works in Source or Object form.
76
+
77
+ 3. Grant of Patent License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ (except as stated in this section) patent license to make, have made,
81
+ use, offer to sell, sell, import, and otherwise transfer the Work,
82
+ where such license applies only to those patent claims licensable
83
+ by such Contributor that are necessarily infringed by their
84
+ Contribution(s) alone or by combination of their Contribution(s)
85
+ with the Work to which such Contribution(s) was submitted. If You
86
+ institute patent litigation against any entity (including a
87
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
88
+ or a Contribution incorporated within the Work constitutes direct
89
+ or contributory patent infringement, then any patent licenses
90
+ granted to You under this License for that Work shall terminate
91
+ as of the date such litigation is filed.
92
+
93
+ 4. Redistribution. You may reproduce and distribute copies of the
94
+ Work or Derivative Works thereof in any medium, with or without
95
+ modifications, and in Source or Object form, provided that You
96
+ meet the following conditions:
97
+
98
+ (a) You must give any other recipients of the Work or
99
+ Derivative Works a copy of this License; and
100
+
101
+ (b) You must cause any modified files to carry prominent notices
102
+ stating that You changed the files; and
103
+
104
+ (c) You must retain, in the Source form of any Derivative Works
105
+ that You distribute, all copyright, patent, trademark, and
106
+ attribution notices from the Source form of the Work,
107
+ excluding those notices that do not pertain to any part of
108
+ the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright (c) 2024 Cisco Systems, Inc. and/or its affiliates
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+
207
+ Project-URL: Homepage, https://github.com/cisco-en-programmability/catalystwan-sdk-next-python
208
+ Classifier: Development Status :: 3 - Alpha
209
+ Classifier: Intended Audience :: Developers
210
+ Classifier: Programming Language :: Python
211
+ Classifier: Programming Language :: Python :: 3
212
+ Classifier: Programming Language :: Python :: 3.8
213
+ Classifier: Programming Language :: Python :: 3.9
214
+ Classifier: Programming Language :: Python :: 3.10
215
+ Classifier: Programming Language :: Python :: 3.11
216
+ Classifier: Programming Language :: Python :: 3.12
217
+ Classifier: Operating System :: OS Independent
218
+ Classifier: Topic :: Internet
219
+ Requires-Python: >=3.8
220
+ Description-Content-Type: text/markdown
221
+ License-File: LICENSE
222
+ Requires-Dist: packaging>=23.0
223
+ Requires-Dist: requests>=2.32.3
224
+ Requires-Dist: typing-extensions>=4.12.2
225
+ Requires-Dist: urllib3>=2.2.2
226
+ Requires-Dist: catalystwan-types==2.0.0a0
227
+ Requires-Dist: catalystwan-v20-15==2.0.0a1
228
+ Requires-Dist: catalystwan-v20-16==2.0.0a1
229
+ Provides-Extra: test
230
+ Requires-Dist: pytest>=8.2.2; extra == "test"
231
+ Provides-Extra: ver-all
232
+ Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-all"
233
+ Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-all"
234
+ Provides-Extra: ver-2015
235
+ Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-2015"
236
+ Provides-Extra: ver-2016
237
+ Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-2016"
238
+
239
+ Cisco Catalyst WAN SDK 2.0
240
+ ==========================
241
+
242
+ Welcome to the official documentation for the Cisco Catalyst WAN SDK, a package designed for creating simple and parallel automatic requests via the official SD-WAN Manager API.
243
+
244
+ Overview
245
+ --------
246
+
247
+ Cisco Catalyst WAN SDK serves as a multiple session handler (provider, provider as a tenant, tenant) and is environment-independent. You just need a connection to any SD-WAN Manager.
248
+
249
+ Supported Catalystwan WAN Server Versions
250
+ -----------------------------------------
251
+
252
+ - 20.15
253
+ - 20.16
254
+
255
+ Cisco Catalyst WAN SDK – Early Access Release
256
+ ---------------------------------------------
257
+
258
+ We are excited to introduce the Cisco Catalyst WAN SDK in its early access release phase,
259
+ marking an important step in enabling developers to harness the full potential of Cisco's
260
+ networking solutions. This release provides a unique opportunity to explore and experiment
261
+ with the SDK's capabilities as we continue to refine and enhance its features.
262
+
263
+ As this version is part of an early development stage, it is provided "as is" and is still
264
+ undergoing active testing and iteration. While we are committed to supporting your experience
265
+ on a best-effort basis, we recommend exercising caution and conducting thorough testing before
266
+ deploying it in a production environment.
267
+
268
+ Your feedback during this phase is invaluable in shaping the SDK to meet the needs of our developer
269
+ community. Thank you for partnering with us on this journey to innovate and advance networking automation.
270
+
271
+ Not recommend to use in production environments.
272
+ ------------------------------------------------
273
+ Cisco Catalyst WAN SDK in its `pre-alpha` release phase. This marks a significant milestone
274
+ in empowering developers to unlock the full capabilities of Cisco's networking solutions.
275
+ Please note that, as a pre-alpha release, this version of the SDK is still in active development
276
+ and testing. It is provided "as is," with limited support offered on a best-effort basis.
277
+
278
+
279
+ Supported Python Versions
280
+ -------------------------
281
+
282
+ Python >= 3.8
283
+
284
+ > If you don't have a specific version, you can just use [Pyenv](https://github.com/pyenv/pyenv) to manage Python versions.
285
+
286
+
287
+ Installation
288
+ ------------
289
+
290
+ To install the SDK, run the following command:
291
+
292
+ ```bash
293
+ pip install catalystwan==2.0.0a0
294
+ ```
295
+
296
+ To manually install the necessary Python packages in editable mode, you can use the `pip install -e` command.
297
+
298
+ ```bash
299
+ pip install -e ./packages/catalystwan-types \
300
+ -e ./packages/catalystwan-core \
301
+ -e ./versions/catalystwan-v20_15 \
302
+ -e ./versions/catalystwan-v20_16
303
+ ```
304
+
305
+
306
+ Getting Started
307
+ ---------------
308
+
309
+ To execute SDK APIs, you need to create a `ApiClient`. Use the `create_client()` method to configure a session, perform authentication, and obtain a `ApiClient` instance in an operational state.
310
+
311
+ ### Example Usage
312
+
313
+ Here's a quick example of how to use the SDK:
314
+
315
+ ```python
316
+ from catalystwan.core import create_client
317
+
318
+ url = "example.com"
319
+ username = "admin"
320
+ password = "password123"
321
+
322
+ with create_client(url=url, username=username, password=password) as client:
323
+ result = client.health.devices.get_devices_health()
324
+ print(result)
325
+ ```
326
+
327
+ If you need to preform more complex operations that require models, they can utilize an alias: `m`.
328
+ ```python
329
+
330
+ with create_client(...) as client:
331
+ result = client.admin.aaa.update_aaa_config(
332
+ client.admin.aaa.m.Aaa(
333
+ accounting: True,
334
+ admin_auth_order: False,
335
+ audit_disable: False,
336
+ auth_fallback: False,
337
+ auth_order: ["local"]
338
+ )
339
+ )
340
+ print(result)
341
+ ```
342
+
343
+ Using an alias allows for easier access and management of models, simplifying workflows and improving efficiency. This approach helps streamline operations without requiring direct integration with underlying models, making them more user-friendly and scalable.
@@ -4,6 +4,7 @@ pyproject.toml
4
4
  src/catalystwan.egg-info/PKG-INFO
5
5
  src/catalystwan.egg-info/SOURCES.txt
6
6
  src/catalystwan.egg-info/dependency_links.txt
7
+ src/catalystwan.egg-info/entry_points.txt
7
8
  src/catalystwan.egg-info/requires.txt
8
9
  src/catalystwan.egg-info/top_level.txt
9
10
  src/catalystwan/core/__init__.py
@@ -19,6 +20,7 @@ src/catalystwan/core/request_adapter.py
19
20
  src/catalystwan/core/request_limiter.py
20
21
  src/catalystwan/core/response.py
21
22
  src/catalystwan/core/session.py
23
+ src/catalystwan/core/tests.py
22
24
  src/catalystwan/core/types.py
23
25
  src/catalystwan/core/version.py
24
26
  src/catalystwan/core/vmanage_auth.py
@@ -0,0 +1,2 @@
1
+ [pytest11]
2
+ catalystwan = catalystwan.core.tests
@@ -1,147 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: catalystwan
3
- Version: 2.0.0a2
4
- Summary: Cisco Catalyst WAN SDK for Python
5
- License-Expression: Apache-2.0
6
- Project-URL: Homepage, https://github.com/cisco-en-programmability/catalystwan-sdk-next-python
7
- Classifier: Development Status :: 3 - Alpha
8
- Classifier: Intended Audience :: Developers
9
- Classifier: Programming Language :: Python
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.8
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Topic :: Internet
18
- Requires-Python: >=3.8
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: packaging>=23.0
22
- Requires-Dist: requests>=2.32.3
23
- Requires-Dist: typing-extensions>=4.12.2
24
- Requires-Dist: urllib3>=2.2.2
25
- Requires-Dist: catalystwan-types==2.0.0a0
26
- Requires-Dist: catalystwan-v20-15==2.0.0a1
27
- Requires-Dist: catalystwan-v20-16==2.0.0a1
28
- Provides-Extra: test
29
- Requires-Dist: pytest>=8.2.2; extra == "test"
30
- Provides-Extra: ver-all
31
- Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-all"
32
- Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-all"
33
- Provides-Extra: ver-2015
34
- Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-2015"
35
- Provides-Extra: ver-2016
36
- Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-2016"
37
- Dynamic: license-file
38
-
39
- Cisco Catalyst WAN SDK 2.0
40
- ==========================
41
-
42
- Welcome to the official documentation for the Cisco Catalyst WAN SDK, a package designed for creating simple and parallel automatic requests via the official SD-WAN Manager API.
43
-
44
- Overview
45
- --------
46
-
47
- Cisco Catalyst WAN SDK serves as a multiple session handler (provider, provider as a tenant, tenant) and is environment-independent. You just need a connection to any SD-WAN Manager.
48
-
49
- Supported Catalystwan WAN Server Versions
50
- -----------------------------------------
51
-
52
- - 20.15
53
- - 20.16
54
-
55
-
56
- Important Notice: Version Incompatibility
57
- -----------------------------------------
58
-
59
- We are excited to announce the release of Cisco Catalyst WAN SDK version 2.0.
60
- This new version introduces a range of enhancements and features designed
61
- to improve performance and usability. However, it is important to note that version 2.0
62
- is not compatible with any previous legacy versions of the SDK.
63
-
64
-
65
- Actions Recommended:
66
- Backup: Ensure you have backups of your current projects before attempting to upgrade.
67
- Review Documentation: Carefully review the updated documentation and release notes for guidance on migration and new features.
68
- Test Thoroughly: Test your projects thoroughly in a development environment before deploying version 2.0 in production.
69
-
70
- We appreciate your understanding and cooperation as we continue to enhance the Cisco Catalyst WAN SDK. Should you have any questions or require assistance, please reach out through our support channels.
71
-
72
- Thank you for your continued support and feedback!
73
-
74
-
75
- Not recommend to use in production environments.
76
- ------------------------------------------------
77
- Cisco Catalyst WAN SDK in its `pre-alpha` release phase. This marks a significant milestone
78
- in empowering developers to unlock the full capabilities of Cisco's networking solutions.
79
- Please note that, as a pre-alpha release, this version of the SDK is still in active development
80
- and testing. It is provided "as is," with limited support offered on a best-effort basis.
81
-
82
-
83
- Supported Python Versions
84
- -------------------------
85
-
86
- Python >= 3.8
87
-
88
- > If you don't have a specific version, you can just use [Pyenv](https://github.com/pyenv/pyenv) to manage Python versions.
89
-
90
-
91
- Installation
92
- ------------
93
-
94
- To install the SDK, run the following command:
95
-
96
- ```bash
97
- pip install catalystwan==2.0.0a0
98
- ```
99
-
100
- To manually install the necessary Python packages in editable mode, you can use the `pip install -e` command.
101
-
102
- ```bash
103
- pip install -e ./packages/catalystwan-types \
104
- -e ./packages/catalystwan-core \
105
- -e ./versions/catalystwan-v20_15 \
106
- -e ./versions/catalystwan-v20_16
107
- ```
108
-
109
-
110
- Getting Started
111
- ---------------
112
-
113
- To execute SDK APIs, you need to create a `ApiClient`. Use the `create_client()` method to configure a session, perform authentication, and obtain a `ApiClient` instance in an operational state.
114
-
115
- ### Example Usage
116
-
117
- Here's a quick example of how to use the SDK:
118
-
119
- ```python
120
- from catalystwan.core import create_client
121
-
122
- url = "example.com"
123
- username = "admin"
124
- password = "password123"
125
-
126
- with create_client(url=url, username=username, password=password) as client:
127
- result = client.health.devices.get_devices_health()
128
- print(result)
129
- ```
130
-
131
- If you need to preform more complex operations that require models, they can utilize an alias: `m`.
132
- ```python
133
-
134
- with create_client(...) as client:
135
- result = client.admin.aaa.update_aaa_config(
136
- client.admin.aaa.m.Aaa(
137
- accounting: True,
138
- admin_auth_order: False,
139
- audit_disable: False,
140
- auth_fallback: False,
141
- auth_order: ["local"]
142
- )
143
- )
144
- print(result)
145
- ```
146
-
147
- Using an alias allows for easier access and management of models, simplifying workflows and improving efficiency. This approach helps streamline operations without requiring direct integration with underlying models, making them more user-friendly and scalable.
@@ -1,37 +0,0 @@
1
- # This file is autogenerated and cannot be modified manually.
2
-
3
- from __future__ import annotations
4
-
5
- import typing as t
6
-
7
- if t.TYPE_CHECKING:
8
- from catalystwan.versions.v20_15.api_client import ApiClient as ApiClientV20_15
9
- from catalystwan.versions.v20_16.api_client import ApiClient as ApiClientV20_16
10
-
11
- ApiClient = t.Union[ApiClientV20_15, ApiClientV20_16]
12
-
13
- VERSIONS = ["20.15", "20.16"]
14
-
15
-
16
- @t.overload
17
- def load_client(version: t.Literal["20.15"]) -> t.Type[ApiClientV20_15]: ...
18
-
19
-
20
- @t.overload
21
- def load_client(version: t.Literal["20.16"]) -> t.Type[ApiClientV20_16]: ...
22
-
23
-
24
- @t.overload
25
- def load_client(version: str) -> t.Type[t.Union[ApiClientV20_15, ApiClientV20_16]]: ...
26
-
27
-
28
- def load_client(version: t.Union[str, t.Literal["20.15", "20.16"]]) -> t.Type[ApiClient]:
29
- if version == "20.15":
30
- from catalystwan.versions.v20_15.api_client import ApiClient as ApiClientV20_15
31
-
32
- return ApiClientV20_15
33
- if version == "20.16":
34
- from catalystwan.versions.v20_16.api_client import ApiClient as ApiClientV20_16
35
-
36
- return ApiClientV20_16
37
- raise RuntimeError("Unsupported version: {}".format(version))
@@ -1,147 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: catalystwan
3
- Version: 2.0.0a2
4
- Summary: Cisco Catalyst WAN SDK for Python
5
- License-Expression: Apache-2.0
6
- Project-URL: Homepage, https://github.com/cisco-en-programmability/catalystwan-sdk-next-python
7
- Classifier: Development Status :: 3 - Alpha
8
- Classifier: Intended Audience :: Developers
9
- Classifier: Programming Language :: Python
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.8
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Topic :: Internet
18
- Requires-Python: >=3.8
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: packaging>=23.0
22
- Requires-Dist: requests>=2.32.3
23
- Requires-Dist: typing-extensions>=4.12.2
24
- Requires-Dist: urllib3>=2.2.2
25
- Requires-Dist: catalystwan-types==2.0.0a0
26
- Requires-Dist: catalystwan-v20-15==2.0.0a1
27
- Requires-Dist: catalystwan-v20-16==2.0.0a1
28
- Provides-Extra: test
29
- Requires-Dist: pytest>=8.2.2; extra == "test"
30
- Provides-Extra: ver-all
31
- Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-all"
32
- Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-all"
33
- Provides-Extra: ver-2015
34
- Requires-Dist: catalystwan-v20-15==2.0.0a1; extra == "ver-2015"
35
- Provides-Extra: ver-2016
36
- Requires-Dist: catalystwan-v20-16==2.0.0a1; extra == "ver-2016"
37
- Dynamic: license-file
38
-
39
- Cisco Catalyst WAN SDK 2.0
40
- ==========================
41
-
42
- Welcome to the official documentation for the Cisco Catalyst WAN SDK, a package designed for creating simple and parallel automatic requests via the official SD-WAN Manager API.
43
-
44
- Overview
45
- --------
46
-
47
- Cisco Catalyst WAN SDK serves as a multiple session handler (provider, provider as a tenant, tenant) and is environment-independent. You just need a connection to any SD-WAN Manager.
48
-
49
- Supported Catalystwan WAN Server Versions
50
- -----------------------------------------
51
-
52
- - 20.15
53
- - 20.16
54
-
55
-
56
- Important Notice: Version Incompatibility
57
- -----------------------------------------
58
-
59
- We are excited to announce the release of Cisco Catalyst WAN SDK version 2.0.
60
- This new version introduces a range of enhancements and features designed
61
- to improve performance and usability. However, it is important to note that version 2.0
62
- is not compatible with any previous legacy versions of the SDK.
63
-
64
-
65
- Actions Recommended:
66
- Backup: Ensure you have backups of your current projects before attempting to upgrade.
67
- Review Documentation: Carefully review the updated documentation and release notes for guidance on migration and new features.
68
- Test Thoroughly: Test your projects thoroughly in a development environment before deploying version 2.0 in production.
69
-
70
- We appreciate your understanding and cooperation as we continue to enhance the Cisco Catalyst WAN SDK. Should you have any questions or require assistance, please reach out through our support channels.
71
-
72
- Thank you for your continued support and feedback!
73
-
74
-
75
- Not recommend to use in production environments.
76
- ------------------------------------------------
77
- Cisco Catalyst WAN SDK in its `pre-alpha` release phase. This marks a significant milestone
78
- in empowering developers to unlock the full capabilities of Cisco's networking solutions.
79
- Please note that, as a pre-alpha release, this version of the SDK is still in active development
80
- and testing. It is provided "as is," with limited support offered on a best-effort basis.
81
-
82
-
83
- Supported Python Versions
84
- -------------------------
85
-
86
- Python >= 3.8
87
-
88
- > If you don't have a specific version, you can just use [Pyenv](https://github.com/pyenv/pyenv) to manage Python versions.
89
-
90
-
91
- Installation
92
- ------------
93
-
94
- To install the SDK, run the following command:
95
-
96
- ```bash
97
- pip install catalystwan==2.0.0a0
98
- ```
99
-
100
- To manually install the necessary Python packages in editable mode, you can use the `pip install -e` command.
101
-
102
- ```bash
103
- pip install -e ./packages/catalystwan-types \
104
- -e ./packages/catalystwan-core \
105
- -e ./versions/catalystwan-v20_15 \
106
- -e ./versions/catalystwan-v20_16
107
- ```
108
-
109
-
110
- Getting Started
111
- ---------------
112
-
113
- To execute SDK APIs, you need to create a `ApiClient`. Use the `create_client()` method to configure a session, perform authentication, and obtain a `ApiClient` instance in an operational state.
114
-
115
- ### Example Usage
116
-
117
- Here's a quick example of how to use the SDK:
118
-
119
- ```python
120
- from catalystwan.core import create_client
121
-
122
- url = "example.com"
123
- username = "admin"
124
- password = "password123"
125
-
126
- with create_client(url=url, username=username, password=password) as client:
127
- result = client.health.devices.get_devices_health()
128
- print(result)
129
- ```
130
-
131
- If you need to preform more complex operations that require models, they can utilize an alias: `m`.
132
- ```python
133
-
134
- with create_client(...) as client:
135
- result = client.admin.aaa.update_aaa_config(
136
- client.admin.aaa.m.Aaa(
137
- accounting: True,
138
- admin_auth_order: False,
139
- audit_disable: False,
140
- auth_fallback: False,
141
- auth_order: ["local"]
142
- )
143
- )
144
- print(result)
145
- ```
146
-
147
- Using an alias allows for easier access and management of models, simplifying workflows and improving efficiency. This approach helps streamline operations without requiring direct integration with underlying models, making them more user-friendly and scalable.
File without changes
File without changes