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.0rc7.tar.gz
(17.8 kB
view hashes)
Built Distribution
jelapi-0.1.0rc7-py3-none-any.whl
(35.1 kB
view hashes)
Close
Hashes for jelapi-0.1.0rc7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1b4cb9bf8deb94a7e554a26fe54dc47aa807352061cd6e84a1e1dec7b98a3e |
|
MD5 | bb8ba18a5256f776ef7c61fed349ec3e |
|
BLAKE2b-256 | 3da17368194f945c2794cbe2ec6cd570a76216a08d4515ee8de51035c1946037 |