mtn-cloud 0.2.5__tar.gz → 0.2.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.
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/PKG-INFO +5 -5
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/README.md +2 -2
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-overview.md +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/index.md +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/index.md +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/pyproject.toml +2 -2
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/_version.py +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/client.py +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/storage_bucket.py +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/archive_buckets.py +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/storage_buckets.py +1 -1
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_archive_buckets.py +3 -3
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_instance_types.py +8 -8
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/.gitignore +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/LICENSE +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/advanced-cookbook.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/archive-buckets.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/client.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/clouds.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/groups.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/instance-types.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/instances.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/networks.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/plans.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/api-reference/storage-buckets.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/docstring-style.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/instances.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/networking.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/quickstart.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/storage.md +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/docs/stylesheets/extra.css +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/__init__.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/config.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/exceptions.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/http.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/__init__.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/archive.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/base.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/cloud.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/group.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/instance.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/instance_type.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/network.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/plan.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/user.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/models/volume.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/__init__.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/base.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/clouds.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/groups.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/instance_types.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/instances.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/networks.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/src/mtn_cloud/resources/plans.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/__init__.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/conftest.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_client.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_clouds.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_config.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_exceptions.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_instances.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_networks.py +0 -0
- {mtn_cloud-0.2.5 → mtn_cloud-0.2.6}/tests/test_storage_buckets.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mtn-cloud
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Community Python SDK for MTN Cloud
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Community Python SDK for MTN Cloud - Deploy and manage cloud resources with ease
|
|
5
5
|
Project-URL: Homepage, https://github.com/mahveotm/mtn-cloud-python
|
|
6
6
|
Project-URL: Documentation, https://github.com/mahveotm/mtn-cloud-python#readme
|
|
7
7
|
Project-URL: Repository, https://github.com/mahveotm/mtn-cloud-python
|
|
@@ -10,7 +10,7 @@ Author-email: Marvellous Osuolale <m@rvellous.com>
|
|
|
10
10
|
Maintainer-email: Marvellous Osuolale <m@rvellous.com>
|
|
11
11
|
License: MIT
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Keywords: api,cloud,devops,infrastructure,
|
|
13
|
+
Keywords: api,cloud,devops,infrastructure,mtn,mtn-cloud,sdk
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
16
16
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -50,7 +50,7 @@ Description-Content-Type: text/markdown
|
|
|
50
50
|
[](https://www.python.org/downloads/)
|
|
51
51
|
[](https://opensource.org/licenses/MIT)
|
|
52
52
|
|
|
53
|
-
A Modern Python SDK for [MTN Cloud](https://console.cloud.mtn.ng)
|
|
53
|
+
A Modern Python SDK for [MTN Cloud](https://console.cloud.mtn.ng) with typed models, clear resource managers, and practical workflows for compute, networking, storage, and archives.
|
|
54
54
|
|
|
55
55
|
Docs: [mtn-cloud-python](https://mahveotm.github.io/mtn-cloud-python/)
|
|
56
56
|
|
|
@@ -349,6 +349,6 @@ MIT License. See [LICENSE](LICENSE) for details.
|
|
|
349
349
|
|
|
350
350
|
- [MTN Cloud Console](https://console.cloud.mtn.ng)
|
|
351
351
|
- [MTN Cloud Guide](https://cloud.mtn.ng/documentation)
|
|
352
|
-
- [Morpheus API Documentation](https://apidocs.morpheusdata.com/)
|
|
352
|
+
- [Morpheus API Documentation (supplementary)](https://apidocs.morpheusdata.com/)
|
|
353
353
|
- [GitHub Repository](https://github.com/mahveotm/mtn-cloud-python)
|
|
354
354
|
- [PyPI Package](https://pypi.org/project/mtn-cloud/)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.python.org/downloads/)
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
|
|
9
|
-
A Modern Python SDK for [MTN Cloud](https://console.cloud.mtn.ng)
|
|
9
|
+
A Modern Python SDK for [MTN Cloud](https://console.cloud.mtn.ng) with typed models, clear resource managers, and practical workflows for compute, networking, storage, and archives.
|
|
10
10
|
|
|
11
11
|
Docs: [mtn-cloud-python](https://mahveotm.github.io/mtn-cloud-python/)
|
|
12
12
|
|
|
@@ -305,6 +305,6 @@ MIT License. See [LICENSE](LICENSE) for details.
|
|
|
305
305
|
|
|
306
306
|
- [MTN Cloud Console](https://console.cloud.mtn.ng)
|
|
307
307
|
- [MTN Cloud Guide](https://cloud.mtn.ng/documentation)
|
|
308
|
-
- [Morpheus API Documentation](https://apidocs.morpheusdata.com/)
|
|
308
|
+
- [Morpheus API Documentation (supplementary)](https://apidocs.morpheusdata.com/)
|
|
309
309
|
- [GitHub Repository](https://github.com/mahveotm/mtn-cloud-python)
|
|
310
310
|
- [PyPI Package](https://pypi.org/project/mtn-cloud/)
|
|
@@ -81,7 +81,7 @@ Resource methods return typed Pydantic models, for example:
|
|
|
81
81
|
|
|
82
82
|
## Naming Conventions
|
|
83
83
|
|
|
84
|
-
- `*_id` means numeric
|
|
84
|
+
- `*_id` means numeric MTN Cloud resource ID.
|
|
85
85
|
- `bucket_name` in archive methods means archive bucket name.
|
|
86
86
|
- `remote_path` means path inside archive storage.
|
|
87
87
|
- `local_path` / `local_directory` refer to local filesystem paths.
|
|
@@ -76,5 +76,5 @@ Every resource manager (`instances`, `networks`, `plans`, etc.) inherits:
|
|
|
76
76
|
|
|
77
77
|
- MTN Cloud Console: <https://console.cloud.mtn.ng>
|
|
78
78
|
- MTN Cloud Guide: <https://cloud.mtn.ng/documentation>
|
|
79
|
-
- Morpheus API
|
|
79
|
+
- Morpheus API Documentation (supplementary): <https://apidocs.morpheusdata.com/>
|
|
80
80
|
- SDK Source: <https://github.com/mahveotm/mtn-cloud-python>
|
|
@@ -26,7 +26,7 @@ Use this guide in two ways:
|
|
|
26
26
|
## Conventions Used
|
|
27
27
|
|
|
28
28
|
- `cloud` means an initialized `MTNCloud` client.
|
|
29
|
-
- `group` maps to
|
|
29
|
+
- `group` maps to MTN Cloud site.
|
|
30
30
|
- `cloud` or `zone` may be used interchangeably based on Morpheus API naming.
|
|
31
31
|
- Example IDs and codes are illustrative; query your account first before provisioning.
|
|
32
32
|
|
|
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mtn-cloud"
|
|
7
7
|
dynamic = ["version"]
|
|
8
|
-
description = "Community Python SDK for MTN Cloud
|
|
8
|
+
description = "Community Python SDK for MTN Cloud - Deploy and manage cloud resources with ease"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
11
11
|
authors = [
|
|
@@ -17,7 +17,7 @@ maintainers = [
|
|
|
17
17
|
keywords = [
|
|
18
18
|
"mtn",
|
|
19
19
|
"cloud",
|
|
20
|
-
"
|
|
20
|
+
"mtn-cloud",
|
|
21
21
|
"sdk",
|
|
22
22
|
"api",
|
|
23
23
|
"infrastructure",
|
|
@@ -17,7 +17,7 @@ from mtn_cloud.resources.storage_buckets import StorageBucketsResource
|
|
|
17
17
|
|
|
18
18
|
class MTNCloud:
|
|
19
19
|
"""
|
|
20
|
-
MTN Cloud client for interacting with the
|
|
20
|
+
MTN Cloud client for interacting with the MTN Cloud API.
|
|
21
21
|
|
|
22
22
|
This is the main entry point for the SDK. Initialize with your
|
|
23
23
|
API token or credentials to start making API calls.
|
|
@@ -21,12 +21,12 @@ SAMPLE_ARCHIVE_BUCKET = {
|
|
|
21
21
|
"name": "apitestmybucket",
|
|
22
22
|
"description": "API Test: My Archive Bucket",
|
|
23
23
|
"storageProvider": {"id": 113, "name": "Local Archives"},
|
|
24
|
-
"owner": {"id": 1, "name": "
|
|
24
|
+
"owner": {"id": 1, "name": "MTN QA"},
|
|
25
25
|
"createdBy": {"username": "apiuser"},
|
|
26
26
|
"isPublic": False,
|
|
27
27
|
"visibility": "private",
|
|
28
28
|
"code": "64d94943f108",
|
|
29
|
-
"filePath": "
|
|
29
|
+
"filePath": "mtn-archives/64d94943f108/",
|
|
30
30
|
"rawSize": 0,
|
|
31
31
|
"fileCount": 0,
|
|
32
32
|
"accounts": [],
|
|
@@ -35,7 +35,7 @@ SAMPLE_ARCHIVE_BUCKET = {
|
|
|
35
35
|
SAMPLE_ARCHIVE_FILE = {
|
|
36
36
|
"id": 5338,
|
|
37
37
|
"name": "test.txt",
|
|
38
|
-
"filePath": "
|
|
38
|
+
"filePath": "mtn-archives/6f657af7bc7b/test.txt",
|
|
39
39
|
"archiveBucket": {"id": 1115, "name": "apitestmybucket", "isPublic": False},
|
|
40
40
|
"createdBy": {"username": "apiuser"},
|
|
41
41
|
"isDirectory": False,
|
|
@@ -36,21 +36,21 @@ SAMPLE_INSTANCE_TYPE = {
|
|
|
36
36
|
|
|
37
37
|
SAMPLE_INSTANCE_TYPE_MULTIPLE_LAYOUTS = {
|
|
38
38
|
"id": 113,
|
|
39
|
-
"name": "
|
|
40
|
-
"code": "
|
|
39
|
+
"name": "MTN Builds",
|
|
40
|
+
"code": "mtnbuilds",
|
|
41
41
|
"description": None,
|
|
42
42
|
"labels": [],
|
|
43
43
|
"provisionTypeCode": "mixed",
|
|
44
44
|
"category": "web",
|
|
45
45
|
"active": True,
|
|
46
|
-
"environmentPrefix": "
|
|
46
|
+
"environmentPrefix": "MTN_BUILDS",
|
|
47
47
|
"visibility": "private",
|
|
48
48
|
"featured": True,
|
|
49
49
|
"versions": ["7.9-v1", "8.3-v1"],
|
|
50
50
|
"instanceTypeLayouts": [
|
|
51
|
-
{"id": 1313, "name": "
|
|
52
|
-
{"id": 1315, "name": "
|
|
53
|
-
{"id": 1312, "name": "
|
|
51
|
+
{"id": 1313, "name": "MTN Debian", "provisionTypeCode": "vmware"},
|
|
52
|
+
{"id": 1315, "name": "MTN Ubuntu", "provisionTypeCode": "vmware"},
|
|
53
|
+
{"id": 1312, "name": "MTN CentOS", "provisionTypeCode": "vmware"},
|
|
54
54
|
],
|
|
55
55
|
"account": {"id": 1, "name": "mastertenant"},
|
|
56
56
|
}
|
|
@@ -183,7 +183,7 @@ class TestInstanceTypeModel:
|
|
|
183
183
|
"""Test getting layout by name."""
|
|
184
184
|
it = InstanceType.model_validate(SAMPLE_INSTANCE_TYPE_MULTIPLE_LAYOUTS)
|
|
185
185
|
|
|
186
|
-
layout = it.get_layout_by_name("
|
|
186
|
+
layout = it.get_layout_by_name("MTN Ubuntu")
|
|
187
187
|
assert layout is not None
|
|
188
188
|
assert layout.id == 1315
|
|
189
189
|
|
|
@@ -197,7 +197,7 @@ class TestInstanceTypeModel:
|
|
|
197
197
|
|
|
198
198
|
layout = it.get_layout_by_id(1312)
|
|
199
199
|
assert layout is not None
|
|
200
|
-
assert layout.name == "
|
|
200
|
+
assert layout.name == "MTN CentOS"
|
|
201
201
|
|
|
202
202
|
# Test not found
|
|
203
203
|
not_found = it.get_layout_by_id(99999)
|
|
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
|