jelapi: A Jelastic API Python library
Project description
jelapi
A Jelastic API Python library
Installation
pip3 install jelapi
Usage
import jelapi
jelapi.api_url = "https://app.jpc.infomaniak.com/1.0/"
jelapi.api_token = "your-long-token"
jelenvs = jelapi.JelasticEnvironment.list()
jelenv = next(
env
for _, env in jelenvs.items()
if all(eg in env.envGroups for eg in ["clients/envgroup", "prod"])
)
for n in jelenv.nodes:
n.fixedCloudlets = 2
cpnode = jelenv.node_by_node_group("cp")
cpnode.fixedCloudlets = 2
cpnode.envVars["AN_ENV_VARIABLE"] = "Content"
sqlnode = jelenv.nodeGroups["sqldb"].nodes[0]
sqlnode.flexibleCloudlets = max(sqlnode.flexibleCloudlets - 2, 0)
sqlnode.allowFlexibleCloudletsReduction = True
jelenv.save()
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
jelapi-0.1.0rc9.tar.gz
(27.7 kB
view hashes)
Built Distribution
jelapi-0.1.0rc9-py3-none-any.whl
(47.4 kB
view hashes)
Close
Hashes for jelapi-0.1.0rc9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 753b4b62b2863bf23310a9ed3aded061f8e576d49ec23aaed0db588d9247196a |
|
MD5 | bea529bd375693eb9deb7a021ec03ef7 |
|
BLAKE2b-256 | 3f6041198c04306e999283f9938d9bbd2e30c017c5891f068b645c07cbfeaf74 |