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(url_base="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)
response = auth_api.login(username="admin", password="admin")
jwt = response['jwt']
virt_api = Virtualization(url_base="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)
virt_api.set_auth_jwt(jwt)
print(virt_api.get_vms())
storage_api = Storage(url_base="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.30.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for syneto_api-0.2.30-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a6bb00c3a7dcdc1fdca30e0ce40d10d44c932b923b17587e7c2eadfddf6c9f |
|
MD5 | 3749cd23254283519e35b1ca04680ab4 |
|
BLAKE2b-256 | 22ea53adc56892e846c83e37fdb6d0db71d747b446a939c7fcc1aff72e966beb |