syneto_api 0.2.6__tar.gz → 0.2.7__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.
- {syneto_api-0.2.6 → syneto_api-0.2.7}/PKG-INFO +1 -1
- {syneto_api-0.2.6 → syneto_api-0.2.7}/pyproject.toml +1 -1
- {syneto_api-0.2.6 → syneto_api-0.2.7}/setup.py +1 -1
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/__init__.py +0 -1
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/virt_api.py +3 -0
- syneto_api-0.2.6/src/syneto_api/jobs_api.py +0 -23
- {syneto_api-0.2.6 → syneto_api-0.2.7}/README.md +0 -0
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/api_client.py +0 -0
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/auth_api.py +0 -0
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/protection_api.py +0 -0
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/settings.py +0 -0
- {syneto_api-0.2.6 → syneto_api-0.2.7}/src/syneto_api/storage_api.py +0 -0
|
@@ -15,7 +15,7 @@ install_requires = \
|
|
|
15
15
|
|
|
16
16
|
setup_kwargs = {
|
|
17
17
|
'name': 'syneto-api',
|
|
18
|
-
'version': '0.2.
|
|
18
|
+
'version': '0.2.7',
|
|
19
19
|
'description': 'Syneto Client API library',
|
|
20
20
|
'long_description': '# Syneto API\n\nSyneto Client API library: authentication, storage, virtualization and protection\n\n# Installation\n\n```\n$ pip install syneto-api\n```\n\n# Basic Usage\n\n```\nfrom syneto_api import Authentication, Virtualization, Storage, Protection\n\nauth_api = Authentication(url_base="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)\nresponse = auth_api.login(username="admin", password="admin")\njwt = response[\'jwt\']\n\nvirt_api = Virtualization(url_base="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)\nvirt_api.set_auth_jwt(jwt)\nprint(virt_api.get_vms())\n\nstorage_api = Storage(url_base="https://syneto-instance-ip-address/api/storage", insecure_ssl=True)\nstorage_api.set_auth_jwt(jwt)\nprint(storage_api.get_pools())\n```\n\n# Environment Variables\n\nFor conveninence, the base urls for the api endpoints are also accepted as environment variables, please see below.\n\n```\nAUTH_SERVICE=https://syneto-instance-ip-address/api/auth\nVIRTUALIZATION_SERVICE=https://syneto-instance-ip-address/api/virtualization\nSTORAGE_SERVICE=https://syneto-instance-ip-address/api/storage\nPROTECTION_SERVICE=https://syneto-instance-ip-address/api/protection\n```\n\nIf you are using self-signed SSL certificates, set the following env. so that the http request library does not perform ssl verification. \n\n```\nALLOW_INSECURE_SSL=True\n```\n',
|
|
21
21
|
'author': 'Your Name',
|
|
@@ -25,6 +25,9 @@ class Virtualization(APIClientBase):
|
|
|
25
25
|
def get_vms(self):
|
|
26
26
|
return self.get_request("/vms")
|
|
27
27
|
|
|
28
|
+
def get_vm_by_syn_id(self, vm_syn_id: str):
|
|
29
|
+
return self.get_request("/vms/{vm_syn_id}", vm_syn_id=vm_syn_id)
|
|
30
|
+
|
|
28
31
|
def get_vmware_hosts(self):
|
|
29
32
|
return self.get_request("/vmware/hosts")
|
|
30
33
|
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from .api_client import APIClientBase
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Jobs(APIClientBase):
|
|
6
|
-
def __init__(self, url_base=None, **kwargs):
|
|
7
|
-
super().__init__(url_base or os.environ.get("PROTECTION_SERVICE", ""), **kwargs)
|
|
8
|
-
|
|
9
|
-
def get_jobs(self):
|
|
10
|
-
return self.get_request("/jobs")
|
|
11
|
-
|
|
12
|
-
def get_job(self, id: str):
|
|
13
|
-
return self.get_request("/jobs/{}", id)
|
|
14
|
-
|
|
15
|
-
def create_job(self, config: dict, job_type: str):
|
|
16
|
-
body = {"config": config, "type": job_type}
|
|
17
|
-
return self.post_request("/jobs", body=body)
|
|
18
|
-
|
|
19
|
-
def patch_job(self, id: str, body: dict):
|
|
20
|
-
return self.patch_request("/jobs", query_args={"id": id}, body=body)
|
|
21
|
-
|
|
22
|
-
def remove_job(self, id: str):
|
|
23
|
-
return self.delete_request("/jobs", query_args={"id": id})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|