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.0rc6.tar.gz
(16.6 kB
view hashes)
Built Distribution
jelapi-0.1.0rc6-py3-none-any.whl
(32.7 kB
view hashes)
Close
Hashes for jelapi-0.1.0rc6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff5c43b5ed7916a2994756bf1142afc80dad118a09962a580449e9bf9b3b85da |
|
MD5 | 51aedfa1df66f5bc5af7288d0765944e |
|
BLAKE2b-256 | 6d3c14584c2f1490f729dbd943d3e394814e4e969af0a5e9b62cbcc58dc2ebea |