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.0rc4.tar.gz
(16.6 kB
view hashes)
Built Distribution
jelapi-0.1.0rc4-py3-none-any.whl
(32.6 kB
view hashes)
Close
Hashes for jelapi-0.1.0rc4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f846d7437ac3b00566f1ef1f09ef0a43095c853e9b2b1000cca39870dd611579 |
|
MD5 | e45282c021ea356b78376bbcedefc722 |
|
BLAKE2b-256 | c4834e9585b88853bdf3f14a51bdb14d6a015613148a3043e0e03e7015866f62 |