syneto_api 0.2.39__tar.gz → 0.2.41__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: syneto-api
3
- Version: 0.2.39
3
+ Version: 0.2.41
4
4
  Summary: Syneto Client API library
5
5
  Home-page: https://github.com/SynetoNet/syneto-api
6
6
  License: Proprietary
@@ -11,6 +11,7 @@ Classifier: License :: Other/Proprietary License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.7
13
13
  Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
14
15
  Requires-Dist: aiodns (>=3,<4)
15
16
  Requires-Dist: aiohttp (>=3.7,<4.0)
16
17
  Requires-Dist: cchardet (>=2.1,<3.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "syneto_api"
3
- version = "0.2.39"
3
+ version = "0.2.41"
4
4
  description = "Syneto Client API library"
5
5
  authors = ["Your Name <you@example.com>"]
6
6
  license = "Proprietary"
@@ -20,7 +20,7 @@ install_requires = \
20
20
 
21
21
  setup_kwargs = {
22
22
  'name': 'syneto-api',
23
- 'version': '0.2.39',
23
+ 'version': '0.2.41',
24
24
  'description': 'Syneto Client API library',
25
25
  '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',
26
26
  'author': 'Your Name',
@@ -0,0 +1,30 @@
1
+ import os
2
+ from typing import Any, Optional, List, Dict
3
+ from .api_client import APIClientBase
4
+
5
+
6
+ class Central(APIClientBase):
7
+ def __init__(self, url_base=None, **kwargs):
8
+ super().__init__(url_base or os.environ.get("CENTRAL_SERVICE", ""), **kwargs)
9
+
10
+ def activate_product(
11
+ self, email: str, password: str, activation_key: Optional[str]
12
+ ) -> Any:
13
+ body: Dict = {
14
+ "email": email,
15
+ "password": password,
16
+ "activation_key": activation_key,
17
+ }
18
+ return self.post_request("/services/licensing", body=body)
19
+
20
+ def sync(self) -> Any:
21
+ return self.post_request("/sync")
22
+
23
+ def configure_monitoring(self, exporters: List[Any]) -> Any:
24
+ body: Dict = {
25
+ "exporters": exporters,
26
+ }
27
+ return self.post_request("/services/monitoring", body=body)
28
+
29
+ def get_monitoring_details(self) -> Any:
30
+ return self.get_request("/services/monitoring")
@@ -1,45 +0,0 @@
1
- import os
2
- from typing import Any, Optional, List, Dict
3
- from .api_client import APIClientBase
4
-
5
-
6
- class Central(APIClientBase):
7
- def __init__(self, url_base=None, **kwargs):
8
- super().__init__(url_base or os.environ.get("CENTRAL_SERVICE", ""), **kwargs)
9
-
10
- def activate_product(
11
- self, email: str, password: str, activation_key: Optional[str]
12
- ) -> Any:
13
- body: Dict = {
14
- "email": email,
15
- "password": password,
16
- "activation_key": activation_key,
17
- }
18
- return self.post_request("/licensing/activate", body=body)
19
-
20
- def sync(self) -> Any:
21
- return self.post_request("/sync")
22
-
23
- def is_monitoring_purchased(self) -> Any:
24
- return self.get_request("/monitoring/is-purchased")
25
-
26
- def is_monitoring_enabled(self) -> Any:
27
- return self.get_request("/monitoring/is-enabled")
28
-
29
- def enable_monitoring(self) -> Any:
30
- return self.post_request("/monitoring/enable")
31
-
32
- def disable_monitoring(self) -> Any:
33
- return self.post_request("/monitoring/disable")
34
-
35
- def configure_monitoring(self, exporters: List[Any]) -> Any:
36
- body: Dict = {
37
- "exporters": exporters,
38
- }
39
- return self.post_request("/monitoring/configure", body=body)
40
-
41
- def get_external_services(self) -> Any:
42
- return self.get_request("/external-services")
43
-
44
- def get_certificates(self) -> Any:
45
- return self.get_request("/certificates")
File without changes