Syneto Client API library
Project description
Syneto API
Syneto Client API library: authentication, storage, virtualization and protection
Installation
$ pip install syneto-api
Basic Usage
from syneto_api import Authentication, Virtualization, Storage, Protection
auth_api = Authentication(base_url="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)
response = auth_api.login(username="admin", password="admin")
jwt = response['jwt']
virt_api = Virtualization(base_url="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)
virt_api.set_auth_jwt(jwt)
print(virt_api.get_vms())
storage_api = Storage(base_url="https://syneto-instance-ip-address/api/storage", insecure_ssl=True)
storage_api.set_auth_jwt(jwt)
print(storage_api.get_pools())
Environment Variables
For conveninence, the base urls for the api endpoints are also accepted as environment variables, please see below.
AUTH_SERVICE=https://syneto-instance-ip-address/api/auth
VIRTUALIZATION_SERVICE=https://syneto-instance-ip-address/api/virtualization
STORAGE_SERVICE=https://syneto-instance-ip-address/api/storage
PROTECTION_SERVICE=https://syneto-instance-ip-address/api/protection
If you are using self-signed SSL certificates, set the following env. so that the http request library does not perform ssl verification.
ALLOW_INSECURE_SSL=True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
syneto_api-0.2.1.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for syneto_api-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 344219f05dec2ef48c3ada54ca8a6049da2cf106e38cd318ff8bd9b3fe2daf7b |
|
MD5 | b148dd126720e17f6d8d819a153793e4 |
|
BLAKE2b-256 | 0fbac5b509b89fe9a3979c11208b64ebb7f47ec9ff1b6609ce9d32b6e656fd1a |