An api client library for MAAS.io
Project description
Table of Contents
Quickstart
Installing
You can install using pip.
pip install maas-api
Using
You can use the api client the same way you would use the CLI.
from maas_api import Client
client = Client("http://192.0.2.10:/MAAS", api_key="your:api:key")
# allocate a machine
machine = client.machines.allocate()
# start deploy
client.machine.deploy(system_id=machine["system_id"])
# release the machine
client.machine.release(system_id=machine["system_id"])
Why?
The official MAAS api client library python-libmaas did not receive any new functionality that is available with MAAS. There is however a CLI written in python. This allows all the functionality to be used.
How?
By using the same technique as the official CLI. By using the API description available at /MAAS/api/2.0/describe. This allows us to expose the full API exposed by the MAAS server and to keep functional parity with the CLI.
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
maas-api-0.1.1.tar.gz
(3.0 kB
view hashes)