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.values()
if all(eg in env.envGroups for eg in ["clients/envgroup", "prod"])
)
for ng in jelenv.nodeGroups.values():
for n in ng.nodes:
n.fixedCloudlets = 2
cpnodegroup = jelenv.nodeGroups("cp"]
cpnodegroup.nodes[0].fixedCloudlets = 2
cpnodegroup.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.1.tar.gz
(31.3 kB
view hashes)
Built Distribution
jelapi-0.1.1-py3-none-any.whl
(127.6 kB
view hashes)