The following HTTP methods are available for accessing the API:
- GET (for information retrieval and queries),
- POST (for asking the system to do things),
- PUT (for updating objects), and
- DELETE (for deleting objects).
All methods except DELETE may take parameters, but they are not all passed in the same way. GET parameters are passed in the URL, as is normal with a GET: "/item/?foo=bar" passes parameter "foo" with value "bar".
POST and PUT are different. Your request should have MIME type "multipart/form-data"; each part represents one parameter (for POST) or attribute (for PUT). Each part is named after the parameter or attribute it contains, and its contents are the conveyed value.
All parameters are in text form. If you need to submit binary data to the API, don't send it as any MIME binary format; instead, send it as a plain text part containing base64-encoded data.
Most resources offer a choice of GET or POST operations. In those cases these methods will take one special parameter, called op, to indicate what it is you want to do.
For example, to list all machines, you might GET "/MAAS/api/2.0/machines".
Operations
Logged-in user
Manage the current logged-in user.
GET /MAAS/api/2.0/account/?op=list_authorisation_tokens
List authorisation tokens available to the currently logged-in user.
Success
HTTP Status Code : 200
JSON
[ { "name": "MAAS consumer", "token": "6FSsXwk3QsktR96BJd:KVA8C3VTCEg8aYSuy4:c5D88bRZCSSTDwMgwycQEagc7sqd4N9p" }, { "name": "mytoken", "token": "QVphn5VQs8QvXuRETw:bNVmuqaTJmP3dbmGwU:fWpkqzKEkq8SeKa26FaN4UuX6CNT44C9" } ]
POST /MAAS/api/2.0/account/?op=create_authorisation_token
Create an authorisation OAuth token and OAuth consumer.
Parameters
name (String): Optional. Optional name of the token that will be generated.
Success
HTTP Status Code : 200
JSON
{ "token_key": "K6bhJZXCFKWFTfQTk5", "token_secret": "entQ246T7KyyfkwMSWRLuSwycruNDfDG", "consumer_key": "dFTQGcQLNvhJVc2H69", "name": "MAAS consumer" }
POST /MAAS/api/2.0/account/?op=delete_authorisation_token
Delete an authorisation OAuth token and the related OAuth consumer.
Parameters
token_key (String): Required. The key of the token to be deleted.
Success
HTTP Status Code : 204
POST /MAAS/api/2.0/account/?op=update_token_name
Modify the consumer name of an authorisation OAuth token.
Parameters
token (String): Required. Can be the whole token or only the token key.
name (String): Required. New name of the token.
Success
HTTP Status Code : 200
Content : Accepted
Bcache Cache Set
Manage bcache cache set on a machine.
DELETE /MAAS/api/2.0/nodes/{system_id}/bcache-cache-set/{id}/
Delete bcache cache set on a machine.
Parameters
{system_id} (String): Required. A machine system_id.
{id} (String): Required. A cache_set_id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 400
Content : The cache set is in use.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
GET /MAAS/api/2.0/nodes/{system_id}/bcache-cache-set/{id}/
Read bcache cache set on a machine.
Parameters
{system_id} (String): Required. A machine system_id.
{id} (String): Required. A cache_set_id.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/nodes/{system_id}/bcache-cache-set/{id}/
Update bcache cache set on a machine.
Note: specifying both a cache_device and a cache_partition is not allowed.
Parameters
{system_id} (String): Required. A machine system_id.
{id} (String): Required. A cache_set_id.
cache_device (String): Optional. Cache block device to replace current one.
cache_partition (String): Optional. Cache partition to replace current one.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Bcache Cache Sets
Manage bcache cache sets on a machine.
GET /MAAS/api/2.0/nodes/{system_id}/bcache-cache-sets/
List all bcache cache sets belonging to a machine.
Parameters
{system_id} (String): Required. A machine system_id.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/bcache-cache-sets/
Creates a bcache cache set.
Note: specifying both a cache_device and a cache_partition is not allowed.
Parameters
{system_id} (String): Required. A machine system_id.
cache_device (String): Optional. Cache block device.
cache_partition (String): Optional. Cache partition.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Bcache Device
Manage bcache device on a machine.
DELETE /MAAS/api/2.0/nodes/{system_id}/bcache/{id}/
Delete bcache on a machine.
Parameters
{system_id} (String): Required. The machine's system_id.
{id} (String): Required. The bcache id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
GET /MAAS/api/2.0/nodes/{system_id}/bcache/{id}/
Read bcache device on a machine.
Parameters
{system_id} (String): Required. The machine's system_id.
{id} (String): Required. The bcache id.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/nodes/{system_id}/bcache/{id}/
Update bcache on a machine.
Specifying both a device and a partition for a given role (cache or backing) is not allowed.
Parameters
{system_id} (String): Required. The machine's system_id.
{id} (String): Required. The bcache id.
name (String): Optional. Name of the Bcache.
uuid (String): Optional. UUID of the Bcache.
cache_set (String): Optional. Cache set to replace current one.
backing_device (String): Optional. Backing block device to replace current one.
backing_partition (String): Optional. Backing partition to replace current one.
cache_mode (String): Optional. Cache mode: WRITEBACK
,
WRITETHROUGH
, WRITEAROUND
.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Bcache Devices
Manage bcache devices on a machine.
GET /MAAS/api/2.0/nodes/{system_id}/bcaches/
List all bcache devices belonging to a machine.
Parameters
{system_id} (String): Required. The machine's system_id.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/bcaches/
Creates a bcache.
Specifying both a device and a partition for a given role (cache or backing) is not allowed.
Parameters
{system_id} (String): Required. The machine's system_id.
name (String): Optional. Name of the Bcache.
uuid (String): Optional. UUID of the Bcache.
cache_set (String): Optional. Cache set.
backing_device (String): Optional. Backing block device.
backing_partition (String): Optional. Backing partition.
cache_mode (String): Optional. Cache mode: WRITEBACK
,
WRITETHROUGH
, WRITEAROUND
.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Block device
Manage a block device on a machine.
DELETE /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/
Delete block device on a given machine.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content : The user does not have permissions to delete the block device.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
GET /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/
Read a block device on a given machine.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": null, "system_id": "y7388k", "block_size": 1024000, "available_size": 1000000000, "model": "fakemodel", "serial": "123", "used_size": 0, "tags": [], "partition_table_type": null, "partitions": [], "path": "/dev/disk/by-dname/newblockdevice", "size": 1000000000, "id_path": "", "filesystem": null, "storage_pool": null, "name": "newblockdevice", "used_for": "Unused", "id": 73, "type": "physical", "uuid": null, "resource_uri": "/MAAS/api/2.0/nodes/y7388k/blockdevices/73/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=add_tag
Add a tag to block device on a given machine.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
tag (String): Required. The tag being added.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "filesystem": null, "available_size": 2173730816, "model": "model-5btVsu", "type": "physical", "name": "newname", "system_id": "thr3am", "partition_table_type": null, "partitions": [], "size": 2173730816, "id_path": "", "block_size": 4096, "uuid": null, "used_size": 0, "used_for": "Unused", "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY", "newtag" ], "storage_pool": "pool_id-QkOjON", "path": "/dev/disk/by-dname/newname", "id": 20, "serial": "serial-SE3O1p", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to add a tag.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=format
Format block device with filesystem.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
fstype (String): Required. Type of filesystem.
uuid (String): Optional. UUID of the filesystem.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "system_id": "thr3am", "partitions": [], "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "uuid": null, "storage_pool": "pool_id-QkOjON", "id": 20, "type": "physical", "filesystem": { "fstype": "ext4", "label": "", "uuid": "fcc36eca-09fd-4c15-b339-c706ad3b75cf", "mount_point": null, "mount_options": null }, "name": "newname", "id_path": "", "used_for": "Unmounted ext4 formatted filesystem", "partition_table_type": null, "model": "model-5btVsu", "used_size": 2173730816, "serial": "serial-SE3O1p", "size": 2173730816, "available_size": 0, "block_size": 4096, "path": "/dev/disk/by-dname/newname", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to format the block device.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=mount
Mount the filesystem on block device.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
mount_point (String): Required. Path on the filesystem to mount.
mount_options (String): Optional. Options to pass to mount(8).
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "id": 20, "available_size": 0, "type": "physical", "storage_pool": "pool_id-QkOjON", "system_id": "thr3am", "block_size": 4096, "uuid": null, "id_path": "", "name": "newname", "partitions": [], "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "filesystem": { "fstype": "ext4", "label": "", "uuid": "9a5860a2-497d-433b-98c3-e0059ad1545e", "mount_point": "/media", "mount_options": "" }, "size": 2173730816, "partition_table_type": null, "model": "model-5btVsu", "path": "/dev/disk/by-dname/newname", "serial": "serial-SE3O1p", "used_for": "ext4 formatted filesystem mounted at /media", "used_size": 2173730816, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to mount the filesystem.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=remove_tag
Remove a tag from block device on a given machine.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
tag (String): Optional. The tag being removed.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "used_for": "Unused", "serial": "serial-SE3O1p", "used_size": 0, "partitions": [], "block_size": 4096, "available_size": 2173730816, "type": "physical", "path": "/dev/disk/by-dname/newname", "storage_pool": "pool_id-QkOjON", "id": 20, "partition_table_type": null, "model": "model-5btVsu", "uuid": null, "filesystem": null, "name": "newname", "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "id_path": "", "size": 2173730816, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to remove a tag.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=set_boot_disk
Set a block device as the boot disk for the machine.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
Success
HTTP Status Code : 200
Content
OK
Error
HTTP Status Code : 400
Content : The block device is a virtual block device.
HTTP Status Code : 403
Content : The user does not have permissions to set the boot disk.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=unformat
Unformat a previously formatted block device.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "used_size": 0, "uuid": null, "system_id": "thr3am", "id": 20, "type": "physical", "model": "model-5btVsu", "id_path": "", "size": 2173730816, "available_size": 2173730816, "path": "/dev/disk/by-dname/newname", "used_for": "Unused", "filesystem": null, "partition_table_type": null, "name": "newname", "storage_pool": "pool_id-QkOjON", "partitions": [], "serial": "serial-SE3O1p", "block_size": 4096, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 400
Content : The block device is not formatted, currently mounted, or part of a filesystem group.
HTTP Status Code : 403
Content : The user does not have permissions to unformat the block device.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/?op=unmount
Unmount the filesystem on block device.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "model": "model-5btVsu", "size": 2173730816, "partition_table_type": null, "available_size": 0, "used_for": "Unmounted ext4 formatted filesystem", "id_path": "", "name": "newname", "id": 20, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "filesystem": { "fstype": "ext4", "label": "", "uuid": "9a5860a2-497d-433b-98c3-e0059ad1545e", "mount_point": null, "mount_options": null }, "partitions": [], "storage_pool": "pool_id-QkOjON", "used_size": 2173730816, "block_size": 4096, "system_id": "thr3am", "serial": "serial-SE3O1p", "type": "physical", "path": "/dev/disk/by-dname/newname", "uuid": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 400
Content : The block device is not formatted or currently mounted.
HTTP Status Code : 403
Content : The user does not have permissions to mount the filesystem.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
PUT /MAAS/api/2.0/nodes/{system_id}/blockdevices/{id}/
Update block device on a given machine.
Machines must have a status of Ready to have access to all options. Machines with Deployed status can only have the name, model, serial, and/or id_path updated for a block device. This is intented to allow a bad block device to be replaced while the machine remains deployed.
Parameters
{system_id} (String): Required. The machine system_id.
{id} (String): Required. The block device's id.
name (String): Optional. (Physical devices) Name of the block device.
model (String): Optional. (Physical devices) Model of the block device.
serial (String): Optional. (Physical devices) Serial number of the block device.
id_path (String): Optional. (Physical devices) Only used if model and serial cannot be provided. This should be a path that is fixed and doesn't change depending on the boot order or kernel version.
size (String): Optional. (Physical devices) Size of the block device.
block_size (String): Optional. (Physical devices) Block size of the block device.
name (String): Optional. (Virtual devices) Name of the block device.
uuid (String): Optional. (Virtual devices) UUID of the block device.
size (String): Optional. (Virtual devices) Size of the block device. (Only allowed for logical volumes.)
Success
HTTP Status Code : 200
JSON
{ "firmware_version": "firmware_version-WJ46L3", "storage_pool": "pool_id-QkOjON", "uuid": null, "system_id": "thr3am", "block_size": 4096, "id_path": "", "filesystem": null, "used_for": "Unused", "model": "model-5btVsu", "used_size": 0, "partition_table_type": null, "id": 20, "serial": "serial-SE3O1p", "size": 2173730816, "type": "physical", "available_size": 2173730816, "path": "/dev/disk/by-dname/newname", "partitions": [], "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "name": "newname", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to update the block device.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Block devices
Manage block devices on a machine.
GET /MAAS/api/2.0/nodes/{system_id}/blockdevices/
List all block devices belonging to a machine.
Parameters
{system_id} (String): Required. The machine system_id.
Success
HTTP Status Code : 200
JSON
[ { "id_path": null, "size": 3698265088, "block_size": 512, "tags": [ "tag-BGt1BR", "tag-1Fm39m", "tag-Hqbbak" ], "uuid": null, "id": 1, "available_size": 3698265088, "filesystem": null, "partitions": [], "storage_pool": "pool_id-nHmvMI", "used_size": 0, "path": "/dev/disk/by-dname/name-86Ezga", "partition_table_type": null, "used_for": "Unused", "type": "physical", "name": "name-86Ezga", "system_id": "y7388k", "model": "model-sCuLNN", "serial": "serial-ZKjZxn", "resource_uri": "/MAAS/api/2.0/nodes/y7388k/blockdevices/1/" }, { "id_path": null, "size": 1392376320, "block_size": 512, "tags": [ "tag-hZPKgU", "tag-ImIubs", "tag-yRv0Vm" ], "uuid": null, "id": 2, "available_size": 1392376320, "filesystem": null, "partitions": [], "storage_pool": "pool_id-nHmvMI", "used_size": 0, "path": "/dev/disk/by-dname/name-EIcGBl", "partition_table_type": null, "used_for": "Unused", "type": "physical", "name": "name-EIcGBl", "system_id": "y7388k", "model": "model-QhVkKT", "serial": "serial-3TaTIG", "resource_uri": "/MAAS/api/2.0/nodes/y7388k/blockdevices/2/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/
Create a physical block device.
Parameters
{system_id} (String): Required. The machine system_id.
name (String): Required. Name of the block device.
model (String): Optional. Model of the block device.
serial (String): Optional. Serial number of the block device.
id_path (String): Optional. Only used if model and serial cannot be provided. This should be a path that is fixed and doesn't change depending on the boot order or kernel version.
size (String): Required. Size of the block device.
block_size (String): Required. Block size of the block device.
Success
HTTP Status Code : 200
JSON
{ "firmware_version": null, "uuid": null, "used_for": "Unused", "used_size": 0, "storage_pool": null, "system_id": "y7388k", "type": "physical", "path": "/dev/disk/by-dname/newblockdevice", "filesystem": null, "id_path": "", "partitions": [], "tags": [], "available_size": 1000000000, "block_size": 1024000, "model": "fakemodel", "partition_table_type": null, "name": "newblockdevice", "size": 1000000000, "serial": "123", "id": 73, "resource_uri": "/MAAS/api/2.0/nodes/y7388k/blockdevices/73/" }
Error
HTTP Status Code : 404
Content
Not Found
Boot resource
Manage a boot resource.
DELETE /MAAS/api/2.0/boot-resources/{id}/
Delete a boot resource by id.
Parameters
{id} (Int): Required. The boot resource id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/boot-resources/{id}/
Reads a boot resource by id
Parameters
{id} (Int): Required. The boot resource id.
Success
HTTP Status Code : 200
JSON
{ "id": 7, "type": "Uploaded", "name": "newresource", "architecture": "amd64/generic", "resource_uri": "/MAAS/api/2.0/boot-resources/7/", "subarches": "generic", "title": "", "sets": { "20181203": { "version": "20181203", "label": "uploaded", "size": 4000000000, "complete": false, "progress": 0, "files": { "root-tgz": { "filename": "root-tgz", "filetype": "root-tgz", "sha256": "aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f", "size": 4000000000, "complete": false, "progress": 0, "upload_uri": "/MAAS/api/2.0/boot-resources/7/upload/18/" } } } } }
Error
HTTP Status Code : 404
Content
Not Found
Boot resources
Manage the boot resources.
GET /MAAS/api/2.0/boot-resources/
List all boot resources
Parameters
type (String): Optional. Type of boot resources to list. If not provided, returns all types.
Success
HTTP Status Code : 200
JSON
[ { "id": 3, "type": "Synced", "name": "grub-efi-signed/uefi", "architecture": "amd64/generic", "resource_uri": "/MAAS/api/2.0/boot-resources/3/" }, { "id": 4, "type": "Synced", "name": "grub-efi/uefi", "architecture": "arm64/generic", "resource_uri": "/MAAS/api/2.0/boot-resources/4/" }, { "id": 5, "type": "Synced", "name": "grub-ieee1275/open-firmware", "architecture": "ppc64el/generic", "resource_uri": "/MAAS/api/2.0/boot-resources/5/" }, { "id": 6, "type": "Synced", "name": "pxelinux/pxe", "architecture": "i386/generic", "resource_uri": "/MAAS/api/2.0/boot-resources/6/" }, { "id": 1, "type": "Synced", "name": "ubuntu/bionic", "architecture": "amd64/ga-18.04", "resource_uri": "/MAAS/api/2.0/boot-resources/1/", "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04" }, { "id": 2, "type": "Synced", "name": "ubuntu/bionic", "architecture": "amd64/ga-18.04-lowlatency", "resource_uri": "/MAAS/api/2.0/boot-resources/2/", "subarches": "generic,hwe-p,hwe-q,hwe-r,hwe-s,hwe-t,hwe-u,hwe-v,hwe-w,ga-16.04,ga-16.10,ga-17.04,ga-17.10,ga-18.04" } ]
GET /MAAS/api/2.0/boot-resources/?op=is_importing
Get the status of importing resources.
Success
HTTP Status Code : 200
Content : true
Content : false
POST /MAAS/api/2.0/boot-resources/
Uploads a new boot resource.
Parameters
name (String): Required. Name of the boot resource.
architecture (String): Required. Architecture the boot resource supports.
sha256 (String): Required. The sha256
hash of the resource.
size (String): Required. The size of the resource in bytes.
title (String): Optional. Title for the boot resource.
filetype (String): Optional. Filetype for uploaded content.
(Default: tgz
. Supported: tgz
, ddtgz
, ddtbz
, ddtxz
, ddtar
,
ddbz2
, ddgz
, ddxz
, ddraw
)
content (String): Optional. Image content. Note: this is not a
normal parameter, but an application/octet-stream
file upload.
Success
HTTP Status Code : 201
JSON
{ "id": 7, "type": "Uploaded", "name": "newresource", "architecture": "amd64/generic", "resource_uri": "/MAAS/api/2.0/boot-resources/7/", "subarches": "generic", "title": "", "sets": { "20181203": { "version": "20181203", "label": "uploaded", "size": 4000000000, "complete": false, "progress": 0, "files": { "root-tgz": { "filename": "root-tgz", "filetype": "root-tgz", "sha256": "aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f", "size": 4000000000, "complete": false, "progress": 0, "upload_uri": "/MAAS/api/2.0/boot-resources/7/upload/18/" } } } } }
POST /MAAS/api/2.0/boot-resources/?op=import
Import the boot resources.
Success
HTTP Status Code : 200
Content : Import of boot resources started
POST /MAAS/api/2.0/boot-resources/?op=stop_import
Stop import the boot resources.
Success
HTTP Status Code : 200
Content : Import of boot resources is being stopped.
Boot source
Manage a boot source.
DELETE /MAAS/api/2.0/boot-sources/{id}/
Delete a boot source with the given id.
Parameters
{id} (String): Required. A boot-source id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/boot-sources/{id}/
Read a boot source with the given id.
Parameters
{id} (String): Required. A boot-source id.
Success
HTTP Status Code : 200
JSON
{ "created": "2018-12-04T18:11:31.894", "updated": "2018-12-04T18:11:31.894", "url": "http://images.maas.io/ephemeral-v3/daily/", "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg", "id": 1, "keyring_data": "", "resource_uri": "/MAAS/api/2.0/boot-sources/1/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/boot-sources/{id}/
Update a boot source with the given id.
Parameters
{id} (String): Required. A boot-source id.
url (String): Optional. The URL of the BootSource.
keyring_filename (String): Optional. The path to the keyring file for this BootSource.
keyring_data (String): Optional. The GPG keyring for this BootSource, base64-encoded data.
Success
HTTP Status Code : 200
JSON
{ "created": "2018-12-04T18:11:31.894", "updated": "2018-12-04T18:20:08.070", "url": "http://my.domain.com/ephemeral-v3/daily/", "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg", "keyring_data": "", "id": 1, "resource_uri": "/MAAS/api/2.0/boot-sources/1/" }
Error
HTTP Status Code : 404
Content
Not Found
Boot source selection
Manage a boot source selection.
DELETE /MAAS/api/2.0/boot-sources/{boot_source_id}/selections/{id}/
Delete a boot source with the given id.
Parameters
{boot_source_id} (String): Required. A boot-source id.
{id} (String): Required. A boot-source selection id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/boot-sources/{boot_source_id}/selections/{id}/
Read a boot source selection with the given id.
Parameters
{boot_source_id} (String): Required. A boot-source id.
{id} (String): Required. A boot-source selection id.
Success
HTTP Status Code : 200
JSON
{ "os": "ubuntu", "release": "bionic", "arches": [ "amd64" ], "subarches": [ "*" ], "labels": [ "*" ], "id": 1, "boot_source_id": 1, "resource_uri": "/MAAS/api/2.0/boot-sources/1/selections/1/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/boot-sources/{boot_source_id}/selections/{id}/
Update a boot source selection with the given id.
Parameters
{boot_source_id} (String): Required. A boot-source id.
{id} (String): Required. A boot-source selection id.
os (String): Optional. The OS (e.g. ubuntu, centos) for which to import resources.
release (String): Optional. The release for which to import resources.
arches (String): Optional. The list of architectures for which to import resources.
subarches (String): Optional. The list of sub-architectures for which to import resources.
labels (String): Optional. The list of labels for which to import resources.
Success
HTTP Status Code : 200
JSON
{ "os": "ubuntu", "release": "bionic", "arches": [ "amd64" ], "subarches": [ "*" ], "labels": [ "*" ], "id": 1, "boot_source_id": 1, "resource_uri": "/MAAS/api/2.0/boot-sources/1/selections/1/" }
Error
HTTP Status Code : 404
Content
Not Found
Boot source selections
Manage the collection of boot source selections.
GET /MAAS/api/2.0/boot-sources/{boot_source_id}/selections/
List all available boot-source selections.
Parameters
{boot_source_id} (String): Required. A boot-source id.
Success
HTTP Status Code : 200
JSON
{ "os": "ubuntu", "release": "bionic", "arches": [ "amd64" ], "subarches": [ "*" ], "labels": [ "*" ], "id": 1, "boot_source_id": 1, "resource_uri": "/MAAS/api/2.0/boot-sources/1/selections/1/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/boot-sources/{boot_source_id}/selections/
Create a new boot source selection.
Parameters
{boot_source_id} (String): Required. A boot-source id.
os (String): Optional. The OS (e.g. ubuntu, centos) for which to import resources.
release (String): Optional. The release for which to import resources.
arches (String): Optional. The architecture list for which to import resources.
subarches (String): Optional. The subarchitecture list for which to import resources.
labels (String): Optional. The label lists for which to import resources.
Success
HTTP Status Code : 200
JSON
{ "os": "ubuntu", "release": "bionic", "arches": [ "amd64" ], "subarches": [ "*" ], "labels": [ "*" ], "id": 1, "boot_source_id": 1, "resource_uri": "/MAAS/api/2.0/boot-sources/1/selections/1/" }
Error
HTTP Status Code : 404
Content
Not Found
Boot sources
Manage the collection of boot sources.
GET /MAAS/api/2.0/boot-sources/
List all boot sources.
Success
HTTP Status Code : 200
JSON
[ { "created": "2018-12-04T18:11:31.894", "updated": "2018-12-04T18:20:08.070", "url": "http://my.domain.com/ephemeral-v3/daily/", "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg", "keyring_data": "", "id": 1, "resource_uri": "/MAAS/api/2.0/boot-sources/1/" } ]
POST /MAAS/api/2.0/boot-sources/
Create a new boot source. Note that in addition to url
, you must
supply either keyring_data
or keyring_filename
.
Parameters
url (String): Required. The URL of the BootSource.
keyring_filename (String): Optional. The path to the keyring file for this BootSource.
keyring_data (String): Optional. The GPG keyring for this BootSource, base64-encoded.
Success
HTTP Status Code : 201
JSON
{ "created": "2018-12-04T18:34:59.543", "updated": "2018-12-04T18:34:59.543", "url": "http://foo.com/bleh", "keyring_filename": "/bleh/foo.gpg", "id": 2, "keyring_data": "", "resource_uri": "/MAAS/api/2.0/boot-sources/2/" }
Commissioning script
Manage a custom commissioning script.
This functionality is only available to administrators.
This endpoint has been deprecated in favor of the node-script endpoint.
DELETE /MAAS/api/2.0/commissioning-scripts/{name}
Delete a commissioning script.
GET /MAAS/api/2.0/commissioning-scripts/{name}
Read a commissioning script.
PUT /MAAS/api/2.0/commissioning-scripts/{name}
Update a commissioning script.
Commissioning scripts
Manage custom commissioning scripts.
This functionality is only available to administrators.
This endpoint has been deprecated in favor of the node-scripts endpoint.
GET /MAAS/api/2.0/commissioning-scripts/
List commissioning scripts.
POST /MAAS/api/2.0/commissioning-scripts/
Create a new commissioning script.
Each commissioning script is identified by a unique name.
By convention the name should consist of a two-digit number, a dash, and a brief descriptive identifier consisting only of ASCII characters. You don't need to follow this convention, but not doing so opens you up to risks w.r.t. encoding and ordering. The name must not contain any whitespace, quotes, or apostrophes.
A commissioning machine will run each of the scripts in lexicographical order. There are no promises about how non-ASCII characters are sorted, or even how upper-case letters are sorted relative to lower-case letters. So where ordering matters, use unique numbers.
Scripts built into MAAS will have names starting with "00-maas" or "99-maas" to ensure that they run first or last, respectively.
Usually a commissioning script will be just that, a script. Ideally a script should be ASCII text to avoid any confusion over encoding. But in some cases a commissioning script might consist of a binary tool provided by a hardware vendor. Either way, the script gets passed to the commissioning machine in the exact form in which it was uploaded.
- param name
-
Unique identifying name for the script. Names should follow the pattern of "25-burn-in-hard-disk" (all ASCII, and with numbers greater than zero, and generally no "weird" characters).
- param content
-
A script file, to be uploaded in binary form. Note: this is not a normal parameter, but a file upload. Its filename is ignored; MAAS will know it by the name you pass to the request.
DHCP Snippet
Manage an individual DHCP snippet.
The DHCP snippet is identified by its id.
DELETE /MAAS/api/2.0/dhcp-snippets/{id}/
Delete a DHCP snippet with the given id.
Parameters
{id} (Int): Required. A DHCP snippet id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/dhcp-snippets/{id}/
Read a DHCP snippet with the given id.
Parameters
{id} (Int): Required. A DHCP snippet id.
Success
HTTP Status Code : 200
JSON
{ "name": "boot from other server", "description": "instructs device to boot from other server", "enabled": true, "node": { "created": "2018-12-04T19:21:11.134", "updated": "2018-12-04T19:21:11.164", "hostname": "free-orca", "pool": null, "domain": { "authoritative": true, "ttl": null, "name": "maas", "is_default": true, "id": 0, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "address_ttl": null, "status": 0, "previous_status": 0, "status_expires": null, "bios_boot_method": null, "osystem": "", "distro_series": "", "architecture": null, "min_hwe_kernel": null, "hwe_kernel": null, "node_type": 1, "parent": null, "agent_name": "", "error_description": "", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "cpu_count": 0, "cpu_speed": 0, "memory": 0, "swap_size": null, "bmc": null, "instance_power_parameters": "", "power_state": "unknown", "power_state_queried": null, "power_state_updated": null, "last_image_sync": null, "token": null, "error": "", "netboot": true, "license_key": null, "creation_type": 1, "boot_interface": null, "boot_cluster_ip": null, "boot_disk": null, "gateway_link_ipv4": null, "gateway_link_ipv6": null, "default_user": "", "install_rackd": false, "install_kvm": false, "enable_ssh": false, "skip_bmc_config": false, "skip_networking": false, "skip_storage": false, "url": "", "dns_process": null, "managing_process": null, "current_commissioning_script_set": null, "current_installation_script_set": null, "current_testing_script_set": null, "locked": false, "owner": null, "resource_uri": "/MAAS/api/2.0/nodes/shqe4g/" }, "subnet": null, "global_snippet": false, "value": "filename \"test-boot\";\nserver-name \"boot.from.me\";\n", "history": [ { "id": 20, "value": "filename \"test-boot\";\nserver-name \"boot.from.me\";\n", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 5, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/5/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/dhcp-snippets/{id}/?op=revert
Revert the value of a DHCP snippet with the given id to an earlier revision.
Parameters
{id} (Int): Required. A DHCP snippet id.
to (Int): Required. What revision in the DHCP snippet's history to revert to. This can either be an ID or a negative number representing how far back to go.
Success
HTTP Status Code : 200
JSON
{ "name": "600 lease time", "description": "changes lease time to 600 secs.", "enabled": true, "node": null, "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "space": "management", "fabric_id": 0, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "id": 3, "history": [ { "id": 18, "value": "default-lease-time 600;", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "value": "default-lease-time 600;", "global_snippet": false, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/3/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/dhcp-snippets/{id}/
Update a DHCP snippet with the given id.
Parameters
{id} (Int): Required. A DHCP snippet id.
name (String): Optional. The name of the DHCP snippet.
value (String): Optional. The new value of the DHCP snippet to be used in dhcpd.conf. Previous values are stored and can be reverted.
description (String): Optional. A description of what the DHCP snippet does.
enabled (Boolean): Optional. Whether or not the DHCP snippet is currently enabled.
node (String): Optional. The node the DHCP snippet is to be used for. Can not be set if subnet is set.
subnet (String): Optional. The subnet the DHCP snippet is to be used for. Can not be set if node is set.
global_snippet (Boolean): Optional. Set the DHCP snippet to be a global option. This removes any node or subnet links.
Success
HTTP Status Code : 200
JSON
{ "name": "boot from other server", "description": "instructs device to boot from other server", "enabled": true, "node": { "created": "2018-12-04T19:21:11.134", "updated": "2018-12-04T19:21:11.164", "hostname": "free-orca", "pool": null, "domain": { "authoritative": true, "ttl": null, "name": "maas", "is_default": true, "id": 0, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "address_ttl": null, "status": 0, "previous_status": 0, "status_expires": null, "bios_boot_method": null, "osystem": "", "distro_series": "", "architecture": null, "min_hwe_kernel": null, "hwe_kernel": null, "node_type": 1, "parent": null, "agent_name": "", "error_description": "", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "cpu_count": 0, "cpu_speed": 0, "memory": 0, "swap_size": null, "bmc": null, "instance_power_parameters": "", "power_state": "unknown", "power_state_queried": null, "power_state_updated": null, "last_image_sync": null, "token": null, "error": "", "netboot": true, "license_key": null, "creation_type": 1, "boot_interface": null, "boot_cluster_ip": null, "boot_disk": null, "gateway_link_ipv4": null, "gateway_link_ipv6": null, "default_user": "", "install_rackd": false, "install_kvm": false, "enable_ssh": false, "skip_bmc_config": false, "skip_networking": false, "skip_storage": false, "url": "", "dns_process": null, "managing_process": null, "current_commissioning_script_set": null, "current_installation_script_set": null, "current_testing_script_set": null, "locked": false, "owner": null, "resource_uri": "/MAAS/api/2.0/nodes/shqe4g/" }, "subnet": null, "global_snippet": false, "value": "filename \"test-boot\";\nserver-name \"boot.from.me\";\n", "history": [ { "id": 20, "value": "filename \"test-boot\";\nserver-name \"boot.from.me\";\n", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 5, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/5/" }
Error
HTTP Status Code : 404
Content
Not Found
DHCP Snippets
Manage the collection of all DHCP snippets in MAAS.
GET /MAAS/api/2.0/dhcp-snippets/
List all available DHCP snippets.
Success
HTTP Status Code : 200
JSON
[ { "name": "foo class", "description": "adds class for vender 'foo'", "enabled": true, "node": null, "subnet": null, "value": "class \"foo\" {\n match if substring (\n option vendor-class-identifier, 0, 3) = \"foo\";\n}\n", "history": [ { "id": 16, "value": "class \"foo\" {\n match if substring (\n option vendor-class-identifier, 0, 3) = \"foo\";\n}\n", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 1, "global_snippet": true, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/1/" }, { "name": "bar class", "description": "adds class for vender 'bar'", "enabled": false, "node": null, "subnet": null, "value": "class \"bar\" {\n match if substring (\n option vendor-class-identifier, 0, 3) = \"bar\";\n}\n", "history": [ { "id": 17, "value": "class \"bar\" {\n match if substring (\n option vendor-class-identifier, 0, 3) = \"bar\";\n}\n", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 2, "global_snippet": true, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/2/" }, { "name": "600 lease time", "description": "changes lease time to 600 secs.", "enabled": true, "node": null, "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "id": 5001, "fabric_id": 0, "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "name": "untagged", "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "value": "default-lease-time 600;", "history": [ { "id": 18, "value": "default-lease-time 600;", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 3, "global_snippet": false, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/3/" }, { "name": "7200 max lease time", "description": "changes max lease time to 7200 secs.", "enabled": false, "node": null, "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "name": "untagged", "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" }, "value": "max-lease-time 7200;", "history": [ { "id": 19, "value": "max-lease-time 7200;", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 4, "global_snippet": false, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/4/" } ]
POST /MAAS/api/2.0/dhcp-snippets/
Creates a DHCP snippet.
Parameters
name (String): Required. The name of the DHCP snippet.
value (String): Required. The snippet of config inserted into dhcpd.conf.
description (String): Optional. A description of what the snippet does.
enabled (Boolean): Optional. Whether or not the snippet is currently enabled.
node (String): Optional. The node this snippet applies to. Cannot be used with subnet or global_snippet.
subnet (String): Optional. The subnet this snippet applies to. Cannot be used with node or global_snippet.
global_snippet (Boolean): Optional. Whether or not this snippet is to be applied globally. Cannot be used with node or subnet.
Success
HTTP Status Code : 200
JSON
{ "name": "7200 max lease time", "description": "changes max lease time to 7200 secs.", "enabled": false, "node": null, "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "name": "untagged", "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" }, "value": "max-lease-time 7200;", "history": [ { "id": 19, "value": "max-lease-time 7200;", "created": "Tue, 04 Dec 2018 19:21:11 -0000" } ], "id": 4, "global_snippet": false, "resource_uri": "/MAAS/api/2.0/dhcp-snippets/4/" }
DNSResource
Manage dnsresource.
DELETE /MAAS/api/2.0/dnsresources/{id}/
Delete a DNS resource with the given id.
Parameters
{id} (Int): Required. The DNS resource id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content : The user does not have permission to update the requested DNS resource.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/dnsresources/{id}/
Read a DNS resource by id.
Parameters
{id} (Int): Required. The DNS resource id.
Success
HTTP Status Code : 200
JSON
{ "address_ttl": null, "fqdn": "sample-machine.ubnt", "resource_records": [], "ip_addresses": [], "id": 1, "resource_uri": "/MAAS/api/2.0/dnsresources/1/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/dnsresources/{id}/
Update a DNS resource with the given id.
Parameters
{id} (Int): Required. The DNS resource id.
fqdn (String): Optional. Hostname (with domain) for the dnsresource.
ip_address (String): Optional. Address to assign to the dnsresource.
Success
HTTP Status Code : 200
JSON
{ "address_ttl": null, "fqdn": "sample-machine.ubnt", "resource_records": [], "ip_addresses": [], "id": 1, "resource_uri": "/MAAS/api/2.0/dnsresources/1/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to update the requested DNS resource.
HTTP Status Code : 404
Content
Not Found
DNSResourceRecord
Manage dnsresourcerecord.
DELETE /MAAS/api/2.0/dnsresourcerecords/{id}/
Delete a DNS resource record with the given id.
Parameters
{id} (Int): Required. The DNS resource record id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content : The user does not have permission to delete the requested DNS resource record.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/dnsresourcerecords/{id}/
Read a DNS resource record description Read a DNS resource record with the given id.
Parameters
{id} (Int): Required. The DNS resource record id.
Success
HTTP Status Code : 200
JSON
{ "ttl": null, "rrtype": "CNAME", "rrdata": "172.16.0.0", "fqdn": "sample-machine-new.ubnt", "id": 1, "resource_uri": "/MAAS/api/2.0/dnsresourcerecords/1/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/dnsresourcerecords/{id}/
Update a DNS resource record with the given id.
Parameters
{id} (Int): Required. The DNS resource record id.
rrtype (String): Optional. Resource type.
rrdata (String): Optional. Resource data (everything to the right of type.)
Success
HTTP Status Code : 200
JSON
{ "ttl": null, "rrtype": "TXT", "rrdata": "172.16.0.0", "fqdn": "sample-machine-new.ubnt", "id": 1, "resource_uri": "/MAAS/api/2.0/dnsresourcerecords/1/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to update the requested DNS resource record.
HTTP Status Code : 404
Content
Not Found
DNSResourceRecords
Manage DNS resource records (e.g. CNAME, MX, NS, SRV, TXT)
GET /MAAS/api/2.0/dnsresourcerecords/
List all DNS resource records.
Parameters
domain (String): Optional. Restricts the listing to entries for the domain.
name (String): Optional. Restricts the listing to entries of the given name.
rrtype (String): Optional. Restricts the listing to entries which have records of the given rrtype.
Success
HTTP Status Code : 200
JSON
[ { "ttl": null, "rrtype": "CNAME", "rrdata": "172.16.0.0", "fqdn": "sample-machine-new.ubnt", "id": 1, "resource_uri": "/MAAS/api/2.0/dnsresourcerecords/1/" } ]
POST /MAAS/api/2.0/dnsresourcerecords/
Create a new DNS resource record.
Parameters
fqdn (String): Optional. Hostname (with domain) for the
dnsresource. Either fqdn
or name
and domain
must be specified.
fqdn
is ignored if either name or domain is given (e.g.
www.your-maas.maas).
name (String): Optional. The name (or hostname without a domain) of the DNS resource record (e.g. www.your-maas)
domain (String): Optional. The domain (name or id) where to create the DNS resource record (Domain (e.g. 'maas')
rrtype (String): Optional. The resource record type (e.g cname
,
mx
, ns
, srv
, sshfp
, txt
).
rrdata (String): Optional. The resource record data (e.g. 'your-maas', '10 mail.your-maas.maas')
Success
HTTP Status Code : 200
JSON
{ "ttl": null, "rrtype": "TXT", "rrdata": "172.16.0.0", "fqdn": "sample-machine-new.ubnt", "id": 1, "resource_uri": "/MAAS/api/2.0/dnsresourcerecords/1/" }
DNSResources
Manage dnsresources.
GET /MAAS/api/2.0/dnsresources/
List all resources for the specified criteria.
Parameters
domain (String): Optional. Restricts the listing to entries for the domain.
name (String): Optional. Restricts the listing to entries of the given name.
rrtype (String): Optional. Restricts the listing to entries which have records of the given rrtype.
all (Boolean): Optional. Include implicit DNS records created for nodes registered in MAAS if true.
Success
HTTP Status Code : 200
JSON
[ { "address_ttl": null, "id": -1, "ip_addresses": null, "resource_records": [ { "system_id": "ydpcwh", "node_type": 0, "user_id": null, "dnsresource_id": null, "ttl": null, "rrtype": "A", "rrdata": "172.16.2.111", "dnsdata_id": null } ], "fqdn": "divine-buck.ubnt", "resource_uri": "/MAAS/api/2.0/dnsresources/-1/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/dnsresources/
Create a DNS resource.
Parameters
fqdn (String): Optional. Hostname (with domain) for the
dnsresource. Either fqdn
or name
and domain
must be specified.
fqdn
is ignored if either name
or domain
is given.
name (String): Required. Hostname (without domain).
domain (String): Required. Domain (name or id).
address_ttl (String): Optional. Default TTL for entries in this zone.
ip_addresses (String): Optional. Address (ip or id) to assign to the dnsresource.
Success
HTTP Status Code : 200
JSON
{ "address_ttl": null, "fqdn": "sample-machine.ubnt", "resource_records": [], "id": 1, "ip_addresses": [], "resource_uri": "/MAAS/api/2.0/dnsresources/1/" }
Device
Manage an individual device.
The device is identified by its system_id.
DELETE /MAAS/api/2.0/devices/{system_id}/
Delete a device with the given system_id.
Parameters
{system_id} (String): Required. A device system_id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to delete the device.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/devices/{system_id}/
Reads a node with the given system_id.
Parameters
{system_id} (String): Required. A node's system_id.
Success
HTTP Status Code : 200
JSON
{ "boot_interface": { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, "memory": 8192, "tag_names": [], "current_installation_result_id": null, "fqdn": "causal-quagga.maas", "disable_ipv4": false, "distro_series": "", "ip_addresses": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "node_type": 0, "min_hwe_kernel": null, "commissioning_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, "system_id": "g8xyqs", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "blockdevice_set": [ { "id_path": null, "size": 2250362368, "block_size": 512, "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "id_path": null, "size": 1443074048, "block_size": 4096, "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "current_commissioning_result_id": 198, "cpu_test_status": 2, "address_ttl": null, "cache_sets": [], "storage": 3693.436416, "node_type_name": "Machine", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "cpu_count": 7, "storage_test_status_name": "Passed", "owner": "user2", "status": 20, "volume_groups": [], "hwe_kernel": null, "netboot": true, "current_testing_result_id": 199, "commissioning_status": 2, "testing_status_name": "Passed", "architecture": "i386/generic", "locked": false, "power_state": "error", "memory_test_status_name": "Passed", "power_type": "virsh", "interface_set": [ { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, { "system_id": "g8xyqs", "name": "eth-ex07mq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 113, "params": "", "type": "physical", "firmware_version": null, "mac_address": "8f:75:69:58:26:47", "parents": [], "tags": [ "tag-ymen6c", "tag-oKQ7iK", "tag-yQLBgJ" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/113/" }, { "system_id": "g8xyqs", "name": "eth-CE1j2X", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 114, "params": "", "type": "physical", "firmware_version": null, "mac_address": "b0:5e:ed:8d:d8:36", "parents": [], "tags": [ "tag-LJPUwT", "tag-U5zGn3", "tag-dHGEeD" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/114/" }, { "system_id": "g8xyqs", "name": "bond-VpkNvO", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [], "discovered": null, "id": 115, "params": "", "type": "bond", "firmware_version": null, "mac_address": "0a:87:3f:94:0e:68", "parents": [ "eth-CE1j2X", "eth-ex07mq", "eth-jJ5ZwN" ], "tags": [ "tag-HwhC7n", "tag-WHGBJc", "tag-yY8Ap5" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/115/" } ], "owner_data": {}, "bcaches": [], "hostname": "causal-quagga", "raids": [], "other_test_status": 2, "status_action": "action-BqENyW", "special_filesystems": [], "physicalblockdevice_set": [ { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "firmware_version": "firmware_version-UW8ucD", "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "id_path": null, "block_size": 4096, "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "size": 1443074048, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "iscsiblockdevice_set": [], "testing_status": 2, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "storage_test_status": 2, "pod": { "id": 5, "name": "sacred-hen", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "swap_size": null, "status_message": "desc-eqGqfo", "status_name": "Failed to exit rescue mode", "osystem": "", "cpu_test_status_name": "Passed", "memory_test_status": 2, "other_test_status_name": "Passed", "virtualblockdevice_set": [], "cpu_speed": 0, "resource_uri": "/MAAS/api/2.0/machines/g8xyqs/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/devices/{system_id}/?op=details
Returns system details -- for example, LLDP and lshw
XML dumps.
Returns a {detail_type: xml, ...}
map, where detail_type
is
something like "lldp" or "lshw".
Note that this is returned as BSON and not JSON. This is for efficiency,
but mainly because JSON can't do binary content without applying
additional encoding like base-64. The example output below is
represented in ASCII using bsondump example.bson
and is for
demonstrative purposes.
Parameters
{system_id} (String): Required. The node's system_id.
Success
HTTP Status Code : 200
Content
{ "lldp": { "$binary": "cjBZSWw2S1ZkRA==", "$type": "00" }, "lshw": { "$binary": "Nkd5MzRLYjBkTQ==", "$type": "00" } }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/devices/{system_id}/?op=power_parameters
Gets power parameters for a given system_id, if any. For some types of power control this will include private information such as passwords and secret keys.
Note that this method is reserved for admin users and returns a 403 if the user is not one.
Success
HTTP Status Code : 200
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/devices/{system_id}/?op=restore_default_configuration
Restore the configuration options of a device with the given system_id to default values.
Parameters
{system_id} (String): Required. A device system_id.
Success
HTTP Status Code : 200
JSON
{ "owner_data": {}, "node_type": 1, "parent": null, "ip_addresses": [], "system_id": "shqe4g", "tag_names": [], "interface_set": [ { "discovered": null, "firmware_version": null, "name": "eth-jBhEqB", "system_id": "shqe4g", "parents": [], "effective_mtu": 1500, "children": [], "links": [ { "id": 71, "mode": "dhcp" } ], "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "primary_rack": null, "fabric_id": 12, "id": 5016, "space": "undefined", "secondary_rack": null, "fabric": "fabric-12", "resource_uri": "/MAAS/api/2.0/vlans/5016/" }, "enabled": true, "vendor": null, "type": "physical", "tags": [ "tag-Vg3OLy", "tag-KY66Uo", "tag-jh3fOB" ], "product": null, "id": 134, "params": "", "mac_address": "4d:2f:6f:d3:b7:6d", "resource_uri": "/MAAS/api/2.0/nodes/shqe4g/interfaces/134/" } ], "domain": { "authoritative": true, "ttl": null, "resource_record_count": 0, "name": "maas", "is_default": true, "id": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "owner": null, "address_ttl": null, "fqdn": "newhostname.maas", "hostname": "newhostname", "node_type_name": "Device", "resource_uri": "/MAAS/api/2.0/devices/shqe4g/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the device.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/devices/{system_id}/?op=restore_networking_configuration
Restore the networking options of a device with the given system_id to default values.
Parameters
{system_id} (String): Required. A device system_id.
Success
HTTP Status Code : 200
JSON
{ "interface_set": [ { "system_id": "shqe4g", "mac_address": "4d:2f:6f:d3:b7:6d", "type": "physical", "enabled": true, "links": [ { "id": 70, "mode": "dhcp" } ], "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-12", "space": "undefined", "name": "untagged", "fabric_id": 12, "id": 5016, "secondary_rack": null, "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5016/" }, "discovered": null, "tags": [ "tag-Vg3OLy", "tag-KY66Uo", "tag-jh3fOB" ], "parents": [], "name": "eth-jBhEqB", "params": "", "children": [], "effective_mtu": 1500, "id": 134, "product": null, "vendor": null, "resource_uri": "/MAAS/api/2.0/nodes/shqe4g/interfaces/134/" } ], "system_id": "shqe4g", "node_type": 1, "tag_names": [], "address_ttl": null, "ip_addresses": [], "owner_data": {}, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "owner": null, "node_type_name": "Device", "domain": { "authoritative": true, "ttl": null, "name": "maas", "is_default": true, "resource_record_count": 0, "id": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "parent": null, "fqdn": "newhostname.maas", "hostname": "newhostname", "resource_uri": "/MAAS/api/2.0/devices/shqe4g/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the device.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/devices/{system_id}/?op=set_owner_data
Set key=value data for the current owner.
Pass any key=value form data to this method to add, modify, or remove. A key is removed when the value for that key is set to an empty string.
This operation will not remove any previous keys unless explicitly passed with an empty string. All owner data is removed when the machine is no longer allocated to a user.
Parameters
key (String): Required. key
can be any string value.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content : The requested node is not found.
HTTP Status Code : 403
Content : The user does not have set the zone.
PUT /MAAS/api/2.0/devices/{system_id}/
Update a device with a given system_id.
Parameters
{system_id} (String): Required. A device system_id.
hostname (String): Optional. The hostname for this device.
domain (String): Optional. The domain for this device.
parent (String): Optional. Optional system_id to indicate this device's parent. If the parent is already set and this parameter is omitted, the parent will be unchanged.
zone (String): Optional. Name of a valid physical zone in which to place this node.
Success
HTTP Status Code : 200
JSON
{ "domain": { "authoritative": true, "ttl": null, "is_default": true, "resource_record_count": 0, "name": "maas", "id": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "owner": null, "address_ttl": null, "node_type_name": "Device", "fqdn": "newhostname.maas", "owner_data": {}, "parent": null, "interface_set": [ { "product": null, "discovered": null, "links": [], "name": "eth-jBhEqB", "enabled": true, "firmware_version": null, "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-12", "name": "untagged", "primary_rack": null, "id": 5016, "fabric_id": 12, "resource_uri": "/MAAS/api/2.0/vlans/5016/" }, "parents": [], "params": "", "effective_mtu": 1500, "children": [], "id": 134, "vendor": null, "mac_address": "4d:2f:6f:d3:b7:6d", "system_id": "shqe4g", "tags": [ "tag-Vg3OLy", "tag-KY66Uo", "tag-jh3fOB" ], "resource_uri": "/MAAS/api/2.0/nodes/shqe4g/interfaces/134/" } ], "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "node_type": 1, "ip_addresses": [], "hostname": "newhostname", "tag_names": [], "system_id": "shqe4g", "resource_uri": "/MAAS/api/2.0/devices/shqe4g/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the device.
HTTP Status Code : 404
Content
Not Found
Devices
Manage the collection of all the devices in the MAAS.
GET /MAAS/api/2.0/devices/
List nodes visible to current user, optionally filtered by criteria.
Nodes are sorted by id (i.e. most recent last) and grouped by type.
Parameters
hostname (String): Optional. Only nodes relating to the node with the matching hostname will be returned. This can be specified multiple times to see multiple nodes.
mac_address (String): Optional. Only nodes relating to the node owning the specified MAC address will be returned. This can be specified multiple times to see multiple nodes.
id (String): Optional. Only nodes relating to the nodes with matching system ids will be returned.
domain (String): Optional. Only nodes relating to the nodes in the domain will be returned.
zone (String): Optional. Only nodes relating to the nodes in the zone will be returned.
pool (String): Optional. Only nodes belonging to the pool will be returned.
agent_name (String): Optional. Only nodes relating to the nodes with matching agent names will be returned.
Success
HTTP Status Code : 200
JSON
[ { "commissioning_status": 2, "version": "2.5.0~beta3-7325-g1425f6d4c-0ubuntu1~18.04.1", "node_type_name": "Region and rack controller", "ip_addresses": [ "10.55.32.135", "192.168.122.1" ], "storage_test_status": -1, "cpu_count": 4, "hostname": "mymaas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 23, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "swap_size": null, "power_type": "", "memory": 8192, "current_testing_result_id": null, "osystem": "ubuntu", "node_type": 4, "service_set": [ { "name": "proxy", "status": "running", "status_info": "" }, { "name": "bind9", "status": "running", "status_info": "" }, { "name": "ntp_region", "status": "running", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "syslog_region", "status": "running", "status_info": "" }, { "name": "ntp_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd", "status": "running", "status_info": "" }, { "name": "tftp", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "http", "status": "running", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "syslog_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd6", "status": "off", "status_info": "" }, { "name": "rackd", "status": "running", "status_info": "" } ], "other_test_status": -1, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "status_action": "", "commissioning_status_name": "Passed", "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "mac_address": "fa:16:3e:b8:af:ff", "tags": [], "params": "", "id": 1, "discovered": null, "product": "OpenStack Nova", "parents": [], "type": "physical", "name": "ens3", "enabled": true, "effective_mtu": 1500, "vendor": "OpenStack Foundation", "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 1, "mode": "static", "ip_address": "10.55.32.135", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/1/" }, { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "mac_address": "52:54:00:09:88:41", "tags": [], "params": "", "id": 17, "discovered": null, "product": null, "parents": [], "type": "bridge", "name": "virbr0", "enabled": true, "effective_mtu": 1500, "vendor": null, "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 17, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/17/" } ], "cpu_speed": 2400, "testing_status_name": "Unknown", "tag_names": [ "virtual" ], "current_commissioning_result_id": 1, "system_id": "6gsym8", "distro_series": "bionic", "cpu_test_status": -1, "memory_test_status_name": "Unknown", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "33313934-3432-5a43-4339-343532355a35", "cpu_model": "Intel Core i7 9xx (Nehalem Class Core i7)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "other_test_status_name": "Unknown", "fqdn": "mymaas.maas", "power_state": "unknown", "memory_test_status": -1, "current_installation_result_id": null, "storage_test_status_name": "Unknown", "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "resource_uri": "/MAAS/api/2.0/rackcontrollers/6gsym8/" } ]
GET /MAAS/api/2.0/devices/?op=is_registered
Returns whether or not the given MAC address is registered within this MAAS (and attached to a non-retired node).
Parameters
mac_address (URL String): Required. The MAC address to be checked.
Success
HTTP Status Code : 200
Boolean
false
Error
HTTP Status Code : 400
Content
No provided mac_address!
POST /MAAS/api/2.0/devices/
Create a new device.
Parameters
hostname (String): Optional. A hostname. If not given, one will be generated.
domain (String): Optional. The domain of the device. If not given the default domain is used.
mac_addresses (String): Required. One or more MAC addresses for the device.
parent (String): Optional. The system id of the parent.
Success
HTTP Status Code : 200
JSON
{ "address_ttl": null, "fqdn": "moral-buck.maas", "interface_set": [ { "discovered": null, "product": null, "name": "eth0", "children": [], "effective_mtu": 1500, "firmware_version": null, "vendor": null, "id": 136, "type": "physical", "tags": [], "links": [], "enabled": true, "params": "", "vlan": null, "system_id": "kas8m6", "mac_address": "00:00:00:00:00:00", "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/kas8m6/interfaces/136/" } ], "owner": "admin", "hostname": "moral-buck", "parent": null, "node_type_name": "Device", "ip_addresses": [], "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "owner_data": {}, "system_id": "kas8m6", "domain": { "authoritative": true, "ttl": null, "is_default": true, "name": "maas", "id": 0, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "tag_names": [], "node_type": 1, "resource_uri": "/MAAS/api/2.0/devices/kas8m6/" }
Error
HTTP Status Code : 400
Content : There was a problem with the given parameters.
POST /MAAS/api/2.0/devices/?op=set_zone
Assigns a given node to a given zone.
Parameters
zone (String): Required. The zone name.
nodes (String): Required. The node to add.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 400
Content : The given parameters were not correct.
Discoveries
Query observed discoveries.
GET /MAAS/api/2.0/discovery/
Lists all the devices MAAS has discovered. Discoveries are listed in the order they were last observed on the network (most recent first).
Success
HTTP Status Code : 200
JSON
[ { "discovery_id": "MTcyLjE2LjIuNzAsMjk6ZTU6Mjc6OWQ6YmY6OGQ=", "ip": "172.16.2.70", "mac_address": "29:e5:27:9d:bf:8d", "last_seen": "2018-12-10T19:56:34.299", "hostname": null, "fabric_name": "fabric-1", "vid": 1844, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 8, "interface_name": "eth2" }, "mac_organization": null, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjIuNzAsMjk6ZTU6Mjc6OWQ6YmY6OGQ=/" }, { "discovery_id": "MTcyLjE2LjIuMzUsMjA6NDk6Mzc6OGE6YTk6MGY=", "ip": "172.16.2.35", "mac_address": "20:49:37:8a:a9:0f", "last_seen": "2018-12-10T19:56:34.212", "hostname": null, "fabric_name": "fabric-1", "vid": 1100, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 8, "interface_name": "eth2" }, "mac_organization": null, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjIuMzUsMjA6NDk6Mzc6OGE6YTk6MGY=/" } ]
GET /MAAS/api/2.0/discovery/?op=by_unknown_ip
Lists all discovered devices with an unknown IP address.
Filters the list of discovered devices by excluding any discoveries where a known MAAS node is configured with the IP address of a discovery, or has been observed using it after it was assigned by a MAAS-managed DHCP server.
Discoveries are listed in the order they were last observed on the network (most recent first).
Success
HTTP Status Code : 200
JSON
[ { "discovery_id": "MTcyLjE2LjIuMTgwLDk1Ojg2OjY4OjhiOjdhOjVk", "ip": "172.16.2.180", "mac_address": "95:86:68:8b:7a:5d", "last_seen": "2018-12-10T19:56:28.440", "hostname": "host-cyp092", "fabric_name": "fabric-1", "vid": 1641, "mac_organization": null, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 8, "interface_name": "eth2" }, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjIuMTgwLDk1Ojg2OjY4OjhiOjdhOjVk/" }, { "discovery_id": "MTcyLjE2LjEuMTM1LGUwOmQ3OjVmOjBiOmM4OjMx", "ip": "172.16.1.135", "mac_address": "e0:d7:5f:0b:c8:31", "last_seen": "2018-12-10T19:56:28.280", "hostname": null, "fabric_name": "fabric-0", "vid": 3883, "mac_organization": null, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 7, "interface_name": "eth1" }, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjEuMTM1LGUwOmQ3OjVmOjBiOmM4OjMx/" } ]
GET /MAAS/api/2.0/discovery/?op=by_unknown_ip_and_mac
Lists all discovered devices completely unknown to MAAS.
Filters the list of discovered devices by excluding any discoveries where a known MAAS node is configured with either the MAC address or the IP address of a discovery.
Discoveries are listed in the order they were last observed on the network (most recent first).
Success
HTTP Status Code : 200
JSON
[ { "discovery_id": "MTcyLjE2LjIuMTgwLDk1Ojg2OjY4OjhiOjdhOjVk", "ip": "172.16.2.180", "mac_address": "95:86:68:8b:7a:5d", "last_seen": "2018-12-10T19:56:28.440", "hostname": "host-cyp092", "fabric_name": "fabric-1", "vid": 1641, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 8, "interface_name": "eth2" }, "mac_organization": null, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjIuMTgwLDk1Ojg2OjY4OjhiOjdhOjVk/" }, { "discovery_id": "MTcyLjE2LjEuMTM1LGUwOmQ3OjVmOjBiOmM4OjMx", "ip": "172.16.1.135", "mac_address": "e0:d7:5f:0b:c8:31", "last_seen": "2018-12-10T19:56:28.280", "hostname": null, "fabric_name": "fabric-0", "vid": 3883, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 7, "interface_name": "eth1" }, "mac_organization": null, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjEuMTM1LGUwOmQ3OjVmOjBiOmM4OjMx/" } ]
GET /MAAS/api/2.0/discovery/?op=by_unknown_mac
Filters the list of discovered devices by excluding any discoveries where an interface known to MAAS is configured with a discovered MAC address.
Discoveries are listed in the order they were last observed on the network (most recent first).
Success
HTTP Status Code : 200
JSON
[ { "discovery_id": "MTcyLjE2LjEuNCw2YjoyMTphYzoxYjowMjpkOQ==", "ip": "172.16.1.43", "mac_address": "6b:21:ac:1b:02:d9", "last_seen": "2018-12-10T19:56:27.225", "hostname": null, "fabric_name": "fabric-0", "vid": 1214, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 6, "interface_name": "eth0" }, "mac_organization": null, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjEuNCw2YjoyMTphYzoxYjowMjpkOQ==/" }, { "discovery_id": "MTcyLjE2LjQuMjEsODY6NjE6ZTQ6ZWY6ZmY6YmQ=", "ip": "172.16.4.212", "mac_address": "86:61:e4:ef:ff:bd", "last_seen": "2018-12-10T19:56:27.162", "hostname": "host-n1b7n1", "fabric_name": "fabric-0", "vid": 480, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 10, "interface_name": "vlan10" }, "mac_organization": null, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjQuMjEsODY6NjE6ZTQ6ZWY6ZmY6YmQ=/" } ]
POST /MAAS/api/2.0/discovery/?op=clear
Deletes all discovered neighbours and/or mDNS entries.
Note: One of mdns
, neighbours
, or all
parameters must be supplied.
Parameters
mdns (Boolean): Optional. Delete all mDNS entries.
neighbours (Boolean): Optional. Delete all neighbour entries.
all (Boolean): Optional. Delete all discovery data.
Success
HTTP Status Code : 204
POST /MAAS/api/2.0/discovery/?op=scan
Immediately run a neighbour discovery scan on all rack networks.
This command causes each connected rack controller to execute the 'maas-rack scan-network' command, which will scan all CIDRs configured on the rack controller using 'nmap' (if it is installed) or 'ping'.
Network discovery must not be set to 'disabled' for this command to be useful.
Scanning will be started in the background, and could take a long time on rack controllers that do not have 'nmap' installed and are connected to large networks.
If the call is a success, this method will return a dictionary of results with the following keys:
result
: A human-readable string summarizing the results.
scan_attempted_on
: A list of rack system_id values where a scan was
attempted. (That is, an RPC connection was successful and a subsequent
call was intended.)
failed_to_connect_to
: A list of rack system_id values where the RPC
connection failed.
scan_started_on
: A list of rack system_id values where a scan was
successfully started.
scan_failed_on
: A list of rack system_id values where a scan was
attempted, but failed because a scan was already in progress.
rpc_call_timed_out_on
: A list of rack system_id values where the RPC
connection was made, but the call timed out before a ten second timeout
elapsed.
Parameters
cidr (String): Optional. The subnet CIDR(s) to scan (can be specified multiple times). If not specified, defaults to all networks.
force (Boolean): Optional. If True, will force the scan, even if all networks are specified. (This may not be the best idea, depending on acceptable use agreements, and the politics of the organization that owns the network.) Note that this parameter is required if all networks are specified. Default: False.
always_use_ping (String): Optional. If True, will force the scan to use 'ping' even if 'nmap' is installed. Default: False.
slow (String): Optional. If True, and 'nmap' is being used, will limit the scan to nine packets per second. If the scanner is 'ping', this option has no effect. Default: False.
threads (String): Optional. The number of threads to use during scanning. If 'nmap' is the scanner, the default is one thread per 'nmap' process. If 'ping' is the scanner, the default is four threads per CPU.
Success
HTTP Status Code : 200
JSON
{ "result": "Scanning is in-progress on all rack controllers.", "scan_started_on": [ { "system_id": "6gsym8", "hostname": "dev-runmaas" } ], "scan_failed_on": [], "scan_attempted_on": [ { "system_id": "6gsym8", "hostname": "dev-runmaas" } ], "failed_to_connect_to": [], "rpc_call_timed_out_on": [], "failures": [] }
Discovery
Read or delete an observed discovery.
GET /MAAS/api/2.0/discovery/{discovery_id}/
Read a discovery with the given discovery_id.
Parameters
{discovery_id (String): Required. A discovery_id.
Success
HTTP Status Code : 200
JSON
{ "discovery_id": "MTcyLjE2LjEuNCw2YjoyMTphYzoxYjowMjpkOQ==", "ip": "172.16.1.43", "mac_address": "6b:21:ac:1b:02:d9", "last_seen": "2018-12-10T19:56:27.225", "hostname": null, "fabric_name": "fabric-0", "vid": 1214, "mac_organization": null, "observer": { "system_id": "76y7pg", "hostname": "happy-rack", "interface_id": 6, "interface_name": "eth0" }, "resource_uri": "/MAAS/api/2.0/discovery/MTcyLjE2LjEuNCw2YjoyMTphYzoxYjowMjpkOQ==/" }
Error
HTTP Status Code : 404
Content
Not Found
Domain
Manage domain.
DELETE /MAAS/api/2.0/domains/{id}/
Delete a domain with the given id.
Parameters
{id} (Int): Required. A domain id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the domain.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/domains/{id}/
Read a domain with the given id.
Parameters
{id} (Int): Required. A domain id.
Success
HTTP Status Code : 200
JSON
[ { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "is_default": true, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, { "authoritative": true, "ttl": null, "id": 1, "name": "sample", "is_default": false, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/1/" }, { "authoritative": true, "ttl": null, "id": 2, "name": "ubnt", "is_default": false, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/2/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/domains/{id}/?op=set_default
Set the specified domain to be the default.
Parameters
{id} (Int): Required. A domain id. If any unallocated nodes are using the previous default domain, changes them to use the new default domain.
Success
HTTP Status Code : 200
JSON
{ "authoritative": true, "ttl": null, "resource_record_count": 0, "name": "newdomain", "id": 3, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/3/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the domain.
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/domains/{id}/
Update a domain with the given id.
Parameters
{id} (Int): Required. A domain id.
name (String): Required. Name of the domain.
authoritative (String): Optional. True if we are authoritative for this domain.
ttl (String): Optional. The default TTL for this domain.
Success
HTTP Status Code : 200
JSON
{ "authoritative": true, "ttl": null, "is_default": false, "id": 3, "name": "newdomain", "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/3/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the domain.
HTTP Status Code : 404
Content
Not Found
Domains
Manage domains.
GET /MAAS/api/2.0/domains/
List all domains.
Success
HTTP Status Code : 200
JSON
[ { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "is_default": true, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, { "authoritative": true, "ttl": null, "id": 1, "name": "sample", "is_default": false, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/1/" }, { "authoritative": true, "ttl": null, "id": 2, "name": "ubnt", "is_default": false, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/2/" } ]
POST /MAAS/api/2.0/domains/
Create a domain.
Parameters
name (String): Required. Name of the domain.
authoritative (String): Optional. Class type of the domain.
Success
HTTP Status Code : 200
JSON
{ "authoritative": true, "ttl": null, "name": "newdomain", "resource_record_count": 0, "is_default": false, "id": 3, "resource_uri": "/MAAS/api/2.0/domains/3/" }
POST /MAAS/api/2.0/domains/?op=set_serial
Set the SOA serial number for all DNS zones.
Parameters
serial (Int): Required. Serial number to use next.
Success
HTTP Status Code : 200
Content : No content returned.
Events
Retrieve filtered node events.
A specific Node's events is identified by specifying one or more ids, hostnames, or mac addresses as a list.
GET /MAAS/api/2.0/events/?op=query
List node events, optionally filtered by various criteria via URL query parameters.
Parameters
hostname (String): Optional. An optional hostname. Only events relating to the node with the matching hostname will be returned. This can be specified multiple times to get events relating to more than one node.
mac_address (String): Optional. An optional list of MAC addresses. Only nodes with matching MAC addresses will be returned.
id (String): Optional. An optional list of system ids. Only nodes with matching system ids will be returned.
zone (String): Optional. An optional name for a physical zone. Only nodes in the zone will be returned.
agent_name (String): Optional. An optional agent name. Only nodes with matching agent names will be returned.
level (String): Optional. Desired minimum log level of returned events. Returns this level of events and greater. Choose from: AUDIT, CRITICAL, DEBUG, ERROR, INFO, WARNING. The default is INFO.
limit (String): Optional. Optional number of events to return. Default 100. Maximum: 1000.
before (String): Optional. Optional event id. Defines where to start returning older events.
after (String): Optional. Optional event id. Defines where to start returning newer events.
owner (String): Optional. If specified, filters the list to show only events owned by the specified username.
Success
HTTP Status Code : 200
JSON
{ "count": 5, "events": [ { "username": "unknown", "node": "7xtf67", "hostname": "spence-devmaas", "id": 1667, "level": "WARNING", "created": "Fri, 07 Dec. 2018 20:11:08", "type": "Rack import warning", "description": "Finished importing boot images, the region does not have any boot images available." }, { "username": "unknown", "node": "7xtf67", "hostname": "spence-devmaas", "id": 1666, "level": "INFO", "created": "Fri, 07 Dec. 2018 20:11:08", "type": "Rack import info", "description": "Starting rack boot image import" }, { "username": "unknown", "node": "7xtf67", "hostname": "spence-devmaas", "id": 1665, "level": "INFO", "created": "Fri, 07 Dec. 2018 20:11:00", "type": "Starting refresh of controller hardware and networking information", "description": "(MAAS)" }, { "username": "unknown", "node": "7xtf67", "hostname": "spence-devmaas", "id": 1664, "level": "INFO", "created": "Fri, 07 Dec. 2018 16:37:18", "type": "Starting refresh of controller hardware and networking information", "description": "(MAAS)" }, { "username": "unknown", "node": "7xtf67", "hostname": "spence-devmaas", "id": 1663, "level": "INFO", "created": "Fri, 07 Dec. 2018 16:36:15", "type": "Starting refresh of controller hardware and networking information", "description": "(MAAS)" } ], "next_uri": "/MAAS/api/2.0/events/?op=query&limit=5&after=1667", "prev_uri": "/MAAS/api/2.0/events/?op=query&limit=5&before=1663" }
Fabric
Manage fabric.
DELETE /MAAS/api/2.0/fabrics/{id}/
Delete a fabric with the given id.
Parameters
{id} (Int): Required. A fabric id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/fabrics/{id}/
Read a fabric with the given id.
Parameters
{id} (Int): Required. A fabric id.
Success
HTTP Status Code : 200
JSON
{ "class_type": null, "name": "fabric-14", "id": 14, "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 14, "space": "undefined", "fabric": "fabric-14", "id": 5018, "secondary_rack": null, "primary_rack": null, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5018/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/14/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/fabrics/{id}/
Update a fabric with the given id.
Parameters
{id} (Int): Required. A fabric id.
name (String): Optional. Name of the fabric.
description (String): Optional. Description of the fabric.
class_type (String): Optional. Class type of the fabric.
Success
HTTP Status Code : 200
JSON
{ "class_type": null, "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "fabric_id": 14, "fabric": "fabric-14", "id": 5018, "primary_rack": null, "name": "untagged", "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5018/" } ], "name": "fabric-14", "id": 14, "resource_uri": "/MAAS/api/2.0/fabrics/14/" }
Error
HTTP Status Code : 404
Content
Not Found
Fabrics
Manage fabrics.
GET /MAAS/api/2.0/fabrics/
List all fabrics.
Success
HTTP Status Code : 200
JSON
[ { "class_type": null, "id": 0, "name": "fabric-0", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "secondary_rack": "fcka3t", "fabric_id": 0, "name": "untagged", "primary_rack": "7xtf67", "id": 5001, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "secondary_rack": "fcka3t", "fabric_id": 0, "name": "10", "primary_rack": "7xtf67", "id": 5002, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/0/" }, { "class_type": null, "id": 1, "name": "fabric-1", "vlans": [ { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "secondary_rack": null, "fabric_id": 1, "name": "42", "primary_rack": null, "id": 5004, "space": "ipv6-testbed", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "secondary_rack": "fcka3t", "fabric_id": 1, "name": "untagged", "primary_rack": "7xtf67", "id": 5003, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5003/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/1/" }, { "class_type": null, "id": 2, "name": "fabric-2", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-2", "secondary_rack": null, "fabric_id": 2, "name": "untagged", "primary_rack": null, "id": 5005, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, { "vid": 567, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-2", "secondary_rack": null, "fabric_id": 2, "name": "567", "primary_rack": null, "id": 5006, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5006/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/2/" }, { "class_type": null, "id": 3, "name": "fabric-3", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-3", "secondary_rack": null, "fabric_id": 3, "name": "untagged", "primary_rack": null, "id": 5007, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5007/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/3/" }, { "class_type": null, "id": 4, "name": "fabric-4", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-4", "secondary_rack": null, "fabric_id": 4, "name": "untagged", "primary_rack": null, "id": 5008, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5008/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/4/" }, { "class_type": null, "id": 5, "name": "fabric-5", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-5", "secondary_rack": null, "fabric_id": 5, "name": "untagged", "primary_rack": null, "id": 5009, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5009/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/5/" }, { "class_type": null, "id": 6, "name": "fabric-6", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-6", "secondary_rack": null, "fabric_id": 6, "name": "untagged", "primary_rack": null, "id": 5010, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5010/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/6/" }, { "class_type": null, "id": 7, "name": "fabric-7", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-7", "secondary_rack": null, "fabric_id": 7, "name": "untagged", "primary_rack": null, "id": 5011, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5011/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/7/" }, { "class_type": null, "id": 8, "name": "fabric-8", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-8", "secondary_rack": null, "fabric_id": 8, "name": "untagged", "primary_rack": null, "id": 5012, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5012/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/8/" }, { "class_type": null, "id": 9, "name": "fabric-9", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-9", "secondary_rack": null, "fabric_id": 9, "name": "untagged", "primary_rack": null, "id": 5013, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5013/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/9/" }, { "class_type": null, "id": 10, "name": "fabric-10", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-10", "secondary_rack": null, "fabric_id": 10, "name": "untagged", "primary_rack": null, "id": 5014, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5014/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/10/" }, { "class_type": null, "id": 11, "name": "fabric-11", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-11", "secondary_rack": null, "fabric_id": 11, "name": "untagged", "primary_rack": null, "id": 5015, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5015/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/11/" }, { "class_type": null, "id": 12, "name": "fabric-12", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-12", "secondary_rack": null, "fabric_id": 12, "name": "untagged", "primary_rack": null, "id": 5016, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5016/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/12/" }, { "class_type": null, "id": 13, "name": "fabric-13", "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-13", "secondary_rack": null, "fabric_id": 13, "name": "untagged", "primary_rack": null, "id": 5017, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/13/" } ]
POST /MAAS/api/2.0/fabrics/
Create a fabric.
Parameters
name (String): Optional. Name of the fabric.
description (String): Optional. Description of the fabric.
class_type (String): Optional. Class type of the fabric.
Success
HTTP Status Code : 200
JSON
{ "class_type": null, "name": "fabric-14", "id": 14, "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-14", "primary_rack": null, "fabric_id": 14, "space": "undefined", "name": "untagged", "id": 5018, "secondary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5018/" } ], "resource_uri": "/MAAS/api/2.0/fabrics/14/" }
Fan Network
Manage Fan Network.
DELETE /MAAS/api/2.0/fannetworks/{id}/
Deletes a fan network with the given id.
Parameters
{id} (Int): Required. The fan network id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/fannetworks/{id}/
Read a fan network with the given id.
Parameters
{id} (Int): Required. The fan network id.
Success
HTTP Status Code : 200
JSON
{ "name": "fannetwork", "overlay": "172.0.0.0/8", "underlay": "172.16.0.0/16", "dhcp": null, "host_reserve": 1, "bridge": null, "off": false, "id": 1, "resource_uri": "/MAAS/api/2.0/fannetworks/1/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/fannetworks/{id}/
Update a fan network with the given id.
Parameters
{id} (Int): Required. The fan network id.
name (String): Optional. Name of the fan network.
overlay (String): Optional. The overlay network.
underlay (String): Optional. The underlay network.
dhcp (Boolean): Optional. Configure DHCP server for overlay network.
host_reserve (Int): Optional. The number of IP addresses to reserve for host.
bridge (String): Optional. Override bridge name.
off (Boolean): Optional. Put this fan network in the configuration, but disable it.
Success
HTTP Status Code : 200
JSON
{ "name": "fannetwork", "overlay": "172.0.0.0/8", "underlay": "172.16.0.0/16", "dhcp": null, "host_reserve": 1, "bridge": "br1", "off": false, "id": 1, "resource_uri": "/MAAS/api/2.0/fannetworks/1/" }
Error
HTTP Status Code : 404
Content
Not Found
Fan Networks
Manage Fan Networks.
GET /MAAS/api/2.0/fannetworks/
List all fan networks.
Success
HTTP Status Code : 200
JSON
[ { "name": "fannetwork", "overlay": "172.0.0.0/8", "underlay": "172.16.0.0/16", "dhcp": null, "host_reserve": 1, "bridge": null, "off": false, "id": 1, "resource_uri": "/MAAS/api/2.0/fannetworks/1/" } ]
POST /MAAS/api/2.0/fannetworks/
Create a fan network
Parameters
name (String): Required. Name of the fan network.
overlay (String): Required. The overlay network.
underlay (String): Required. The underlay network.
dhcp (Boolean): Optional. Configure DHCP server for overlay network.
host_reserve (Int): Optional. The number of IP addresses to reserve for host.
bridge (String): Optional. Override bridge name.
off (Boolean): Optional. Put this fan network in the configuration, but disable it.
Success
HTTP Status Code : 200
JSON
[ { "name": "fannetwork", "overlay": "172.0.0.0/8", "underlay": "172.16.0.0/16", "dhcp": null, "host_reserve": 1, "bridge": null, "off": false, "id": 1, "resource_uri": "/MAAS/api/2.0/fannetworks/1/" } ]
File
Manage a FileStorage object.
The file is identified by its filename and owner.
DELETE /MAAS/api/2.0/files/{filename}/
Delete a file with the given file name.
Parameters
{filename} (String): Required. The name of the file.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/files/{filename}/
Reads a stored file with the given file name.
The content of the file is base64-encoded.
Parameters
{filename} (String): Required. The name of the file.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
Files
Manage the collection of all the files in this MAAS.
DELETE /MAAS/api/2.0/files/
Delete a stored file.
Parameters
filename (String): Required. The filename of the object to be deleted.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/files/
List the files from the file storage.
The returned files are ordered by file name and the content is excluded.
Parameters
prefix (String): Optional. Prefix used to filter returned files.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
GET /MAAS/api/2.0/files/?op=get
Get a named file from the file storage.
Parameters
filename (String): Required. The name of the file.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/files/?op=get_by_key
Get a file from the file storage with the given key.
Parameters
key (String): Required. The file's key.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/files/
Add a new file to the file storage.
Parameters
filename (String): Required. The file name to use in storage.
file (String): Required. File data. Content type must be
application/octet-stream
.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 400
Content : The filename is missing, the file data is missing or more than one file is supplied.
IP Addresses
Manage IP addresses allocated by MAAS.
GET /MAAS/api/2.0/ipaddresses/
List all IP addresses known to MAAS.
By default, gets a listing of all IP addresses allocated to the requesting user.
Parameters
ip (String): Optional. If specified, will only display information for the specified IP address.
all (Boolean): Optional. (Admin users only) If True, all reserved IP addresses will be shown. (By default, only addresses of type 'User reserved' that are assigned to the requesting user are shown.)
owner (String): Optional. (Admin users only) If specified, filters the list to show only IP addresses owned by the specified username.
Success
HTTP Status Code : 200
JSON
[ { "created": "2018-12-14T20:11:27.187", "ip": "172.16.1.234", "alloc_type": 4, "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "name": "untagged", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "space": "management", "fabric_id": 0, "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "alloc_type_name": "User reserved", "owner": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "interface_set": [], "resource_uri": "/MAAS/api/2.0/ipaddresses/" } ]
POST /MAAS/api/2.0/ipaddresses/?op=release
Release an IP address that was previously reserved by the user.
Parameters
ip (String): Required. The IP address to release.
force (Boolean): Optional. If True, allows a MAAS administrator to force an IP address to be released, even if it is not a user-reserved IP address or does not belong to the requesting user. Use with caution.
discovered (Boolean): Optional. If True, allows a MAAS administrator to release a discovered address. Only valid if 'force' is specified. If not specified, MAAS will attempt to release any type of address except for discovered addresses.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/ipaddresses/?op=reserve
Reserve an IP address for use outside of MAAS.
Returns an IP adddress that MAAS will not allow any of its known nodes to use; it is free for use by the requesting user until released by the user.
The user must supply either a subnet or a specific IP address within a subnet.
Parameters
subnet (String): Optional. CIDR representation of the subnet on which the IP reservation is required. E.g. 10.1.2.0/24
ip (String): Optional. The IP address, which must be within a known subnet.
ip_address (String): Optional. (Deprecated.) Alias for 'ip' parameter. Provided for backward compatibility.
hostname (String): Optional. The hostname to use for the specified IP address. If no domain component is given, the default domain will be used.
mac (String): Optional. The MAC address that should be linked to this reservation.
Success
HTTP Status Code : 200
JSON
{ "created": "2018-12-14T20:01:45.856", "ip": "172.16.1.234", "alloc_type": 4, "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "space": "management", "name": "untagged", "fabric_id": 0, "id": 5001, "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "alloc_type_name": "User reserved", "owner": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "interface_set": [], "resource_uri": "/MAAS/api/2.0/ipaddresses/" }
Error
HTTP Status Code : 400
Content : No subnet in MAAS matching the provided one, or an ip_address was supplied, but a corresponding subnet could not be found.
HTTP Status Code : 503
Content : No more IP addresses are available.
IP Range
Manage IP range.
DELETE /MAAS/api/2.0/ipranges/{id}/
Delete an IP range with the given id.
Parameters
{id} (Int): Required. An IP range id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to delete the IP range.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/ipranges/{id}/
Read an IP range with the given id.
Parameters
{id} (Int): Required. An IP range id.
Success
HTTP Status Code : 200
JSON
{ "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "secondary_rack": "fcka3t", "fabric": "fabric-0", "fabric_id": 0, "name": "untagged", "space": "management", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "type": "reserved", "start_ip": "172.16.1.200", "end_ip": "172.16.1.210", "user": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "comment": "", "id": 1, "resource_uri": "/MAAS/api/2.0/ipranges/1/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/ipranges/{id}/
Update an IP range with the given id.
Parameters
{id} (Int): Required. An IP range id.
start_ip (String): Optional. Start IP address of this range (inclusive).
end_ip (String): Optional. End IP address of this range (inclusive).
comment (String): Optional. A description of this range. (optional)
Success
HTTP Status Code : 200
JSON
{ "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "space": "management", "fabric_id": 0, "primary_rack": "7xtf67", "fabric": "fabric-0", "secondary_rack": "fcka3t", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "type": "reserved", "start_ip": "172.16.1.200", "end_ip": "172.16.1.210", "user": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "comment": "", "id": 1, "resource_uri": "/MAAS/api/2.0/ipranges/1/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to update the IP range.
HTTP Status Code : 404
Content
Not Found
IP Ranges
Manage IP ranges.
GET /MAAS/api/2.0/ipranges/
List all available IP ranges.
Success
HTTP Status Code : 200
JSON
[ { "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "fcka3t", "fabric_id": 0, "id": 5001, "fabric": "fabric-0", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "type": "reserved", "start_ip": "172.16.1.200", "end_ip": "172.16.1.210", "user": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "comment": "", "id": 1, "resource_uri": "/MAAS/api/2.0/ipranges/1/" } ]
POST /MAAS/api/2.0/ipranges/
Create a new IP range.
Parameters
type (String): Required. Type of this range. (dynamic
or
reserved
)
start_ip (String): Required. Start IP address of this range (inclusive).
end_ip (String): Required. End IP address of this range (inclusive).
subnet (String): Required. Subnet associated with this range.
comment (String): Optional. A description of this range.
Success
HTTP Status Code : 200
JSON
{ "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "fcka3t", "fabric_id": 0, "id": 5001, "fabric": "fabric-0", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "type": "reserved", "start_ip": "172.16.1.200", "end_ip": "172.16.1.210", "user": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "comment": "", "id": 1, "resource_uri": "/MAAS/api/2.0/ipranges/1/" }
Error
HTTP Status Code : 403
Content : The user does not have the permissions required to create an IP range.
Interface
Manage a node's or device's interface.
DELETE /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/
Delete an interface with the given system_id and interface id.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/
Read an interface with the given system_id and interface id.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
Success
HTTP Status Code : 200
JSON
{ "name": "eth0", "children": [ "newbond" ], "mac_address": "00:01:02:03:04:55", "links": [], "product": null, "parents": [], "enabled": true, "vlan": null, "firmware_version": null, "system_id": "thr3am", "tags": [], "params": {}, "type": "physical", "discovered": null, "effective_mtu": 1500, "vendor": null, "id": 138, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/138/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/?op=add_tag
Add a tag to an interface with the given system_id and interface id.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
tag (String): Optional. The tag to add.
Success
HTTP Status Code : 200
JSON
{ "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "space": "management", "primary_rack": "7xtf67", "name": "untagged", "id": 5003, "fabric": "fabric-1", "secondary_rack": "76y7pg", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "effective_mtu": 1500, "vendor": null, "product": null, "enabled": true, "children": [ "eth-lKRYAa.42" ], "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "space": "management", "primary_rack": "7xtf67", "name": "untagged", "id": 5003, "fabric": "fabric-1", "secondary_rack": "76y7pg", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "name": "eth-lKRYAa", "discovered": null, "id": 37, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b", "mytag" ], "parents": [], "firmware_version": null, "params": "", "mac_address": "cb:93:ac:d1:ed:65", "system_id": "thr3am", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }
Error
HTTP Status Code : 403
Content : If the user does not have the permission to add a tag.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/?op=disconnect
Disconnect an interface with the given system_id and interface id.
Deletes any linked subnets and IP addresses, and disconnects the interface from any associated VLAN.
Success
HTTP Status Code : 200
JSON
{ "enabled": true, "system_id": "thr3am", "tags": [], "vendor": null, "type": "physical", "product": null, "links": [], "vlan": null, "firmware_version": null, "parents": [], "params": {}, "effective_mtu": 1500, "discovered": null, "mac_address": "00:01:02:03:04:77", "children": [ "br1" ], "name": "eth1", "id": 140, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/140/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/?op=link_subnet
Link an interface with the given system_id and interface id to a subnet.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
mode (String): Required. AUTO
, DHCP
, STATIC
or LINK_UP
connection to subnet.
Mode definitions:
AUTO
: Assign this interface a static IP address from the provided subnet. The subnet must be a managed subnet. The IP address will not be assigned until the node goes to be deployed.DHCP
: Bring this interface up with DHCP on the given subnet. Only one subnet can be set toDHCP
. If the subnet is managed this interface will pull from the dynamic IP range.STATIC
: Bring this interface up with a static IP address on the given subnet. Any number of static links can exist on an interface.LINK_UP
: Bring this interface up only on the given subnet. No IP address will be assigned to this interface. The interface cannot have any currentAUTO
,DHCP
orSTATIC
links.
subnet (Int): Required. Subnet id linked to interface.
ip_address (String): Optional. IP address for the interface in
subnet. Only used when mode is STATIC
. If not provided an IP address
from subnet will be auto selected.
force (Boolean): Optional. If True, allows LINK_UP
to be set on
the interface even if other links already exist. Also allows the
selection of any VLAN, even a VLAN MAAS does not believe the interface
to currently be on. Using this option will cause all other links on the
interface to be deleted. (Defaults to False.)
default_gateway (String): Optional. True sets the gateway IP
address for the subnet as the default gateway for the node this
interface belongs to. Option can only be used with the AUTO
and
STATIC
modes.
Success
HTTP Status Code : 200
JSON
{ "tags": [], "system_id": "thr3am", "parents": [], "enabled": true, "params": {}, "product": null, "discovered": null, "effective_mtu": 1500, "firmware_version": null, "type": "physical", "vendor": null, "id": 140, "mac_address": "00:01:02:03:04:77", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "id": 5001, "fabric": "fabric-0", "fabric_id": 0, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "children": [ "br1" ], "name": "eth1", "links": [ { "id": 70, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "id": 5001, "fabric": "fabric-0", "fabric_id": 0, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/140/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/?op=remove_tag
Remove a tag from an interface with the given system_id and interface id.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
tag (String): Optional. The tag to remove.
Success
HTTP Status Code : 200
JSON
{ "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "space": "management", "primary_rack": "7xtf67", "name": "untagged", "id": 5003, "fabric": "fabric-1", "secondary_rack": "76y7pg", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "effective_mtu": 1500, "vendor": null, "product": null, "enabled": true, "children": [ "eth-lKRYAa.42" ], "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "space": "management", "primary_rack": "7xtf67", "name": "untagged", "id": 5003, "fabric": "fabric-1", "secondary_rack": "76y7pg", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "name": "eth-lKRYAa", "discovered": null, "id": 37, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "parents": [], "firmware_version": null, "params": "", "mac_address": "cb:93:ac:d1:ed:65", "system_id": "thr3am", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }
Error
HTTP Status Code : 403
Content : If the user does not have the permission to add a tag.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/?op=set_default_gateway
Set the given interface id on the given system_id as the default gateway.
If this interface has more than one subnet with a gateway IP in the same IP address family then specifying the ID of the link on this interface is required.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
link_id (Int): Optional. ID of the link on this interface to select the default gateway IP address from.
Success
HTTP Status Code : 200
JSON
{ "effective_mtu": 1500, "id": 37, "children": [ "eth-lKRYAa.42" ], "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "id": 5003, "fabric_id": 1, "name": "untagged", "space": "management", "fabric": "fabric-1", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "name": "eth-lKRYAa", "parents": [], "enabled": true, "type": "physical", "system_id": "thr3am", "mac_address": "cb:93:ac:d1:ed:65", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "id": 5003, "fabric_id": 1, "name": "untagged", "space": "management", "fabric": "fabric-1", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "params": "", "vendor": null, "firmware_version": null, "discovered": null, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }
Error
HTTP Status Code : 400
Content : If the interface has no AUTO
or STATIC
links.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/?op=unlink_subnet
Unlink an interface with the given system_id and interface id from a subnet.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
id (Int): Optional. ID of the subnet link on the interface to remove.
Success
HTTP Status Code : 200
JSON
{ "type": "physical", "product": null, "name": "eth1", "system_id": "thr3am", "links": [ { "id": 71, "mode": "link_up" } ], "children": [ "br1" ], "id": 140, "mac_address": "00:01:02:03:04:77", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "fabric_id": 0, "space": "management", "name": "untagged", "secondary_rack": "76y7pg", "id": 5001, "fabric": "fabric-0", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "parents": [], "enabled": true, "params": {}, "discovered": null, "firmware_version": null, "effective_mtu": 1500, "tags": [], "vendor": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/140/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/nodes/{system_id}/interfaces/{id}/
Update an interface with the given system_id and interface id.
Note: machines must have a status of Ready or Broken to have access to all options. Machines with Deployed status can only have the name and/or mac_address updated for an interface. This is intented to allow a bad interface to be replaced while the machine remains deployed.
Parameters
{system_id} (String): Required. A system_id.
{id} (Int): Required. An interface id.
name (String): Optional. (Physical interfaces) Name of the interface.
mac_address (String): Optional. (Physical interfaces) MAC address of the interface.
tags (String): Optional. (Physical interfaces) Tags for the interface.
vlan (Int): Optional. (Physical interfaces) Untagged VLAN id the interface is connected to. If not set then the interface is considered disconnected.
name (String): Optional. (Bond interfaces) Name of the interface.
mac_address (String): Optional. (Bond interfaces) MAC address of the interface.
tags (String): Optional. (Bond interfaces) Tags for the interface.
vlan (Int): Optional. (Bond interfaces) Untagged VLAN id the interface is connected to. If not set then the interface is considered disconnected.
parents (Int): Optional. (Bond interfaces) Parent interface ids that make this bond.
tags (String): Optional. (VLAN interfaces) Tags for the interface.
vlan (Int): Optional. (VLAN interfaces) Tagged VLAN id the interface is connected to.
parent (Int): Optional. (VLAN interfaces) Parent interface ids for the VLAN interface.
name (String): Optional. (Bridge interfaces) Name of the interface.
mac_address (String): Optional. (Bridge interfaces) MAC address of the interface.
tags (String): Optional. (Bridge interfaces) Tags for the interface.
vlan (Int): Optional. (Bridge interfaces) VLAN id the interface is connected to.
parent (Int): Optional. (Bridge interfaces) Parent interface ids for this bridge interface.
bridge_stp (Boolean): Optional. (Bridge interfaces) Turn spanning tree protocol on or off. (Default: False).
bridge_fd (Int): Optional. (Bridge interfaces) Set bridge forward delay to time seconds. (Default: 15).
bond_miimon (Int): Optional. (Bonds) The link monitoring freqeuncy in milliseconds. (Default: 100).
bond_downdelay (Int): Optional. (Bonds) Specifies the time, in milliseconds, to wait before disabling a slave after a link failure has been detected.
bond_updelay (Int): Optional. (Bonds) Specifies the time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.
bond_lacp_rate (String): Optional. (Bonds) Option specifying the
rate in which we'll ask our link partner to transmit LACPDU packets in
802.3ad mode. Available options are fast
or slow
. (Default: slow
).
bond_xmit_hash_policy (String): Optional. (Bonds) The transmit
hash policy to use for slave selection in balance-xor, 802.3ad, and tlb
modes. Possible values are: layer2
, layer2+3
, layer3+4
,
encap2+3
, encap3+4
.
bond_mode (String): Optional. (Bonds) The operating mode of the
bond. (Default: active-backup
).
Supported bonding modes (bond-mode):
balance-rr
: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.active-backup
: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch.balance-xor
: Transmit based on the selected transmit hash policy. The default policy is a simple [(source MAC address XOR'd with destination MAC address XOR packet type ID) modulo slave count].broadcast
: Transmits everything on all slave interfaces. This mode provides fault tolerance.802.3ad
: IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.balance-tlb
: Adaptive transmit load balancing: channel bonding that does not require any special switch support.balance-alb
: Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation.
mtu (String): Optional. Maximum transmission unit.
accept_ra (String): Optional. Accept router advertisements. (IPv6 only)
autoconf (String): Optional. Perform stateless autoconfiguration. (IPv6 only)
Success
HTTP Status Code : 200
JSON
{ "mac_address": "00:01:02:03:04:55", "type": "physical", "enabled": true, "parents": [], "vendor": null, "vlan": null, "tags": [], "links": [], "params": {}, "discovered": null, "effective_mtu": 1500, "id": 138, "product": null, "name": "eth0", "firmware_version": null, "system_id": "thr3am", "children": [ "newbond" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/138/" }
Error
HTTP Status Code : 404
Content
Not Found
Interfaces
Manage interfaces on a node.
GET /MAAS/api/2.0/nodes/{system_id}/interfaces/
List all interfaces belonging to a machine, device, or rack controller.
Parameters
{system_id} (String): Required. A system_id.
Success
HTTP Status Code : 200
JSON
[ { "name": "eth-lKRYAa", "parents": [], "product": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "fabric": "fabric-1", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "type": "physical", "enabled": true, "params": "", "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "system_id": "thr3am", "firmware_version": null, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "discovered": null, "id": 37, "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "fabric": "fabric-1", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": null, "children": [ "eth-lKRYAa.42" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, { "name": "eth-3ookc5", "parents": [], "product": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "fabric": "fabric-1", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "type": "physical", "enabled": true, "params": "", "mac_address": "bc:d3:d5:28:88:dc", "effective_mtu": 1500, "system_id": "thr3am", "firmware_version": null, "tags": [ "tag-LddZkA", "tag-EDi2sp", "tag-RwynT2" ], "discovered": null, "id": 38, "links": [ { "id": 15, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "fabric": "fabric-1", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": null, "children": [ "eth-3ookc5.42" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/38/" }, { "name": "eth-W8E8f0", "parents": [], "product": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "fabric": "fabric-1", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "type": "physical", "enabled": true, "params": "", "mac_address": "ad:5a:3e:a3:68:13", "effective_mtu": 1500, "system_id": "thr3am", "firmware_version": null, "tags": [ "tag-dc12B9", "tag-D71Hh0", "tag-PnEfvN" ], "discovered": null, "id": 39, "links": [ { "id": 16, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "space": "management", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "fabric": "fabric-1", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": null, "children": [ "eth-W8E8f0.42" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/39/" }, { "name": "eth-lKRYAa.42", "parents": [ "eth-lKRYAa" ], "product": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "space": "ipv6-testbed", "secondary_rack": null, "primary_rack": null, "fabric": "fabric-1", "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "type": "vlan", "enabled": true, "params": "", "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "system_id": "thr3am", "firmware_version": null, "tags": [ "tag-u0TLLj", "tag-C09Efp", "tag-QK7j09" ], "discovered": null, "id": 40, "links": [ { "id": 17, "mode": "auto", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "space": "ipv6-testbed", "secondary_rack": null, "primary_rack": null, "fabric": "fabric-1", "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "vendor": null, "children": [], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/40/" }, { "name": "eth-3ookc5.42", "parents": [ "eth-3ookc5" ], "product": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "space": "ipv6-testbed", "secondary_rack": null, "primary_rack": null, "fabric": "fabric-1", "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "type": "vlan", "enabled": true, "params": "", "mac_address": "bc:d3:d5:28:88:dc", "effective_mtu": 1500, "system_id": "thr3am", "firmware_version": null, "tags": [ "tag-EFzacM", "tag-dxAebl", "tag-GsPX3m" ], "discovered": null, "id": 41, "links": [ { "id": 18, "mode": "static", "ip_address": "2001:db8:42:0:6556:13fa:7452:70da", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "space": "ipv6-testbed", "secondary_rack": null, "primary_rack": null, "fabric": "fabric-1", "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "vendor": null, "children": [], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/41/" }, { "name": "eth-W8E8f0.42", "parents": [ "eth-W8E8f0" ], "product": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "space": "ipv6-testbed", "secondary_rack": null, "primary_rack": null, "fabric": "fabric-1", "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "type": "vlan", "enabled": true, "params": "", "mac_address": "ad:5a:3e:a3:68:13", "effective_mtu": 1500, "system_id": "thr3am", "firmware_version": null, "tags": [ "tag-cyexYi", "tag-nnoi80", "tag-xhApes" ], "discovered": null, "id": 42, "links": [ { "id": 19, "mode": "static", "ip_address": "2001:db8:42:0:cf29:e368:ba5b:9977", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "space": "ipv6-testbed", "secondary_rack": null, "primary_rack": null, "fabric": "fabric-1", "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "vendor": null, "children": [], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/42/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/?op=create_bond
Create a bond interface on a machine.
Parameters
{system_id} (String): Required. A system_id.
name (String): Required. Name of the interface.
mac_address (String): Optional. MAC address of the interface.
tags (String): Optional. Tags for the interface.
vlan (String): Optional. VLAN the interface is connected to. If not provided then the interface is considered disconnected.
parents (Int): Required. Parent interface ids that make this bond.
bond_mode (String): Optional. The operating mode of the bond. (Default: active-backup).
Supported bonding modes:
balance-rr
: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.active-backup
: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch.balance-xor
: Transmit based on the selected transmit hash policy. The default policy is a simple [(source MAC address XOR'd with destination MAC address XOR packet type ID) modulo slave count].broadcast
: Transmits everything on all slave interfaces. This mode provides fault tolerance.802.3ad
: IEEE 802.3ad dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Uses all slaves in the active aggregator according to the 802.3ad specification.balance-tlb
: Adaptive transmit load balancing: channel bonding that does not require any special switch support.balance-alb
: Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation.
bond_miimon (Int): Optional. The link monitoring freqeuncy in milliseconds. (Default: 100).
bond_downdelay (Int): Optional. Specifies the time, in milliseconds, to wait before disabling a slave after a link failure has been detected.
bond_updelay (Int): Optional. Specifies the time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.
bond_lacp_rate (String): Optional. Option specifying the rate at
which to ask the link partner to transmit LACPDU packets in 802.3ad
mode. Available options are fast
or slow
. (Default: slow
).
bond_xmit_hash_policy (String): Optional. The transmit hash
policy to use for slave selection in balance-xor, 802.3ad, and tlb
modes. Possible values are: layer2
, layer2+3
, layer3+4
,
encap2+3
, encap3+4
. (Default: layer2
)
bond_num_grat_arp (Int): Optional. The number of peer notifications (IPv4 ARP or IPv6 Neighbour Advertisements) to be issued after a failover. (Default: 1)
mtu (Int): Optional. Maximum transmission unit.
accept_ra (Boolean): Optional. Accept router advertisements. (IPv6 only)
autoconf (Boolean): Optional. Perform stateless autoconfiguration. (IPv6 only)
Success
HTTP Status Code : 200
JSON
{ "system_id": "thr3am", "mac_address": "00:01:02:03:04:66", "children": [], "name": "newbond", "effective_mtu": 1500, "firmware_version": null, "params": { "bond_downdelay": 0, "bond_lacp_rate": "fast", "bond_miimon": 100, "bond_mode": "balance-rr", "bond_num_grat_arp": 1, "bond_updelay": 0, "bond_xmit_hash_policy": "layer2" }, "links": [], "id": 139, "tags": [], "product": null, "enabled": true, "discovered": null, "vendor": null, "type": "bond", "vlan": null, "parents": [ "eth0" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/139/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/?op=create_bridge
Create a bridge interface on a machine.
Parameters
{system_id} (String): Required. A system_id.
name (String): Optional. Name of the interface.
mac_address (String): Optional. MAC address of the interface.
tags (String): Optional. Tags for the interface.
vlan (String): Optional. VLAN the interface is connected to.
parent (Int): Optional. Parent interface id for this bridge interface.
bridge_stp (Boolean): Optional. Turn spanning tree protocol on or off. (Default: False).
bridge_fd (Int): Optional. Set bridge forward delay to time seconds. (Default: 15).
mtu (Int): Optional. Maximum transmission unit.
accept_ra (Boolean): Optional. Accept router advertisements. (IPv6 only)
autoconf (Boolean): Optional. Perform stateless autoconfiguration. (IPv6 only)
Success
HTTP Status Code : 200
JSON
{ "name": "br1", "id": 141, "enabled": true, "parents": [ "eth1" ], "vlan": null, "effective_mtu": 1500, "product": null, "system_id": "thr3am", "firmware_version": null, "children": [], "mac_address": "00:11:22:33:44:55", "params": { "bridge_fd": 15, "bridge_stp": false }, "discovered": null, "links": [], "vendor": null, "tags": [], "type": "bridge", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/141/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/?op=create_physical
Create a physical interface on a machine and device.
Parameters
{system_id} (String): Required. A system_id.
name (String): Optional. Name of the interface.
mac_address (String): Required. MAC address of the interface.
tags (String): Optional. Tags for the interface.
vlan (String): Optional. Untagged VLAN the interface is connected to. If not provided then the interface is considered disconnected.
mtu (Int): Optional. Maximum transmission unit.
accept_ra (Boolean): Optional. Accept router advertisements. (IPv6 only)
autoconf (Boolean): Optional. Perform stateless autoconfiguration. (IPv6 only)
Success
HTTP Status Code : 200
JSON
{ "product": null, "id": 138, "system_id": "thr3am", "enabled": true, "vlan": null, "type": "physical", "mac_address": "00:01:02:03:04:55", "vendor": null, "params": {}, "discovered": null, "children": [], "effective_mtu": 1500, "parents": [], "firmware_version": null, "links": [], "tags": [], "name": "eth0", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/138/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/interfaces/?op=create_vlan
Create a VLAN interface on a machine.
Parameters
{system_id} (String): Required. A system_id.
tags (String): Optional. Tags for the interface.
vlan (String): Required. Tagged VLAN the interface is connected to.
parent (Int): Required. Parent interface id for this VLAN interface.
mtu (Int): Optional. Maximum transmission unit.
accept_ra (Boolean): Optional. Accept router advertisements. (IPv6 only)
autoconf (Boolean): Optional. Perform stateless autoconfiguration. (IPv6 only)
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
License Key
Manage a license key.
DELETE /MAAS/api/2.0/license-key/{osystem}/{distro_series}
Delete license key for the given operation system and distro series.
Parameters
{osystem} (String): Optional. Operating system that the key belongs to.
{distro_series} (String): Optional. OS release that the key belongs to.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Unknown API endpoint: /MAAS/api/2.0/license-key/windows/win2012/.
GET /MAAS/api/2.0/license-key/{osystem}/{distro_series}
Read a license key for the given operating sytem and distro series.
Parameters
{osystem} (String): Required. Operating system that the key belongs to.
{distro_series} (String): Required. OS release that the key belongs to.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Unknown API endpoint: /MAAS/api/2.0/license-key/windows/win2012/.
PUT /MAAS/api/2.0/license-key/{osystem}/{distro_series}
Update a license key for the given operating system and distro series.
Parameters
{osystem} (String): Required. Operating system that the key belongs to.
{distro_series} (String): Required. OS release that the key belongs to.
license_key (String): Optional. License key for osystem/distro_series combo.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Unknown API endpoint: /MAAS/api/2.0/license-key/windows/win2012/.
License Keys
Manage the license keys.
GET /MAAS/api/2.0/license-keys/
List all available license keys.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
POST /MAAS/api/2.0/license-keys/
Define a license key.
Parameters
osystem (String): Required. Operating system that the key belongs to.
distro_series (String): Required. OS release that the key belongs to.
license_key (String): Required. License key for osystem/distro_series combo.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
MAAS server
Manage the MAAS server.
GET /MAAS/api/2.0/maas/?op=get_config
Get a configuration value.
Parameters
name (String): Required. The name of the configuration item to be retrieved.
Available configuration items:
- active_discovery_interval
-
Active subnet mapping interval. When enabled, each rack will scan subnets enabled for active mapping. This helps ensure discovery information is accurate and complete.
- boot_images_auto_import
-
Automatically import/refresh the boot images every 60 minutes.
- boot_images_no_proxy
-
Set no_proxy with the image repository address when MAAS is behind (or set with) a proxy.. By default, when MAAS is behind (and set with) a proxy, it is used to download images from the image repository. In some situations (e.g. when using a local image repository) it doesn't make sense for MAAS to use the proxy to download images because it can access them directly. Setting this option allows MAAS to access the (local) image repository directly by setting the no_proxy variable for the MAAS env with the address of the image repository.
- commissioning_distro_series
-
Default Ubuntu release used for commissioning.
- completed_intro
-
Marks if the initial intro has been completed.
- curtin_verbose
-
Run the fast-path installer with higher verbosity. This provides more detail in the installation logs.
- default_distro_series
-
Default OS release used for deployment.
- default_dns_ttl
-
Default Time-To-Live for the DNS. If no TTL value is specified at a more specific point this is how long DNS responses are valid, in seconds.
- default_min_hwe_kernel
-
Default Minimum Kernel Version. The default minimum kernel version used on all new and commissioned nodes.
- default_osystem
-
Default operating system used for deployment.
- default_storage_layout
-
Default storage layout. Storage layout that is applied to a node when it is commissioned. Available choices are: 'bcache' (Bcache layout), 'flat' (Flat layout), 'lvm' (LVM layout).
- disk_erase_with_quick_erase
-
Use quick erase by default when erasing disks.. This is not a secure erase; it wipes only the beginning and end of each disk.
- disk_erase_with_secure_erase
-
Use secure erase by default when erasing disks. Will only be used on devices that support secure erase. Other devices will fall back to full wipe or quick erase depending on the selected options.
- dns_trusted_acl
-
List of external networks (not previously known), that will be allowed to use MAAS for DNS resolution.. MAAS keeps a list of networks that are allowed to use MAAS for DNS resolution. This option allows to add extra networks (not previously known) to the trusted ACL where this list of networks is kept. It also supports specifying IPs or ACL names.
- dnssec_validation
-
Enable DNSSEC validation of upstream zones. Only used when MAAS is running its own DNS server. This value is used as the value of 'dnssec_validation' in the DNS server config.
- enable_analytics
-
Enable Google Analytics in MAAS UI to shape improvements in user experience.
- enable_disk_erasing_on_release
-
Erase nodes' disks prior to releasing. Forces users to always erase disks when releasing.
- enable_http_proxy
-
Enable the use of an APT or YUM and HTTP/HTTPS proxy. Provision nodes to use the built-in HTTP proxy (or user specified proxy) for APT or YUM. MAAS also uses the proxy for downloading boot images.
- enable_third_party_drivers
-
Enable the installation of proprietary drivers (i.e. HPVSA).
- enlist_commissioning
-
Whether to run commissioning during enlistment.. Enables running all built-in commissioning scripts during enlistment.
- http_proxy
-
Proxy for APT or YUM and HTTP/HTTPS. This will be passed onto provisioned nodes to use as a proxy for APT or YUM traffic. MAAS also uses the proxy for downloading boot images. If no URL is provided, the built-in MAAS proxy will be used.
- kernel_opts
-
Boot parameters to pass to the kernel by default.
- maas_internal_domain
-
Domain name used by MAAS for internal mapping of MAAS provided services.. This domain should not collide with an upstream domain provided by the set upstream DNS.
- maas_name
-
MAAS name.
- maas_proxy_port
-
Port to bind the MAAS built-in proxy (default: 8000). Defines the port used to bind the built-in proxy. The default port is 8000.
- maas_syslog_port
-
Port to bind the MAAS built-in syslog (default: 5247). Defines the port used to bind the built-in syslog. The default port is 5247.
- max_node_commissioning_results
-
The maximum number of commissioning results runs which are stored.
- max_node_installation_results
-
The maximum number of installation result runs which are stored.
- max_node_testing_results
-
The maximum number of testing results runs which are stored.
- network_discovery
-
. When enabled, MAAS will use passive techniques (such as listening to ARP requests and mDNS advertisements) to observe networks attached to rack controllers. Active subnet mapping will also be available to be enabled on the configured subnets.
- node_timeout
-
Time, in minutes, until the node times out during commissioning, testing, deploying, or entering rescue mode.. Commissioning, testing, deploying, and entering rescue mode all set a timeout when beginning. If MAAS does not hear from the node within the specified number of minutes the node is powered off and set into a failed status.
- ntp_external_only
-
Use external NTP servers only. Configure all region controller hosts, rack controller hosts, and subsequently deployed machines to refer directly to the configured external NTP servers. Otherwise only region controller hosts will be configured to use those external NTP servers, rack contoller hosts will in turn refer to the regions' NTP servers, and deployed machines will refer to the racks' NTP servers.
- ntp_servers
-
Addresses of NTP servers. NTP servers, specified as IP addresses or hostnames delimited by commas and/or spaces, to be used as time references for MAAS itself, the machines MAAS deploys, and devices that make use of MAAS's DHCP services.
- prefer_v4_proxy
-
Sets IPv4 DNS resolution before IPv6. If prefer_v4_proxy is set, the proxy will be set to prefer IPv4 DNS resolution before it attempts to perform IPv6 DNS resolution.
- prometheus_enabled
-
Enable sending stats to a prometheus gateway.. Allows MAAS to send statistics to Prometheus. This requires the 'prometheus_push_gateway' to be set.
- prometheus_push_gateway
-
Address or hostname of the Prometheus push gateway.. Defines the address or hostname of the Prometheus push gateway where MAAS will send data to.
- prometheus_push_interval
-
Interval of how often to send data to Prometheus (default: to 60 minutes).. The internal of how often MAAS will send stats to Prometheus in minutes.
- remote_syslog
-
Remote syslog server to forward machine logs. A remote syslog server that MAAS will set on enlisting, commissioning, testing, and deploying machines to send all log messages. Clearing this value will restore the default behaviour of forwarding syslog to MAAS.
- subnet_ip_exhaustion_threshold_count
-
If the number of free IP addresses on a subnet becomes less than or equal to this threshold, an IP exhaustion warning will appear for that subnet.
- upstream_dns
-
Upstream DNS used to resolve domains not managed by this MAAS (space-separated IP addresses). Only used when MAAS is running its own DNS server. This value is used as the value of 'forwarders' in the DNS server config.
- use_peer_proxy
-
Use the built-in proxy with an external proxy as a peer. If enable_http_proxy is set, the built-in proxy will be configured to use http_proxy as a peer proxy. The deployed machines will be configured to use the built-in proxy.
- use_rack_proxy
-
Use DNS and HTTP metadata proxy on the rack controllers when a machine is booted.. All DNS and HTTP metadata traffic will flow through the rack controller that a machine is booting from. This isolated region controllers from machines.
- windows_kms_host
-
Windows KMS activation host. FQDN or IP address of the host that provides the KMS Windows activation service. (Only needed for Windows deployments using KMS activation.)
Success
HTTP Status Code : 200
Content
"bionic"
POST /MAAS/api/2.0/maas/?op=set_config
Set a configuration value.
Parameters
value (String): Optional. The value of the configuration item to be set.
name (String): Required. The name of the configuration item to be set.
Available configuration items:
- active_discovery_interval
-
Active subnet mapping interval. When enabled, each rack will scan subnets enabled for active mapping. This helps ensure discovery information is accurate and complete.
- boot_images_auto_import
-
Automatically import/refresh the boot images every 60 minutes.
- boot_images_no_proxy
-
Set no_proxy with the image repository address when MAAS is behind (or set with) a proxy.. By default, when MAAS is behind (and set with) a proxy, it is used to download images from the image repository. In some situations (e.g. when using a local image repository) it doesn't make sense for MAAS to use the proxy to download images because it can access them directly. Setting this option allows MAAS to access the (local) image repository directly by setting the no_proxy variable for the MAAS env with the address of the image repository.
- commissioning_distro_series
-
Default Ubuntu release used for commissioning.
- completed_intro
-
Marks if the initial intro has been completed.
- curtin_verbose
-
Run the fast-path installer with higher verbosity. This provides more detail in the installation logs.
- default_distro_series
-
Default OS release used for deployment.
- default_dns_ttl
-
Default Time-To-Live for the DNS. If no TTL value is specified at a more specific point this is how long DNS responses are valid, in seconds.
- default_min_hwe_kernel
-
Default Minimum Kernel Version. The default minimum kernel version used on all new and commissioned nodes.
- default_osystem
-
Default operating system used for deployment.
- default_storage_layout
-
Default storage layout. Storage layout that is applied to a node when it is commissioned. Available choices are: 'bcache' (Bcache layout), 'flat' (Flat layout), 'lvm' (LVM layout).
- disk_erase_with_quick_erase
-
Use quick erase by default when erasing disks.. This is not a secure erase; it wipes only the beginning and end of each disk.
- disk_erase_with_secure_erase
-
Use secure erase by default when erasing disks. Will only be used on devices that support secure erase. Other devices will fall back to full wipe or quick erase depending on the selected options.
- dns_trusted_acl
-
List of external networks (not previously known), that will be allowed to use MAAS for DNS resolution.. MAAS keeps a list of networks that are allowed to use MAAS for DNS resolution. This option allows to add extra networks (not previously known) to the trusted ACL where this list of networks is kept. It also supports specifying IPs or ACL names.
- dnssec_validation
-
Enable DNSSEC validation of upstream zones. Only used when MAAS is running its own DNS server. This value is used as the value of 'dnssec_validation' in the DNS server config.
- enable_analytics
-
Enable Google Analytics in MAAS UI to shape improvements in user experience.
- enable_disk_erasing_on_release
-
Erase nodes' disks prior to releasing. Forces users to always erase disks when releasing.
- enable_http_proxy
-
Enable the use of an APT or YUM and HTTP/HTTPS proxy. Provision nodes to use the built-in HTTP proxy (or user specified proxy) for APT or YUM. MAAS also uses the proxy for downloading boot images.
- enable_third_party_drivers
-
Enable the installation of proprietary drivers (i.e. HPVSA).
- enlist_commissioning
-
Whether to run commissioning during enlistment.. Enables running all built-in commissioning scripts during enlistment.
- http_proxy
-
Proxy for APT or YUM and HTTP/HTTPS. This will be passed onto provisioned nodes to use as a proxy for APT or YUM traffic. MAAS also uses the proxy for downloading boot images. If no URL is provided, the built-in MAAS proxy will be used.
- kernel_opts
-
Boot parameters to pass to the kernel by default.
- maas_internal_domain
-
Domain name used by MAAS for internal mapping of MAAS provided services.. This domain should not collide with an upstream domain provided by the set upstream DNS.
- maas_name
-
MAAS name.
- maas_proxy_port
-
Port to bind the MAAS built-in proxy (default: 8000). Defines the port used to bind the built-in proxy. The default port is 8000.
- maas_syslog_port
-
Port to bind the MAAS built-in syslog (default: 5247). Defines the port used to bind the built-in syslog. The default port is 5247.
- max_node_commissioning_results
-
The maximum number of commissioning results runs which are stored.
- max_node_installation_results
-
The maximum number of installation result runs which are stored.
- max_node_testing_results
-
The maximum number of testing results runs which are stored.
- network_discovery
-
. When enabled, MAAS will use passive techniques (such as listening to ARP requests and mDNS advertisements) to observe networks attached to rack controllers. Active subnet mapping will also be available to be enabled on the configured subnets.
- node_timeout
-
Time, in minutes, until the node times out during commissioning, testing, deploying, or entering rescue mode.. Commissioning, testing, deploying, and entering rescue mode all set a timeout when beginning. If MAAS does not hear from the node within the specified number of minutes the node is powered off and set into a failed status.
- ntp_external_only
-
Use external NTP servers only. Configure all region controller hosts, rack controller hosts, and subsequently deployed machines to refer directly to the configured external NTP servers. Otherwise only region controller hosts will be configured to use those external NTP servers, rack contoller hosts will in turn refer to the regions' NTP servers, and deployed machines will refer to the racks' NTP servers.
- ntp_servers
-
Addresses of NTP servers. NTP servers, specified as IP addresses or hostnames delimited by commas and/or spaces, to be used as time references for MAAS itself, the machines MAAS deploys, and devices that make use of MAAS's DHCP services.
- prefer_v4_proxy
-
Sets IPv4 DNS resolution before IPv6. If prefer_v4_proxy is set, the proxy will be set to prefer IPv4 DNS resolution before it attempts to perform IPv6 DNS resolution.
- prometheus_enabled
-
Enable sending stats to a prometheus gateway.. Allows MAAS to send statistics to Prometheus. This requires the 'prometheus_push_gateway' to be set.
- prometheus_push_gateway
-
Address or hostname of the Prometheus push gateway.. Defines the address or hostname of the Prometheus push gateway where MAAS will send data to.
- prometheus_push_interval
-
Interval of how often to send data to Prometheus (default: to 60 minutes).. The internal of how often MAAS will send stats to Prometheus in minutes.
- remote_syslog
-
Remote syslog server to forward machine logs. A remote syslog server that MAAS will set on enlisting, commissioning, testing, and deploying machines to send all log messages. Clearing this value will restore the default behaviour of forwarding syslog to MAAS.
- subnet_ip_exhaustion_threshold_count
-
If the number of free IP addresses on a subnet becomes less than or equal to this threshold, an IP exhaustion warning will appear for that subnet.
- upstream_dns
-
Upstream DNS used to resolve domains not managed by this MAAS (space-separated IP addresses). Only used when MAAS is running its own DNS server. This value is used as the value of 'forwarders' in the DNS server config.
- use_peer_proxy
-
Use the built-in proxy with an external proxy as a peer. If enable_http_proxy is set, the built-in proxy will be configured to use http_proxy as a peer proxy. The deployed machines will be configured to use the built-in proxy.
- use_rack_proxy
-
Use DNS and HTTP metadata proxy on the rack controllers when a machine is booted.. All DNS and HTTP metadata traffic will flow through the rack controller that a machine is booting from. This isolated region controllers from machines.
- windows_kms_host
-
Windows KMS activation host. FQDN or IP address of the host that provides the KMS Windows activation service. (Only needed for Windows deployments using KMS activation.)
Success
HTTP Status Code : 200
Content
OK
Machine
Manage an individual machine.
A machine is identified by its system_id.
DELETE /MAAS/api/2.0/machines/{system_id}/
Deletes a machine with the given system_id.
Note: A machine cannot be deleted if it hosts pod virtual machines. Use
force
to override this behavior. Forcing deletion will also remove
hosted pods. E.g. /machines/abc123/?force=1
.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 400
Content : The machine cannot be deleted.
HTTP Status Code : 403
Content : The user does not have permission to delete this machine.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/machines/{system_id}/
Reads a node with the given system_id.
Parameters
{system_id} (String): Required. A node's system_id.
Success
HTTP Status Code : 200
JSON
{ "boot_interface": { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, "memory": 8192, "tag_names": [], "current_installation_result_id": null, "fqdn": "causal-quagga.maas", "disable_ipv4": false, "distro_series": "", "ip_addresses": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "node_type": 0, "min_hwe_kernel": null, "commissioning_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, "system_id": "g8xyqs", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "blockdevice_set": [ { "id_path": null, "size": 2250362368, "block_size": 512, "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "id_path": null, "size": 1443074048, "block_size": 4096, "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "current_commissioning_result_id": 198, "cpu_test_status": 2, "address_ttl": null, "cache_sets": [], "storage": 3693.436416, "node_type_name": "Machine", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "cpu_count": 7, "storage_test_status_name": "Passed", "owner": "user2", "status": 20, "volume_groups": [], "hwe_kernel": null, "netboot": true, "current_testing_result_id": 199, "commissioning_status": 2, "testing_status_name": "Passed", "architecture": "i386/generic", "locked": false, "power_state": "error", "memory_test_status_name": "Passed", "power_type": "virsh", "interface_set": [ { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, { "system_id": "g8xyqs", "name": "eth-ex07mq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 113, "params": "", "type": "physical", "firmware_version": null, "mac_address": "8f:75:69:58:26:47", "parents": [], "tags": [ "tag-ymen6c", "tag-oKQ7iK", "tag-yQLBgJ" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/113/" }, { "system_id": "g8xyqs", "name": "eth-CE1j2X", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 114, "params": "", "type": "physical", "firmware_version": null, "mac_address": "b0:5e:ed:8d:d8:36", "parents": [], "tags": [ "tag-LJPUwT", "tag-U5zGn3", "tag-dHGEeD" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/114/" }, { "system_id": "g8xyqs", "name": "bond-VpkNvO", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [], "discovered": null, "id": 115, "params": "", "type": "bond", "firmware_version": null, "mac_address": "0a:87:3f:94:0e:68", "parents": [ "eth-CE1j2X", "eth-ex07mq", "eth-jJ5ZwN" ], "tags": [ "tag-HwhC7n", "tag-WHGBJc", "tag-yY8Ap5" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/115/" } ], "owner_data": {}, "bcaches": [], "hostname": "causal-quagga", "raids": [], "other_test_status": 2, "status_action": "action-BqENyW", "special_filesystems": [], "physicalblockdevice_set": [ { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "firmware_version": "firmware_version-UW8ucD", "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "id_path": null, "block_size": 4096, "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "size": 1443074048, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "iscsiblockdevice_set": [], "testing_status": 2, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "storage_test_status": 2, "pod": { "id": 5, "name": "sacred-hen", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "swap_size": null, "status_message": "desc-eqGqfo", "status_name": "Failed to exit rescue mode", "osystem": "", "cpu_test_status_name": "Passed", "memory_test_status": 2, "other_test_status_name": "Passed", "virtualblockdevice_set": [], "cpu_speed": 0, "resource_uri": "/MAAS/api/2.0/machines/g8xyqs/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/machines/{system_id}/?op=details
Returns system details -- for example, LLDP and lshw
XML dumps.
Returns a {detail_type: xml, ...}
map, where detail_type
is
something like "lldp" or "lshw".
Note that this is returned as BSON and not JSON. This is for efficiency,
but mainly because JSON can't do binary content without applying
additional encoding like base-64. The example output below is
represented in ASCII using bsondump example.bson
and is for
demonstrative purposes.
Parameters
{system_id} (String): Required. The node's system_id.
Success
HTTP Status Code : 200
Content
{ "lldp": { "$binary": "cjBZSWw2S1ZkRA==", "$type": "00" }, "lshw": { "$binary": "Nkd5MzRLYjBkTQ==", "$type": "00" } }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/machines/{system_id}/?op=get_curtin_config
Return the rendered curtin configuration for the machine.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 403
Content : The user does not have permission to see curtin configuration on this machine.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/machines/{system_id}/?op=power_parameters
Gets power parameters for a given system_id, if any. For some types of power control this will include private information such as passwords and secret keys.
Note that this method is reserved for admin users and returns a 403 if the user is not one.
Success
HTTP Status Code : 200
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/machines/{system_id}/?op=query_power_state
Gets the power state of a given node. MAAS sends a request to the node's power controller, which asks it about the node's state. The reply to this could be delayed by up to 30 seconds while waiting for the power controller to respond. Use this method sparingly as it ties up an appserver thread while waiting.
Parameters
system_id (String): Required. The node to query.
Success
HTTP Status Code : 200
JSON
{ "state": "on" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=abort
Abort a node's current operation.
Parameters
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to abort the current operation.
POST /MAAS/api/2.0/machines/{system_id}/?op=clear_default_gateways
Clear any set default gateways on a machine with the given system_id.
This will clear both IPv4 and IPv6 gateways on the machine. This will transition the logic of identifing the best gateway to MAAS. This logic is determined based the following criteria:
- Managed subnets over unmanaged subnets.
- Bond interfaces over physical interfaces.
- Machine's boot interface over all other interfaces except bonds.
- Physical interfaces over VLAN interfaces.
- Sticky IP links over user reserved IP links.
- User reserved IP links over auto IP links.
If the default gateways need to be specific for this machine you can set which interface and subnet's gateway to use when this machine is deployed with the interfaces set-default-gateway API.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "raids": [], "other_test_status": 2, "memory_test_status_name": "Passed", "boot_interface": { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "children": [ "eth-lKRYAa.42" ], "vendor": null, "firmware_version": null, "discovered": null, "parents": [], "enabled": true, "product": null, "name": "eth-lKRYAa", "params": "", "id": 37, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "system_id": "thr3am", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, "locked": false, "owner": null, "memory": 8192, "osystem": "", "special_filesystems": [], "architecture": "i386/generic", "power_type": "virsh", "current_installation_result_id": null, "storage_test_status": 2, "tag_names": [], "node_type": 0, "default_gateways": { "ipv4": { "gateway_ip": "172.16.2.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status": 2, "other_test_status_name": "Passed", "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "type": "physical", "uuid": null, "partition_table_type": "MBR", "available_size": 0, "used_size": 3528458240, "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "type": "partition", "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "id": 1, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "path": "/dev/disk/by-dname/name-xE9mtJ", "storage_pool": "pool_id-QkOjON", "used_for": "MBR partitioned with 1 partition", "name": "name-xE9mtJ", "model": "model-mSnL9L", "serial": "serial-jBitFU", "filesystem": null, "id": 18, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "type": "physical", "uuid": null, "partition_table_type": null, "available_size": 3498806272, "used_size": 0, "partitions": [], "path": "/dev/disk/by-dname/name-EjgNwC", "storage_pool": "pool_id-QkOjON", "used_for": "Unused", "name": "name-EjgNwC", "model": "model-OHzOYI", "serial": "serial-5EZFik", "filesystem": null, "id": 19, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "type": "physical", "uuid": null, "partition_table_type": null, "available_size": 2173730816, "used_size": 0, "partitions": [], "path": "/dev/disk/by-dname/name-VhlrVi", "storage_pool": "pool_id-QkOjON", "used_for": "Unused", "name": "name-VhlrVi", "model": "model-5btVsu", "serial": "serial-SE3O1p", "filesystem": null, "id": 20, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "cpu_test_status_name": "Passed", "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "commissioning_status_name": "Passed", "volume_groups": [], "cpu_test_status": 2, "status": 4, "iscsiblockdevice_set": [], "cpu_speed": 0, "current_commissioning_result_id": 21, "status_message": "desc-SRem4v", "min_hwe_kernel": null, "hwe_kernel": null, "fqdn": "above-robin.sample", "interface_set": [ { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "children": [ "eth-lKRYAa.42" ], "vendor": null, "firmware_version": null, "discovered": null, "parents": [], "enabled": true, "product": null, "name": "eth-lKRYAa", "params": "", "id": 37, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "system_id": "thr3am", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "children": [ "eth-3ookc5.42" ], "vendor": null, "firmware_version": null, "discovered": null, "parents": [], "enabled": true, "product": null, "name": "eth-3ookc5", "params": "", "id": 38, "tags": [ "tag-LddZkA", "tag-EDi2sp", "tag-RwynT2" ], "system_id": "thr3am", "links": [ { "id": 15, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "bc:d3:d5:28:88:dc", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/38/" }, { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "children": [ "eth-W8E8f0.42" ], "vendor": null, "firmware_version": null, "discovered": null, "parents": [], "enabled": true, "product": null, "name": "eth-W8E8f0", "params": "", "id": 39, "tags": [ "tag-dc12B9", "tag-D71Hh0", "tag-PnEfvN" ], "system_id": "thr3am", "links": [ { "id": 16, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": "7xtf67", "space": "management", "secondary_rack": "76y7pg", "fabric": "fabric-1", "name": "untagged", "id": 5003, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "ad:5a:3e:a3:68:13", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/39/" }, { "type": "vlan", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": null, "space": "ipv6-testbed", "secondary_rack": null, "fabric": "fabric-1", "name": "42", "id": 5004, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "children": [], "vendor": null, "firmware_version": null, "discovered": null, "parents": [ "eth-lKRYAa" ], "enabled": true, "product": null, "name": "eth-lKRYAa.42", "params": "", "id": 40, "tags": [ "tag-u0TLLj", "tag-C09Efp", "tag-QK7j09" ], "system_id": "thr3am", "links": [ { "id": 17, "mode": "auto", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": null, "space": "ipv6-testbed", "secondary_rack": null, "fabric": "fabric-1", "name": "42", "id": 5004, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/40/" }, { "type": "vlan", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": null, "space": "ipv6-testbed", "secondary_rack": null, "fabric": "fabric-1", "name": "42", "id": 5004, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "children": [], "vendor": null, "firmware_version": null, "discovered": null, "parents": [ "eth-3ookc5" ], "enabled": true, "product": null, "name": "eth-3ookc5.42", "params": "", "id": 41, "tags": [ "tag-EFzacM", "tag-dxAebl", "tag-GsPX3m" ], "system_id": "thr3am", "links": [ { "id": 18, "mode": "static", "ip_address": "2001:db8:42:0:6556:13fa:7452:70da", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": null, "space": "ipv6-testbed", "secondary_rack": null, "fabric": "fabric-1", "name": "42", "id": 5004, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "bc:d3:d5:28:88:dc", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/41/" }, { "type": "vlan", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": null, "space": "ipv6-testbed", "secondary_rack": null, "fabric": "fabric-1", "name": "42", "id": 5004, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "children": [], "vendor": null, "firmware_version": null, "discovered": null, "parents": [ "eth-W8E8f0" ], "enabled": true, "product": null, "name": "eth-W8E8f0.42", "params": "", "id": 42, "tags": [ "tag-cyexYi", "tag-nnoi80", "tag-xhApes" ], "system_id": "thr3am", "links": [ { "id": 19, "mode": "static", "ip_address": "2001:db8:42:0:cf29:e368:ba5b:9977", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "primary_rack": null, "space": "ipv6-testbed", "secondary_rack": null, "fabric": "fabric-1", "name": "42", "id": 5004, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "ad:5a:3e:a3:68:13", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/42/" } ], "virtualblockdevice_set": [], "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "domain": { "authoritative": true, "ttl": null, "is_default": false, "resource_record_count": 0, "name": "sample", "id": 1, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "storage_test_status_name": "Passed", "netboot": true, "node_type_name": "Machine", "bcaches": [], "ip_addresses": [ "2001:db8:42:0:6556:13fa:7452:70da", "2001:db8:42:0:cf29:e368:ba5b:9977" ], "testing_status": 2, "owner_data": {}, "swap_size": null, "current_testing_result_id": 22, "power_state": "on", "testing_status_name": "Passed", "disable_ipv4": false, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "type": "physical", "uuid": null, "partition_table_type": "MBR", "available_size": 0, "used_size": 3528458240, "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "type": "partition", "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "id": 1, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "path": "/dev/disk/by-dname/name-xE9mtJ", "storage_pool": "pool_id-QkOjON", "used_for": "MBR partitioned with 1 partition", "name": "name-xE9mtJ", "model": "model-mSnL9L", "serial": "serial-jBitFU", "filesystem": null, "id": 18, "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "system_id": "thr3am", "block_size": 1024, "size": 3532084224, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "type": "physical", "uuid": null, "partition_table_type": null, "available_size": 3498806272, "used_size": 0, "partitions": [], "path": "/dev/disk/by-dname/name-EjgNwC", "storage_pool": "pool_id-QkOjON", "used_for": "Unused", "name": "name-EjgNwC", "model": "model-OHzOYI", "serial": "serial-5EZFik", "filesystem": null, "id": 19, "id_path": null, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "system_id": "thr3am", "block_size": 1024, "size": 3498806272, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "type": "physical", "uuid": null, "partition_table_type": null, "available_size": 2173730816, "used_size": 0, "partitions": [], "path": "/dev/disk/by-dname/name-VhlrVi", "storage_pool": "pool_id-QkOjON", "used_for": "Unused", "name": "name-VhlrVi", "model": "model-5btVsu", "serial": "serial-SE3O1p", "filesystem": null, "id": 20, "id_path": null, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "system_id": "thr3am", "block_size": 4096, "size": 2173730816, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "memory_test_status": 2, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "type": "physical", "uuid": null, "partition_table_type": "MBR", "available_size": 0, "used_size": 3528458240, "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "type": "partition", "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "id": 1, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "path": "/dev/disk/by-dname/name-xE9mtJ", "storage_pool": "pool_id-QkOjON", "used_for": "MBR partitioned with 1 partition", "name": "name-xE9mtJ", "model": "model-mSnL9L", "serial": "serial-jBitFU", "filesystem": null, "id": 18, "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "system_id": "thr3am", "block_size": 1024, "size": 3532084224, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "cpu_count": 3, "cache_sets": [], "distro_series": "", "status_action": "action-Kboqzg", "storage": 9204.621312000001, "address_ttl": null, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "system_id": "thr3am", "status_name": "Ready", "hostname": "above-robin", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to clear default gateways on this machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=commission
Begin commissioning process for a machine.
A machine in the 'ready', 'declared' or 'failed test' state may initiate a commissioning cycle where it is checked out and tested in preparation for transitioning to the 'ready' state. If it is already in the 'ready' state this is considered a re-commissioning process which is useful if commissioning tests were changed after it previously commissioned.
Parameters
{system_id} (String): Required. The machines's system_id.
enable_ssh (Int): Optional. Whether to enable SSH for the commissioning environment using the user's SSH key(s). '1' == True, '0' == False.
skip_bmc_config (Int): Optional. Whether to skip re-configuration of the BMC for IPMI based machines. '1' == True, '0' == False.
skip_networking (Int): Optional. Whether to skip re-configuring the networking on the machine after the commissioning has completed. '1' == True, '0' == False.
skip_storage (Int): Optional. Whether to skip re-configuring the storage on the machine after the commissioning has completed. '1' == True, '0' == False.
commissioning_scripts (String): Optional. A comma seperated list of commissioning script names and tags to be run. By default all custom commissioning scripts are run. Built-in commissioning scripts always run. Selecting 'update_firmware' or 'configure_hba' will run firmware updates or configure HBA's on matching machines.
testing_scripts (String): Optional. A comma seperated list of testing script names and tags to be run. By default all tests tagged 'commissioning' will be run. Set to 'none' to disable running tests.
Success
HTTP Status Code : 200
JSON
{ "special_filesystems": [], "min_hwe_kernel": "", "fqdn": "clever-turkey.maas", "node_type": 0, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "current_commissioning_result_id": 4, "raids": [], "storage": 8000, "status_action": "", "storage_test_status": 0, "status_message": "From 'New' to 'Commissioning'", "owner": "admin", "owner_data": {}, "hwe_kernel": null, "status_name": "Commissioning", "iscsiblockdevice_set": [], "current_installation_result_id": null, "power_state": "off", "cpu_count": 1, "power_type": "virsh", "netboot": true, "commissioning_status_name": "Pending", "volume_groups": [], "status": 1, "cpu_test_status_name": "Unknown", "system_id": "8bk8nn", "swap_size": null, "memory": 1024, "architecture": "amd64/generic", "address_ttl": null, "testing_status_name": "Pending", "cpu_test_status": -1, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "hostname": "clever-turkey", "locked": false, "testing_status": 0, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 512, "tags": [ "default" ], "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 1, "partition_table_type": null, "available_size": 8000000000, "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "used_for": "Unused", "used_size": 0, "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/blockdevices/1/" } ], "boot_interface": { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 4, "params": "", "firmware_version": null, "mac_address": "52:54:00:e8:4e:f2", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/interfaces/4/" }, "interface_set": [ { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 4, "params": "", "firmware_version": null, "mac_address": "52:54:00:e8:4e:f2", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/interfaces/4/" } ], "storage_test_status_name": "Pending", "other_test_status_name": "Unknown", "tag_names": [ "virtual" ], "commissioning_status": 0, "physicalblockdevice_set": [ { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 1, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/blockdevices/1/" } ], "memory_test_status_name": "Unknown", "other_test_status": -1, "domain": { "authoritative": true, "ttl": null, "name": "maas", "id": 0, "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "virtualblockdevice_set": [], "cache_sets": [], "ip_addresses": [], "pod": { "id": 1, "name": "LXCPod", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "disable_ipv4": false, "bcaches": [], "node_type_name": "Machine", "current_testing_result_id": 5, "cpu_speed": 0, "memory_test_status": -1, "osystem": "", "distro_series": "", "boot_disk": { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 1, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/blockdevices/1/" }, "resource_uri": "/MAAS/api/2.0/machines/8bk8nn/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=deploy
Deploys an operating system to a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
user_data (String): Optional. If present, this blob of base64-encoded user-data to be made available to the machines through the metadata service.
distro_series (String): Optional. If present, this parameter specifies the OS release the machine will use.
hwe_kernel (String): Optional. If present, this parameter specified the kernel to be used on the machine
agent_name (String): Optional. An optional agent name to attach to the acquired machine.
bridge_all (Boolean): Optional. Optionally create a bridge interface for every configured interface on the machine. The created bridges will be removed once the machine is released. (Default: false)
bridge_stp (Boolean): Optional. Optionally turn spanning tree protocol on or off for the bridges created on every configured interface. (Default: false)
bridge_fd (Int): Optional. Optionally adjust the forward delay to time seconds. (Default: 15)
comment (String): Optional. Optional comment for the event log.
install_rackd (Boolean): Optional. If true, the rack controller will be installed on this machine.
install_kvm (Boolean): Optional. If true, KVM will be installed on this machine and added to MAAS.
Success
HTTP Status Code : 200
JSON
{ "current_installation_result_id": null, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "status": 10, "pod": null, "tag_names": [], "interface_set": [ { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "59:19:ad:ff:98:40", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-1OCzPl", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-i1LDjJ", "tag-KdsM1g", "tag-u3TxeO" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 69, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/69/" }, { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "4e:3a:ce:3f:78:73", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-jazQFg", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-FkyL8W", "tag-r9cMlR", "tag-5qrXq4" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 70, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/70/" }, { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "bc:8b:c6:bf:fc:62", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-D6eWMG", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-5uCxk5", "tag-3jzOoX", "tag-Ik6cQK" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 71, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/71/" }, { "type": "bond", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "b3:34:d5:e4:93:a7", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "bond-JJpXQk", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-p1ayax", "tag-AQZCd9", "tag-xOStNZ" ], "children": [], "product": null, "params": "", "links": [], "id": 72, "parents": [ "eth-1OCzPl", "eth-D6eWMG", "eth-jazQFg" ], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/72/" } ], "blockdevice_set": [ { "id_path": null, "size": 1420288000, "block_size": 4096, "tags": [ "tag-A5ettc", "tag-ZGBqxq", "tag-pRNe2w" ], "type": "physical", "available_size": 0, "model": "model-UKuyzV", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "e8cf55ff-67d4-48fe-addd-76537625dd9c", "size": 1413480448, "bootable": false, "tags": [], "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "system_id": "d8n3re", "path": "/dev/disk/by-dname/name-c4XzgA-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "8b30d12c-79b2-4be6-aefd-5bc79597fcdb", "mount_point": "/", "mount_options": null }, "device_id": 37, "id": 4, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/partition/4" } ], "system_id": "d8n3re", "name": "name-c4XzgA", "path": "/dev/disk/by-dname/name-c4XzgA", "serial": "serial-ioxfVu", "used_size": 1418723328, "filesystem": null, "storage_pool": null, "partition_table_type": "MBR", "uuid": null, "id": 37, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/" } ], "special_filesystems": [], "distro_series": "", "volume_groups": [], "domain": { "authoritative": true, "ttl": null, "is_default": false, "name": "ubnt", "resource_record_count": 0, "id": 2, "resource_uri": "/MAAS/api/2.0/domains/2/" }, "disable_ipv4": false, "power_state": "on", "storage_test_status": 3, "hwe_kernel": null, "zone": { "name": "zone-south", "description": "swatTQdIEo", "id": 3, "resource_uri": "/MAAS/api/2.0/zones/zone-south/" }, "boot_disk": { "firmware_version": "firmware_version-6wcxNP", "type": "physical", "available_size": 0, "model": "model-UKuyzV", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "e8cf55ff-67d4-48fe-addd-76537625dd9c", "size": 1413480448, "bootable": false, "tags": [], "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "system_id": "d8n3re", "path": "/dev/disk/by-dname/name-c4XzgA-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "8b30d12c-79b2-4be6-aefd-5bc79597fcdb", "mount_point": "/", "mount_options": null }, "device_id": 37, "id": 4, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/partition/4" } ], "system_id": "d8n3re", "name": "name-c4XzgA", "path": "/dev/disk/by-dname/name-c4XzgA", "id_path": null, "tags": [ "tag-A5ettc", "tag-ZGBqxq", "tag-pRNe2w" ], "serial": "serial-ioxfVu", "used_size": 1418723328, "filesystem": null, "storage_pool": null, "block_size": 4096, "partition_table_type": "MBR", "size": 1420288000, "uuid": null, "id": 37, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/" }, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "commissioning_status": 2, "cpu_test_status": 3, "address_ttl": null, "swap_size": null, "other_test_status": 2, "storage": 1420.288, "ip_addresses": [], "other_test_status_name": "Passed", "status_name": "Allocated", "iscsiblockdevice_set": [], "storage_test_status_name": "Failed", "memory_test_status_name": "Passed", "netboot": true, "memory": 4096, "osystem": "", "system_id": "d8n3re", "cpu_count": 7, "locked": false, "memory_test_status": 2, "raids": [], "current_commissioning_result_id": 93, "current_testing_result_id": 94, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-6wcxNP", "type": "physical", "available_size": 0, "model": "model-UKuyzV", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "e8cf55ff-67d4-48fe-addd-76537625dd9c", "size": 1413480448, "bootable": false, "tags": [], "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "system_id": "d8n3re", "path": "/dev/disk/by-dname/name-c4XzgA-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "8b30d12c-79b2-4be6-aefd-5bc79597fcdb", "mount_point": "/", "mount_options": null }, "device_id": 37, "id": 4, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/partition/4" } ], "system_id": "d8n3re", "name": "name-c4XzgA", "path": "/dev/disk/by-dname/name-c4XzgA", "id_path": null, "tags": [ "tag-A5ettc", "tag-ZGBqxq", "tag-pRNe2w" ], "serial": "serial-ioxfVu", "used_size": 1418723328, "filesystem": null, "storage_pool": null, "block_size": 4096, "partition_table_type": "MBR", "size": 1420288000, "uuid": null, "id": 37, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/" } ], "cache_sets": [], "node_type": 0, "node_type_name": "Machine", "owner": "admin", "fqdn": "newname.ubnt", "bcaches": [], "power_type": "manual", "cpu_speed": 0, "status_action": "action-zj4LdP", "architecture": "amd64/generic", "min_hwe_kernel": "", "virtualblockdevice_set": [], "boot_interface": { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "59:19:ad:ff:98:40", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-1OCzPl", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-i1LDjJ", "tag-KdsM1g", "tag-u3TxeO" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 69, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/69/" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "owner_data": {}, "testing_status": 3, "commissioning_status_name": "Passed", "status_message": "desc-9blXOT", "cpu_test_status_name": "Failed", "hostname": "newname", "testing_status_name": "Failed", "resource_uri": "/MAAS/api/2.0/machines/d8n3re/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user does not have permission to deploy this machine.
HTTP Status Code : 503
Content : MAAS attempted to allocate an IP address, and there were no IP addresses available on the relevant cluster interface.
POST /MAAS/api/2.0/machines/{system_id}/?op=exit_rescue_mode
Exits the rescue mode process on a machine with the given system_id.
A machine in the 'rescue mode' state may exit the rescue mode process.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "special_filesystems": [], "min_hwe_kernel": "", "fqdn": "new-tuna.maas", "node_type": 0, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "current_commissioning_result_id": 8, "raids": [], "storage": 8000, "status_action": "", "storage_test_status": -1, "status_message": "From 'Entering rescue mode' to 'Exiting rescue mode'", "owner": "admin", "owner_data": {}, "hwe_kernel": null, "status_name": "Exiting rescue mode", "iscsiblockdevice_set": [], "current_installation_result_id": null, "power_state": "on", "cpu_count": 1, "power_type": "virsh", "netboot": true, "commissioning_status_name": "Unknown", "volume_groups": [], "status": 19, "cpu_test_status_name": "Unknown", "system_id": "a8m7sr", "swap_size": null, "memory": 1024, "architecture": "amd64/generic", "address_ttl": null, "testing_status_name": "Unknown", "cpu_test_status": -1, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "hostname": "new-tuna", "locked": false, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 512, "tags": [ "default" ], "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 3, "partition_table_type": null, "available_size": 8000000000, "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "used_for": "Unused", "used_size": 0, "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/blockdevices/3/" } ], "boot_interface": { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 6, "params": "", "firmware_version": null, "mac_address": "52:54:00:9f:9d:7e", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/interfaces/6/" }, "interface_set": [ { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 6, "params": "", "firmware_version": null, "mac_address": "52:54:00:9f:9d:7e", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/interfaces/6/" } ], "storage_test_status_name": "Unknown", "other_test_status_name": "Unknown", "tag_names": [ "virtual" ], "commissioning_status": -1, "physicalblockdevice_set": [ { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 3, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/blockdevices/3/" } ], "memory_test_status_name": "Unknown", "other_test_status": -1, "domain": { "authoritative": true, "ttl": null, "name": "maas", "id": 0, "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "virtualblockdevice_set": [], "cache_sets": [], "ip_addresses": [], "pod": { "id": 1, "name": "LXCPod", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "disable_ipv4": false, "bcaches": [], "node_type_name": "Machine", "current_testing_result_id": 9, "cpu_speed": 0, "memory_test_status": -1, "osystem": "", "distro_series": "", "boot_disk": { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 3, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/blockdevices/3/" }, "resource_uri": "/MAAS/api/2.0/machines/a8m7sr/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to exit rescue mode on the machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=lock
Mark a machine with the given system_id as 'Locked' to prevent changes.
Parameters
{system_id} (String): Required. The machines's system_id.
comment (String): Optional. Optional comment for the event log.
Success
HTTP Status Code : 200
JSON
{ "fqdn": "aware-elk.maas", "power_state": "on", "volume_groups": [ { "system_id": "recrwg", "id": 1, "__incomplete__": true } ], "storage": 5294.79424, "virtualblockdevice_set": [ { "filesystem": { "fstype": "ext4", "label": "root", "uuid": "4fc23a1c-dab0-471e-aa8d-b1e157c681af", "mount_point": "/", "mount_options": null }, "name": "vgroot-lvroot", "tags": [], "partition_table_type": null, "size": 1426063360, "system_id": "recrwg", "path": "/dev/disk/by-dname/vgroot-lvroot", "uuid": "dddd6ee5-0a11-4af0-b8d3-5d71d9d1617e", "type": "virtual", "model": null, "serial": null, "used_for": "ext4 formatted filesystem mounted at /", "block_size": 4096, "partitions": [], "id_path": null, "available_size": 0, "storage_pool": null, "used_size": 1426063360, "id": 24, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/24/" } ], "current_commissioning_result_id": 41, "min_hwe_kernel": null, "locked": true, "status_name": "Deployed", "cpu_count": 6, "interface_set": [ { "parents": [], "name": "eth-xMPy44", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-I507XZ", "tag-U7WRmW", "tag-Nkiold" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "2f:00:35:fd:94:0a", "children": [ "eth-xMPy44.10" ], "links": [ { "id": 23, "mode": "auto", "ip_address": "172.16.1.81", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 46, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/46/" }, { "parents": [], "name": "eth-y3Syjk", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-uFpKfL", "tag-JwGxLy", "tag-FNTvHD" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "22:2e:4a:ca:ed:bb", "children": [ "eth-y3Syjk.10" ], "links": [ { "id": 24, "mode": "auto", "ip_address": "172.16.1.50", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 47, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/47/" }, { "parents": [], "name": "eth-mrQO2Y", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-ZOwzJO", "tag-dGE8gU", "tag-4qpUgN" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "b1:3d:dd:86:16:0b", "children": [ "eth-mrQO2Y.10" ], "links": [ { "id": 25, "mode": "static", "ip_address": "172.16.1.140", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 48, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/48/" }, { "parents": [ "eth-xMPy44" ], "name": "eth-xMPy44.10", "firmware_version": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "tags": [ "tag-XBs2PI", "tag-FC4Krm", "tag-Lb8OTS" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "vlan", "params": "", "product": null, "mac_address": "2f:00:35:fd:94:0a", "children": [], "links": [ { "id": 26, "mode": "static", "ip_address": "172.16.3.217", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "discovered": null, "vendor": null, "id": 49, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/49/" }, { "parents": [ "eth-y3Syjk" ], "name": "eth-y3Syjk.10", "firmware_version": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "tags": [ "tag-pcPo4T", "tag-rU43Xd", "tag-KaVXHp" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "vlan", "params": "", "product": null, "mac_address": "22:2e:4a:ca:ed:bb", "children": [], "links": [ { "id": 27, "mode": "auto", "ip_address": "172.16.4.21", "subnet": { "name": "name-c2ULe1", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.4.0/24", "rdns_mode": 2, "gateway_ip": "172.16.4.1", "dns_servers": [ "fd08:fef7:5c1f:a2e6:3d8e:6c3b:89f9:80cb", "fc67:ad6a:88fe:9192:62f9:e882:8bcc:339e", "255.59.162.158" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 4, "resource_uri": "/MAAS/api/2.0/subnets/4/" } } ], "discovered": null, "vendor": null, "id": 50, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/50/" }, { "parents": [ "eth-mrQO2Y" ], "name": "eth-mrQO2Y.10", "firmware_version": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "tags": [ "tag-v9GgVC", "tag-xDdgfA", "tag-Y8fBEG" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "vlan", "params": "", "product": null, "mac_address": "b1:3d:dd:86:16:0b", "children": [], "links": [ { "id": 28, "mode": "auto", "ip_address": "172.16.3.79", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "discovered": null, "vendor": null, "id": 51, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/51/" } ], "raids": [], "boot_interface": { "parents": [], "name": "eth-xMPy44", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-I507XZ", "tag-U7WRmW", "tag-Nkiold" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "2f:00:35:fd:94:0a", "children": [ "eth-xMPy44.10" ], "links": [ { "id": 23, "mode": "auto", "ip_address": "172.16.1.81", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 46, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/46/" }, "status_message": "(admin)", "status": 6, "node_type": 0, "netboot": true, "pod": { "id": 4, "name": "crisp-lab", "resource_uri": "/MAAS/api/2.0/pods/4/" }, "cpu_test_status_name": "Passed", "storage_test_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "is_default": true, "id": 0, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-DBlpn2", "filesystem": null, "name": "name-pgLeVS", "tags": [ "tag-QzeBbm", "tag-OWHfqo", "tag-CM5Qpt" ], "partition_table_type": "MBR", "size": 1438582272, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS", "uuid": null, "type": "physical", "model": "model-62BmpN", "serial": "serial-iMHmE5", "used_for": "MBR partitioned with 1 partition", "block_size": 512, "partitions": [ { "uuid": "05fb6e01-03e9-4e5b-a826-ec15a91a3219", "size": 1430257664, "bootable": false, "tags": [], "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "ec4275ae-7e49-4cc0-9194-4e4e264e2e32", "mount_point": null, "mount_options": null }, "device_id": 22, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS-part1", "type": "partition", "used_for": "LVM volume for vgroot", "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/partition/2" } ], "id_path": null, "available_size": 0, "storage_pool": "pool_id-LcQqiM", "used_size": 1435500544, "id": 22, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/" }, "testing_status": 2, "cpu_test_status": 2, "disable_ipv4": false, "cpu_speed": 0, "owner": "admin", "hostname": "aware-elk", "ip_addresses": [ "172.16.1.81", "172.16.1.50", "172.16.1.140", "172.16.3.217", "172.16.4.21", "172.16.3.79" ], "iscsiblockdevice_set": [], "special_filesystems": [], "memory_test_status": 2, "other_test_status": 2, "osystem": "", "distro_series": "", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "bcaches": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "current_testing_result_id": 42, "architecture": "i386/generic", "system_id": "recrwg", "current_installation_result_id": 43, "other_test_status_name": "Passed", "swap_size": null, "status_action": "lock", "testing_status_name": "Passed", "address_ttl": null, "node_type_name": "Machine", "commissioning_status": 2, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "memory_test_status_name": "Passed", "memory": 8192, "power_type": "virsh", "commissioning_status_name": "Passed", "hwe_kernel": null, "default_gateways": { "ipv4": { "gateway_ip": "172.16.1.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-DBlpn2", "filesystem": null, "name": "name-pgLeVS", "tags": [ "tag-QzeBbm", "tag-OWHfqo", "tag-CM5Qpt" ], "partition_table_type": "MBR", "size": 1438582272, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS", "uuid": null, "type": "physical", "model": "model-62BmpN", "serial": "serial-iMHmE5", "used_for": "MBR partitioned with 1 partition", "block_size": 512, "partitions": [ { "uuid": "05fb6e01-03e9-4e5b-a826-ec15a91a3219", "size": 1430257664, "bootable": false, "tags": [], "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "ec4275ae-7e49-4cc0-9194-4e4e264e2e32", "mount_point": null, "mount_options": null }, "device_id": 22, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS-part1", "type": "partition", "used_for": "LVM volume for vgroot", "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/partition/2" } ], "id_path": null, "available_size": 0, "storage_pool": "pool_id-LcQqiM", "used_size": 1435500544, "id": 22, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/" }, { "firmware_version": "firmware_version-MtZVEn", "filesystem": null, "name": "name-nI5TAA", "tags": [ "tag-1U9Qzd", "tag-mvNZeT", "tag-oFF6wc" ], "partition_table_type": null, "size": 3856211968, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-nI5TAA", "uuid": null, "type": "physical", "model": "model-qPjKqf", "serial": "serial-VKKak6", "used_for": "Unused", "block_size": 1024, "partitions": [], "id_path": null, "available_size": 3856211968, "storage_pool": "pool_id-nYrFZj", "used_size": 0, "id": 23, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/23/" } ], "cache_sets": [], "owner_data": {}, "storage_test_status": 2, "tag_names": [], "blockdevice_set": [ { "id_path": null, "size": 1438582272, "block_size": 512, "tags": [ "tag-QzeBbm", "tag-OWHfqo", "tag-CM5Qpt" ], "filesystem": null, "name": "name-pgLeVS", "partition_table_type": "MBR", "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS", "uuid": null, "type": "physical", "model": "model-62BmpN", "serial": "serial-iMHmE5", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "05fb6e01-03e9-4e5b-a826-ec15a91a3219", "size": 1430257664, "bootable": false, "tags": [], "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "ec4275ae-7e49-4cc0-9194-4e4e264e2e32", "mount_point": null, "mount_options": null }, "device_id": 22, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS-part1", "type": "partition", "used_for": "LVM volume for vgroot", "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/partition/2" } ], "available_size": 0, "storage_pool": "pool_id-LcQqiM", "used_size": 1435500544, "id": 22, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/" }, { "id_path": null, "size": 3856211968, "block_size": 1024, "tags": [ "tag-1U9Qzd", "tag-mvNZeT", "tag-oFF6wc" ], "filesystem": null, "name": "name-nI5TAA", "partition_table_type": null, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-nI5TAA", "uuid": null, "type": "physical", "model": "model-qPjKqf", "serial": "serial-VKKak6", "used_for": "Unused", "partitions": [], "available_size": 3856211968, "storage_pool": "pool_id-nYrFZj", "used_size": 0, "id": 23, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/23/" }, { "id_path": null, "size": 1426063360, "block_size": 4096, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "4fc23a1c-dab0-471e-aa8d-b1e157c681af", "mount_point": "/", "mount_options": null }, "name": "vgroot-lvroot", "partition_table_type": null, "system_id": "recrwg", "path": "/dev/disk/by-dname/lvroot", "uuid": "dddd6ee5-0a11-4af0-b8d3-5d71d9d1617e", "type": "virtual", "model": null, "serial": null, "used_for": "ext4 formatted filesystem mounted at /", "partitions": [], "available_size": 0, "storage_pool": null, "used_size": 1426063360, "id": 24, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/24/" } ], "resource_uri": "/MAAS/api/2.0/machines/recrwg/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to lock the machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=mark_broken
Mark a machine with the given system_id as 'Broken'.
If the node is allocated, release it first.
Parameters
{system_id} (String): Required. The machines's system_id.
comment (String): Optional. Optional comment for the event log. Will be displayed on the node as an error description until marked fixed.
Success
HTTP Status Code : 200
JSON
{ "hostname": "above-robin", "cpu_speed": 0, "current_testing_result_id": 22, "status_action": "", "node_type_name": "Machine", "netboot": true, "storage_test_status_name": "Passed", "system_id": "thr3am", "commissioning_status": 2, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "tag_names": [], "cpu_test_status": 2, "bcaches": [], "locked": false, "min_hwe_kernel": null, "cpu_count": 3, "iscsiblockdevice_set": [], "current_commissioning_result_id": 21, "current_installation_result_id": null, "raids": [], "storage_test_status": 2, "status_name": "Broken", "architecture": "i386/generic", "storage": 9204.621312000001, "distro_series": "", "special_filesystems": [], "volume_groups": [], "ip_addresses": [], "interface_set": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "power_state": "on", "domain": { "authoritative": true, "ttl": null, "resource_record_count": 0, "is_default": false, "name": "sample", "id": 1, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "disable_ipv4": false, "status_message": "From 'Ready' to 'Broken'", "memory_test_status_name": "Passed", "other_test_status_name": "Passed", "cache_sets": [], "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "owner": null, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "owner_data": {}, "osystem": "", "cpu_test_status_name": "Passed", "memory_test_status": 2, "address_ttl": null, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "used_size": 3528458240, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "system_id": "thr3am", "type": "partition", "id": 9, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "available_size": 0, "serial": "serial-jBitFU", "path": "/dev/disk/by-dname/name-xE9mtJ", "size": 3532084224, "partition_table_type": "MBR", "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "id_path": null, "used_for": "MBR partitioned with 1 partition", "name": "name-xE9mtJ", "system_id": "thr3am", "type": "physical", "model": "model-mSnL9L", "id": 18, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "used_size": 0, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [], "available_size": 3498806272, "serial": "serial-5EZFik", "path": "/dev/disk/by-dname/name-EjgNwC", "size": 3498806272, "partition_table_type": null, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "id_path": null, "used_for": "Unused", "name": "name-EjgNwC", "system_id": "thr3am", "type": "physical", "model": "model-OHzOYI", "id": 19, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "used_size": 0, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [], "available_size": 2173730816, "serial": "serial-SE3O1p", "path": "/dev/disk/by-dname/name-VhlrVi", "size": 2173730816, "partition_table_type": null, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "id_path": null, "used_for": "Unused", "name": "name-VhlrVi", "system_id": "thr3am", "type": "physical", "model": "model-5btVsu", "id": 20, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "node_type": 0, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "used_size": 3528458240, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "system_id": "thr3am", "type": "partition", "id": 9, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "available_size": 0, "serial": "serial-jBitFU", "path": "/dev/disk/by-dname/name-xE9mtJ", "size": 3532084224, "partition_table_type": "MBR", "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "id_path": null, "used_for": "MBR partitioned with 1 partition", "name": "name-xE9mtJ", "system_id": "thr3am", "type": "physical", "model": "model-mSnL9L", "id": 18, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "testing_status_name": "Passed", "power_type": "virsh", "status": 8, "swap_size": null, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "used_size": 3528458240, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "system_id": "thr3am", "type": "partition", "id": 9, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "available_size": 0, "serial": "serial-jBitFU", "path": "/dev/disk/by-dname/name-xE9mtJ", "partition_table_type": "MBR", "used_for": "MBR partitioned with 1 partition", "name": "name-xE9mtJ", "system_id": "thr3am", "type": "physical", "model": "model-mSnL9L", "id": 18, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "used_size": 0, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [], "available_size": 3498806272, "serial": "serial-5EZFik", "path": "/dev/disk/by-dname/name-EjgNwC", "partition_table_type": null, "used_for": "Unused", "name": "name-EjgNwC", "system_id": "thr3am", "type": "physical", "model": "model-OHzOYI", "id": 19, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "used_size": 0, "uuid": null, "storage_pool": "pool_id-QkOjON", "filesystem": null, "partitions": [], "available_size": 2173730816, "serial": "serial-SE3O1p", "path": "/dev/disk/by-dname/name-VhlrVi", "partition_table_type": null, "used_for": "Unused", "name": "name-VhlrVi", "system_id": "thr3am", "type": "physical", "model": "model-5btVsu", "id": 20, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "commissioning_status_name": "Passed", "memory": 8192, "testing_status": 2, "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "fqdn": "above-robin.sample", "hwe_kernel": null, "other_test_status": 2, "boot_interface": null, "virtualblockdevice_set": [], "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to the machine as Broken.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=mark_fixed
Mark a machine with the given system_id as 'Fixed'.
Parameters
{system_id} (String): Required. The machines's system_id.
comment (String): Optional. Optional comment for the event log.
Success
HTTP Status Code : 200
JSON
{ "memory": 8192, "memory_test_status_name": "Passed", "storage_test_status_name": "Passed", "hostname": "above-robin", "current_testing_result_id": 22, "testing_status": 2, "cpu_count": 3, "status_message": "From 'Broken' to 'Ready'", "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "storage_pool": "pool_id-QkOjON", "name": "name-xE9mtJ", "serial": "serial-jBitFU", "id_path": null, "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "type": "partition", "id": 9, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "system_id": "thr3am", "device_id": 18, "used_for": "ext4 formatted filesystem mounted at /", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "partition_table_type": "MBR", "size": 3532084224, "filesystem": null, "type": "physical", "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "available_size": 0, "uuid": null, "model": "model-mSnL9L", "system_id": "thr3am", "block_size": 1024, "used_size": 3528458240, "used_for": "MBR partitioned with 1 partition", "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "hwe_kernel": null, "storage_test_status": 2, "domain": { "authoritative": true, "ttl": null, "name": "sample", "id": 1, "is_default": false, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "cpu_test_status_name": "Passed", "power_type": "virsh", "disable_ipv4": false, "tag_names": [], "commissioning_status": 2, "memory_test_status": 2, "virtualblockdevice_set": [], "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "locked": false, "other_test_status_name": "Passed", "owner_data": {}, "boot_interface": null, "osystem": "", "current_commissioning_result_id": 21, "cache_sets": [], "node_type_name": "Machine", "fqdn": "above-robin.sample", "commissioning_status_name": "Passed", "testing_status_name": "Passed", "distro_series": "", "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "power_state": "on", "owner": null, "current_installation_result_id": null, "system_id": "thr3am", "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "storage_pool": "pool_id-QkOjON", "name": "name-xE9mtJ", "serial": "serial-jBitFU", "id_path": null, "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "type": "partition", "id": 9, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "system_id": "thr3am", "device_id": 18, "used_for": "ext4 formatted filesystem mounted at /", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "partition_table_type": "MBR", "size": 3532084224, "filesystem": null, "type": "physical", "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "available_size": 0, "uuid": null, "model": "model-mSnL9L", "system_id": "thr3am", "block_size": 1024, "used_size": 3528458240, "used_for": "MBR partitioned with 1 partition", "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "storage_pool": "pool_id-QkOjON", "name": "name-EjgNwC", "serial": "serial-5EZFik", "id_path": null, "partitions": [], "partition_table_type": null, "size": 3498806272, "filesystem": null, "type": "physical", "id": 19, "path": "/dev/disk/by-dname/name-EjgNwC", "available_size": 3498806272, "uuid": null, "model": "model-OHzOYI", "system_id": "thr3am", "block_size": 1024, "used_size": 0, "used_for": "Unused", "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "storage_pool": "pool_id-QkOjON", "name": "name-VhlrVi", "serial": "serial-SE3O1p", "id_path": null, "partitions": [], "partition_table_type": null, "size": 2173730816, "filesystem": null, "type": "physical", "id": 20, "path": "/dev/disk/by-dname/name-VhlrVi", "available_size": 2173730816, "uuid": null, "model": "model-5btVsu", "system_id": "thr3am", "block_size": 4096, "used_size": 0, "used_for": "Unused", "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "node_type": 0, "status": 4, "special_filesystems": [], "address_ttl": null, "cpu_test_status": 2, "ip_addresses": [], "swap_size": null, "volume_groups": [], "status_action": "", "other_test_status": 2, "cpu_speed": 0, "raids": [], "interface_set": [], "architecture": "i386/generic", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "bcaches": [], "storage": 9204.621312000001, "min_hwe_kernel": null, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "storage_pool": "pool_id-QkOjON", "name": "name-xE9mtJ", "serial": "serial-jBitFU", "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "type": "partition", "id": 9, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "system_id": "thr3am", "device_id": 18, "used_for": "ext4 formatted filesystem mounted at /", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "partition_table_type": "MBR", "filesystem": null, "type": "physical", "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "available_size": 0, "uuid": null, "model": "model-mSnL9L", "system_id": "thr3am", "used_size": 3528458240, "used_for": "MBR partitioned with 1 partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "storage_pool": "pool_id-QkOjON", "name": "name-EjgNwC", "serial": "serial-5EZFik", "partitions": [], "partition_table_type": null, "filesystem": null, "type": "physical", "id": 19, "path": "/dev/disk/by-dname/name-EjgNwC", "available_size": 3498806272, "uuid": null, "model": "model-OHzOYI", "system_id": "thr3am", "used_size": 0, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "storage_pool": "pool_id-QkOjON", "name": "name-VhlrVi", "serial": "serial-SE3O1p", "partitions": [], "partition_table_type": null, "filesystem": null, "type": "physical", "id": 20, "path": "/dev/disk/by-dname/name-VhlrVi", "available_size": 2173730816, "uuid": null, "model": "model-5btVsu", "system_id": "thr3am", "used_size": 0, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "netboot": true, "status_name": "Ready", "iscsiblockdevice_set": [], "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to the machine as Fixed.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=mount_special
Mount a special-purpose filesystem, like tmpfs on a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
fstype (String): Required. The filesystem type. This must be a filesystem that does not require a block special device.
mount_point (String): Required. Path on the filesystem to mount.
mount_option (String): Optional. Options to pass to mount(8).
Success
HTTP Status Code : 200
JSON
{ "storage_test_status_name": "Passed", "ip_addresses": [ "2001:db8:42:0:6556:13fa:7452:70da", "2001:db8:42:0:cf29:e368:ba5b:9977" ], "testing_status_name": "Passed", "cpu_count": 3, "node_type_name": "Machine", "osystem": "", "disable_ipv4": false, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "system_id": "thr3am", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 1, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "used_size": 3528458240, "available_size": 0, "used_for": "MBR partitioned with 1 partition", "system_id": "thr3am", "name": "name-xE9mtJ", "filesystem": null, "partition_table_type": "MBR", "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "model": "model-mSnL9L", "serial": "serial-jBitFU", "storage_pool": "pool_id-QkOjON", "id": 18, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "partitions": [], "used_size": 0, "available_size": 3498806272, "used_for": "Unused", "system_id": "thr3am", "name": "name-EjgNwC", "filesystem": null, "partition_table_type": null, "path": "/dev/disk/by-dname/name-EjgNwC", "uuid": null, "model": "model-OHzOYI", "serial": "serial-5EZFik", "storage_pool": "pool_id-QkOjON", "id": 19, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "partitions": [], "used_size": 0, "available_size": 2173730816, "used_for": "Unused", "system_id": "thr3am", "name": "name-VhlrVi", "filesystem": null, "partition_table_type": null, "path": "/dev/disk/by-dname/name-VhlrVi", "uuid": null, "model": "model-5btVsu", "serial": "serial-SE3O1p", "storage_pool": "pool_id-QkOjON", "id": 20, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "status_action": "action-Kboqzg", "memory_test_status_name": "Passed", "interface_set": [ { "parents": [], "params": "", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "system_id": "thr3am", "name": "eth-lKRYAa", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-lKRYAa.42" ], "product": null, "id": 37, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, { "parents": [], "params": "", "links": [ { "id": 15, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "bc:d3:d5:28:88:dc", "tags": [ "tag-LddZkA", "tag-EDi2sp", "tag-RwynT2" ], "system_id": "thr3am", "name": "eth-3ookc5", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-3ookc5.42" ], "product": null, "id": 38, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/38/" }, { "parents": [], "params": "", "links": [ { "id": 16, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "ad:5a:3e:a3:68:13", "tags": [ "tag-dc12B9", "tag-D71Hh0", "tag-PnEfvN" ], "system_id": "thr3am", "name": "eth-W8E8f0", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-W8E8f0.42" ], "product": null, "id": 39, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/39/" }, { "parents": [ "eth-lKRYAa" ], "params": "", "links": [ { "id": 17, "mode": "auto", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "tags": [ "tag-u0TLLj", "tag-C09Efp", "tag-QK7j09" ], "system_id": "thr3am", "name": "eth-lKRYAa.42", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [], "product": null, "id": 40, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/40/" }, { "parents": [ "eth-3ookc5" ], "params": "", "links": [ { "id": 18, "mode": "static", "ip_address": "2001:db8:42:0:6556:13fa:7452:70da", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "bc:d3:d5:28:88:dc", "tags": [ "tag-EFzacM", "tag-dxAebl", "tag-GsPX3m" ], "system_id": "thr3am", "name": "eth-3ookc5.42", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [], "product": null, "id": 41, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/41/" }, { "parents": [ "eth-W8E8f0" ], "params": "", "links": [ { "id": 19, "mode": "static", "ip_address": "2001:db8:42:0:cf29:e368:ba5b:9977", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "ad:5a:3e:a3:68:13", "tags": [ "tag-cyexYi", "tag-nnoi80", "tag-xhApes" ], "system_id": "thr3am", "name": "eth-W8E8f0.42", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [], "product": null, "id": 42, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/42/" } ], "owner_data": {}, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "system_id": "thr3am", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 1, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "used_size": 3528458240, "available_size": 0, "used_for": "MBR partitioned with 1 partition", "system_id": "thr3am", "name": "name-xE9mtJ", "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "filesystem": null, "partition_table_type": "MBR", "block_size": 1024, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "model": "model-mSnL9L", "serial": "serial-jBitFU", "storage_pool": "pool_id-QkOjON", "size": 3532084224, "id": 18, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "storage_test_status": 2, "power_type": "virsh", "other_test_status": 2, "owner": null, "min_hwe_kernel": null, "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "tag_names": [], "memory_test_status": 2, "testing_status": 2, "boot_interface": { "parents": [], "params": "", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "system_id": "thr3am", "name": "eth-lKRYAa", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-lKRYAa.42" ], "product": null, "id": 37, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, "raids": [], "node_type": 0, "cpu_speed": 0, "netboot": true, "status_message": "desc-SRem4v", "status": 4, "current_installation_result_id": null, "volume_groups": [], "storage": 9204.621312000001, "system_id": "thr3am", "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "system_id": "thr3am", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 1, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "used_size": 3528458240, "available_size": 0, "used_for": "MBR partitioned with 1 partition", "system_id": "thr3am", "name": "name-xE9mtJ", "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "filesystem": null, "partition_table_type": "MBR", "block_size": 1024, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "model": "model-mSnL9L", "serial": "serial-jBitFU", "storage_pool": "pool_id-QkOjON", "size": 3532084224, "id": 18, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "partitions": [], "used_size": 0, "available_size": 3498806272, "used_for": "Unused", "system_id": "thr3am", "name": "name-EjgNwC", "id_path": null, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "filesystem": null, "partition_table_type": null, "block_size": 1024, "path": "/dev/disk/by-dname/name-EjgNwC", "uuid": null, "model": "model-OHzOYI", "serial": "serial-5EZFik", "storage_pool": "pool_id-QkOjON", "size": 3498806272, "id": 19, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "partitions": [], "used_size": 0, "available_size": 2173730816, "used_for": "Unused", "system_id": "thr3am", "name": "name-VhlrVi", "id_path": null, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "filesystem": null, "partition_table_type": null, "block_size": 4096, "path": "/dev/disk/by-dname/name-VhlrVi", "uuid": null, "model": "model-5btVsu", "serial": "serial-SE3O1p", "storage_pool": "pool_id-QkOjON", "size": 2173730816, "id": 20, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "domain": { "authoritative": true, "ttl": null, "is_default": false, "name": "sample", "resource_record_count": 0, "id": 1, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "status_name": "Ready", "hwe_kernel": null, "special_filesystems": [ { "fstype": "tmpfs", "label": null, "uuid": "be2d1132-669d-41b8-977d-5100ee22cec3", "mount_point": "/home/foo", "mount_options": "" } ], "locked": false, "current_testing_result_id": 22, "other_test_status_name": "Passed", "cpu_test_status_name": "Passed", "cache_sets": [], "cpu_test_status": 2, "architecture": "i386/generic", "default_gateways": { "ipv4": { "gateway_ip": "172.16.2.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "bcaches": [], "current_commissioning_result_id": 21, "virtualblockdevice_set": [], "commissioning_status": 2, "iscsiblockdevice_set": [], "address_ttl": null, "commissioning_status_name": "Passed", "distro_series": "", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "swap_size": null, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "fqdn": "above-robin.sample", "memory": 8192, "power_state": "on", "hostname": "above-robin", "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to mount the special filesystem on this machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=override_failed_testing
Ignore failed tests and put node back into a usable state.
Parameters
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to override tests.
POST /MAAS/api/2.0/machines/{system_id}/?op=power_off
Powers off a given node.
Parameters
stop_mode (String): Optional. Power-off mode. If 'soft', perform a soft power down if the node's power type supports it, otherwise perform a hard power off. For all values other than 'soft', and by default, perform a hard power off. A soft power off generally asks the OS to shutdown the system gracefully before powering off, while a hard power off occurs immediately without any warning to the OS.
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
JSON
{ "cpu_count": 1, "fqdn": "node2.maas", "hostname": "node2", "power_state": "on", "cpu_test_status": -1, "storage": 8000, "osystem": "ubuntu", "cpu_test_status_name": "Unknown", "testing_status": 2, "iscsiblockdevice_set": [], "boot_interface": { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" }, "boot_disk": { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" }, "bcaches": [], "cpu_speed": 2500, "ip_addresses": [ "172.16.99.5" ], "virtualblockdevice_set": [], "special_filesystems": [], "owner_data": {}, "physicalblockdevice_set": [ { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "testing_status_name": "Passed", "disable_ipv4": false, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" } ], "architecture": "amd64/generic", "commissioning_status": 2, "hwe_kernel": "ga-18.04", "current_installation_result_id": 8, "swap_size": null, "memory": 1024, "pod": { "id": 1, "name": "MyPodName", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "current_commissioning_result_id": 6, "hardware_info": { "system_vendor": "QEMU", "system_product": "Standard PC (i440FX + PIIX, 1996)", "system_version": "pc-i440fx-bionic", "system_serial": "Unknown", "cpu_model": "QEMU Virtual CPU version 2.5+", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "1.10.2-1ubuntu1", "mainboard_firmware_date": "04/01/2014" }, "pool": { "name": "newname", "description": "new description", "id": 1, "resource_uri": "/MAAS/api/2.0/resourcepool/1/" }, "current_testing_result_id": 7, "tag_names": [ "virtual", "mypod" ], "storage_test_status": 2, "address_ttl": null, "status_message": "'cloudinit' running modules for final", "cache_sets": [], "other_test_status_name": "Unknown", "node_type_name": "Machine", "distro_series": "bionic", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "min_hwe_kernel": "", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "system_id": "e8xa8m", "locked": false, "power_type": "virsh", "node_type": 0, "memory_test_status": -1, "memory_test_status_name": "Unknown", "status": 6, "netboot": false, "volume_groups": [], "raids": [], "default_gateways": { "ipv4": { "gateway_ip": "172.16.99.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status_name": "Passed", "status_action": "modules-final", "other_test_status": -1, "status_name": "Deployed", "storage_test_status_name": "Passed", "owner": "admin", "resource_uri": "/MAAS/api/2.0/machines/e8xa8m/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to power off the node.
POST /MAAS/api/2.0/machines/{system_id}/?op=power_on
Turn on the given node with optional user-data and comment.
Parameters
user_data (String): Optional. Base64-encoded blob of data to be made available to the nodes through the metadata service.
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
JSON
{ "cpu_count": 1, "fqdn": "node2.maas", "hostname": "node2", "power_state": "on", "cpu_test_status": -1, "storage": 8000, "osystem": "ubuntu", "cpu_test_status_name": "Unknown", "testing_status": 2, "iscsiblockdevice_set": [], "boot_interface": { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" }, "boot_disk": { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" }, "bcaches": [], "cpu_speed": 2500, "ip_addresses": [ "172.16.99.5" ], "virtualblockdevice_set": [], "special_filesystems": [], "owner_data": {}, "physicalblockdevice_set": [ { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "testing_status_name": "Passed", "disable_ipv4": false, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" } ], "architecture": "amd64/generic", "commissioning_status": 2, "hwe_kernel": "ga-18.04", "current_installation_result_id": 8, "swap_size": null, "memory": 1024, "pod": { "id": 1, "name": "MyPodName", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "current_commissioning_result_id": 6, "hardware_info": { "system_vendor": "QEMU", "system_product": "Standard PC (i440FX + PIIX, 1996)", "system_version": "pc-i440fx-bionic", "system_serial": "Unknown", "cpu_model": "QEMU Virtual CPU version 2.5+", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "1.10.2-1ubuntu1", "mainboard_firmware_date": "04/01/2014" }, "pool": { "name": "newname", "description": "new description", "id": 1, "resource_uri": "/MAAS/api/2.0/resourcepool/1/" }, "current_testing_result_id": 7, "tag_names": [ "virtual", "mypod" ], "storage_test_status": 2, "address_ttl": null, "status_message": "'cloudinit' running modules for final", "cache_sets": [], "other_test_status_name": "Unknown", "node_type_name": "Machine", "distro_series": "bionic", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "min_hwe_kernel": "", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "system_id": "e8xa8m", "locked": false, "power_type": "virsh", "node_type": 0, "memory_test_status": -1, "memory_test_status_name": "Unknown", "status": 6, "netboot": false, "volume_groups": [], "raids": [], "default_gateways": { "ipv4": { "gateway_ip": "172.16.99.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status_name": "Passed", "status_action": "modules-final", "other_test_status": -1, "status_name": "Deployed", "storage_test_status_name": "Passed", "owner": "admin", "resource_uri": "/MAAS/api/2.0/machines/e8xa8m/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to power on the node.
HTTP Status Code : 503
Content : Returns 503 if the start-up attempted to allocate an IP address, and there were no IP addresses available on the relevant cluster interface.
POST /MAAS/api/2.0/machines/{system_id}/?op=release
Releases a machine with the given system_id. Note that this operation is the opposite of allocating a machine.
Erasing drives:
If neither secure_erase
nor quick_erase
are specified, MAAS will
overwrite the whole disk with null bytes. This can be very slow.
If both secure_erase
and quick_erase
are specified and the drive
does NOT have a secure erase feature, MAAS will behave as if only
quick_erase
was specified.
If secure_erase
is specified and quick_erase
is NOT specified and
the drive does NOT have a secure erase feature, MAAS will behave as if
secure_erase
was NOT specified, i.e. MAAS will overwrite the whole
disk with null bytes. This can be very slow.
Parameters
{system_id} (String): Required. The machines's system_id.
comment (String): Required. Optional comment for the event log.
erase (Boolean): Optional. Erase the disk when releasing.
secure_erase (Boolean): Optional. Use the drive's secure erase feature if available. In some cases, this can be much faster than overwriting the drive. Some drives implement secure erasure by overwriting themselves so this could still be slow.
quick_erase (Boolean): Optional. Wipe 2MiB at the start and at the end of the drive to make data recovery inconvenient and unlikely to happen by accident. This is not secure.
Success
HTTP Status Code : 200
JSON
{ "memory": 8192, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "path": "/dev/disk/by-dname/name-xE9mtJ", "id_path": null, "name": "name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "58fb1ffe-5ab2-4dc8-bad9-8b549cf22f57", "size": 3523215360, "bootable": false, "tags": [], "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "system_id": "thr3am", "id": 1, "filesystem": { "fstype": "ext4", "label": "root", "uuid": "109c27d3-e1e5-424a-b7ed-6a2ba32902c7", "mount_point": "/", "mount_options": null }, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "partition_table_type": "MBR", "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-jBitFU", "id": 18, "size": 3532084224, "available_size": 0, "block_size": 1024, "used_size": 3528458240, "model": "model-mSnL9L", "filesystem": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "storage_test_status_name": "Passed", "other_test_status": 2, "domain": { "authoritative": true, "ttl": null, "name": "sample", "resource_record_count": 0, "is_default": false, "id": 1, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "current_commissioning_result_id": 21, "system_id": "thr3am", "commissioning_status": 2, "iscsiblockdevice_set": [], "raids": [], "node_type_name": "Machine", "memory_test_status_name": "Passed", "boot_interface": { "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "name": "eth-lKRYAa", "parents": [], "params": "", "system_id": "thr3am", "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "id": 37, "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "product": null, "children": [ "eth-lKRYAa.42" ], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "status": 4, "testing_status_name": "Passed", "tag_names": [], "osystem": "", "current_testing_result_id": 22, "node_type": 0, "commissioning_status_name": "Passed", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "memory_test_status": 2, "storage_test_status": 2, "other_test_status_name": "Passed", "testing_status": 2, "disable_ipv4": false, "cpu_count": 3, "storage": 9204.621312000001, "netboot": true, "hwe_kernel": null, "cpu_test_status_name": "Passed", "bcaches": [], "status_name": "Ready", "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "cpu_speed": 0, "special_filesystems": [], "min_hwe_kernel": "", "architecture": "amd64/generic", "current_installation_result_id": null, "distro_series": "", "locked": false, "volume_groups": [], "ip_addresses": [ "2001:db8:42:0:6556:13fa:7452:70da", "2001:db8:42:0:cf29:e368:ba5b:9977" ], "owner_data": {}, "interface_set": [ { "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "name": "eth-lKRYAa", "parents": [], "params": "", "system_id": "thr3am", "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "id": 37, "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "product": null, "children": [ "eth-lKRYAa.42" ], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, { "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "name": "eth-3ookc5", "parents": [], "params": "", "system_id": "thr3am", "mac_address": "bc:d3:d5:28:88:dc", "effective_mtu": 1500, "id": 38, "links": [ { "id": 15, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "product": null, "children": [ "eth-3ookc5.42" ], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-LddZkA", "tag-EDi2sp", "tag-RwynT2" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/38/" }, { "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "name": "eth-W8E8f0", "parents": [], "params": "", "system_id": "thr3am", "mac_address": "ad:5a:3e:a3:68:13", "effective_mtu": 1500, "id": 39, "links": [ { "id": 16, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "secondary_rack": "76y7pg", "id": 5003, "primary_rack": "7xtf67", "space": "management", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "product": null, "children": [ "eth-W8E8f0.42" ], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-dc12B9", "tag-D71Hh0", "tag-PnEfvN" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/39/" }, { "discovered": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "secondary_rack": null, "id": 5004, "primary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "name": "eth-lKRYAa.42", "parents": [ "eth-lKRYAa" ], "params": "", "system_id": "thr3am", "mac_address": "cb:93:ac:d1:ed:65", "effective_mtu": 1500, "id": 40, "links": [ { "id": 17, "mode": "auto", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "secondary_rack": null, "id": 5004, "primary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 5, "space": "ipv6-testbed", "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "product": null, "children": [], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-u0TLLj", "tag-C09Efp", "tag-QK7j09" ], "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/40/" }, { "discovered": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "secondary_rack": null, "id": 5004, "primary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "name": "eth-3ookc5.42", "parents": [ "eth-3ookc5" ], "params": "", "system_id": "thr3am", "mac_address": "bc:d3:d5:28:88:dc", "effective_mtu": 1500, "id": 41, "links": [ { "id": 18, "mode": "static", "ip_address": "2001:db8:42:0:6556:13fa:7452:70da", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "secondary_rack": null, "id": 5004, "primary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 5, "space": "ipv6-testbed", "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "product": null, "children": [], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-EFzacM", "tag-dxAebl", "tag-GsPX3m" ], "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/41/" }, { "discovered": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "secondary_rack": null, "id": 5004, "primary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "name": "eth-W8E8f0.42", "parents": [ "eth-W8E8f0" ], "params": "", "system_id": "thr3am", "mac_address": "ad:5a:3e:a3:68:13", "effective_mtu": 1500, "id": 42, "links": [ { "id": 19, "mode": "static", "ip_address": "2001:db8:42:0:cf29:e368:ba5b:9977", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "42", "secondary_rack": null, "id": 5004, "primary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 5, "space": "ipv6-testbed", "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "product": null, "children": [], "enabled": true, "firmware_version": null, "vendor": null, "tags": [ "tag-cyexYi", "tag-nnoi80", "tag-xhApes" ], "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/42/" } ], "cache_sets": [], "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "path": "/dev/disk/by-dname/name-xE9mtJ", "name": "name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "58fb1ffe-5ab2-4dc8-bad9-8b549cf22f57", "size": 3523215360, "bootable": false, "tags": [], "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "system_id": "thr3am", "id": 1, "filesystem": { "fstype": "ext4", "label": "root", "uuid": "109c27d3-e1e5-424a-b7ed-6a2ba32902c7", "mount_point": "/", "mount_options": null }, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "partition_table_type": "MBR", "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-jBitFU", "id": 18, "available_size": 0, "used_size": 3528458240, "model": "model-mSnL9L", "filesystem": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "path": "/dev/disk/by-dname/name-EjgNwC", "name": "name-EjgNwC", "used_for": "Unused", "partitions": [], "partition_table_type": null, "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-5EZFik", "id": 19, "available_size": 3498806272, "used_size": 0, "model": "model-OHzOYI", "filesystem": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "path": "/dev/disk/by-dname/name-VhlrVi", "name": "name-VhlrVi", "used_for": "Unused", "partitions": [], "partition_table_type": null, "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-SE3O1p", "id": 20, "available_size": 2173730816, "used_size": 0, "model": "model-5btVsu", "filesystem": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "status_action": "action-Kboqzg", "power_type": "virsh", "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "path": "/dev/disk/by-dname/name-xE9mtJ", "id_path": null, "name": "name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "58fb1ffe-5ab2-4dc8-bad9-8b549cf22f57", "size": 3523215360, "bootable": false, "tags": [], "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "system_id": "thr3am", "id": 1, "filesystem": { "fstype": "ext4", "label": "root", "uuid": "109c27d3-e1e5-424a-b7ed-6a2ba32902c7", "mount_point": "/", "mount_options": null }, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "partition_table_type": "MBR", "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-jBitFU", "id": 18, "size": 3532084224, "available_size": 0, "block_size": 1024, "used_size": 3528458240, "model": "model-mSnL9L", "filesystem": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "path": "/dev/disk/by-dname/name-EjgNwC", "id_path": null, "name": "name-EjgNwC", "used_for": "Unused", "partitions": [], "partition_table_type": null, "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-5EZFik", "id": 19, "size": 3498806272, "available_size": 3498806272, "block_size": 1024, "used_size": 0, "model": "model-OHzOYI", "filesystem": null, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "path": "/dev/disk/by-dname/name-VhlrVi", "id_path": null, "name": "name-VhlrVi", "used_for": "Unused", "partitions": [], "partition_table_type": null, "system_id": "thr3am", "uuid": null, "storage_pool": "pool_id-QkOjON", "serial": "serial-SE3O1p", "id": 20, "size": 2173730816, "available_size": 2173730816, "block_size": 4096, "used_size": 0, "model": "model-5btVsu", "filesystem": null, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "fqdn": "pretty-jackal.sample", "cpu_test_status": 2, "virtualblockdevice_set": [], "status_message": "desc-SRem4v", "hostname": "pretty-jackal", "power_state": "on", "pod": { "id": 5, "name": "lucky-mantis", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "default_gateways": { "ipv4": { "gateway_ip": "172.16.2.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "owner": null, "address_ttl": null, "swap_size": null, "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user does not have permission to release this machine.
HTTP Status Code : 409
Content : The machine is in a state that prevents it from being released.
POST /MAAS/api/2.0/machines/{system_id}/?op=rescue_mode
Begins the rescue mode process on a machine with the given system_id.
A machine in the 'deployed' or 'broken' state may initiate the rescue mode process.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "special_filesystems": [], "min_hwe_kernel": "", "fqdn": "new-tuna.maas", "node_type": 0, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "current_commissioning_result_id": 8, "raids": [], "storage": 8000, "status_action": "", "storage_test_status": -1, "status_message": "From 'Failed commissioning' to 'Entering rescue mode'", "owner": "admin", "owner_data": {}, "hwe_kernel": null, "status_name": "Entering rescue mode", "iscsiblockdevice_set": [], "current_installation_result_id": null, "power_state": "on", "cpu_count": 1, "power_type": "virsh", "netboot": true, "commissioning_status_name": "Unknown", "volume_groups": [], "status": 17, "cpu_test_status_name": "Unknown", "system_id": "a8m7sr", "swap_size": null, "memory": 1024, "architecture": "amd64/generic", "address_ttl": null, "testing_status_name": "Unknown", "cpu_test_status": -1, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "hostname": "new-tuna", "locked": false, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 512, "tags": [ "default" ], "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 3, "partition_table_type": null, "available_size": 8000000000, "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "used_for": "Unused", "used_size": 0, "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/blockdevices/3/" } ], "boot_interface": { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 6, "params": "", "firmware_version": null, "mac_address": "52:54:00:9f:9d:7e", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/interfaces/6/" }, "interface_set": [ { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 6, "params": "", "firmware_version": null, "mac_address": "52:54:00:9f:9d:7e", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/interfaces/6/" } ], "storage_test_status_name": "Unknown", "other_test_status_name": "Unknown", "tag_names": [ "virtual" ], "commissioning_status": -1, "physicalblockdevice_set": [ { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 3, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/blockdevices/3/" } ], "memory_test_status_name": "Unknown", "other_test_status": -1, "domain": { "authoritative": true, "ttl": null, "name": "maas", "id": 0, "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "virtualblockdevice_set": [], "cache_sets": [], "ip_addresses": [], "pod": { "id": 1, "name": "LXCPod", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "disable_ipv4": false, "bcaches": [], "node_type_name": "Machine", "current_testing_result_id": 9, "cpu_speed": 0, "memory_test_status": -1, "osystem": "", "distro_series": "", "boot_disk": { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 3, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "a8m7sr", "resource_uri": "/MAAS/api/2.0/nodes/a8m7sr/blockdevices/3/" }, "resource_uri": "/MAAS/api/2.0/machines/a8m7sr/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to begin rescue mode on the machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=restore_default_configuration
Restores the default configuration options on a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "fqdn": "above-robin.sample", "architecture": "i386/generic", "current_commissioning_result_id": 21, "power_type": "virsh", "testing_status": 2, "cache_sets": [], "status_action": "action-Kboqzg", "netboot": true, "special_filesystems": [], "locked": false, "cpu_test_status_name": "Passed", "commissioning_status_name": "Passed", "node_type": 0, "volume_groups": [], "storage": 9204.621312000001, "tag_names": [], "memory_test_status_name": "Passed", "disable_ipv4": false, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "boot_interface": null, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "id": 9, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "type": "partition", "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "serial": "serial-jBitFU", "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "filesystem": null, "name": "name-xE9mtJ", "type": "physical", "model": "model-mSnL9L", "system_id": "thr3am", "id_path": null, "size": 3532084224, "available_size": 0, "uuid": null, "used_size": 3528458240, "partition_table_type": "MBR", "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "partitions": [], "serial": "serial-5EZFik", "id": 19, "path": "/dev/disk/by-dname/name-EjgNwC", "used_for": "Unused", "filesystem": null, "name": "name-EjgNwC", "type": "physical", "model": "model-OHzOYI", "system_id": "thr3am", "id_path": null, "size": 3498806272, "available_size": 3498806272, "uuid": null, "used_size": 0, "partition_table_type": null, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "partitions": [], "serial": "serial-SE3O1p", "id": 20, "path": "/dev/disk/by-dname/name-VhlrVi", "used_for": "Unused", "filesystem": null, "name": "name-VhlrVi", "type": "physical", "model": "model-5btVsu", "system_id": "thr3am", "id_path": null, "size": 2173730816, "available_size": 2173730816, "uuid": null, "used_size": 0, "partition_table_type": null, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "other_test_status_name": "Passed", "raids": [], "storage_test_status_name": "Passed", "current_installation_result_id": null, "status_message": "desc-SRem4v", "min_hwe_kernel": null, "virtualblockdevice_set": [], "distro_series": "", "cpu_test_status": 2, "other_test_status": 2, "owner": null, "iscsiblockdevice_set": [], "power_state": "on", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "interface_set": [], "node_type_name": "Machine", "storage_test_status": 2, "domain": { "authoritative": true, "ttl": null, "id": 1, "is_default": false, "name": "sample", "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "bcaches": [], "hwe_kernel": null, "swap_size": null, "system_id": "thr3am", "commissioning_status": 2, "address_ttl": null, "current_testing_result_id": 22, "testing_status_name": "Passed", "status": 4, "status_name": "Ready", "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "id": 9, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "type": "partition", "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "serial": "serial-jBitFU", "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "filesystem": null, "name": "name-xE9mtJ", "type": "physical", "model": "model-mSnL9L", "system_id": "thr3am", "id_path": null, "size": 3532084224, "available_size": 0, "uuid": null, "used_size": 3528458240, "partition_table_type": "MBR", "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "osystem": "", "memory_test_status": 2, "hostname": "above-robin", "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "cpu_count": 3, "memory": 8192, "ip_addresses": [], "owner_data": {}, "cpu_speed": 0, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "partitions": [ { "uuid": "38258f60-1d55-4c16-90e6-48a22073070d", "size": 3523215360, "bootable": false, "tags": [], "id": 9, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "472f77ad-a1d6-4a68-b24b-f75f428387ff", "mount_point": "/", "mount_options": null }, "used_for": "ext4 formatted filesystem mounted at /", "device_id": 18, "type": "partition", "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/9" } ], "serial": "serial-jBitFU", "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "filesystem": null, "name": "name-xE9mtJ", "type": "physical", "model": "model-mSnL9L", "system_id": "thr3am", "available_size": 0, "uuid": null, "used_size": 3528458240, "partition_table_type": "MBR", "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "partitions": [], "serial": "serial-5EZFik", "id": 19, "path": "/dev/disk/by-dname/name-EjgNwC", "used_for": "Unused", "filesystem": null, "name": "name-EjgNwC", "type": "physical", "model": "model-OHzOYI", "system_id": "thr3am", "available_size": 3498806272, "uuid": null, "used_size": 0, "partition_table_type": null, "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "partitions": [], "serial": "serial-SE3O1p", "id": 20, "path": "/dev/disk/by-dname/name-VhlrVi", "used_for": "Unused", "filesystem": null, "name": "name-VhlrVi", "type": "physical", "model": "model-5btVsu", "system_id": "thr3am", "available_size": 2173730816, "uuid": null, "used_size": 0, "partition_table_type": null, "storage_pool": "pool_id-QkOjON", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to restore default options on this machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=restore_networking_configuration
Restores networking options to their initial state on a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "tag_names": [], "cpu_test_status_name": "Passed", "status_name": "Ready", "hwe_kernel": null, "memory_test_status_name": "Passed", "commissioning_status_name": "Passed", "bcaches": [], "swap_size": null, "special_filesystems": [], "volume_groups": [], "locked": false, "current_testing_result_id": 22, "node_type": 0, "distro_series": "", "boot_interface": null, "node_type_name": "Machine", "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "serial": "serial-jBitFU", "model": "model-mSnL9L", "type": "physical", "path": "/dev/disk/by-dname/name-xE9mtJ", "used_size": 3528458240, "uuid": null, "system_id": "thr3am", "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "filesystem": null, "name": "name-xE9mtJ", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "device_id": 18, "type": "partition", "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "system_id": "thr3am", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "id": 1, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "id": 18, "storage_pool": "pool_id-QkOjON", "available_size": 0, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "serial": "serial-5EZFik", "model": "model-OHzOYI", "type": "physical", "path": "/dev/disk/by-dname/name-EjgNwC", "used_size": 0, "uuid": null, "system_id": "thr3am", "used_for": "Unused", "partition_table_type": null, "filesystem": null, "name": "name-EjgNwC", "partitions": [], "id": 19, "storage_pool": "pool_id-QkOjON", "available_size": 3498806272, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "serial": "serial-SE3O1p", "model": "model-5btVsu", "type": "physical", "path": "/dev/disk/by-dname/name-VhlrVi", "used_size": 0, "uuid": null, "system_id": "thr3am", "used_for": "Unused", "partition_table_type": null, "filesystem": null, "name": "name-VhlrVi", "partitions": [], "id": 20, "storage_pool": "pool_id-QkOjON", "available_size": 2173730816, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "power_state": "on", "fqdn": "above-robin.sample", "raids": [], "domain": { "authoritative": true, "ttl": null, "resource_record_count": 0, "is_default": false, "name": "sample", "id": 1, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "owner": null, "netboot": true, "status": 4, "virtualblockdevice_set": [], "hostname": "above-robin", "testing_status_name": "Passed", "cpu_test_status": 2, "memory_test_status": 2, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "disable_ipv4": false, "interface_set": [], "memory": 8192, "status_message": "desc-SRem4v", "min_hwe_kernel": null, "other_test_status_name": "Passed", "cpu_speed": 0, "osystem": "", "status_action": "action-Kboqzg", "testing_status": 2, "storage_test_status": 2, "system_id": "thr3am", "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "serial": "serial-jBitFU", "id_path": null, "model": "model-mSnL9L", "type": "physical", "block_size": 1024, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_size": 3528458240, "size": 3532084224, "uuid": null, "system_id": "thr3am", "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "filesystem": null, "name": "name-xE9mtJ", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "device_id": 18, "type": "partition", "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "system_id": "thr3am", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "id": 1, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "id": 18, "storage_pool": "pool_id-QkOjON", "available_size": 0, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "serial": "serial-5EZFik", "id_path": null, "model": "model-OHzOYI", "type": "physical", "block_size": 1024, "path": "/dev/disk/by-dname/name-EjgNwC", "used_size": 0, "size": 3498806272, "uuid": null, "system_id": "thr3am", "used_for": "Unused", "partition_table_type": null, "filesystem": null, "name": "name-EjgNwC", "partitions": [], "id": 19, "storage_pool": "pool_id-QkOjON", "available_size": 3498806272, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "serial": "serial-SE3O1p", "id_path": null, "model": "model-5btVsu", "type": "physical", "block_size": 4096, "path": "/dev/disk/by-dname/name-VhlrVi", "used_size": 0, "size": 2173730816, "uuid": null, "system_id": "thr3am", "used_for": "Unused", "partition_table_type": null, "filesystem": null, "name": "name-VhlrVi", "partitions": [], "id": 20, "storage_pool": "pool_id-QkOjON", "available_size": 2173730816, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "owner_data": {}, "current_commissioning_result_id": 21, "architecture": "i386/generic", "cache_sets": [], "power_type": "virsh", "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status": 2, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "serial": "serial-jBitFU", "id_path": null, "model": "model-mSnL9L", "type": "physical", "block_size": 1024, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_size": 3528458240, "size": 3532084224, "uuid": null, "system_id": "thr3am", "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "filesystem": null, "name": "name-xE9mtJ", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "device_id": 18, "type": "partition", "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "system_id": "thr3am", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "id": 1, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "id": 18, "storage_pool": "pool_id-QkOjON", "available_size": 0, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "storage": 9204.621312000001, "current_installation_result_id": null, "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "address_ttl": null, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "ip_addresses": [], "iscsiblockdevice_set": [], "other_test_status": 2, "storage_test_status_name": "Passed", "cpu_count": 3, "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to restore networking options on this machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=restore_storage_configuration
Restores storage configuration options to their initial state on a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
Success
HTTP Status Code : 200
JSON
{ "tag_names": [], "testing_status_name": "Passed", "storage_test_status_name": "Passed", "raids": [], "status_name": "Ready", "storage": 9204.621312000001, "boot_interface": null, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "system_id": "thr3am", "model": "model-mSnL9L", "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "block_size": 1024, "available_size": 0, "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "type": "physical", "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "storage_pool": "pool_id-QkOjON", "used_size": 3528458240, "serial": "serial-jBitFU", "size": 3532084224, "partitions": [ { "uuid": "6f361e21-2941-4199-b130-c51a84b90d53", "size": 3523215360, "bootable": false, "tags": [], "system_id": "thr3am", "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 8, "device_id": 18, "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "462a6127-618b-4c5d-ad53-3d4d64fb76e3", "mount_point": "/", "mount_options": null }, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/8" } ], "name": "name-xE9mtJ", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "testing_status": 2, "min_hwe_kernel": null, "distro_series": "", "swap_size": null, "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "interface_set": [], "owner_data": {}, "current_testing_result_id": 22, "cpu_test_status_name": "Passed", "bcaches": [], "status_message": "desc-SRem4v", "other_test_status": 2, "disable_ipv4": false, "cache_sets": [], "current_installation_result_id": null, "cpu_test_status": 2, "netboot": true, "system_id": "thr3am", "architecture": "i386/generic", "special_filesystems": [], "address_ttl": null, "status_action": "action-Kboqzg", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "owner": null, "memory": 8192, "volume_groups": [], "hostname": "above-robin", "cpu_count": 3, "power_type": "virsh", "osystem": "", "cpu_speed": 0, "domain": { "authoritative": true, "ttl": null, "id": 1, "is_default": false, "resource_record_count": 0, "name": "sample", "resource_uri": "/MAAS/api/2.0/domains/1/" }, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "storage_test_status": 2, "memory_test_status": 2, "current_commissioning_result_id": 21, "hwe_kernel": null, "fqdn": "above-robin.sample", "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "system_id": "thr3am", "model": "model-mSnL9L", "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "block_size": 1024, "available_size": 0, "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "type": "physical", "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "storage_pool": "pool_id-QkOjON", "used_size": 3528458240, "serial": "serial-jBitFU", "size": 3532084224, "partitions": [ { "uuid": "6f361e21-2941-4199-b130-c51a84b90d53", "size": 3523215360, "bootable": false, "tags": [], "system_id": "thr3am", "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 8, "device_id": 18, "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "462a6127-618b-4c5d-ad53-3d4d64fb76e3", "mount_point": "/", "mount_options": null }, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/8" } ], "name": "name-xE9mtJ", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "system_id": "thr3am", "model": "model-OHzOYI", "id_path": null, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "block_size": 1024, "available_size": 3498806272, "id": 19, "path": "/dev/disk/by-dname/name-EjgNwC", "uuid": null, "type": "physical", "used_for": "Unused", "partition_table_type": null, "storage_pool": "pool_id-QkOjON", "used_size": 0, "serial": "serial-5EZFik", "size": 3498806272, "partitions": [], "name": "name-EjgNwC", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "system_id": "thr3am", "model": "model-5btVsu", "id_path": null, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "block_size": 4096, "available_size": 2173730816, "id": 20, "path": "/dev/disk/by-dname/name-VhlrVi", "uuid": null, "type": "physical", "used_for": "Unused", "partition_table_type": null, "storage_pool": "pool_id-QkOjON", "used_size": 0, "serial": "serial-SE3O1p", "size": 2173730816, "partitions": [], "name": "name-VhlrVi", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "iscsiblockdevice_set": [], "status": 4, "other_test_status_name": "Passed", "node_type": 0, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "system_id": "thr3am", "model": "model-mSnL9L", "available_size": 0, "id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "type": "physical", "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "storage_pool": "pool_id-QkOjON", "used_size": 3528458240, "serial": "serial-jBitFU", "partitions": [ { "uuid": "6f361e21-2941-4199-b130-c51a84b90d53", "size": 3523215360, "bootable": false, "tags": [], "system_id": "thr3am", "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 8, "device_id": 18, "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "462a6127-618b-4c5d-ad53-3d4d64fb76e3", "mount_point": "/", "mount_options": null }, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/8" } ], "name": "name-xE9mtJ", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "system_id": "thr3am", "model": "model-OHzOYI", "available_size": 3498806272, "id": 19, "path": "/dev/disk/by-dname/name-EjgNwC", "uuid": null, "type": "physical", "used_for": "Unused", "partition_table_type": null, "storage_pool": "pool_id-QkOjON", "used_size": 0, "serial": "serial-5EZFik", "partitions": [], "name": "name-EjgNwC", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "system_id": "thr3am", "model": "model-5btVsu", "available_size": 2173730816, "id": 20, "path": "/dev/disk/by-dname/name-VhlrVi", "uuid": null, "type": "physical", "used_for": "Unused", "partition_table_type": null, "storage_pool": "pool_id-QkOjON", "used_size": 0, "serial": "serial-SE3O1p", "partitions": [], "name": "name-VhlrVi", "filesystem": null, "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "commissioning_status": 2, "node_type_name": "Machine", "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "power_state": "on", "memory_test_status_name": "Passed", "ip_addresses": [], "commissioning_status_name": "Passed", "locked": false, "virtualblockdevice_set": [], "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to restore storage options on this machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=set_owner_data
Set key=value data for the current owner.
Pass any key=value form data to this method to add, modify, or remove. A key is removed when the value for that key is set to an empty string.
This operation will not remove any previous keys unless explicitly passed with an empty string. All owner data is removed when the machine is no longer allocated to a user.
Parameters
key (String): Required. key
can be any string value.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content : The requested node is not found.
HTTP Status Code : 403
Content : The user does not have set the zone.
POST /MAAS/api/2.0/machines/{system_id}/?op=set_storage_layout
Changes the storage layout on machine with the given system_id.
This operation can only be performed on a machine with a status of 'Ready'.
Note: This will clear the current storage layout and any extra configuration and replace it will the new layout.
Parameters
{system_id} (String): Required. The machines's system_id.
storage_layout (String): Required. Storage layout for the
machine: flat
, lvm
, and bcache
.
boot_size (String): Optional. All layouts. Size of the boot partition (e.g. 512M, 1G).
root_size (String): Optional. All layouts. Size of the root partition (e.g. 24G).
root_device (String): Optional. All layouts. Physical block device to place the root partition (e.g. /dev/sda).
vg_name (String): Optional. LVM only. Name of created volume group.
lv_name (String): Optional. LVM only. Name of created logical volume.
lv_size (String): Optional. LVM only. Size of created logical volume.
cache_device (String): Optional. Bcache only. Physical block device to use as the cache device (e.g. /dev/sda).
cache_mode (String): Optional. Bcache only. Cache mode for bcache
device: writeback
, writethrough
, writearound
.
cache_size (String): Optional. Bcache only. Size of the cache partition to create on the cache device (e.g. 48G).
cache_no_part (Boolean): Optional. Bcache only. Don't create a partition on the cache device. Use the entire disk as the cache device.
Success
HTTP Status Code : 200
JSON
{ "special_filesystems": [], "min_hwe_kernel": "", "fqdn": "clever-turkey.maas", "node_type": 0, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "current_commissioning_result_id": 4, "raids": [], "storage": 8000, "status_action": "", "storage_test_status": 0, "status_message": "From 'New' to 'Commissioning'", "owner": "admin", "owner_data": {}, "hwe_kernel": null, "status_name": "Commissioning", "iscsiblockdevice_set": [], "current_installation_result_id": null, "power_state": "off", "cpu_count": 1, "power_type": "virsh", "netboot": true, "commissioning_status_name": "Pending", "volume_groups": [], "status": 1, "cpu_test_status_name": "Unknown", "system_id": "8bk8nn", "swap_size": null, "memory": 1024, "architecture": "amd64/generic", "address_ttl": null, "testing_status_name": "Pending", "cpu_test_status": -1, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "hostname": "clever-turkey", "locked": false, "testing_status": 0, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 512, "tags": [ "default" ], "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 1, "partition_table_type": null, "available_size": 8000000000, "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "used_for": "Unused", "used_size": 0, "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/blockdevices/1/" } ], "boot_interface": { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 4, "params": "", "firmware_version": null, "mac_address": "52:54:00:e8:4e:f2", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/interfaces/4/" }, "interface_set": [ { "children": [], "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "undefined", "fabric_id": 1, "primary_rack": "ccfqya", "id": 5002, "name": "untagged", "fabric": "fabric-1", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "effective_mtu": 1500, "links": [], "vendor": null, "product": null, "id": 4, "params": "", "firmware_version": null, "mac_address": "52:54:00:e8:4e:f2", "enabled": true, "type": "physical", "name": "eth0", "tags": [], "parents": [], "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/interfaces/4/" } ], "storage_test_status_name": "Pending", "other_test_status_name": "Unknown", "tag_names": [ "virtual" ], "commissioning_status": 0, "physicalblockdevice_set": [ { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 1, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/blockdevices/1/" } ], "memory_test_status_name": "Unknown", "other_test_status": -1, "domain": { "authoritative": true, "ttl": null, "name": "maas", "id": 0, "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "virtualblockdevice_set": [], "cache_sets": [], "ip_addresses": [], "pod": { "id": 1, "name": "LXCPod", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "disable_ipv4": false, "bcaches": [], "node_type_name": "Machine", "current_testing_result_id": 5, "cpu_speed": 0, "memory_test_status": -1, "osystem": "", "distro_series": "", "boot_disk": { "firmware_version": null, "size": 8000000000, "storage_pool": "e15d1787-0251-4bb2-9d8b-a5a77f1e9059", "path": "/dev/disk/by-dname/sda", "partitions": [], "serial": "", "model": "", "id": 1, "partition_table_type": null, "available_size": 8000000000, "tags": [ "default" ], "id_path": "/dev/vda", "uuid": null, "type": "physical", "filesystem": null, "name": "sda", "block_size": 512, "used_for": "Unused", "used_size": 0, "system_id": "8bk8nn", "resource_uri": "/MAAS/api/2.0/nodes/8bk8nn/blockdevices/1/" }, "resource_uri": "/MAAS/api/2.0/machines/8bk8nn/" }
Error
HTTP Status Code : 400
Content : The requested machine is not allocated.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user does not have permission to set the storage layout of this machine.
POST /MAAS/api/2.0/machines/{system_id}/?op=test
Begins the testing process for a given node.
A node in the 'ready', 'allocated', 'deployed', 'broken', or any failed state may run tests. If testing is started and successfully passes from 'broken' or any failed state besides 'failed commissioning' the node will be returned to a ready state. Otherwise the node will return to the state it was when testing started.
Parameters
enable_ssh (Int): Optional. Whether to enable SSH for the testing environment using the user's SSH key(s). 0 == false. 1 == true.
testing_scripts (String): Optional. A comma-separated list of testing script names and tags to be run. By default all tests tagged 'commissioning' will be run.
Success
HTTP Status Code : 204
JSON
{ "cpu_speed": 2500, "disable_ipv4": false, "cache_sets": [], "other_test_status_name": "Unknown", "memory_test_status": -1, "tag_names": [ "virtual", "mypod" ], "netboot": false, "power_type": "virsh", "hostname": "node2", "node_type": 0, "testing_status": 0, "default_gateways": { "ipv4": { "gateway_ip": "172.16.99.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "raids": [], "current_installation_result_id": 8, "locked": false, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "iscsiblockdevice_set": [], "current_commissioning_result_id": 6, "current_testing_result_id": 49, "osystem": "ubuntu", "cpu_count": 1, "node_type_name": "Machine", "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "filesystem": null, "model": "", "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "serial": "", "partition_table_type": "MBR", "type": "physical", "id": 2, "path": "/dev/disk/by-dname/vda", "system_id": "e8xa8m", "uuid": null, "available_size": 0, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "device_id": 2, "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "system_id": "e8xa8m", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "name": "vda", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "boot_interface": { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "52:54:00:52:a5:9e", "parents": [], "effective_mtu": 1500, "discovered": [], "type": "physical", "children": [], "product": "Standard PC (i440FX + PIIX, 1996)", "params": "", "tags": [], "id": 5, "vendor": "QEMU", "system_id": "e8xa8m", "enabled": true, "name": "ens4", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" }, "pod": { "id": 1, "name": "MyPodName", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "storage_test_status": 0, "architecture": "amd64/generic", "memory_test_status_name": "Unknown", "storage": 8000, "status_action": "modules-final", "virtualblockdevice_set": [], "special_filesystems": [], "other_test_status": -1, "status_name": "Testing", "volume_groups": [], "ip_addresses": [ "172.16.99.5" ], "hardware_info": { "system_vendor": "QEMU", "system_product": "Standard PC (i440FX + PIIX, 1996)", "system_version": "pc-i440fx-bionic", "system_serial": "Unknown", "cpu_model": "QEMU Virtual CPU version 2.5+", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "1.10.2-1ubuntu1", "mainboard_firmware_date": "04/01/2014" }, "swap_size": null, "owner_data": {}, "status": 21, "cpu_test_status_name": "Unknown", "boot_disk": { "firmware_version": null, "id_path": "/dev/vda", "block_size": 4096, "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "filesystem": null, "model": "", "size": 8000000000, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "serial": "", "partition_table_type": "MBR", "type": "physical", "tags": [ "rotary" ], "id": 2, "path": "/dev/disk/by-dname/vda", "system_id": "e8xa8m", "uuid": null, "available_size": 0, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "device_id": 2, "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "system_id": "e8xa8m", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "name": "vda", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" }, "address_ttl": null, "system_id": "e8xa8m", "memory": 1024, "domain": { "authoritative": true, "ttl": null, "resource_record_count": 0, "is_default": true, "id": 0, "name": "maas", "resource_uri": "/MAAS/api/2.0/domains/0/" }, "min_hwe_kernel": "", "physicalblockdevice_set": [ { "firmware_version": null, "id_path": "/dev/vda", "block_size": 4096, "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "filesystem": null, "model": "", "size": 8000000000, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "serial": "", "partition_table_type": "MBR", "type": "physical", "tags": [ "rotary" ], "id": 2, "path": "/dev/disk/by-dname/vda", "system_id": "e8xa8m", "uuid": null, "available_size": 0, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "device_id": 2, "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "system_id": "e8xa8m", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "name": "vda", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "owner": "admin", "power_state": "on", "hwe_kernel": "ga-18.04", "testing_status_name": "Pending", "pool": { "name": "newname", "description": "new description", "id": 1, "resource_uri": "/MAAS/api/2.0/resourcepool/1/" }, "fqdn": "node2.maas", "status_message": "'cloudinit' running modules for final", "commissioning_status": 2, "distro_series": "bionic", "cpu_test_status": -1, "storage_test_status_name": "Pending", "bcaches": [], "interface_set": [ { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "52:54:00:52:a5:9e", "parents": [], "effective_mtu": 1500, "discovered": [], "type": "physical", "children": [], "product": "Standard PC (i440FX + PIIX, 1996)", "params": "", "tags": [], "id": 5, "vendor": "QEMU", "system_id": "e8xa8m", "enabled": true, "name": "ens4", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" } ], "commissioning_status_name": "Passed", "resource_uri": "/MAAS/api/2.0/machines/e8xa8m/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=unlock
Mark a machine with the given system_id as 'Unlocked' to allow changes.
Parameters
{system_id} (String): Required. The machines's system_id.
comment (String): Optional. Optional comment for the event log.
Success
HTTP Status Code : 200
JSON
{ "fqdn": "aware-elk.maas", "power_state": "on", "volume_groups": [ { "system_id": "recrwg", "id": 1, "__incomplete__": true } ], "storage": 5294.79424, "virtualblockdevice_set": [ { "filesystem": { "fstype": "ext4", "label": "root", "uuid": "4fc23a1c-dab0-471e-aa8d-b1e157c681af", "mount_point": "/", "mount_options": null }, "name": "vgroot-lvroot", "tags": [], "partition_table_type": null, "size": 1426063360, "system_id": "recrwg", "path": "/dev/disk/by-dname/vgroot-lvroot", "uuid": "dddd6ee5-0a11-4af0-b8d3-5d71d9d1617e", "type": "virtual", "model": null, "serial": null, "used_for": "ext4 formatted filesystem mounted at /", "block_size": 4096, "partitions": [], "id_path": null, "available_size": 0, "storage_pool": null, "used_size": 1426063360, "id": 24, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/24/" } ], "current_commissioning_result_id": 41, "min_hwe_kernel": null, "locked": true, "status_name": "Deployed", "cpu_count": 6, "interface_set": [ { "parents": [], "name": "eth-xMPy44", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-I507XZ", "tag-U7WRmW", "tag-Nkiold" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "2f:00:35:fd:94:0a", "children": [ "eth-xMPy44.10" ], "links": [ { "id": 23, "mode": "auto", "ip_address": "172.16.1.81", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 46, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/46/" }, { "parents": [], "name": "eth-y3Syjk", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-uFpKfL", "tag-JwGxLy", "tag-FNTvHD" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "22:2e:4a:ca:ed:bb", "children": [ "eth-y3Syjk.10" ], "links": [ { "id": 24, "mode": "auto", "ip_address": "172.16.1.50", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 47, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/47/" }, { "parents": [], "name": "eth-mrQO2Y", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-ZOwzJO", "tag-dGE8gU", "tag-4qpUgN" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "b1:3d:dd:86:16:0b", "children": [ "eth-mrQO2Y.10" ], "links": [ { "id": 25, "mode": "static", "ip_address": "172.16.1.140", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 48, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/48/" }, { "parents": [ "eth-xMPy44" ], "name": "eth-xMPy44.10", "firmware_version": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "tags": [ "tag-XBs2PI", "tag-FC4Krm", "tag-Lb8OTS" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "vlan", "params": "", "product": null, "mac_address": "2f:00:35:fd:94:0a", "children": [], "links": [ { "id": 26, "mode": "static", "ip_address": "172.16.3.217", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "discovered": null, "vendor": null, "id": 49, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/49/" }, { "parents": [ "eth-y3Syjk" ], "name": "eth-y3Syjk.10", "firmware_version": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "tags": [ "tag-pcPo4T", "tag-rU43Xd", "tag-KaVXHp" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "vlan", "params": "", "product": null, "mac_address": "22:2e:4a:ca:ed:bb", "children": [], "links": [ { "id": 27, "mode": "auto", "ip_address": "172.16.4.21", "subnet": { "name": "name-c2ULe1", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.4.0/24", "rdns_mode": 2, "gateway_ip": "172.16.4.1", "dns_servers": [ "fd08:fef7:5c1f:a2e6:3d8e:6c3b:89f9:80cb", "fc67:ad6a:88fe:9192:62f9:e882:8bcc:339e", "255.59.162.158" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 4, "resource_uri": "/MAAS/api/2.0/subnets/4/" } } ], "discovered": null, "vendor": null, "id": 50, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/50/" }, { "parents": [ "eth-mrQO2Y" ], "name": "eth-mrQO2Y.10", "firmware_version": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "tags": [ "tag-v9GgVC", "tag-xDdgfA", "tag-Y8fBEG" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "vlan", "params": "", "product": null, "mac_address": "b1:3d:dd:86:16:0b", "children": [], "links": [ { "id": 28, "mode": "auto", "ip_address": "172.16.3.79", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "10", "space": "internal", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "discovered": null, "vendor": null, "id": 51, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/51/" } ], "raids": [], "boot_interface": { "parents": [], "name": "eth-xMPy44", "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "tags": [ "tag-I507XZ", "tag-U7WRmW", "tag-Nkiold" ], "system_id": "recrwg", "enabled": true, "effective_mtu": 1500, "type": "physical", "params": "", "product": null, "mac_address": "2f:00:35:fd:94:0a", "children": [ "eth-xMPy44.10" ], "links": [ { "id": 23, "mode": "auto", "ip_address": "172.16.1.81", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "discovered": null, "vendor": null, "id": 46, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/interfaces/46/" }, "status_message": "(admin)", "status": 6, "node_type": 0, "netboot": true, "pod": { "id": 4, "name": "crisp-lab", "resource_uri": "/MAAS/api/2.0/pods/4/" }, "cpu_test_status_name": "Passed", "storage_test_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "is_default": true, "id": 0, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-DBlpn2", "filesystem": null, "name": "name-pgLeVS", "tags": [ "tag-QzeBbm", "tag-OWHfqo", "tag-CM5Qpt" ], "partition_table_type": "MBR", "size": 1438582272, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS", "uuid": null, "type": "physical", "model": "model-62BmpN", "serial": "serial-iMHmE5", "used_for": "MBR partitioned with 1 partition", "block_size": 512, "partitions": [ { "uuid": "05fb6e01-03e9-4e5b-a826-ec15a91a3219", "size": 1430257664, "bootable": false, "tags": [], "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "ec4275ae-7e49-4cc0-9194-4e4e264e2e32", "mount_point": null, "mount_options": null }, "device_id": 22, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS-part1", "type": "partition", "used_for": "LVM volume for vgroot", "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/partition/2" } ], "id_path": null, "available_size": 0, "storage_pool": "pool_id-LcQqiM", "used_size": 1435500544, "id": 22, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/" }, "testing_status": 2, "cpu_test_status": 2, "disable_ipv4": false, "cpu_speed": 0, "owner": "admin", "hostname": "aware-elk", "ip_addresses": [ "172.16.1.81", "172.16.1.50", "172.16.1.140", "172.16.3.217", "172.16.4.21", "172.16.3.79" ], "iscsiblockdevice_set": [], "special_filesystems": [], "memory_test_status": 2, "other_test_status": 2, "osystem": "", "distro_series": "", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "bcaches": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "current_testing_result_id": 42, "architecture": "i386/generic", "system_id": "recrwg", "current_installation_result_id": 43, "other_test_status_name": "Passed", "swap_size": null, "status_action": "lock", "testing_status_name": "Passed", "address_ttl": null, "node_type_name": "Machine", "commissioning_status": 2, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "memory_test_status_name": "Passed", "memory": 8192, "power_type": "virsh", "commissioning_status_name": "Passed", "hwe_kernel": null, "default_gateways": { "ipv4": { "gateway_ip": "172.16.1.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-DBlpn2", "filesystem": null, "name": "name-pgLeVS", "tags": [ "tag-QzeBbm", "tag-OWHfqo", "tag-CM5Qpt" ], "partition_table_type": "MBR", "size": 1438582272, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS", "uuid": null, "type": "physical", "model": "model-62BmpN", "serial": "serial-iMHmE5", "used_for": "MBR partitioned with 1 partition", "block_size": 512, "partitions": [ { "uuid": "05fb6e01-03e9-4e5b-a826-ec15a91a3219", "size": 1430257664, "bootable": false, "tags": [], "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "ec4275ae-7e49-4cc0-9194-4e4e264e2e32", "mount_point": null, "mount_options": null }, "device_id": 22, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS-part1", "type": "partition", "used_for": "LVM volume for vgroot", "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/partition/2" } ], "id_path": null, "available_size": 0, "storage_pool": "pool_id-LcQqiM", "used_size": 1435500544, "id": 22, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/" }, { "firmware_version": "firmware_version-MtZVEn", "filesystem": null, "name": "name-nI5TAA", "tags": [ "tag-1U9Qzd", "tag-mvNZeT", "tag-oFF6wc" ], "partition_table_type": null, "size": 3856211968, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-nI5TAA", "uuid": null, "type": "physical", "model": "model-qPjKqf", "serial": "serial-VKKak6", "used_for": "Unused", "block_size": 1024, "partitions": [], "id_path": null, "available_size": 3856211968, "storage_pool": "pool_id-nYrFZj", "used_size": 0, "id": 23, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/23/" } ], "cache_sets": [], "owner_data": {}, "storage_test_status": 2, "tag_names": [], "blockdevice_set": [ { "id_path": null, "size": 1438582272, "block_size": 512, "tags": [ "tag-QzeBbm", "tag-OWHfqo", "tag-CM5Qpt" ], "filesystem": null, "name": "name-pgLeVS", "partition_table_type": "MBR", "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS", "uuid": null, "type": "physical", "model": "model-62BmpN", "serial": "serial-iMHmE5", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "05fb6e01-03e9-4e5b-a826-ec15a91a3219", "size": 1430257664, "bootable": false, "tags": [], "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "ec4275ae-7e49-4cc0-9194-4e4e264e2e32", "mount_point": null, "mount_options": null }, "device_id": 22, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-pgLeVS-part1", "type": "partition", "used_for": "LVM volume for vgroot", "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/partition/2" } ], "available_size": 0, "storage_pool": "pool_id-LcQqiM", "used_size": 1435500544, "id": 22, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/22/" }, { "id_path": null, "size": 3856211968, "block_size": 1024, "tags": [ "tag-1U9Qzd", "tag-mvNZeT", "tag-oFF6wc" ], "filesystem": null, "name": "name-nI5TAA", "partition_table_type": null, "system_id": "recrwg", "path": "/dev/disk/by-dname/name-nI5TAA", "uuid": null, "type": "physical", "model": "model-qPjKqf", "serial": "serial-VKKak6", "used_for": "Unused", "partitions": [], "available_size": 3856211968, "storage_pool": "pool_id-nYrFZj", "used_size": 0, "id": 23, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/23/" }, { "id_path": null, "size": 1426063360, "block_size": 4096, "tags": [], "filesystem": { "fstype": "ext4", "label": "root", "uuid": "4fc23a1c-dab0-471e-aa8d-b1e157c681af", "mount_point": "/", "mount_options": null }, "name": "vgroot-lvroot", "partition_table_type": null, "system_id": "recrwg", "path": "/dev/disk/by-dname/lvroot", "uuid": "dddd6ee5-0a11-4af0-b8d3-5d71d9d1617e", "type": "virtual", "model": null, "serial": null, "used_for": "ext4 formatted filesystem mounted at /", "partitions": [], "available_size": 0, "storage_pool": null, "used_size": 1426063360, "id": 24, "resource_uri": "/MAAS/api/2.0/nodes/recrwg/blockdevices/24/" } ], "resource_uri": "/MAAS/api/2.0/machines/recrwg/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to unlock the machine.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/machines/{system_id}/?op=unmount_special
Unmount a special-purpose filesystem, like tmpfs, on a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
mount_point (String): Required. Path on the filesystem to unmount.
Success
HTTP Status Code : 200
JSON
{ "storage_test_status_name": "Passed", "ip_addresses": [ "2001:db8:42:0:6556:13fa:7452:70da", "2001:db8:42:0:cf29:e368:ba5b:9977" ], "testing_status_name": "Passed", "cpu_count": 3, "node_type_name": "Machine", "osystem": "", "disable_ipv4": false, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "system_id": "thr3am", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 1, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "used_size": 3528458240, "available_size": 0, "used_for": "MBR partitioned with 1 partition", "system_id": "thr3am", "name": "name-xE9mtJ", "filesystem": null, "partition_table_type": "MBR", "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "model": "model-mSnL9L", "serial": "serial-jBitFU", "storage_pool": "pool_id-QkOjON", "id": 18, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "partitions": [], "used_size": 0, "available_size": 3498806272, "used_for": "Unused", "system_id": "thr3am", "name": "name-EjgNwC", "filesystem": null, "partition_table_type": null, "path": "/dev/disk/by-dname/name-EjgNwC", "uuid": null, "model": "model-OHzOYI", "serial": "serial-5EZFik", "storage_pool": "pool_id-QkOjON", "id": 19, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "partitions": [], "used_size": 0, "available_size": 2173730816, "used_for": "Unused", "system_id": "thr3am", "name": "name-VhlrVi", "filesystem": null, "partition_table_type": null, "path": "/dev/disk/by-dname/name-VhlrVi", "uuid": null, "model": "model-5btVsu", "serial": "serial-SE3O1p", "storage_pool": "pool_id-QkOjON", "id": 20, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "status_action": "action-Kboqzg", "memory_test_status_name": "Passed", "interface_set": [ { "parents": [], "params": "", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "system_id": "thr3am", "name": "eth-lKRYAa", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-lKRYAa.42" ], "product": null, "id": 37, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, { "parents": [], "params": "", "links": [ { "id": 15, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "bc:d3:d5:28:88:dc", "tags": [ "tag-LddZkA", "tag-EDi2sp", "tag-RwynT2" ], "system_id": "thr3am", "name": "eth-3ookc5", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-3ookc5.42" ], "product": null, "id": 38, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/38/" }, { "parents": [], "params": "", "links": [ { "id": 16, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "ad:5a:3e:a3:68:13", "tags": [ "tag-dc12B9", "tag-D71Hh0", "tag-PnEfvN" ], "system_id": "thr3am", "name": "eth-W8E8f0", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-W8E8f0.42" ], "product": null, "id": 39, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/39/" }, { "parents": [ "eth-lKRYAa" ], "params": "", "links": [ { "id": 17, "mode": "auto", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "tags": [ "tag-u0TLLj", "tag-C09Efp", "tag-QK7j09" ], "system_id": "thr3am", "name": "eth-lKRYAa.42", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [], "product": null, "id": 40, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/40/" }, { "parents": [ "eth-3ookc5" ], "params": "", "links": [ { "id": 18, "mode": "static", "ip_address": "2001:db8:42:0:6556:13fa:7452:70da", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "bc:d3:d5:28:88:dc", "tags": [ "tag-EFzacM", "tag-dxAebl", "tag-GsPX3m" ], "system_id": "thr3am", "name": "eth-3ookc5.42", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [], "product": null, "id": 41, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/41/" }, { "parents": [ "eth-W8E8f0" ], "params": "", "links": [ { "id": 19, "mode": "static", "ip_address": "2001:db8:42:0:cf29:e368:ba5b:9977", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "mac_address": "ad:5a:3e:a3:68:13", "tags": [ "tag-cyexYi", "tag-nnoi80", "tag-xhApes" ], "system_id": "thr3am", "name": "eth-W8E8f0.42", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "space": "ipv6-testbed", "name": "42", "fabric": "fabric-1", "primary_rack": null, "fabric_id": 1, "id": 5004, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [], "product": null, "id": 42, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/42/" } ], "owner_data": {}, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "system_id": "thr3am", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 1, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "used_size": 3528458240, "available_size": 0, "used_for": "MBR partitioned with 1 partition", "system_id": "thr3am", "name": "name-xE9mtJ", "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "filesystem": null, "partition_table_type": "MBR", "block_size": 1024, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "model": "model-mSnL9L", "serial": "serial-jBitFU", "storage_pool": "pool_id-QkOjON", "size": 3532084224, "id": 18, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "storage_test_status": 2, "power_type": "virsh", "other_test_status": 2, "owner": null, "min_hwe_kernel": null, "pod": { "id": 5, "name": "poetic-snipe", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "tag_names": [], "memory_test_status": 2, "testing_status": 2, "boot_interface": { "parents": [], "params": "", "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "cb:93:ac:d1:ed:65", "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "system_id": "thr3am", "name": "eth-lKRYAa", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "name": "untagged", "fabric": "fabric-1", "primary_rack": "7xtf67", "fabric_id": 1, "id": 5003, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "enabled": true, "discovered": null, "effective_mtu": 1500, "vendor": null, "children": [ "eth-lKRYAa.42" ], "product": null, "id": 37, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, "raids": [], "node_type": 0, "cpu_speed": 0, "netboot": true, "status_message": "desc-SRem4v", "status": 4, "current_installation_result_id": null, "volume_groups": [], "storage": 9204.621312000001, "system_id": "thr3am", "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "partitions": [ { "uuid": "c9140888-aa96-49a6-b17f-3cdb9da2ded6", "size": 3523215360, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "system_id": "thr3am", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "ce7cbffe-2129-43a8-8498-28a0a35f93b9", "mount_point": "/", "mount_options": null }, "device_id": 18, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "id": 1, "type": "partition", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "used_size": 3528458240, "available_size": 0, "used_for": "MBR partitioned with 1 partition", "system_id": "thr3am", "name": "name-xE9mtJ", "id_path": null, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "filesystem": null, "partition_table_type": "MBR", "block_size": 1024, "path": "/dev/disk/by-dname/name-xE9mtJ", "uuid": null, "model": "model-mSnL9L", "serial": "serial-jBitFU", "storage_pool": "pool_id-QkOjON", "size": 3532084224, "id": 18, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "partitions": [], "used_size": 0, "available_size": 3498806272, "used_for": "Unused", "system_id": "thr3am", "name": "name-EjgNwC", "id_path": null, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "filesystem": null, "partition_table_type": null, "block_size": 1024, "path": "/dev/disk/by-dname/name-EjgNwC", "uuid": null, "model": "model-OHzOYI", "serial": "serial-5EZFik", "storage_pool": "pool_id-QkOjON", "size": 3498806272, "id": 19, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "partitions": [], "used_size": 0, "available_size": 2173730816, "used_for": "Unused", "system_id": "thr3am", "name": "name-VhlrVi", "id_path": null, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "filesystem": null, "partition_table_type": null, "block_size": 4096, "path": "/dev/disk/by-dname/name-VhlrVi", "uuid": null, "model": "model-5btVsu", "serial": "serial-SE3O1p", "storage_pool": "pool_id-QkOjON", "size": 2173730816, "id": 20, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "domain": { "authoritative": true, "ttl": null, "is_default": false, "name": "sample", "resource_record_count": 0, "id": 1, "resource_uri": "/MAAS/api/2.0/domains/1/" }, "status_name": "Ready", "hwe_kernel": null, "special_filesystems": [ { "fstype": "tmpfs", "label": null, "uuid": "be2d1132-669d-41b8-977d-5100ee22cec3", "mount_point": "/home/foo", "mount_options": "" } ], "locked": false, "current_testing_result_id": 22, "other_test_status_name": "Passed", "cpu_test_status_name": "Passed", "cache_sets": [], "cpu_test_status": 2, "architecture": "i386/generic", "default_gateways": { "ipv4": { "gateway_ip": "172.16.2.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "bcaches": [], "current_commissioning_result_id": 21, "virtualblockdevice_set": [], "commissioning_status": 2, "iscsiblockdevice_set": [], "address_ttl": null, "commissioning_status_name": "Passed", "distro_series": "", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "swap_size": null, "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "fqdn": "above-robin.sample", "memory": 8192, "power_state": "on", "hostname": "above-robin", "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 403
Content : The user does not have permission to unmount the special filesystem on this machine.
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/machines/{system_id}/
Updates a machine with the given system_id.
Parameters
{system_id} (String): Required. The machines's system_id.
hostname (String): Optional. The new hostname for this machine.
domain (String): Optional. The domain for this machine. If not given the default domain is used.
architecture (String): Optional. The new architecture for this machine.
min_hwe_kernel (String): Optional. A string containing the minimum kernel version allowed to be ran on this machine.
power_type (String): Optional. The new power type for this machine. If you use the default value, power_parameters will be set to the empty string. Available to admin users. See the Power types section for a list of the available power types.
power_parameters (String): Optional. The new value for the 'param1' power parameter. Note that this is dynamic as the available parameters depend on the selected value of the Machine's power_type. Available to admin users. See the Power types section for a list of the available power parameters for each power type.
power_parameters_skip_check (Boolean): Optional. Whether or not the new power parameters for this machine should be checked against the expected power parameters for the machine's power type ('true' or 'false'). The default is 'false'.
pool (String): Optional. The resource pool to which the machine should belong. All machines belong to the 'default' resource pool if they do not belong to any other resource pool.
zone (String): Optional. Name of a valid physical zone in which to place this machine.
swap_size (String): Optional. Specifies the size of the swap file, in bytes. Field accept K, M, G and T suffixes for values expressed respectively in kilobytes, megabytes, gigabytes and terabytes.
disable_ipv4 (Boolean): Optional. Deprecated. If specified, must be false.
cpu_count (Int): Optional. The amount of CPU cores the machine has.
memory (String): Optional. How much memory the machine has. Field accept K, M, G and T suffixes for values expressed respectively in kilobytes, megabytes, gigabytes and terabytes.
Success
HTTP Status Code : 200
JSON
{ "current_installation_result_id": null, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "status": 10, "pod": null, "tag_names": [], "interface_set": [ { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "59:19:ad:ff:98:40", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-1OCzPl", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-i1LDjJ", "tag-KdsM1g", "tag-u3TxeO" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 69, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/69/" }, { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "4e:3a:ce:3f:78:73", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-jazQFg", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-FkyL8W", "tag-r9cMlR", "tag-5qrXq4" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 70, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/70/" }, { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "bc:8b:c6:bf:fc:62", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-D6eWMG", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-5uCxk5", "tag-3jzOoX", "tag-Ik6cQK" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 71, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/71/" }, { "type": "bond", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "b3:34:d5:e4:93:a7", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "bond-JJpXQk", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-p1ayax", "tag-AQZCd9", "tag-xOStNZ" ], "children": [], "product": null, "params": "", "links": [], "id": 72, "parents": [ "eth-1OCzPl", "eth-D6eWMG", "eth-jazQFg" ], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/72/" } ], "blockdevice_set": [ { "id_path": null, "size": 1420288000, "block_size": 4096, "tags": [ "tag-A5ettc", "tag-ZGBqxq", "tag-pRNe2w" ], "type": "physical", "available_size": 0, "model": "model-UKuyzV", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "e8cf55ff-67d4-48fe-addd-76537625dd9c", "size": 1413480448, "bootable": false, "tags": [], "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "system_id": "d8n3re", "path": "/dev/disk/by-dname/name-c4XzgA-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "8b30d12c-79b2-4be6-aefd-5bc79597fcdb", "mount_point": "/", "mount_options": null }, "device_id": 37, "id": 4, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/partition/4" } ], "system_id": "d8n3re", "name": "name-c4XzgA", "path": "/dev/disk/by-dname/name-c4XzgA", "serial": "serial-ioxfVu", "used_size": 1418723328, "filesystem": null, "storage_pool": null, "partition_table_type": "MBR", "uuid": null, "id": 37, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/" } ], "special_filesystems": [], "distro_series": "", "volume_groups": [], "domain": { "authoritative": true, "ttl": null, "is_default": false, "name": "ubnt", "resource_record_count": 0, "id": 2, "resource_uri": "/MAAS/api/2.0/domains/2/" }, "disable_ipv4": false, "power_state": "on", "storage_test_status": 3, "hwe_kernel": null, "zone": { "name": "zone-south", "description": "swatTQdIEo", "id": 3, "resource_uri": "/MAAS/api/2.0/zones/zone-south/" }, "boot_disk": { "firmware_version": "firmware_version-6wcxNP", "type": "physical", "available_size": 0, "model": "model-UKuyzV", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "e8cf55ff-67d4-48fe-addd-76537625dd9c", "size": 1413480448, "bootable": false, "tags": [], "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "system_id": "d8n3re", "path": "/dev/disk/by-dname/name-c4XzgA-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "8b30d12c-79b2-4be6-aefd-5bc79597fcdb", "mount_point": "/", "mount_options": null }, "device_id": 37, "id": 4, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/partition/4" } ], "system_id": "d8n3re", "name": "name-c4XzgA", "path": "/dev/disk/by-dname/name-c4XzgA", "id_path": null, "tags": [ "tag-A5ettc", "tag-ZGBqxq", "tag-pRNe2w" ], "serial": "serial-ioxfVu", "used_size": 1418723328, "filesystem": null, "storage_pool": null, "block_size": 4096, "partition_table_type": "MBR", "size": 1420288000, "uuid": null, "id": 37, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/" }, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "commissioning_status": 2, "cpu_test_status": 3, "address_ttl": null, "swap_size": null, "other_test_status": 2, "storage": 1420.288, "ip_addresses": [], "other_test_status_name": "Passed", "status_name": "Allocated", "iscsiblockdevice_set": [], "storage_test_status_name": "Failed", "memory_test_status_name": "Passed", "netboot": true, "memory": 4096, "osystem": "", "system_id": "d8n3re", "cpu_count": 7, "locked": false, "memory_test_status": 2, "raids": [], "current_commissioning_result_id": 93, "current_testing_result_id": 94, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-6wcxNP", "type": "physical", "available_size": 0, "model": "model-UKuyzV", "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "e8cf55ff-67d4-48fe-addd-76537625dd9c", "size": 1413480448, "bootable": false, "tags": [], "type": "partition", "used_for": "ext4 formatted filesystem mounted at /", "system_id": "d8n3re", "path": "/dev/disk/by-dname/name-c4XzgA-part1", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "8b30d12c-79b2-4be6-aefd-5bc79597fcdb", "mount_point": "/", "mount_options": null }, "device_id": 37, "id": 4, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/partition/4" } ], "system_id": "d8n3re", "name": "name-c4XzgA", "path": "/dev/disk/by-dname/name-c4XzgA", "id_path": null, "tags": [ "tag-A5ettc", "tag-ZGBqxq", "tag-pRNe2w" ], "serial": "serial-ioxfVu", "used_size": 1418723328, "filesystem": null, "storage_pool": null, "block_size": 4096, "partition_table_type": "MBR", "size": 1420288000, "uuid": null, "id": 37, "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/blockdevices/37/" } ], "cache_sets": [], "node_type": 0, "node_type_name": "Machine", "owner": "admin", "fqdn": "newname.ubnt", "bcaches": [], "power_type": "manual", "cpu_speed": 0, "status_action": "action-zj4LdP", "architecture": "amd64/generic", "min_hwe_kernel": "", "virtualblockdevice_set": [], "boot_interface": { "type": "physical", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5005, "name": "untagged", "fabric": "fabric-2", "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric_id": 2, "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "mac_address": "59:19:ad:ff:98:40", "enabled": true, "discovered": null, "system_id": "d8n3re", "name": "eth-1OCzPl", "effective_mtu": 1500, "firmware_version": null, "vendor": null, "tags": [ "tag-i1LDjJ", "tag-KdsM1g", "tag-u3TxeO" ], "children": [ "bond-JJpXQk" ], "product": null, "params": "", "links": [], "id": 69, "parents": [], "resource_uri": "/MAAS/api/2.0/nodes/d8n3re/interfaces/69/" }, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "owner_data": {}, "testing_status": 3, "commissioning_status_name": "Passed", "status_message": "desc-9blXOT", "cpu_test_status_name": "Failed", "hostname": "newname", "testing_status_name": "Failed", "resource_uri": "/MAAS/api/2.0/machines/d8n3re/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user does not have permission to update this machine.
Machines
Manage the collection of all the machines in the MAAS.
GET /MAAS/api/2.0/machines/
List nodes visible to current user, optionally filtered by criteria.
Nodes are sorted by id (i.e. most recent last) and grouped by type.
Parameters
hostname (String): Optional. Only nodes relating to the node with the matching hostname will be returned. This can be specified multiple times to see multiple nodes.
mac_address (String): Optional. Only nodes relating to the node owning the specified MAC address will be returned. This can be specified multiple times to see multiple nodes.
id (String): Optional. Only nodes relating to the nodes with matching system ids will be returned.
domain (String): Optional. Only nodes relating to the nodes in the domain will be returned.
zone (String): Optional. Only nodes relating to the nodes in the zone will be returned.
pool (String): Optional. Only nodes belonging to the pool will be returned.
agent_name (String): Optional. Only nodes relating to the nodes with matching agent names will be returned.
Success
HTTP Status Code : 200
JSON
[ { "commissioning_status": 2, "version": "2.5.0~beta3-7325-g1425f6d4c-0ubuntu1~18.04.1", "node_type_name": "Region and rack controller", "ip_addresses": [ "10.55.32.135", "192.168.122.1" ], "storage_test_status": -1, "cpu_count": 4, "hostname": "mymaas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 23, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "swap_size": null, "power_type": "", "memory": 8192, "current_testing_result_id": null, "osystem": "ubuntu", "node_type": 4, "service_set": [ { "name": "proxy", "status": "running", "status_info": "" }, { "name": "bind9", "status": "running", "status_info": "" }, { "name": "ntp_region", "status": "running", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "syslog_region", "status": "running", "status_info": "" }, { "name": "ntp_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd", "status": "running", "status_info": "" }, { "name": "tftp", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "http", "status": "running", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "syslog_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd6", "status": "off", "status_info": "" }, { "name": "rackd", "status": "running", "status_info": "" } ], "other_test_status": -1, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "status_action": "", "commissioning_status_name": "Passed", "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "mac_address": "fa:16:3e:b8:af:ff", "tags": [], "params": "", "id": 1, "discovered": null, "product": "OpenStack Nova", "parents": [], "type": "physical", "name": "ens3", "enabled": true, "effective_mtu": 1500, "vendor": "OpenStack Foundation", "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 1, "mode": "static", "ip_address": "10.55.32.135", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/1/" }, { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "mac_address": "52:54:00:09:88:41", "tags": [], "params": "", "id": 17, "discovered": null, "product": null, "parents": [], "type": "bridge", "name": "virbr0", "enabled": true, "effective_mtu": 1500, "vendor": null, "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 17, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/17/" } ], "cpu_speed": 2400, "testing_status_name": "Unknown", "tag_names": [ "virtual" ], "current_commissioning_result_id": 1, "system_id": "6gsym8", "distro_series": "bionic", "cpu_test_status": -1, "memory_test_status_name": "Unknown", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "33313934-3432-5a43-4339-343532355a35", "cpu_model": "Intel Core i7 9xx (Nehalem Class Core i7)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "other_test_status_name": "Unknown", "fqdn": "mymaas.maas", "power_state": "unknown", "memory_test_status": -1, "current_installation_result_id": null, "storage_test_status_name": "Unknown", "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "resource_uri": "/MAAS/api/2.0/rackcontrollers/6gsym8/" } ]
GET /MAAS/api/2.0/machines/?op=is_registered
Returns whether or not the given MAC address is registered within this MAAS (and attached to a non-retired node).
Parameters
mac_address (URL String): Required. The MAC address to be checked.
Success
HTTP Status Code : 200
Boolean
false
Error
HTTP Status Code : 400
Content
No provided mac_address!
GET /MAAS/api/2.0/machines/?op=list_allocated
List machines that were allocated to the User/oauth token.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
GET /MAAS/api/2.0/machines/?op=power_parameters
Get power parameters for multiple machines. To request power parameters
for a specific machine or more than one machine:
op=power_parameters&id=abc123&id=def456
.
Parameters
id (URL String): Optional. A system ID. To request more than one
machine, provide multiple id
arguments in the request. Only machines
with matching system ids will be returned.
Success
HTTP Status Code : 200
JSON
{ "dypesm": { "power_address": "qemu+ssh://ubuntu@172.16.1.28/system", "power_id": "driven-bat" }, "xs7qfn": { "power_address": "qemu+ssh://ubuntu@172.16.1.134/system", "power_id": "nice-shad" } }
Error
HTTP Status Code : 403
Content : The user is not authorized to view the power parameters.
POST /MAAS/api/2.0/machines/
Create a new machine.
Adding a server to MAAS wipes its disks and re-installs its operating system, in the event that it PXE boots. In anonymous enlistment (and when the enlistment is done by a non-admin), the machine is held in the "New" state for approval by a MAAS admin.
The minimum data required is:
architecture=<arch string> (e.g. "i386/generic") mac_addresses=<value> (e.g. "aa:bb:cc:dd:ee:ff")
Parameters
architecture (String): Required. A string containing the architecture type of the machine. (For example, "i386", or "amd64".) To :type architecture: unicode
min_hwe_kernel (String): Optional. A string containing the minimum kernel version allowed to be ran on this machine.
subarchitecture (String): Optional. A string containing the subarchitecture type of the machine. (For example, "generic" or "hwe-t".) To determine the supported subarchitectures, use the boot-resources endpoint.
mac_addresses (String): Required. One or more MAC addresses for the machine. To specify more than one MAC address, the parameter must be specified twice. (such as "machines new mac_addresses=01:02:03:04:05:06 mac_addresses=02:03:04:05:06:07")
hostname (String): Optional. A hostname. If not given, one will be generated.
domain (String): Optional. The domain of the machine. If not given the default domain is used.
power_type (String): Optional. A power management type, if applicable (e.g. "virsh", "ipmi").
power_parameters (String): Optional. The parameter(s) for the power_type. Note that this is dynamic as the available parameters depend on the selected value of the Machine's power_type. Power types section for a list of the available power parameters for each power type.
commission (Boolean): Optional. Request the newly created machine to be created with status set to COMMISSIONING. Machines will wait for COMMISSIONING results and not time out.
Success
HTTP Status Code : 200
JSON
{ "domain": { "authoritative": true, "ttl": null, "id": 0, "resource_record_count": 0, "name": "maas", "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "pod": null, "testing_status": 0, "status_action": "", "min_hwe_kernel": "", "netboot": true, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "boot_interface": { "children": [], "tags": [], "params": "", "type": "physical", "links": [], "effective_mtu": 1500, "product": null, "vlan": null, "mac_address": "01:02:03:04:05:06", "parents": [], "id": 137, "discovered": null, "vendor": null, "system_id": "p37gqk", "enabled": true, "firmware_version": null, "name": "eth0", "resource_uri": "/MAAS/api/2.0/nodes/p37gqk/interfaces/137/" }, "cache_sets": [], "ip_addresses": [], "iscsiblockdevice_set": [], "cpu_count": 0, "special_filesystems": [], "other_test_status_name": "Unknown", "system_id": "p37gqk", "current_testing_result_id": 240, "owner": "admin", "tag_names": [], "cpu_test_status_name": "Unknown", "commissioning_status_name": "Pending", "interface_set": [ { "children": [], "tags": [], "params": "", "type": "physical", "links": [], "effective_mtu": 1500, "product": null, "vlan": null, "mac_address": "01:02:03:04:05:06", "parents": [], "id": 137, "discovered": null, "vendor": null, "system_id": "p37gqk", "enabled": true, "firmware_version": null, "name": "eth0", "resource_uri": "/MAAS/api/2.0/nodes/p37gqk/interfaces/137/" } ], "storage_test_status": 0, "fqdn": "ready-badger.maas", "cpu_speed": 0, "owner_data": {}, "power_state": "unknown", "blockdevice_set": [], "node_type_name": "Machine", "current_installation_result_id": null, "boot_disk": null, "locked": false, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "cpu_test_status": -1, "power_type": "virsh", "other_test_status": -1, "swap_size": null, "physicalblockdevice_set": [], "architecture": "amd64/generic", "status_name": "Commissioning", "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status": 0, "volume_groups": [], "node_type": 0, "virtualblockdevice_set": [], "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "disable_ipv4": false, "memory_test_status_name": "Unknown", "storage_test_status_name": "Pending", "status_message": "From 'New' to 'Commissioning'", "status": 1, "current_commissioning_result_id": 239, "distro_series": "", "address_ttl": null, "storage": 0, "osystem": "", "bcaches": [], "memory": 0, "hostname": "ready-badger", "testing_status_name": "Pending", "memory_test_status": -1, "raids": [], "hwe_kernel": null, "resource_uri": "/MAAS/api/2.0/machines/p37gqk/" }
POST /MAAS/api/2.0/machines/?op=accept
Accept declared machines into MAAS.
Machines can be enlisted in the MAAS anonymously or by non-admin users, as opposed to by an admin. These machines are held in the New state; a MAAS admin must first verify the authenticity of these enlistments, and accept them.
Enlistments can be accepted en masse, by passing multiple machines to this call. Accepting an already accepted machine is not an error, but accepting one that is already allocated, broken, etc. is.
Parameters
machines (String): Optional. A list of system_ids of the machines whose enlistment is to be accepted. (An empty list is acceptable).
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 400
Content : One or more of the given machines is not found.
HTTP Status Code : 403
Content : The user does not have permission to accept machines.
POST /MAAS/api/2.0/machines/?op=accept_all
Accept all declared machines into MAAS.
Machines can be enlisted in the MAAS anonymously or by non-admin users, as opposed to by an admin. These machines are held in the New state; a MAAS admin must first verify the authenticity of these enlistments, and accept them.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
POST /MAAS/api/2.0/machines/?op=add_chassis
Add special hardware types.
Parameters
chassis_type (String): Required. The type of hardware:
mscm
: Moonshot Chassis Manager.msftocs
: Microsoft OCS Chassis Manager.powerkvm
: Virtual Machines on Power KVM, managed by Virsh.recs_box
: Christmann RECS|Box servers.seamicro15k
: Seamicro 1500 Chassis.ucsm
: Cisco UCS Manager.virsh
: virtual machines managed by Virsh.vmware
is the type for virtual machines managed by VMware.
hostname (String): Required. The URL, hostname, or IP address to access the chassis.
username (String): Optional. The username used to access the chassis. This field is required for the recs_box, seamicro15k, vmware, mscm, msftocs, and ucsm chassis types.
password (String): Optional. The password used to access the
chassis. This field is required for the recs_box
, seamicro15k
,
vmware
, mscm
, msftocs
, and ucsm
chassis types.
accept_all (String): Optional. If true, all enlisted machines will be commissioned.
rack_controller (String): Optional. The system_id of the rack controller to send the add chassis command through. If none is specifed MAAS will automatically determine the rack controller to use.
domain (String): Optional. The domain that each new machine added should use.
prefix_filter (String): Optional. (virsh
, vmware
, powerkvm
only.) Filter machines with supplied prefix.
power_control (String): Optional. (seamicro15k
only) The
power_control to use, either ipmi (default), restapi, or restapi2. The
following are optional if you are adding a recs_box, vmware or msftocs
chassis.
port (Int): Optional. (recs_box
, vmware
, msftocs
only) The
port to use when accessing the chassis. The following are optioanl if
you are adding a vmware chassis:
protocol (String): Optional. (vmware
only) The protocol to use
when accessing the VMware chassis (default: https). :return: A string
containing the chassis powered on by which rack controller.
Success
HTTP Status Code : 200
Content : Asking maas-run to add machines from chassis
Error
HTTP Status Code : 403
Content : The user does not have permission to access the rack controller.
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 400
Content : Required parameters are missing.
POST /MAAS/api/2.0/machines/?op=allocate
Allocates an available machine for deployment.
Constraints parameters can be used to allocate a machine that possesses certain characteristics. All the constraints are optional and when multiple constraints are provided, they are combined using 'AND' semantics.
Parameters
name (String): Optional. Hostname or FQDN of the desired machine. If a FQDN is specified, both the domain and the hostname portions must match.
system_id (String): Optional. system_id of the desired machine.
arch (String): Optional. Architecture of the returned machine (e.g. 'i386/generic', 'amd64', 'armhf/highbank', etc.).
If multiple architectures are specified, the machine to acquire may match any of the given architectures. To request multiple architectures, this parameter must be repeated in the request with each value.
cpu_count (Int): Optional. Minimum number of CPUs a returned machine must have.
A machine with additional CPUs may be allocated if there is no exact match, or if the 'mem' constraint is not also specified.
mem (Int): Optional. The minimum amount of memory (expressed in MB) the returned machine must have. A machine with additional memory may be allocated if there is no exact match, or the 'cpu_count' constraint is not also specified.
tags (String): Optional. Tags the machine must match in order to be acquired.
If multiple tag names are specified, the machine must be tagged with all of them. To request multiple tags, this parameter must be repeated in the request with each value.
not_tags (String): Optional. Tags the machine must NOT match. If multiple tag names are specified, the machine must NOT be tagged with ANY of them. To request exclusion of multiple tags, this parameter must be repeated in the request with each value.
zone (String): Optional. Physical zone name the machine must be located in.
not_in_zone (String): Optional. List of physical zones from which the machine must not be acquired. If multiple zones are specified, the machine must NOT be associated with ANY of them. To request multiple zones to exclude, this parameter must be repeated in the request with each value.
pool (String): Optional. Resource pool name the machine must belong to.
not_in_pool (String): Optional. List of resource pool from which the machine must not be acquired. If multiple pools are specified, the machine must NOT be associated with ANY of them. To request multiple pools to exclude, this parameter must be repeated in the request with each value.
pod (String): Optional. Pod the machine must be located in.
not_pod (String): Optional. Pod the machine must not be located in.
pod_type (String): Optional. Pod type the machine must be located in.
not_pod_type (String): Optional. Pod type the machine must not be located in.
subnets (String): Optional. Subnets that must be linked to the machine.
"Linked to" means the node must be configured to acquire an address in the specified subnet, have a static IP address in the specified subnet, or have been observed to DHCP from the specified subnet during commissioning time (which implies that it could have an address on the specified subnet).
Subnets can be specified by one of the following criteria:
- <id>: Match the subnet by its 'id' field
- fabric:<fabric-spec>: Match all subnets in a given fabric.
- ip:<ip-address>: Match the subnet containing <ip-address> with the with the longest-prefix match.
- name:<subnet-name>: Match a subnet with the given name.
- space:<space-spec>: Match all subnets in a given space.
- vid:<vid-integer>: Match a subnet on a VLAN with the specified VID. Valid values range from 0 through 4094 (inclusive). An untagged VLAN can be specified by using the value "0".
- vlan:<vlan-spec>: Match all subnets on the given VLAN.
Note that (as of this writing), the 'fabric', 'space', 'vid', and 'vlan' specifiers are only useful for the 'not_spaces' version of this constraint, because they will most likely force the query to match ALL the subnets in each fabric, space, or VLAN, and thus not return any nodes. (This is not a particularly useful behavior, so may be changed in the future.)
If multiple subnets are specified, the machine must be associated with all of them. To request multiple subnets, this parameter must be repeated in the request with each value.
Note that this replaces the legacy 'networks' constraint in MAAS 1.x.
not_subnets (String): Optional. Subnets that must NOT be linked to the machine.
See the 'subnets' constraint documentation above for more information about how each subnet can be specified.
If multiple subnets are specified, the machine must NOT be associated with ANY of them. To request multiple subnets to exclude, this parameter must be repeated in the request with each value. (Or a fabric, space, or VLAN specifier may be used to match multiple subnets).
Note that this replaces the legacy 'not_networks' constraint in MAAS 1.x.
storage (String): Optional. A list of storage constraint
identifiers, in the form: label:size(tag[,tag[,...])][,label:...]
.
interfaces (String): Optional. A labeled constraint map
associating constraint labels with interface properties that should be
matched. Returned nodes must have one or more interface matching the
specified constraints. The labeled constraint map must be in the format:
label:key=value[,key2=value2[,...]]
.
Each key can be one of the following:
id
: Matches an interface with the specific idfabric
: Matches an interface attached to the specified fabric.fabric_class
: Matches an interface attached to a fabric with the specified class.ip
: Matches an interface with the specified IP address assigned to it.mode
: Matches an interface with the specified mode. (Currently, the only supported mode is "unconfigured".)name
: Matches an interface with the specified name. (For example, "eth0".)hostname
: Matches an interface attached to the node with the specified hostname.subnet
: Matches an interface attached to the specified subnet.space
: Matches an interface attached to the specified space.subnet_cidr
: Matches an interface attached to the specified subnet CIDR. (For example, "192.168.0.0/24".)type
: Matches an interface of the specified type. (Valid types: "physical", "vlan", "bond", "bridge", or "unknown".)vlan
: Matches an interface on the specified VLAN.vid
: Matches an interface on a VLAN with the specified VID.tag
: Matches an interface tagged with the specified tag.
fabrics (String): Optional. Set of fabrics that the machine must be associated with in order to be acquired. If multiple fabrics names are specified, the machine can be in any of the specified fabrics. To request multiple possible fabrics to match, this parameter must be repeated in the request with each value.
not_fabrics (String): Optional. Fabrics the machine must NOT be associated with in order to be acquired. If multiple fabrics names are specified, the machine must NOT be in ANY of them. To request exclusion of multiple fabrics, this parameter must be repeated in the request with each value.
fabric_classes (String): Optional. Set of fabric class types whose fabrics the machine must be associated with in order to be acquired. If multiple fabrics class types are specified, the machine can be in any matching fabric. To request multiple possible fabrics class types to match, this parameter must be repeated in the request with each value.
not_fabric_classes (String): Optional. Fabric class types whose fabrics the machine must NOT be associated with in order to be acquired. If multiple fabrics names are specified, the machine must NOT be in ANY of them. To request exclusion of multiple fabrics, this parameter must be repeated in the request with each value.
agent_name (String): Optional. An optional agent name to attach to the acquired machine.
comment (String): Optional. Comment for the event log.
bridge_all (Boolean): Optional. Optionally create a bridge interface for every configured interface on the machine. The created bridges will be removed once the machine is released. (Default: False)
bridge_stp (Boolean): Optional. Optionally turn spanning tree protocol on or off for the bridges created on every configured interface. (Default: off)
bridge_fd (Int): Optional. Optionally adjust the forward delay to time seconds. (Default: 15)
dry_run (Boolean): Optional. Optional boolean to indicate that the machine should not actually be acquired (this is for support/troubleshooting, or users who want to see which machine would match a constraint, without acquiring a machine). Defaults to False.
verbose (Boolean): Optional. Optional boolean to indicate that the
user would like additional verbosity in the constraints_by_type field
(each constraint will be prefixed by verbose_
, and contain the full
data structure that indicates which machine(s) matched).
Success
HTTP Status Code : 200
JSON
{ "status": 10, "default_gateways": { "ipv4": { "gateway_ip": "172.16.2.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "status_name": "Allocated", "disable_ipv4": false, "iscsiblockdevice_set": [], "other_test_status": 2, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "boot_disk": { "firmware_version": "firmware_version-Jf2fDS", "system_id": "thr3am", "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "id_path": null, "size": 3532084224, "block_size": 1024, "type": "physical", "uuid": null, "filesystem": null, "partitions": [ { "uuid": "f90ccc67-1f7f-43b3-9d1b-baa6e22f96ff", "size": 3523215360, "bootable": false, "tags": [], "system_id": "thr3am", "device_id": 18, "type": "partition", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "465ddc23-e5ed-48fe-984e-900694477380", "mount_point": "/", "mount_options": null }, "id": 1, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "partition_table_type": "MBR", "model": "model-mSnL9L", "storage_pool": "pool_id-QkOjON", "available_size": 0, "id": 18, "used_size": 3528458240, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "serial": "serial-jBitFU", "name": "name-xE9mtJ", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, "address_ttl": null, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-Jf2fDS", "system_id": "thr3am", "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "id_path": null, "size": 3532084224, "block_size": 1024, "type": "physical", "uuid": null, "filesystem": null, "partitions": [ { "uuid": "f90ccc67-1f7f-43b3-9d1b-baa6e22f96ff", "size": 3523215360, "bootable": false, "tags": [], "system_id": "thr3am", "device_id": 18, "type": "partition", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "465ddc23-e5ed-48fe-984e-900694477380", "mount_point": "/", "mount_options": null }, "id": 1, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "partition_table_type": "MBR", "model": "model-mSnL9L", "storage_pool": "pool_id-QkOjON", "available_size": 0, "id": 18, "used_size": 3528458240, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "serial": "serial-jBitFU", "name": "name-xE9mtJ", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "firmware_version": "firmware_version-t3adt6", "system_id": "thr3am", "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "id_path": null, "size": 3498806272, "block_size": 1024, "type": "physical", "uuid": null, "filesystem": null, "partitions": [], "partition_table_type": null, "model": "model-OHzOYI", "storage_pool": "pool_id-QkOjON", "available_size": 3498806272, "id": 19, "used_size": 0, "path": "/dev/disk/by-dname/name-EjgNwC", "used_for": "Unused", "serial": "serial-5EZFik", "name": "name-EjgNwC", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "firmware_version": "firmware_version-WJ46L3", "system_id": "thr3am", "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "id_path": null, "size": 2173730816, "block_size": 4096, "type": "physical", "uuid": null, "filesystem": null, "partitions": [], "partition_table_type": null, "model": "model-5btVsu", "storage_pool": "pool_id-QkOjON", "available_size": 2173730816, "id": 20, "used_size": 0, "path": "/dev/disk/by-dname/name-VhlrVi", "used_for": "Unused", "serial": "serial-SE3O1p", "name": "name-VhlrVi", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "storage": 9204.621312000001, "netboot": true, "cpu_test_status": 2, "memory_test_status": 2, "swap_size": null, "cpu_count": 3, "hostname": "calm-cod", "current_installation_result_id": null, "architecture": "i386/generic", "fqdn": "calm-cod.sample", "system_id": "thr3am", "locked": false, "ip_addresses": [ "2001:db8:42:0:6556:13fa:7452:70da", "2001:db8:42:0:cf29:e368:ba5b:9977" ], "node_type": 0, "special_filesystems": [], "boot_interface": { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "parents": [], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "enabled": true, "product": null, "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "type": "physical", "children": [ "eth-lKRYAa.42" ], "vendor": null, "mac_address": "cb:93:ac:d1:ed:65", "discovered": null, "id": 37, "params": "", "name": "eth-lKRYAa", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, "osystem": "", "tag_names": [], "power_state": "on", "commissioning_status_name": "Passed", "status_message": "From 'Ready' to 'Allocated' (to admin)", "cpu_test_status_name": "Passed", "virtualblockdevice_set": [], "commissioning_status": 2, "hwe_kernel": null, "blockdevice_set": [ { "id_path": null, "size": 3532084224, "block_size": 1024, "tags": [ "tag-CzTfe7", "tag-LZn1dX", "tag-YVJlCd" ], "system_id": "thr3am", "type": "physical", "uuid": null, "filesystem": null, "partitions": [ { "uuid": "f90ccc67-1f7f-43b3-9d1b-baa6e22f96ff", "size": 3523215360, "bootable": false, "tags": [], "system_id": "thr3am", "device_id": 18, "type": "partition", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "465ddc23-e5ed-48fe-984e-900694477380", "mount_point": "/", "mount_options": null }, "id": 1, "path": "/dev/disk/by-dname/name-xE9mtJ-part1", "used_for": "ext4 formatted filesystem mounted at /", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/partition/1" } ], "partition_table_type": "MBR", "model": "model-mSnL9L", "storage_pool": "pool_id-QkOjON", "available_size": 0, "id": 18, "used_size": 3528458240, "path": "/dev/disk/by-dname/name-xE9mtJ", "used_for": "MBR partitioned with 1 partition", "serial": "serial-jBitFU", "name": "name-xE9mtJ", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/18/" }, { "id_path": null, "size": 3498806272, "block_size": 1024, "tags": [ "tag-DAVe6p", "tag-NZsGtH", "tag-NVqhqV" ], "system_id": "thr3am", "type": "physical", "uuid": null, "filesystem": null, "partitions": [], "partition_table_type": null, "model": "model-OHzOYI", "storage_pool": "pool_id-QkOjON", "available_size": 3498806272, "id": 19, "used_size": 0, "path": "/dev/disk/by-dname/name-EjgNwC", "used_for": "Unused", "serial": "serial-5EZFik", "name": "name-EjgNwC", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/19/" }, { "id_path": null, "size": 2173730816, "block_size": 4096, "tags": [ "tag-WAlxSu", "tag-p05xzW", "tag-dwLYRY" ], "system_id": "thr3am", "type": "physical", "uuid": null, "filesystem": null, "partitions": [], "partition_table_type": null, "model": "model-5btVsu", "storage_pool": "pool_id-QkOjON", "available_size": 2173730816, "id": 20, "used_size": 0, "path": "/dev/disk/by-dname/name-VhlrVi", "used_for": "Unused", "serial": "serial-SE3O1p", "name": "name-VhlrVi", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/blockdevices/20/" } ], "owner": "admin", "other_test_status_name": "Passed", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "interface_set": [ { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "parents": [], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-oplxjR", "tag-QAxfJH", "tag-VOqx2b" ], "enabled": true, "product": null, "links": [ { "id": 14, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "type": "physical", "children": [ "eth-lKRYAa.42" ], "vendor": null, "mac_address": "cb:93:ac:d1:ed:65", "discovered": null, "id": 37, "params": "", "name": "eth-lKRYAa", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/37/" }, { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "parents": [], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-LddZkA", "tag-EDi2sp", "tag-RwynT2" ], "enabled": true, "product": null, "links": [ { "id": 15, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "type": "physical", "children": [ "eth-3ookc5.42" ], "vendor": null, "mac_address": "bc:d3:d5:28:88:dc", "discovered": null, "id": 38, "params": "", "name": "eth-3ookc5", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/38/" }, { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "parents": [], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-dc12B9", "tag-D71Hh0", "tag-PnEfvN" ], "enabled": true, "product": null, "links": [ { "id": 16, "mode": "auto", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "management", "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "fabric": "fabric-1", "id": 5003, "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "type": "physical", "children": [ "eth-W8E8f0.42" ], "vendor": null, "mac_address": "ad:5a:3e:a3:68:13", "discovered": null, "id": 39, "params": "", "name": "eth-W8E8f0", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/39/" }, { "firmware_version": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "ipv6-testbed", "primary_rack": null, "secondary_rack": null, "fabric": "fabric-1", "id": 5004, "fabric_id": 1, "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "parents": [ "eth-lKRYAa" ], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-u0TLLj", "tag-C09Efp", "tag-QK7j09" ], "enabled": true, "product": null, "links": [ { "id": 17, "mode": "auto", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "ipv6-testbed", "primary_rack": null, "secondary_rack": null, "fabric": "fabric-1", "id": 5004, "fabric_id": 1, "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "type": "vlan", "children": [], "vendor": null, "mac_address": "cb:93:ac:d1:ed:65", "discovered": null, "id": 40, "params": "", "name": "eth-lKRYAa.42", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/40/" }, { "firmware_version": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "ipv6-testbed", "primary_rack": null, "secondary_rack": null, "fabric": "fabric-1", "id": 5004, "fabric_id": 1, "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "parents": [ "eth-3ookc5" ], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-EFzacM", "tag-dxAebl", "tag-GsPX3m" ], "enabled": true, "product": null, "links": [ { "id": 18, "mode": "static", "ip_address": "2001:db8:42:0:6556:13fa:7452:70da", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "ipv6-testbed", "primary_rack": null, "secondary_rack": null, "fabric": "fabric-1", "id": 5004, "fabric_id": 1, "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "type": "vlan", "children": [], "vendor": null, "mac_address": "bc:d3:d5:28:88:dc", "discovered": null, "id": 41, "params": "", "name": "eth-3ookc5.42", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/41/" }, { "firmware_version": null, "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "ipv6-testbed", "primary_rack": null, "secondary_rack": null, "fabric": "fabric-1", "id": 5004, "fabric_id": 1, "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "parents": [ "eth-W8E8f0" ], "effective_mtu": 1500, "system_id": "thr3am", "tags": [ "tag-cyexYi", "tag-nnoi80", "tag-xhApes" ], "enabled": true, "product": null, "links": [ { "id": 19, "mode": "static", "ip_address": "2001:db8:42:0:cf29:e368:ba5b:9977", "subnet": { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "ipv6-testbed", "primary_rack": null, "secondary_rack": null, "fabric": "fabric-1", "id": 5004, "fabric_id": 1, "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" } } ], "type": "vlan", "children": [], "vendor": null, "mac_address": "ad:5a:3e:a3:68:13", "discovered": null, "id": 42, "params": "", "name": "eth-W8E8f0.42", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/interfaces/42/" } ], "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "storage_test_status": 2, "volume_groups": [], "status_action": "", "storage_test_status_name": "Passed", "raids": [], "node_type_name": "Machine", "power_type": "virsh", "pod": { "id": 5, "name": "well-hen", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "testing_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "is_default": false, "resource_record_count": 0, "id": 1, "name": "sample", "resource_uri": "/MAAS/api/2.0/domains/1/" }, "memory": 8192, "constraints_by_type": {}, "current_testing_result_id": 22, "current_commissioning_result_id": 21, "memory_test_status_name": "Passed", "bcaches": [], "testing_status": 2, "distro_series": "", "min_hwe_kernel": null, "cpu_speed": 0, "cache_sets": [], "owner_data": {}, "resource_uri": "/MAAS/api/2.0/machines/thr3am/" }
Error
HTTP Status Code : 409
Content : No machine matching the given constraints could be found.
POST /MAAS/api/2.0/machines/?op=release
Release multiple machines. Places the machines back into the pool, ready to be reallocated.
Parameters
machines (String): Required. A list of system_ids of the machines which are to be released. (An empty list is acceptable).
comment (String): Optional. Optional comment for the event log.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 400
Content : One or more of the given machines is not found.
HTTP Status Code : 403
Content : The user does not have permission to release machines.
HTTP Status Code : 409
Content : The current state of the machine prevents it from being released.
POST /MAAS/api/2.0/machines/?op=set_zone
Assigns a given node to a given zone.
Parameters
zone (String): Required. The zone name.
nodes (String): Required. The node to add.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 400
Content : The given parameters were not correct.
Network
Manage a network.
This endpoint is deprecated. Use the new 'subnet' endpoint instead.
DELETE /MAAS/api/2.0/networks/{name}/
Delete network definition.
This endpoint is no longer available. Use the 'subnet' endpoint instead.
GET /MAAS/api/2.0/networks/{name}/
Read network definition.
GET /MAAS/api/2.0/networks/{name}/ op=list_connected_macs
Returns the list of MAC addresses connected to this network.
Only MAC addresses for nodes visible to the requesting user are returned.
POST /MAAS/api/2.0/networks/{name}/ op=connect_macs
Connect the given MAC addresses to this network.
This endpoint is no longer available. Use the 'subnet' endpoint instead.
POST /MAAS/api/2.0/networks/{name}/ op=disconnect_macs
Disconnect the given MAC addresses from this network.
This endpoint is no longer available. Use the 'subnet' endpoint instead.
PUT /MAAS/api/2.0/networks/{name}/
Update network definition.
This endpoint is no longer available. Use the 'subnet' endpoint instead.
- param name
-
A simple name for the network, to make it easier to refer to. Must consist only of letters, digits, dashes, and underscores.
- param ip
-
Base IP address for the network, e.g. 10.1.0.0. The host bits will be zeroed.
- param netmask
-
Subnet mask to indicate which parts of an IP address are part of the network address. For example, 255.255.255.0.
- param vlan_tag
-
Optional VLAN tag: a number between 1 and 0xffe (4094) inclusive, or zero for an untagged network.
- param description
-
Detailed description of the network for the benefit of users and administrators.
Networks
Manage the networks.
This endpoint is deprecated. Use the new 'subnets' endpoint instead.
GET /MAAS/api/2.0/networks/
List networks.
- param node
-
Optionally, nodes which must be attached to any returned networks. If more than one node is given, the result will be restricted to networks that these nodes have in common.
POST /MAAS/api/2.0/networks/
Define a network.
This endpoint is no longer available. Use the 'subnets' endpoint instead.
Node
Manage an individual Node.
The Node is identified by its system_id.
DELETE /MAAS/api/2.0/nodes/{system_id}/
Deletes a node with a given system_id.
Parameters
{system_id} (String): Required. A node's system_id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to delete the node.
GET /MAAS/api/2.0/nodes/{system_id}/
Reads a node with the given system_id.
Parameters
{system_id} (String): Required. A node's system_id.
Success
HTTP Status Code : 200
JSON
{ "boot_interface": { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, "memory": 8192, "tag_names": [], "current_installation_result_id": null, "fqdn": "causal-quagga.maas", "disable_ipv4": false, "distro_series": "", "ip_addresses": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "node_type": 0, "min_hwe_kernel": null, "commissioning_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, "system_id": "g8xyqs", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "blockdevice_set": [ { "id_path": null, "size": 2250362368, "block_size": 512, "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "id_path": null, "size": 1443074048, "block_size": 4096, "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "current_commissioning_result_id": 198, "cpu_test_status": 2, "address_ttl": null, "cache_sets": [], "storage": 3693.436416, "node_type_name": "Machine", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "cpu_count": 7, "storage_test_status_name": "Passed", "owner": "user2", "status": 20, "volume_groups": [], "hwe_kernel": null, "netboot": true, "current_testing_result_id": 199, "commissioning_status": 2, "testing_status_name": "Passed", "architecture": "i386/generic", "locked": false, "power_state": "error", "memory_test_status_name": "Passed", "power_type": "virsh", "interface_set": [ { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, { "system_id": "g8xyqs", "name": "eth-ex07mq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 113, "params": "", "type": "physical", "firmware_version": null, "mac_address": "8f:75:69:58:26:47", "parents": [], "tags": [ "tag-ymen6c", "tag-oKQ7iK", "tag-yQLBgJ" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/113/" }, { "system_id": "g8xyqs", "name": "eth-CE1j2X", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 114, "params": "", "type": "physical", "firmware_version": null, "mac_address": "b0:5e:ed:8d:d8:36", "parents": [], "tags": [ "tag-LJPUwT", "tag-U5zGn3", "tag-dHGEeD" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/114/" }, { "system_id": "g8xyqs", "name": "bond-VpkNvO", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [], "discovered": null, "id": 115, "params": "", "type": "bond", "firmware_version": null, "mac_address": "0a:87:3f:94:0e:68", "parents": [ "eth-CE1j2X", "eth-ex07mq", "eth-jJ5ZwN" ], "tags": [ "tag-HwhC7n", "tag-WHGBJc", "tag-yY8Ap5" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/115/" } ], "owner_data": {}, "bcaches": [], "hostname": "causal-quagga", "raids": [], "other_test_status": 2, "status_action": "action-BqENyW", "special_filesystems": [], "physicalblockdevice_set": [ { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "firmware_version": "firmware_version-UW8ucD", "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "id_path": null, "block_size": 4096, "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "size": 1443074048, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "iscsiblockdevice_set": [], "testing_status": 2, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "storage_test_status": 2, "pod": { "id": 5, "name": "sacred-hen", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "swap_size": null, "status_message": "desc-eqGqfo", "status_name": "Failed to exit rescue mode", "osystem": "", "cpu_test_status_name": "Passed", "memory_test_status": 2, "other_test_status_name": "Passed", "virtualblockdevice_set": [], "cpu_speed": 0, "resource_uri": "/MAAS/api/2.0/machines/g8xyqs/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/nodes/{system_id}/?op=details
Returns system details -- for example, LLDP and lshw
XML dumps.
Returns a {detail_type: xml, ...}
map, where detail_type
is
something like "lldp" or "lshw".
Note that this is returned as BSON and not JSON. This is for efficiency,
but mainly because JSON can't do binary content without applying
additional encoding like base-64. The example output below is
represented in ASCII using bsondump example.bson
and is for
demonstrative purposes.
Parameters
{system_id} (String): Required. The node's system_id.
Success
HTTP Status Code : 200
Content
{ "lldp": { "$binary": "cjBZSWw2S1ZkRA==", "$type": "00" }, "lshw": { "$binary": "Nkd5MzRLYjBkTQ==", "$type": "00" } }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/nodes/{system_id}/?op=power_parameters
Gets power parameters for a given system_id, if any. For some types of power control this will include private information such as passwords and secret keys.
Note that this method is reserved for admin users and returns a 403 if the user is not one.
Success
HTTP Status Code : 200
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 404
Content
Not Found
Commissioning results
Read the collection of commissioning script results.
GET /MAAS/api/2.0/installation-results/
Read the commissioning results per node visible to the user, optionally filtered.
Parameters
system_id (String): Optional. An optional list of system ids. Only the results related to the nodes with these system ids will be returned.
name (String): Optional. An optional list of names. Only the results with the specified names will be returned.
result_type (String): Optional. An optional result_type. Only the results with the specified result_type will be returned.
Success
HTTP Status Code : 200
JSON
[ { "created": "2018-12-20T18:26:14.285", "updated": "2018-12-20T18:26:14.779", "id": 241, "name": "stress-ng-memory-short", "script_result": 0, "result_type": 2, "node": { "system_id": "p3nbg8" }, "data": "d2Y5SUZFb1RUYg==", "resource_uri": "/MAAS/api/2.0/commissioning-scripts/" }, { "created": "2018-12-20T18:26:14.285", "updated": "2018-12-20T18:26:14.779", "id": 241, "name": "stress-ng-memory-short.err", "script_result": 0, "result_type": 2, "node": { "system_id": "p3nbg8" }, "data": "RzJqWU5kakhYZQ==", "resource_uri": "/MAAS/api/2.0/commissioning-scripts/" }, { "created": "2018-12-20T18:26:14.287", "updated": "2018-12-20T18:26:14.778", "id": 242, "name": "7z", "script_result": 0, "result_type": 2, "node": { "system_id": "p3nbg8" }, "data": "UHZCYzNxSlowVw==", "resource_uri": "/MAAS/api/2.0/commissioning-scripts/" }, { "created": "2018-12-20T18:26:14.287", "updated": "2018-12-20T18:26:14.778", "id": 242, "name": "7z.err", "script_result": 0, "result_type": 2, "node": { "system_id": "p3nbg8" }, "data": "Q1k0bXFRek4yMA==", "resource_uri": "/MAAS/api/2.0/commissioning-scripts/" } ]
Node Script
Manage or view a custom script.
DELETE /MAAS/api/2.0/scripts/{name}
Deletes a script with the given name.
Parameters
{name} (String): Required. The script's name.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/scripts/{name}
Return metadata belonging to the script with the given name.
Parameters
{name} (String): Required. The script's name.
include_script (String): Optional. Include the base64 encoded script content if any value is given for include_script.
Success
HTTP Status Code : 200
JSON
{ "name": "fio", "title": "Storage benchmark", "description": "Run Fio benchmarking against selected storage devices.", "tags": [ "storage", "destructive" ], "hardware_type": 3, "parallel": 1, "results": { "random_read": { "description": "Read speed when reading randomly from the disk.", "title": "Random read" }, "random_read_iops": { "description": "IOPS when reading randomly from the disk.", "title": "Random read IOPS" }, "random_write": { "description": "Write speed when reading randomly from the disk.", "title": "Random write" }, "random_write_iops": { "description": "IOPS when reading randomly from the disk.", "title": "Random write IOPS" }, "sequential_read": { "description": "Read speed when reading sequentialy from the disk.", "title": "Sequential read" }, "sequential_read_iops": { "description": "IOPS when reading sequentialy from the disk.", "title": "Sequential read IOPS" }, "sequential_write": { "description": "Write speed when reading sequentialy from the disk.", "title": "Sequential write" }, "sequential_write_iops": { "description": "IOPS when reading sequentialy from the disk.", "title": "Sequential write IOPS" } }, "parameters": { "storage": { "argument_format": "{path}", "type": "storage" } }, "packages": { "apt": [ "fio" ] }, "timeout": "0:00:00", "destructive": true, "default": true, "for_hardware": [], "may_reboot": false, "recommission": false, "id": 15, "history": [ { "id": 15, "comment": "Created by maas-", "created": "Thu, 06 Dec 2018 20:41:47 -0000" } ], "type_name": "Testing script", "hardware_type_name": "Storage", "parallel_name": "Run along other instances of this script", "type": 2, "resource_uri": "/MAAS/api/2.0/scripts/fio" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/scripts/{name}?op=download
Download a script with the given name.
Parameters
{name} (String): Required. The name of the script.
revision (Int): Optional. What revision to download, latest by default. Can use rev as a shortcut.
Success
HTTP Status Code : 200
Content
"#!/bin/bash\n\necho 'fake script'\n"
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/scripts/{name}?op=add_tag
Add a single tag to a script with the given name.
Parameters
{name} (String): Required. The name of the script.
tag (String): Optional. The tag being added.
Success
HTTP Status Code : 200
JSON
{ "name": "foobar", "title": "", "description": "", "tags": [ "node", "mytag" ], "hardware_type": 0, "parallel": 0, "results": {}, "parameters": {}, "packages": {}, "timeout": "0:00:00", "destructive": false, "default": false, "for_hardware": [], "may_reboot": true, "recommission": false, "type": 2, "type_name": "Testing script", "history": [ { "id": 24, "comment": null, "created": "Thu, 06 Dec 2018 21:54:38 -0000" } ], "id": 17, "parallel_name": "Disabled", "hardware_type_name": "Node", "resource_uri": "/MAAS/api/2.0/scripts/foobar" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/scripts/{name}?op=remove_tag
Remove a tag from a script with the given name.
Parameters
{name} (String): Required. The name of the script.
tag (String): Optional. The tag being removed.
Success
HTTP Status Code : 200
JSON
{ "name": "foobar", "title": "", "description": "", "tags": [ "node" ], "hardware_type": 0, "parallel": 0, "results": {}, "parameters": {}, "packages": {}, "timeout": "0:00:00", "destructive": false, "default": false, "for_hardware": [], "may_reboot": true, "recommission": false, "hardware_type_name": "Node", "type": 2, "parallel_name": "Disabled", "type_name": "Testing script", "id": 17, "history": [ { "id": 24, "comment": null, "created": "Thu, 06 Dec 2018 21:54:38 -0000" } ], "resource_uri": "/MAAS/api/2.0/scripts/foobar" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/scripts/{name}?op=revert
Revert a script with the given name to an earlier version.
Parameters
{name} (String): Required. The name of the script.
to (Int): Optional. What revision in the script's history to revert to. This can either be an ID or a negative number representing how far back to go.
Success
HTTP Status Code : 200
JSON
{ "name": "foobar", "title": "", "description": "", "tags": [ "node" ], "hardware_type": 0, "parallel": 0, "results": {}, "parameters": {}, "packages": {}, "timeout": "0:00:00", "destructive": false, "default": false, "for_hardware": [], "may_reboot": true, "recommission": false, "parallel_name": "Disabled", "history": [ { "id": 24, "comment": null, "created": "Thu, 06 Dec 2018 21:54:38 -0000" } ], "type": 2, "hardware_type_name": "Node", "type_name": "Testing script", "id": 17, "resource_uri": "/MAAS/api/2.0/scripts/foobar" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/scripts/{name}
Update a script with the given name.
Parameters
{name} (String): Required. The name of the script.
title (String): Optional. The title of the script.
description (String): Optional. A description of what the script does.
tags (String): Optional. A comma seperated list of tags for this script.
type (String): Optional. The type defines when the script should
be used. Can be testing
or commissioning
, defaults to testing
.
hardware_type (String): Optional. The hardware_type defines what
type of hardware the script is assoicated with. May be cpu
, memory
,
storage
, or node
.
parallel (Int): Optional. Whether the script may be run in
parallel with other scripts. May be disabled to run by itself, instance
to run along scripts with the same name, or any to run along any script.
1
== True, 0
== False.
timeout (Int): Optional. How long the script is allowed to run before failing. 0 gives unlimited time, defaults to 0.
destructive (Boolean): Optional. Whether or not the script overwrites data on any drive on the running system. Destructive scripts can not be run on deployed systems. Defaults to false.
script (String): Optional. The content of the script to be uploaded in binary form. Note: this is not a normal parameter, but a file upload. Its filename is ignored; MAAS will know it by the name you pass to the request. Optionally you can ignore the name and script parameter in favor of uploading a single file as part of the request.
comment (String): Optional. A comment about what this change does.
for_hardware (String): Optional. A list of modalias, PCI IDs,
and/or USB IDs the script will automatically run on. Must start with
modalias:
, pci:
, or usb:
.
may_reboot (Boolean): Optional. Whether or not the script may reboot the system while running.
recommission (Boolean): Optional. Whether built-in commissioning scripts should be rerun after successfully running this scripts.
Success
HTTP Status Code : 200
JSON
{ "name": "foobar", "title": "", "description": "", "tags": [ "node" ], "hardware_type": 0, "parallel": 0, "results": {}, "parameters": {}, "packages": {}, "timeout": "0:00:00", "destructive": false, "default": false, "for_hardware": [], "may_reboot": true, "recommission": false, "type_name": "Testing script", "parallel_name": "Disabled", "id": 17, "type": 2, "hardware_type_name": "Node", "history": [ { "id": 24, "comment": null, "created": "Thu, 06 Dec 2018 21:54:38 -0000" } ], "resource_uri": "/MAAS/api/2.0/scripts/foobar" }
Error
HTTP Status Code : 404
Content
Not Found
Node Script Result
Manage node script results.
DELETE /MAAS/api/2.0/nodes/{system_id}/results/{id}/
Delete script results from the given system_id with the given id.
"id" can either by the script set id, current-commissioning
,
current-testing
, or current-installation
.
Parameters
{system_id} (String): Required. The machine's system_id.
{id} (String): Required. The script result id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/nodes/{system_id}/results/{id}/
View a set of test results for a given system_id and script id.
"id" can either by the script set id, current-commissioning
,
current-testing
, or current-installation
.
Parameters
{system_id} (String): Required. The machine's system_id.
{id} (String): Required. The script result id.
hardware_type (String): Optional. Only return scripts for the
given hardware type. Can be node
, cpu
, memory
, or storage
.
Defaults to all.
include_output (String): Optional. Include the base64 encoded output from the script if any value for include_output is given.
filters (String): Optional. A comma seperated list to show only results that ran with a script name, tag, or id.
Success
HTTP Status Code : 200
JSON
{ "status": 2, "type_name": "Testing", "started": "Wed, 04 Jan 2017 17:32:04 -0000", "type": 2, "id": 22, "system_id": "thr3am", "status_name": "Passed", "ended": "Tue, 19 Dec 2017 00:23:41 -0000", "runtime": "348 days, 6:51:37", "last_ping": null, "results": [ { "id": 374, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "7z", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 19 Mar 2017 23:33:01 -0000", "ended": "Mon, 20 Mar 2017 01:16:59 -0000", "runtime": "1:43:58", "starttime": 1489966381, "endtime": 1489972619, "estimated_runtime": "1:43:58", "parameters": {}, "script_id": 14, "script_revision_id": null }, { "id": 368, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 10 Jan 2017 00:25:57 -0000", "ended": "Tue, 10 Jan 2017 02:26:53 -0000", "runtime": "2:00:56", "starttime": 1484007957, "endtime": 1484015213, "estimated_runtime": "2:00:56", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 12, "script_revision_id": null }, { "id": 370, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Mon, 03 Jul 2017 18:26:21 -0000", "ended": "Mon, 03 Jul 2017 18:50:59 -0000", "runtime": "0:24:38", "starttime": 1499106381, "endtime": 1499107859, "estimated_runtime": "0:24:38", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 12, "script_revision_id": null }, { "id": 369, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 04 Jan 2017 17:32:04 -0000", "ended": "Wed, 04 Jan 2017 18:06:45 -0000", "runtime": "0:34:41", "starttime": 1483551124, "endtime": 1483553205, "estimated_runtime": "0:34:41", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 12, "script_revision_id": null }, { "id": 373, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks-destructive", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 04 Oct 2017 03:19:13 -0000", "ended": "Wed, 04 Oct 2017 05:19:30 -0000", "runtime": "2:00:17", "starttime": 1507087153, "endtime": 1507094370, "estimated_runtime": "2:00:17", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 13, "script_revision_id": null }, { "id": 372, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks-destructive", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 23 Jul 2017 20:55:47 -0000", "ended": "Sun, 23 Jul 2017 23:38:04 -0000", "runtime": "2:42:17", "starttime": 1500843347, "endtime": 1500853084, "estimated_runtime": "2:42:17", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 13, "script_revision_id": null }, { "id": 371, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks-destructive", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Mon, 18 Dec 2017 22:06:01 -0000", "ended": "Tue, 19 Dec 2017 00:23:41 -0000", "runtime": "2:17:40", "starttime": 1513634761, "endtime": 1513643021, "estimated_runtime": "2:17:40", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 13, "script_revision_id": null }, { "id": 365, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "internet-connectivity", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 01 Apr 2017 03:04:52 -0000", "ended": "Sat, 01 Apr 2017 03:12:08 -0000", "runtime": "0:07:16", "starttime": 1491015892, "endtime": 1491016328, "estimated_runtime": "0:07:16", "parameters": {}, "script_id": 6, "script_revision_id": null }, { "id": 364, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "memtester", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 19 Apr 2017 09:22:38 -0000", "ended": "Wed, 19 Apr 2017 10:43:25 -0000", "runtime": "1:20:47", "starttime": 1492593758, "endtime": 1492598605, "estimated_runtime": "1:20:47", "parameters": {}, "script_id": 5, "script_revision_id": null }, { "id": 361, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-conveyance", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 18 Mar 2017 10:19:52 -0000", "ended": "Sat, 18 Mar 2017 12:47:57 -0000", "runtime": "2:28:05", "starttime": 1489832392, "endtime": 1489841277, "estimated_runtime": "2:28:05", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 4, "script_revision_id": null }, { "id": 362, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-conveyance", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Thu, 07 Sep 2017 01:11:18 -0000", "ended": "Thu, 07 Sep 2017 03:02:21 -0000", "runtime": "1:51:03", "starttime": 1504746678, "endtime": 1504753341, "estimated_runtime": "1:51:03", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 4, "script_revision_id": null }, { "id": 363, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-conveyance", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Fri, 15 Sep 2017 21:40:34 -0000", "ended": "Fri, 15 Sep 2017 23:16:21 -0000", "runtime": "1:35:47", "starttime": 1505511634, "endtime": 1505517381, "estimated_runtime": "1:35:47", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 4, "script_revision_id": null }, { "id": 358, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Fri, 20 Jan 2017 06:36:01 -0000", "ended": "Fri, 20 Jan 2017 07:21:22 -0000", "runtime": "0:45:21", "starttime": 1484894161, "endtime": 1484896882, "estimated_runtime": "0:45:21", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 2, "script_revision_id": null }, { "id": 359, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 20 Jun 2017 19:17:09 -0000", "ended": "Tue, 20 Jun 2017 19:59:22 -0000", "runtime": "0:42:13", "starttime": 1497986229, "endtime": 1497988762, "estimated_runtime": "0:42:13", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 2, "script_revision_id": null }, { "id": 360, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 26 Feb 2017 09:37:07 -0000", "ended": "Sun, 26 Feb 2017 09:44:53 -0000", "runtime": "0:07:46", "starttime": 1488101827, "endtime": 1488102293, "estimated_runtime": "0:07:46", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 2, "script_revision_id": null }, { "id": 355, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-validate", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 26 Aug 2017 12:32:16 -0000", "ended": "Sat, 26 Aug 2017 14:45:18 -0000", "runtime": "2:13:02", "starttime": 1503750736, "endtime": 1503758718, "estimated_runtime": "2:13:02", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 1, "script_revision_id": null }, { "id": 356, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-validate", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 06 Jun 2017 13:03:30 -0000", "ended": "Tue, 06 Jun 2017 13:47:00 -0000", "runtime": "0:43:30", "starttime": 1496754210, "endtime": 1496756820, "estimated_runtime": "0:43:30", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 1, "script_revision_id": null }, { "id": 357, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-validate", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 16 Jul 2017 19:10:54 -0000", "ended": "Sun, 16 Jul 2017 21:35:40 -0000", "runtime": "2:24:46", "starttime": 1500232254, "endtime": 1500240940, "estimated_runtime": "2:24:46", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 1, "script_revision_id": null }, { "id": 366, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "stress-ng-memory-long", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 08 Apr 2017 03:39:23 -0000", "ended": "Sat, 08 Apr 2017 03:50:36 -0000", "runtime": "0:11:13", "starttime": 1491622763, "endtime": 1491623436, "estimated_runtime": "0:11:13", "parameters": {}, "script_id": 9, "script_revision_id": null }, { "id": 367, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "stress-ng-memory-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Thu, 19 Oct 2017 19:45:46 -0000", "ended": "Thu, 19 Oct 2017 22:18:36 -0000", "runtime": "2:32:50", "starttime": 1508442346, "endtime": 1508451516, "estimated_runtime": "2:32:50", "parameters": {}, "script_id": 10, "script_revision_id": null } ], "resource_uri": "/MAAS/api/2.0/nodes/thr3am/results/22/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/nodes/{system_id}/results/{id}/?op=download
Download a compressed tar containing all results from the given system_id with the given id.
"id" can either by the script set id, current-commissioning
,
current-testing
, or current-installation
.
Parameters
{system_id} (String): Required. The machine's system_id.
{id} (String): Required. The script result id.
hardware_type (String): Optional. Only return scripts for the
given hardware type. Can be node
, cpu
, memory
, or storage
.
Defaults to all.
filters (String): Optional. A comma seperated list to show only results that ran with a script name or tag.
output (String): Optional. Can be either combined
, stdout
,
stderr
, or all
. By default only the combined output is returned.
filetype (String): Optional. Filetype to output, can be txt
or
tar.xz
.
Success
HTTP Status Code : 200
Content
"-------------------------------------- 7z --------------------------------------\nnLX2OJjxTJ\n------------------------- badblocks - /dev/name-xE9mtJ -------------------------\nmqKpKVY4SD\n------------------------- badblocks - /dev/name-VhlrVi -------------------------\nAn5Wf3mKNf------------------------- badblocks - /dev/name-EjgNwC -------------------------\nRB6wrhLVig------------------- badblocks-destructive - /dev/name-VhlrVi -------------------\n3w8FM0ay86\n------------------- badblocks-destructive - /dev/name-EjgNwC -------------------\nTd5OcAHN1x\n------------------- badblocks-destructive - /dev/name-xE9mtJ -------------------\nxLlKiIZbbm---------------------------- internet-connectivity ----------------------------\nNGlqZsnaEY---------------------------------- memtester ----------------------------------\nOJs6jkSHgZ-------------------- smartctl-conveyance - /dev/name-xE9mtJ --------------------\nVdr90lwPs3-------------------- smartctl-conveyance - /dev/name-EjgNwC --------------------\ns61LmxCBgg\n-------------------- smartctl-conveyance - /dev/name-VhlrVi --------------------\nmaH7kZaKcM\n---------------------- smartctl-short - /dev/name-xE9mtJ ----------------------\nUwzxx2OK3h\n---------------------- smartctl-short - /dev/name-EjgNwC ----------------------\nuYOiKPN31W\n---------------------- smartctl-short - /dev/name-VhlrVi ----------------------\nyAlm61zZUv\n--------------------- smartctl-validate - /dev/name-xE9mtJ ---------------------\nALXC7IYXXj\n--------------------- smartctl-validate - /dev/name-EjgNwC ---------------------\nTzqR5BdPLJ\n--------------------- smartctl-validate - /dev/name-VhlrVi ---------------------\naPkNW4SqQV\n---------------------------- stress-ng-memory-long ----------------------------\nYq119nrmEz\n---------------------------- stress-ng-memory-short ----------------------------\nl7b0YoZgB2\n"
Error
HTTP Status Code : 404
Content
Not Found
Node Script Result
Manage node script results.
GET /MAAS/api/2.0/nodes/{system_id}/results/
Return a list of script results grouped by run for the given system_id.
Parameters
{system_id} (String): Required. The machine's system_id.
type (String): Optional. Only return scripts with the given type.
This can be commissioning
, testing
, or installion
. Defaults to
showing all.
hardware_type (String): Optional. Only return scripts for the
given hardware type. Can be node
, cpu
, memory
, or storage
.
Defaults to all.
include_output (String): Optional. Include base64 encoded output from the script. Note that any value of include_output will include the encoded output from the script.
filters (String): Optional. A comma seperated list to show only results with a script name or tag.
Success
HTTP Status Code : 200
JSON
[ { "status_name": "Passed", "status": 2, "type_name": "Commissioning", "id": 21, "runtime": "306 days, 20:34:46", "ended": "Tue, 07 Nov 2017 15:59:57 -0000", "type": 0, "results": [ { "id": 342, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-00-support-info", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 19 Mar 2017 20:38:06 -0000", "ended": "Sun, 19 Mar 2017 21:41:34 -0000", "runtime": "1:03:28", "starttime": 1489955886, "endtime": 1489959694, "estimated_runtime": "1:03:28", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 344, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-01-cpuinfo", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 11 Jan 2017 23:18:54 -0000", "ended": "Thu, 12 Jan 2017 00:03:24 -0000", "runtime": "0:44:30", "starttime": 1484176734, "endtime": 1484179404, "estimated_runtime": "0:44:30", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 343, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-01-lshw", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 15 Oct 2017 08:12:05 -0000", "ended": "Sun, 15 Oct 2017 10:07:54 -0000", "runtime": "1:55:49", "starttime": 1508055125, "endtime": 1508062074, "estimated_runtime": "1:55:49", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 345, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-02-virtuality", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 09 May 2017 14:02:19 -0000", "ended": "Tue, 09 May 2017 15:08:21 -0000", "runtime": "1:06:02", "starttime": 1494338539, "endtime": 1494342501, "estimated_runtime": "1:06:02", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 346, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-03-install-lldpd", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 07 Nov 2017 15:05:05 -0000", "ended": "Tue, 07 Nov 2017 15:59:57 -0000", "runtime": "0:54:52", "starttime": 1510067105, "endtime": 1510070397, "estimated_runtime": "0:54:52", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 347, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-04-list-modaliases", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Fri, 20 Oct 2017 03:01:06 -0000", "ended": "Fri, 20 Oct 2017 05:21:25 -0000", "runtime": "2:20:19", "starttime": 1508468466, "endtime": 1508476885, "estimated_runtime": "2:20:19", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 348, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-05-dhcp-unconfigured-ifaces", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 05 Jul 2017 10:52:49 -0000", "ended": "Wed, 05 Jul 2017 10:53:55 -0000", "runtime": "0:01:06", "starttime": 1499251969, "endtime": 1499252035, "estimated_runtime": "0:01:06", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 349, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-06-get-fruid-api-data", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 04 Jan 2017 19:25:11 -0000", "ended": "Wed, 04 Jan 2017 19:33:04 -0000", "runtime": "0:07:53", "starttime": 1483557911, "endtime": 1483558384, "estimated_runtime": "0:07:53", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 350, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-07-block-devices", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 06 May 2017 05:07:50 -0000", "ended": "Sat, 06 May 2017 06:05:59 -0000", "runtime": "0:58:09", "starttime": 1494047270, "endtime": 1494050759, "estimated_runtime": "0:58:09", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 351, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "00-maas-08-serial-ports", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Thu, 02 Mar 2017 01:01:37 -0000", "ended": "Thu, 02 Mar 2017 03:35:40 -0000", "runtime": "2:34:03", "starttime": 1488416497, "endtime": 1488425740, "estimated_runtime": "2:34:03", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 352, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "99-maas-02-capture-lldp", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 04 Oct 2017 09:27:49 -0000", "ended": "Wed, 04 Oct 2017 09:34:31 -0000", "runtime": "0:06:42", "starttime": 1507109269, "endtime": 1507109671, "estimated_runtime": "0:06:42", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 353, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "99-maas-03-network-interfaces", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 14 Mar 2017 12:40:35 -0000", "ended": "Tue, 14 Mar 2017 15:06:36 -0000", "runtime": "2:26:01", "starttime": 1489495235, "endtime": 1489503996, "estimated_runtime": "2:26:01", "parameters": {}, "script_id": null, "script_revision_id": null }, { "id": 354, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "99-maas-04-network-interfaces-with-sriov", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 05 Sep 2017 14:09:44 -0000", "ended": "Tue, 05 Sep 2017 14:53:53 -0000", "runtime": "0:44:09", "starttime": 1504620584, "endtime": 1504623233, "estimated_runtime": "0:44:09", "parameters": {}, "script_id": null, "script_revision_id": null } ], "started": "Wed, 04 Jan 2017 19:25:11 -0000", "last_ping": null, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/results/21/" }, { "status_name": "Passed", "status": 2, "type_name": "Testing", "id": 22, "runtime": "348 days, 6:51:37", "ended": "Tue, 19 Dec 2017 00:23:41 -0000", "type": 2, "results": [ { "id": 374, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "7z", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 19 Mar 2017 23:33:01 -0000", "ended": "Mon, 20 Mar 2017 01:16:59 -0000", "runtime": "1:43:58", "starttime": 1489966381, "endtime": 1489972619, "estimated_runtime": "1:43:58", "parameters": {}, "script_id": 14, "script_revision_id": null }, { "id": 368, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 10 Jan 2017 00:25:57 -0000", "ended": "Tue, 10 Jan 2017 02:26:53 -0000", "runtime": "2:00:56", "starttime": 1484007957, "endtime": 1484015213, "estimated_runtime": "2:00:56", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 12, "script_revision_id": null }, { "id": 370, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Mon, 03 Jul 2017 18:26:21 -0000", "ended": "Mon, 03 Jul 2017 18:50:59 -0000", "runtime": "0:24:38", "starttime": 1499106381, "endtime": 1499107859, "estimated_runtime": "0:24:38", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 12, "script_revision_id": null }, { "id": 369, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 04 Jan 2017 17:32:04 -0000", "ended": "Wed, 04 Jan 2017 18:06:45 -0000", "runtime": "0:34:41", "starttime": 1483551124, "endtime": 1483553205, "estimated_runtime": "0:34:41", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 12, "script_revision_id": null }, { "id": 373, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks-destructive", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 04 Oct 2017 03:19:13 -0000", "ended": "Wed, 04 Oct 2017 05:19:30 -0000", "runtime": "2:00:17", "starttime": 1507087153, "endtime": 1507094370, "estimated_runtime": "2:00:17", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 13, "script_revision_id": null }, { "id": 372, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks-destructive", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 23 Jul 2017 20:55:47 -0000", "ended": "Sun, 23 Jul 2017 23:38:04 -0000", "runtime": "2:42:17", "starttime": 1500843347, "endtime": 1500853084, "estimated_runtime": "2:42:17", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 13, "script_revision_id": null }, { "id": 371, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "badblocks-destructive", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Mon, 18 Dec 2017 22:06:01 -0000", "ended": "Tue, 19 Dec 2017 00:23:41 -0000", "runtime": "2:17:40", "starttime": 1513634761, "endtime": 1513643021, "estimated_runtime": "2:17:40", "parameters": { "storage": { "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 13, "script_revision_id": null }, { "id": 365, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "internet-connectivity", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 01 Apr 2017 03:04:52 -0000", "ended": "Sat, 01 Apr 2017 03:12:08 -0000", "runtime": "0:07:16", "starttime": 1491015892, "endtime": 1491016328, "estimated_runtime": "0:07:16", "parameters": {}, "script_id": 6, "script_revision_id": null }, { "id": 364, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "memtester", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Wed, 19 Apr 2017 09:22:38 -0000", "ended": "Wed, 19 Apr 2017 10:43:25 -0000", "runtime": "1:20:47", "starttime": 1492593758, "endtime": 1492598605, "estimated_runtime": "1:20:47", "parameters": {}, "script_id": 5, "script_revision_id": null }, { "id": 361, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-conveyance", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 18 Mar 2017 10:19:52 -0000", "ended": "Sat, 18 Mar 2017 12:47:57 -0000", "runtime": "2:28:05", "starttime": 1489832392, "endtime": 1489841277, "estimated_runtime": "2:28:05", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 4, "script_revision_id": null }, { "id": 362, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-conveyance", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Thu, 07 Sep 2017 01:11:18 -0000", "ended": "Thu, 07 Sep 2017 03:02:21 -0000", "runtime": "1:51:03", "starttime": 1504746678, "endtime": 1504753341, "estimated_runtime": "1:51:03", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 4, "script_revision_id": null }, { "id": 363, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-conveyance", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Fri, 15 Sep 2017 21:40:34 -0000", "ended": "Fri, 15 Sep 2017 23:16:21 -0000", "runtime": "1:35:47", "starttime": 1505511634, "endtime": 1505517381, "estimated_runtime": "1:35:47", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 4, "script_revision_id": null }, { "id": 358, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Fri, 20 Jan 2017 06:36:01 -0000", "ended": "Fri, 20 Jan 2017 07:21:22 -0000", "runtime": "0:45:21", "starttime": 1484894161, "endtime": 1484896882, "estimated_runtime": "0:45:21", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 2, "script_revision_id": null }, { "id": 359, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 20 Jun 2017 19:17:09 -0000", "ended": "Tue, 20 Jun 2017 19:59:22 -0000", "runtime": "0:42:13", "starttime": 1497986229, "endtime": 1497988762, "estimated_runtime": "0:42:13", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 2, "script_revision_id": null }, { "id": 360, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 26 Feb 2017 09:37:07 -0000", "ended": "Sun, 26 Feb 2017 09:44:53 -0000", "runtime": "0:07:46", "starttime": 1488101827, "endtime": 1488102293, "estimated_runtime": "0:07:46", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 2, "script_revision_id": null }, { "id": 355, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-validate", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 26 Aug 2017 12:32:16 -0000", "ended": "Sat, 26 Aug 2017 14:45:18 -0000", "runtime": "2:13:02", "starttime": 1503750736, "endtime": 1503758718, "estimated_runtime": "2:13:02", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-mSnL9L", "name": "name-xE9mtJ", "physical_blockdevice_id": 18, "serial": "serial-jBitFU" } } }, "script_id": 1, "script_revision_id": null }, { "id": 356, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-validate", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Tue, 06 Jun 2017 13:03:30 -0000", "ended": "Tue, 06 Jun 2017 13:47:00 -0000", "runtime": "0:43:30", "starttime": 1496754210, "endtime": 1496756820, "estimated_runtime": "0:43:30", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-OHzOYI", "name": "name-EjgNwC", "physical_blockdevice_id": 19, "serial": "serial-5EZFik" } } }, "script_id": 1, "script_revision_id": null }, { "id": 357, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "smartctl-validate", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sun, 16 Jul 2017 19:10:54 -0000", "ended": "Sun, 16 Jul 2017 21:35:40 -0000", "runtime": "2:24:46", "starttime": 1500232254, "endtime": 1500240940, "estimated_runtime": "2:24:46", "parameters": { "storage": { "argument_format": "{path}", "type": "storage", "value": { "id_path": null, "model": "model-5btVsu", "name": "name-VhlrVi", "physical_blockdevice_id": 20, "serial": "serial-SE3O1p" } } }, "script_id": 1, "script_revision_id": null }, { "id": 366, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "stress-ng-memory-long", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Sat, 08 Apr 2017 03:39:23 -0000", "ended": "Sat, 08 Apr 2017 03:50:36 -0000", "runtime": "0:11:13", "starttime": 1491622763, "endtime": 1491623436, "estimated_runtime": "0:11:13", "parameters": {}, "script_id": 9, "script_revision_id": null }, { "id": 367, "created": "Thu, 06 Dec 2018 20:41:55 -0000", "updated": "Thu, 06 Dec 2018 20:41:56 -0000", "name": "stress-ng-memory-short", "status": 2, "status_name": "Passed", "exit_status": 0, "started": "Thu, 19 Oct 2017 19:45:46 -0000", "ended": "Thu, 19 Oct 2017 22:18:36 -0000", "runtime": "2:32:50", "starttime": 1508442346, "endtime": 1508451516, "estimated_runtime": "2:32:50", "parameters": {}, "script_id": 10, "script_revision_id": null } ], "started": "Wed, 04 Jan 2017 17:32:04 -0000", "last_ping": null, "system_id": "thr3am", "resource_uri": "/MAAS/api/2.0/nodes/thr3am/results/22/" } ]
Error
HTTP Status Code : 404
Content
Not Found
Node Scripts
Manage custom scripts.
This functionality is only available to administrators.
GET /MAAS/api/2.0/scripts/
Return a list of stored scripts.
Note that parameters should be passed in the URI. E.g.
/script/?type=testing
.
Parameters
type (String): Optional. Only return scripts with the given type.
This can be testing
or commissioning
. Defaults to showing both.
hardware_type (String): Optional. Only return scripts for the
given hardware type. Can be node
, cpu
, memory
, or storage
.
Defaults to all.
include_script (String): Optional. Include the base64- encoded script content.
filters (String): Optional. A comma seperated list to show only results with a script name or tag.
Success
HTTP Status Code : 200
JSON
[ { "name": "memtester", "title": "Memory integrity", "description": "Run memtester against all available userspace memory.", "tags": [ "memory" ], "hardware_type": 2, "parallel": 0, "results": {}, "parameters": {}, "packages": { "apt": [ "memtester" ] }, "timeout": "0:00:00", "destructive": false, "default": true, "for_hardware": [], "may_reboot": false, "recommission": false, "history": [ { "id": 5, "comment": "Created by maas-", "created": "Thu, 06 Dec 2018 20:41:47 -0000" } ], "id": 5, "hardware_type_name": "Memory", "type_name": "Testing script", "parallel_name": "Disabled", "type": 2, "resource_uri": "/MAAS/api/2.0/scripts/memtester" }, { "name": "stress-ng-memory-long", "title": "Memory integrity", "description": "Run stress-ng memory tests for 12 hours.", "tags": [ "memory" ], "hardware_type": 2, "parallel": 0, "results": {}, "parameters": {}, "packages": { "apt": [ "stress-ng" ] }, "timeout": "12:00:00", "destructive": false, "default": true, "for_hardware": [], "may_reboot": false, "recommission": false, "history": [ { "id": 9, "comment": "Created by maas-", "created": "Thu, 06 Dec 2018 20:41:47 -0000" } ], "id": 9, "hardware_type_name": "Memory", "type_name": "Testing script", "parallel_name": "Disabled", "type": 2, "resource_uri": "/MAAS/api/2.0/scripts/stress-ng-memory-long" }, { "name": "stress-ng-memory-short", "title": "Memory integrity", "description": "Run stress-ng memory tests for 5 minutes.", "tags": [ "memory" ], "hardware_type": 2, "parallel": 0, "results": {}, "parameters": {}, "packages": { "apt": [ "stress-ng" ] }, "timeout": "0:05:00", "destructive": false, "default": true, "for_hardware": [], "may_reboot": false, "recommission": false, "history": [ { "id": 10, "comment": "Created by maas-", "created": "Thu, 06 Dec 2018 20:41:47 -0000" } ], "id": 10, "hardware_type_name": "Memory", "type_name": "Testing script", "parallel_name": "Disabled", "type": 2, "resource_uri": "/MAAS/api/2.0/scripts/stress-ng-memory-short" } ]
POST /MAAS/api/2.0/scripts/
Create a new script.
Parameters
name (String): Required. The name of the script.
title (String): Optional. The title of the script.
description (String): Optional. A description of what the script does.
tags (String): Optional. A comma seperated list of tags for this script.
type (String): Optional. The script_type defines when the script
should be used: testing
or commissioning
. Defaults to testing
.
hardware_type (String): Optional. The hardware_type defines what type of hardware the script is assoicated with. May be CPU, memory, storage, or node.
parallel (Int): Optional. Whether the script may be run in parallel with other scripts. May be disabled to run by itself, instance to run along scripts with the same name, or any to run along any script. 1 == True, 0 == False.
timeout (Int): Optional. How long the script is allowed to run before failing. 0 gives unlimited time, defaults to 0.
destructive (Boolean): Optional. Whether or not the script overwrites data on any drive on the running system. Destructive scripts can not be run on deployed systems. Defaults to false.
script (String): Optional. The content of the script to be uploaded in binary form. Note: this is not a normal parameter, but a file upload. Its filename is ignored; MAAS will know it by the name you pass to the request. Optionally you can ignore the name and script parameter in favor of uploading a single file as part of the request.
comment (String): Optional. A comment about what this change does.
for_hardware (String): Optional. A list of modalias, PCI IDs,
and/or USB IDs the script will automatically run on. Must start with
modalias:
, pci:
, or usb:
.
may_reboot (Boolean): Optional. Whether or not the script may reboot the system while running.
recommission (String): Optional. Whether builtin commissioning scripts should be rerun after successfully running this scripts.
Success
HTTP Status Code : 200
JSON
{ "name": "foobar", "title": "", "description": "", "tags": [ "node" ], "hardware_type": 0, "parallel": 0, "results": {}, "parameters": {}, "packages": {}, "timeout": "0:00:00", "destructive": false, "default": false, "for_hardware": [], "may_reboot": false, "recommission": false, "type": 2, "type_name": "Testing script", "id": 16, "history": [ { "id": 22, "comment": null, "created": "Thu, 06 Dec 2018 21:26:18 -0000" } ], "hardware_type_name": "Node", "parallel_name": "Disabled", "resource_uri": "/MAAS/api/2.0/scripts/foobar" }
Nodes
Manage the collection of all the nodes in the MAAS.
GET /MAAS/api/2.0/nodes/
List nodes visible to current user, optionally filtered by criteria.
Nodes are sorted by id (i.e. most recent last) and grouped by type.
Parameters
hostname (String): Optional. Only nodes relating to the node with the matching hostname will be returned. This can be specified multiple times to see multiple nodes.
mac_address (String): Optional. Only nodes relating to the node owning the specified MAC address will be returned. This can be specified multiple times to see multiple nodes.
id (String): Optional. Only nodes relating to the nodes with matching system ids will be returned.
domain (String): Optional. Only nodes relating to the nodes in the domain will be returned.
zone (String): Optional. Only nodes relating to the nodes in the zone will be returned.
pool (String): Optional. Only nodes belonging to the pool will be returned.
agent_name (String): Optional. Only nodes relating to the nodes with matching agent names will be returned.
Success
HTTP Status Code : 200
JSON
[ { "commissioning_status": 2, "version": "2.5.0~beta3-7325-g1425f6d4c-0ubuntu1~18.04.1", "node_type_name": "Region and rack controller", "ip_addresses": [ "10.55.32.135", "192.168.122.1" ], "storage_test_status": -1, "cpu_count": 4, "hostname": "mymaas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 23, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "swap_size": null, "power_type": "", "memory": 8192, "current_testing_result_id": null, "osystem": "ubuntu", "node_type": 4, "service_set": [ { "name": "proxy", "status": "running", "status_info": "" }, { "name": "bind9", "status": "running", "status_info": "" }, { "name": "ntp_region", "status": "running", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "syslog_region", "status": "running", "status_info": "" }, { "name": "ntp_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd", "status": "running", "status_info": "" }, { "name": "tftp", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "http", "status": "running", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "syslog_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd6", "status": "off", "status_info": "" }, { "name": "rackd", "status": "running", "status_info": "" } ], "other_test_status": -1, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "status_action": "", "commissioning_status_name": "Passed", "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "mac_address": "fa:16:3e:b8:af:ff", "tags": [], "params": "", "id": 1, "discovered": null, "product": "OpenStack Nova", "parents": [], "type": "physical", "name": "ens3", "enabled": true, "effective_mtu": 1500, "vendor": "OpenStack Foundation", "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 1, "mode": "static", "ip_address": "10.55.32.135", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/1/" }, { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "mac_address": "52:54:00:09:88:41", "tags": [], "params": "", "id": 17, "discovered": null, "product": null, "parents": [], "type": "bridge", "name": "virbr0", "enabled": true, "effective_mtu": 1500, "vendor": null, "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 17, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/17/" } ], "cpu_speed": 2400, "testing_status_name": "Unknown", "tag_names": [ "virtual" ], "current_commissioning_result_id": 1, "system_id": "6gsym8", "distro_series": "bionic", "cpu_test_status": -1, "memory_test_status_name": "Unknown", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "33313934-3432-5a43-4339-343532355a35", "cpu_model": "Intel Core i7 9xx (Nehalem Class Core i7)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "other_test_status_name": "Unknown", "fqdn": "mymaas.maas", "power_state": "unknown", "memory_test_status": -1, "current_installation_result_id": null, "storage_test_status_name": "Unknown", "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "resource_uri": "/MAAS/api/2.0/rackcontrollers/6gsym8/" } ]
GET /MAAS/api/2.0/nodes/?op=is_registered
Returns whether or not the given MAC address is registered within this MAAS (and attached to a non-retired node).
Parameters
mac_address (URL String): Required. The MAC address to be checked.
Success
HTTP Status Code : 200
Boolean
false
Error
HTTP Status Code : 400
Content
No provided mac_address!
POST /MAAS/api/2.0/nodes/?op=set_zone
Assigns a given node to a given zone.
Parameters
zone (String): Required. The zone name.
nodes (String): Required. The node to add.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 400
Content : The given parameters were not correct.
Notification
Manage an individual notification.
DELETE /MAAS/api/2.0/notifications/{id}/
Delete a notification with a given id.
Parameters
{id} (Int): Required. The notification id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/notifications/{id}/
Read a notification with the given id.
Parameters
{id} (Int): Required. The notification id.
Success
HTTP Status Code : 200
JSON
{ "ident": null, "user": null, "users": true, "admins": false, "message": "This is a test message.", "context": {}, "category": "info", "id": 1414, "resource_uri": "/MAAS/api/2.0/notifications/1414/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/notifications/{id}/?op=dismiss
Dismiss a notification with the given id.
It is safe to call multiple times for the same notification.
Parameters
{id} (Int): Required. The notification id.
Success
HTTP Status Code : 200
Error
HTTP Status Code : 403
Content : The notification is not relevant to the invoking user.
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/notifications/{id}/
Update a notification with a given id.
This is available to admins only.
Note: One of the user
, users
or admins
parameters must be set to
True for the notification to be visible to anyone.
Parameters
{id} (Int): Required. The notification id.
message (String): Required. The message for this notification. May contain basic HTML, such as formatting. This string will be sanitised before display so that it doesn't break MAAS HTML.
context (String): Optional. Optional JSON context. The root object
must be an object (i.e. a mapping). The values herein can be
referenced by message
with Python's "format" (not %) codes.
category (String): Optional. Choose from: error
, warning
,
success
, or info
. Defaults to info
.
ident (String): Optional. Unique identifier for this notification.
user (String): Optional. User ID this notification is intended for. By default it will not be targeted to any individual user.
users (Boolean): Optional. True to notify all users, defaults to false, i.e. not targeted to all users.
admins (Boolean): Optional. True to notify all admins, defaults to false, i.e. not targeted to all admins.
Success
HTTP Status Code : 200
JSON
{ "ident": null, "user": null, "users": true, "admins": false, "message": "This is an updated test message.", "context": {}, "category": "info", "id": 1414, "resource_uri": "/MAAS/api/2.0/notifications/1414/" }
Error
HTTP Status Code : 404
Content
Not Found
Notifications
Manage the collection of all the notifications in MAAS.
GET /MAAS/api/2.0/notifications/
List notifications relevant to the invoking user.
Notifications that have been dismissed are not returned.
Success
HTTP Status Code : 200
JSON
[ { "ident": "dhcp_disabled_all_vlans", "user": null, "users": false, "admins": true, "message": "DHCP is not enabled on any VLAN. This will prevent machines from being able to PXE boot, unless an external DHCP server is being used.", "context": {}, "category": "warning", "id": 1, "resource_uri": "/MAAS/api/2.0/notifications/1/" }, { "ident": null, "user": null, "users": false, "admins": true, "message": "Attention admins! Core critical! Meltdown imminent! Evacuate habitat immediately!", "context": { "name-oeIkwE": "value-cY9eNX" }, "category": "error", "id": 2, "resource_uri": "/MAAS/api/2.0/notifications/2/" }, { "ident": null, "user": { "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }, "users": false, "admins": false, "message": "Greetings, {name}! Get away from the habitat for the weekend and visit the Mare Nubium with MAAS Tours. Use the code METAL to claim a special gift!", "context": { "name": "Admin" }, "category": "info", "id": 5, "resource_uri": "/MAAS/api/2.0/notifications/5/" }, { "ident": "maas-import-pxe-files script", "user": null, "users": false, "admins": true, "message": "Boot image import process not started. Machines will not be able to\nprovision without boot images. Visit the\n<a href=\"http://localhost:5240/MAAS/#/images\">boot images</a> page to start the import.\n", "context": {}, "category": "error", "id": 1409, "resource_uri": "/MAAS/api/2.0/notifications/1409/" }, { "ident": "clusters", "user": null, "users": false, "admins": true, "message": "One rack controller is not yet connected to the region. Visit the <a href=\"/MAAS/#/controllers\">rack controllers page</a> for more information.", "context": {}, "category": "error", "id": 1410, "resource_uri": "/MAAS/api/2.0/notifications/1410/" }, { "ident": "controller_out_of_date_mfhrw8", "user": null, "users": false, "admins": true, "message": "Controller <a href='#/node/controller/{system_id}'>{hostname}</a> is running an older version of MAAS (less than 2.3.0).", "context": { "hostname": "happy-region", "latest_version": "", "system_id": "mfhrw8" }, "category": "warning", "id": 1411, "resource_uri": "/MAAS/api/2.0/notifications/1411/" }, { "ident": "controller_out_of_date_ekf6cn", "user": null, "users": false, "admins": true, "message": "Controller <a href='#/node/controller/{system_id}'>{hostname}</a> is running an older version of MAAS (less than 2.3.0).", "context": { "hostname": "happy-rack", "latest_version": "", "system_id": "ekf6cn" }, "category": "warning", "id": 1412, "resource_uri": "/MAAS/api/2.0/notifications/1412/" } ]
POST /MAAS/api/2.0/notifications/
Create a new notification.
This is available to admins only.
Note: One of the user
, users
or admins
parameters must be set to
True for the notification to be visible to anyone.
Parameters
message (String): Required. The message for this notification. May contain basic HTML, such as formatting. This string will be sanitised before display so that it doesn't break MAAS HTML.
context (String): Optional. Optional JSON context. The root object
must be an object (i.e. a mapping). The values herein can be
referenced by message
with Python's "format" (not %) codes.
category (String): Optional. Choose from: error
, warning
,
success
, or info
. Defaults to info
.
ident (String): Optional. Unique identifier for this notification.
user (String): Optional. User ID this notification is intended for. By default it will not be targeted to any individual user.
users (Boolean): Optional. True to notify all users, defaults to false, i.e. not targeted to all users.
admins (Boolean): Optional. True to notify all admins, defaults to false, i.e. not targeted to all admins.
Success
HTTP Status Code : 200
JSON
{ "ident": null, "user": null, "users": true, "admins": false, "message": "This is a test message.", "context": {}, "category": "info", "id": 1413, "resource_uri": "/MAAS/api/2.0/notifications/1413/" }
Package Repositories
Manage the collection of all Package Repositories in MAAS.
GET /MAAS/api/2.0/package-repositories/
List all available package repositories.
Success
HTTP Status Code : 200
JSON
{ "name": "ports_archive", "url": "http://ports.ubuntu.com/ubuntu-ports", "distributions": [], "disabled_pockets": [], "disabled_components": [], "disable_sources": true, "components": [], "arches": [ "armhf", "arm64", "ppc64el", "s390x" ], "key": "", "enabled": true, "id": 2, "resource_uri": "/MAAS/api/2.0/package-repositories/2/" }
POST /MAAS/api/2.0/package-repositories/
Create a new package repository.
Parameters
name (String): Required. The name of the package repository.
url (String): Required. The url of the package repository.
distributions (String): Optional. Which package distributions to include.
disabled_pockets (String): Optional. The list of pockets to disable.
disabled_components (String): Optional. The list of components to disable. Only applicable to the default Ubuntu repositories.
components (String): Optional. The list of components to enable. Only applicable to custom repositories.
arches (String): Optional. The list of supported architectures.
key (String): Optional. The authentication key to use with the repository.
enabled (Boolean): Optional. Whether or not the repository is enabled.
Success
HTTP Status Code : 200
JSON
{ "name": "ports_archive", "url": "http://ports.ubuntu.com/ubuntu-ports", "distributions": [], "disabled_pockets": [], "disabled_components": [], "disable_sources": true, "components": [], "arches": [ "armhf", "arm64", "ppc64el", "s390x" ], "key": "", "enabled": true, "id": 2, "resource_uri": "/MAAS/api/2.0/package-repositories/2/" }
Package Repository
Manage an individual package repository.
A package repository is identified by its id.
DELETE /MAAS/api/2.0/package-repositories/{id}/
Delete a package repository with the given id.
Parameters
{id} (Int): Required. A package repository id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/package-repositories/{id}/
Read a package repository with the given id.
Parameters
{id} (Int): Required. A package repository id.
Success
HTTP Status Code : 200
JSON
{ "name": "ports_archive", "url": "http://ports.ubuntu.com/ubuntu-ports", "distributions": [], "disabled_pockets": [], "disabled_components": [], "disable_sources": true, "components": [], "arches": [ "armhf", "arm64", "ppc64el", "s390x" ], "key": "", "enabled": true, "id": 2, "resource_uri": "/MAAS/api/2.0/package-repositories/2/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/package-repositories/{id}/
Update the package repository with the given id.
Parameters
{id} (Int): Required. A package repository id.
name (String): Optional. The name of the package repository.
url (String): Optional. The url of the package repository.
distributions (String): Optional. Which package distributions to include.
disabled_pockets (String): Optional. The list of pockets to disable.
disabled_components (String): Optional. The list of components to disable. Only applicable to the default Ubuntu repositories.
disable_sources (String): Optional. Disable deb-src lines.
components (String): Optional. The list of components to enable. Only applicable to custom repositories.
arches (String): Optional. The list of supported architectures.
key (String): Optional. The authentication key to use with the repository.
enabled (Boolean): Optional. Whether or not the repository is enabled.
Success
HTTP Status Code : 200
JSON
{ "name": "ports_archive", "url": "http://ports.ubuntu.com/ubuntu-ports", "distributions": [], "disabled_pockets": [], "disabled_components": [], "disable_sources": true, "components": [], "arches": [ "armhf", "arm64", "ppc64el", "s390x" ], "key": "", "enabled": true, "id": 2, "resource_uri": "/MAAS/api/2.0/package-repositories/2/" }
Error
HTTP Status Code : 404
Content
Not Found
Partitions
Manage partition on a block device.
DELETE /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
Delete the partition from machine system_id and device device_id with the given partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}
Read the partition from machine system_id and device device_id with the given partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
Success
HTTP Status Code : 200
JSON
[ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "path": "/dev/disk/by-dname/vda", "system_id": "ccrfnk", "uuid": null, "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "path": "/dev/disk/by-dname/vda-part1", "system_id": "ccrfnk", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "f698b5ee-d53c-4538-86cf-ee4b23d37db6", "mount_point": "/", "mount_options": null }, "id": 1, "type": "partition", "device_id": 1, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" } ], "filesystem": null, "id": 1, "partition_table_type": "MBR", "storage_pool": "18afd485-1491-43c9-a876-7af737d03698", "type": "physical", "name": "vda", "serial": "", "available_size": 0, "model": "", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}?op=add_tag
Add a tag to a partition on machine system_id, device device_id and partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
tag (String): Required. The tag being added.
Success
HTTP Status Code : 200
JSON
{ "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [ "mytag" ], "device_id": 1, "system_id": "ccrfnk", "filesystem": { "fstype": "ext4", "label": "", "uuid": "a73c0701-9216-40ca-857f-63c65b4e7059", "mount_point": null, "mount_options": null }, "used_for": "Unmounted ext4 formatted filesystem", "type": "partition", "id": 1, "path": "/dev/disk/by-dname/vda-part1", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to add a tag.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}?op=format
Format the partition on machine system_id and device device_id with the given partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
fstype (String): Required. Type of filesystem.
uuid (String): Optional. The UUID for the filesystem.
label (String): Optional. The label for the filesystem.
Success
HTTP Status Code : 200
JSON
{ "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "device_id": 1, "system_id": "ccrfnk", "filesystem": { "fstype": "ext4", "label": "", "uuid": "ad185012-fa9e-486d-8869-16bf297272c8", "mount_point": null, "mount_options": null }, "used_for": "Unmounted ext4 formatted filesystem", "type": "partition", "id": 1, "path": "/dev/disk/by-dname/vda-part1", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to format the partition.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}?op=mount
Mount a filesystem on machine system_id, device device_id and partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
mount_point (String): Required. Path on the filesystem to mount.
mount_options (String): Optional. Options to pass to mount(8).
Success
HTTP Status Code : 200
JSON
{ "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "device_id": 1, "system_id": "ccrfnk", "filesystem": { "fstype": "ext4", "label": "", "uuid": "a73c0701-9216-40ca-857f-63c65b4e7059", "mount_point": "/", "mount_options": "" }, "used_for": "ext4 formatted filesystem mounted at /", "type": "partition", "id": 1, "path": "/dev/disk/by-dname/vda-part1", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to mount the filesystem.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}?op=remove_tag
Remove a tag from a partition on machine system_id, device device_id and partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
tag (String): Required. The tag being removed.
Success
HTTP Status Code : 200
JSON
{ "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "device_id": 1, "system_id": "ccrfnk", "filesystem": { "fstype": "ext4", "label": "", "uuid": "a73c0701-9216-40ca-857f-63c65b4e7059", "mount_point": null, "mount_options": null }, "used_for": "Unmounted ext4 formatted filesystem", "type": "partition", "id": 1, "path": "/dev/disk/by-dname/vda-part1", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" }
Error
HTTP Status Code : 403
Content : The user does not have permissions to remove a tag.
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}?op=unformat
Unformat the partition on machine system_id and device device_id with the given partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
Success
HTTP Status Code : 200
JSON
{ "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "used_for": "Unused", "filesystem": null, "system_id": "ccrfnk", "path": "/dev/disk/by-dname/vda-part1", "type": "partition", "id": 1, "device_id": 1, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partition/{id}?op=unmount
Unmount a filesystem on machine system_id, device device_id and partition id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
{id} (Int): Required. The partition id.
Success
HTTP Status Code : 200
JSON
{ "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "device_id": 1, "system_id": "ccrfnk", "filesystem": { "fstype": "ext4", "label": "", "uuid": "a73c0701-9216-40ca-857f-63c65b4e7059", "mount_point": null, "mount_options": null }, "used_for": "Unmounted ext4 formatted filesystem", "type": "partition", "id": 1, "path": "/dev/disk/by-dname/vda-part1", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" }
Error
HTTP Status Code : 400
Content : The partition is not formatted or not currently mounted.
HTTP Status Code : 403
Content : The user does not have permissions to unmount the filesystem.
HTTP Status Code : 404
Content
Not Found
Partitions
Manage partitions on a block device.
GET /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partitions/
List partitions on a device with the given system_id and device_id.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
Success
HTTP Status Code : 200
JSON
[ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "path": "/dev/disk/by-dname/vda", "system_id": "ccrfnk", "uuid": null, "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "partitions": [ { "uuid": "95f5d47d-0abd-408b-b3f1-c3f4df152609", "size": 7994343424, "bootable": false, "tags": [], "path": "/dev/disk/by-dname/vda-part1", "system_id": "ccrfnk", "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "f698b5ee-d53c-4538-86cf-ee4b23d37db6", "mount_point": "/", "mount_options": null }, "id": 1, "type": "partition", "device_id": 1, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/1" } ], "filesystem": null, "id": 1, "partition_table_type": "MBR", "storage_pool": "18afd485-1491-43c9-a876-7af737d03698", "type": "physical", "name": "vda", "serial": "", "available_size": 0, "model": "", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/blockdevices/{device_id}/partitions/
Create a partition on a block device.
Parameters
{system_id} (String): Required. The system_id.
{device_id} (Int): Required. The block device_id.
size (Int): Optional. The size of the partition. If not specified, all available space will be used.
uuid (String): Optional. UUID for the partition. Only used if the partition table type for the block device is GPT.
bootable (Boolean): Optional. If the partition should be marked bootable.
Success
HTTP Status Code : 200
JSON
{ "uuid": "ecfa7d5b-bb76-4443-83ab-ad600c23b4de", "size": 7994343424, "bootable": false, "tags": [], "device_id": 1, "system_id": "ccrfnk", "filesystem": null, "used_for": "Unused", "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/2" }
Error
HTTP Status Code : 404
Content
Not Found
Pod
Manage an individual pod.
A pod is identified by its id.
DELETE /MAAS/api/2.0/pods/{id}/
Deletes a pod with the given pod ID.
Parameters
{id} (Int): Required. The pod's ID.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
GET /MAAS/api/2.0/pods/{id}/
GET /MAAS/api/2.0/pods/{id}/?op=parameters
This returns a pod's configuration parameters. For some types of pod, this will include private information such as passwords and secret keys.
Note: This method is reserved for admin users.
Parameters
{id} (Int): Required. The pod's ID.
Success
HTTP Status Code : 200
JSON
{ "power_address": "qemu+ssh://ubuntu@172.16.2.42/system" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
POST /MAAS/api/2.0/pods/{id}/?op=add_tag
Adds a tag to a given pod.
Parameters
{id} (Int): Required. The pod's ID.
tag (String): Required. The tag to add.
Success
HTTP Status Code : 200
JSON
{ "id": 3, "architectures": [], "available": { "cores": 6, "memory": 4096, "local_storage": 89994823853 }, "memory_over_commit_ratio": 1.0, "host": { "system_id": null, "__incomplete__": true }, "capabilities": [ "dynamic_local_storage", "composable" ], "default_macvlan_mode": null, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "total": { "cores": 17, "memory": 17408, "local_storage": 102193675437 }, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "name": "proud-cat", "cpu_over_commit_ratio": 1.0, "tags": [ "mytag" ], "used": { "cores": 11, "memory": 13312, "local_storage": 12198851584 }, "storage_pools": [ { "id": "pool_id-UuYjRR", "name": "name-Xa03eb", "type": "lvm", "path": "/var/lib/name-Xa03eb", "total": 55908000766, "used": 0, "available": 55908000766, "default": true }, { "id": "pool_id-FkgXoP", "name": "name-MBAlmH", "type": "lvm", "path": "/var/lib/name-MBAlmH", "total": 30058152477, "used": 7636928512, "available": 22421223965, "default": false }, { "id": "pool_id-YDEeSq", "name": "name-TaXcCd", "type": "dir", "path": "/var/lib/name-TaXcCd", "total": 16227522194, "used": 4561923072, "available": 11665599122, "default": false } ], "type": "virsh", "resource_uri": "/MAAS/api/2.0/pods/3/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
POST /MAAS/api/2.0/pods/{id}/?op=compose
Compose a new machine from a pod.
Parameters
cores (Int): Optional. The minimum number of CPU cores.
memory (Int): Optional. The minimum amount of memory, specified in MiB (e.g. 2 MiB == 2*1024*1024).
cores (Int): Optional. The minimum number of CPU cores.
cpu_speed (Int): Optional. The minimum CPU speed, specified in MHz.
architecture (String): Optional. The architecture of the new machine (e.g. amd64). This must be an architecture the pod supports.
storage (String): Optional. A list of storage constraint
identifiers in the form
label:size(tag,tag,...), label:size(tag,tag,...)
. For more information
please see the CLI pod management page of the official MAAS
documentation.
interfaces (String): Optional. A labeled constraint map associating constraint labels with desired interface properties. MAAS will assign interfaces that match the given interface properties.
Format: label:key=value,key=value,...
Keys:
id
: Matches an interface with the specific idfabric
: Matches an interface attached to the specified fabric.fabric_class
: Matches an interface attached to a fabric with the specified class.ip
: Matches an interface whose VLAN is on the subnet implied by the given IP address, and allocates the specified IP address for the machine on that interface (if it is available).mode
: Matches an interface with the specified mode. (Currently, the only supported mode is "unconfigured".)name
: Matches an interface with the specified name. (For example, "eth0".)hostname
: Matches an interface attached to the node with the specified hostname.subnet
: Matches an interface attached to the specified subnet.space
: Matches an interface attached to the specified space.subnet_cidr
: Matches an interface attached to the specified subnet CIDR. (For example, "192.168.0.0/24".)type
: Matches an interface of the specified type. (Valid types: "physical", "vlan", "bond", "bridge", or "unknown".)vlan
: Matches an interface on the specified VLAN.vid
: Matches an interface on a VLAN with the specified VID.tag
: Matches an interface tagged with the specified tag.
hostname (String): Optional. The hostname of the newly composed machine.
domain (Int): Optional. The ID of the domain in which to put the newly composed machine.
zone (Int): Optional. The ID of the zone in which to put the newly composed machine.
pool (Int): Optional. The ID of the pool in which to put the newly composed machine.
Success
HTTP Status Code : 200
JSON
{ "system_id": "wdpx3n", "resource_uri": "/MAAS/api/2.0/machines/wdpx3n/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
POST /MAAS/api/2.0/pods/{id}/?op=refresh
Performs pod discovery and updates all discovered information and discovered machines.
Parameters
{id} (Int): Optional. The pod's ID.
Success
JSON
{ "type": "virsh", "name": "mypod", "tags": [ "virtual" ], "architectures": [ "amd64/generic" ], "used": { "cores": 1, "memory": 1024, "local_storage": 8000000000 }, "storage_pools": [ { "id": "70e0f355-ea3b-4cdd-b4b4-20a01a35617d", "name": "maas", "type": "dir", "path": "/var/lib/libvirt/maas-images", "total": 47751942144, "used": 8000000000, "available": 39751942144, "default": true } ], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "id": 1, "available": { "cores": 7, "memory": 14892, "local_storage": 39751942144 }, "memory_over_commit_ratio": 1.0, "capabilities": [ "composable", "dynamic_local_storage", "over_commit", "storage_pools" ], "default_macvlan_mode": null, "cpu_over_commit_ratio": 1.0, "total": { "cores": 8, "memory": 15916, "local_storage": 47751942144 }, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "host": { "system_id": null, "__incomplete__": true }, "resource_uri": "/MAAS/api/2.0/pods/1/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
POST /MAAS/api/2.0/pods/{id}/?op=remove_tag
Removes a given tag from a pod.
Parameters
{id} (Int): Required. The pod's ID.
tag (String): Required. The tag to add.
Success
HTTP Status Code : 200
JSON
{ "id": 3, "architectures": [], "available": { "cores": 6, "memory": 4096, "local_storage": 89994823853 }, "memory_over_commit_ratio": 1.0, "host": { "system_id": null, "__incomplete__": true }, "capabilities": [ "dynamic_local_storage", "composable" ], "default_macvlan_mode": null, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "total": { "cores": 17, "memory": 17408, "local_storage": 102193675437 }, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "name": "proud-cat", "cpu_over_commit_ratio": 1.0, "tags": [], "used": { "cores": 11, "memory": 13312, "local_storage": 12198851584 }, "storage_pools": [ { "id": "pool_id-UuYjRR", "name": "name-Xa03eb", "type": "lvm", "path": "/var/lib/name-Xa03eb", "total": 55908000766, "used": 0, "available": 55908000766, "default": true }, { "id": "pool_id-FkgXoP", "name": "name-MBAlmH", "type": "lvm", "path": "/var/lib/name-MBAlmH", "total": 30058152477, "used": 7636928512, "available": 22421223965, "default": false }, { "id": "pool_id-YDEeSq", "name": "name-TaXcCd", "type": "dir", "path": "/var/lib/name-TaXcCd", "total": 16227522194, "used": 4561923072, "available": 11665599122, "default": false } ], "type": "virsh", "resource_uri": "/MAAS/api/2.0/pods/3/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
PUT /MAAS/api/2.0/pods/{id}/
Update a specific pod by ID.
Note: A pod's 'type' cannot be updated. The pod must be deleted and re-added to change the type.
Parameters
{id} (URL String): Required. The pod's ID.
name (String): Optional. The pod's name.
pool (String): Optional. The name of the resource pool associated with this pod -- composed machines will be assigned to this resource pool by default.
cpu_over_commit_ratio (Int): Optional. CPU overcommit ratio (1-10)
memory_over_commit_ratio (Int): Optional. CPU overcommit ratio (1-10)
default_storage_pool (String): Optional. Default KVM storage pool to use when the pod has storage pools.
power_address (String): Optional. Address for power control of the pod.
power_pass (String): Optional. Password for access to power control of the pod.
zone (String): Optional. The pod's zone.
default_macvlan_mode (String): Optional. Default macvlan mode for pods that use it: bridge, passthru, private, vepa.
tags (String): Optional. Tag or tags (command separated) associated with the pod.
console_log (Boolean): Optional. If 'True', VMs composed in this pod will have console output logged (Note: this will automatically create a tag named 'pod-console-logging' and apply it to the pod). If 'False', MAAS deletes the 'pod-console-logging' tag, if any, which turns off console logging.
Success
HTTP Status Code : 200
JSON
{ "cpu_over_commit_ratio": 1.0, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "storage_pools": [ { "id": "70e0f355-ea3b-4cdd-b4b4-20a01a35617d", "name": "maas", "type": "dir", "path": "/var/lib/libvirt/maas-images", "total": 47751942144, "used": 8000000000, "available": 39751942144, "default": true } ], "name": "newpodname", "memory_over_commit_ratio": 1.0, "type": "virsh", "host": { "system_id": null, "__incomplete__": true }, "architectures": [ "amd64/generic" ], "tags": [ "virtual" ], "default_macvlan_mode": "", "used": { "cores": 1, "memory": 1024, "local_storage": 8000000000 }, "available": { "cores": 7, "memory": 14892, "local_storage": 39751942144 }, "id": 1, "capabilities": [ "composable", "dynamic_local_storage", "over_commit", "storage_pools" ], "total": { "cores": 8, "memory": 15916, "local_storage": 47751942144 }, "resource_uri": "/MAAS/api/2.0/pods/1/" }
Error
HTTP Status Code : 404 -- The pod's ID was not found.
HTTP Status Code : 403 -- The current user does not have permission to update the pod.
Pods
Manage the collection of all the pod in the MAAS.
GET /MAAS/api/2.0/pods/
Get a listing of all pods.
Success
HTTP Status Code : 200
JSON
[ { "id": 3, "architectures": [], "available": { "cores": 6, "memory": 4096, "local_storage": 89994823853 }, "memory_over_commit_ratio": 1.0, "host": { "system_id": null, "__incomplete__": true }, "capabilities": [ "dynamic_local_storage", "composable" ], "default_macvlan_mode": null, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "total": { "cores": 17, "memory": 17408, "local_storage": 102193675437 }, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "name": "proud-cat", "cpu_over_commit_ratio": 1.0, "tags": [], "used": { "cores": 11, "memory": 13312, "local_storage": 12198851584 }, "storage_pools": [ { "id": "pool_id-UuYjRR", "name": "name-Xa03eb", "type": "lvm", "path": "/var/lib/name-Xa03eb", "total": 55908000766, "used": 0, "available": 55908000766, "default": true }, { "id": "pool_id-FkgXoP", "name": "name-MBAlmH", "type": "lvm", "path": "/var/lib/name-MBAlmH", "total": 30058152477, "used": 7636928512, "available": 22421223965, "default": false }, { "id": "pool_id-YDEeSq", "name": "name-TaXcCd", "type": "dir", "path": "/var/lib/name-TaXcCd", "total": 16227522194, "used": 4561923072, "available": 11665599122, "default": false } ], "type": "virsh", "resource_uri": "/MAAS/api/2.0/pods/3/" } ]
POST /MAAS/api/2.0/pods/
Create or discover a new pod.
Parameters
type (String): Required. The type of pod to create: rsd
or
virsh
.
power_address (String): Required. Address that gives MAAS access
to the pod's power control. For example:
qemu+ssh://172.16.99.2/system
.
power_user (String): Required. Username to use for power control
of the pod. Required for rsd
pods or virsh
pods that do not have SSH
set up for public-key authentication.
power_pass (String): Required. Password to use for power control
of the pod. Required for rsd
pods or virsh
pods that do not have SSH
set up for public-key authentication.
name (String): Optional. The new pod's name.
zone (String): Optional. The new pod's zone.
pool (String): Optional. The name of the resource pool the new pod will belong to. Machines composed from this pod will be assigned to this resource pool by default.
tags (String): Optional. A tag or list of tags ( comma delimited) to assign to the new pod.
Success
HTTP Status Code : 200
JSON
{ "cpu_over_commit_ratio": 1.0, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "storage_pools": [ { "id": "70e0f355-ea3b-4cdd-b4b4-20a01a35617d", "name": "maas", "type": "dir", "path": "/var/lib/libvirt/maas-images", "total": 47751942144, "used": 0, "available": 47751942144, "default": true } ], "name": "mypod", "memory_over_commit_ratio": 1.0, "type": "virsh", "host": { "system_id": null, "__incomplete__": true }, "architectures": [ "amd64/generic" ], "tags": [ "virtual" ], "default_macvlan_mode": null, "used": { "cores": 0, "memory": 0, "local_storage": 0 }, "available": { "cores": 8, "memory": 15916, "local_storage": 47751942144 }, "id": 1, "capabilities": [ "composable", "dynamic_local_storage", "over_commit", "storage_pools" ], "total": { "cores": 8, "memory": 15916, "local_storage": 47751942144 }, "resource_uri": "/MAAS/api/2.0/pods/1/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 503
Content
Failed talking to pod: Failed to login to virsh console.
RackController
Manage an individual rack controller.
The rack controller is identified by its system_id.
DELETE /MAAS/api/2.0/rackcontrollers/{system_id}/
Deletes a rack controller with the given system_id. A rack controller cannot be deleted if it is set to primary_rack on a VLAN and another rack controller cannot be used to provide DHCP for said VLAN. Use force to override this behavior.
Using force will also allow deleting a rack controller that is hosting pod virtual machines. The pod will also be deleted.
Rack controllers that are also region controllers will be converted to a region controller (and hosted pods will not be affected).
Parameters
force (Boolean): Optional. Always delete the rack controller even if it is the primary_rack on a VLAN and another rack controller cannot provide DHCP on that VLAN. This will disable DHCP on those VLANs.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user does not have permssions to delete the rack controller.
HTTP Status Code : 400
Content : Unable to delete 'maas-run'; it is currently set as a primary rack controller on VLANs fabric-0.untagged and no other rack controller can provide DHCP.
GET /MAAS/api/2.0/rackcontrollers/{system_id}/
Reads a node with the given system_id.
Parameters
{system_id} (String): Required. A node's system_id.
Success
HTTP Status Code : 200
JSON
{ "boot_interface": { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, "memory": 8192, "tag_names": [], "current_installation_result_id": null, "fqdn": "causal-quagga.maas", "disable_ipv4": false, "distro_series": "", "ip_addresses": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "node_type": 0, "min_hwe_kernel": null, "commissioning_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, "system_id": "g8xyqs", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "blockdevice_set": [ { "id_path": null, "size": 2250362368, "block_size": 512, "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "id_path": null, "size": 1443074048, "block_size": 4096, "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "current_commissioning_result_id": 198, "cpu_test_status": 2, "address_ttl": null, "cache_sets": [], "storage": 3693.436416, "node_type_name": "Machine", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "cpu_count": 7, "storage_test_status_name": "Passed", "owner": "user2", "status": 20, "volume_groups": [], "hwe_kernel": null, "netboot": true, "current_testing_result_id": 199, "commissioning_status": 2, "testing_status_name": "Passed", "architecture": "i386/generic", "locked": false, "power_state": "error", "memory_test_status_name": "Passed", "power_type": "virsh", "interface_set": [ { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, { "system_id": "g8xyqs", "name": "eth-ex07mq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 113, "params": "", "type": "physical", "firmware_version": null, "mac_address": "8f:75:69:58:26:47", "parents": [], "tags": [ "tag-ymen6c", "tag-oKQ7iK", "tag-yQLBgJ" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/113/" }, { "system_id": "g8xyqs", "name": "eth-CE1j2X", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 114, "params": "", "type": "physical", "firmware_version": null, "mac_address": "b0:5e:ed:8d:d8:36", "parents": [], "tags": [ "tag-LJPUwT", "tag-U5zGn3", "tag-dHGEeD" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/114/" }, { "system_id": "g8xyqs", "name": "bond-VpkNvO", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [], "discovered": null, "id": 115, "params": "", "type": "bond", "firmware_version": null, "mac_address": "0a:87:3f:94:0e:68", "parents": [ "eth-CE1j2X", "eth-ex07mq", "eth-jJ5ZwN" ], "tags": [ "tag-HwhC7n", "tag-WHGBJc", "tag-yY8Ap5" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/115/" } ], "owner_data": {}, "bcaches": [], "hostname": "causal-quagga", "raids": [], "other_test_status": 2, "status_action": "action-BqENyW", "special_filesystems": [], "physicalblockdevice_set": [ { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "firmware_version": "firmware_version-UW8ucD", "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "id_path": null, "block_size": 4096, "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "size": 1443074048, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "iscsiblockdevice_set": [], "testing_status": 2, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "storage_test_status": 2, "pod": { "id": 5, "name": "sacred-hen", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "swap_size": null, "status_message": "desc-eqGqfo", "status_name": "Failed to exit rescue mode", "osystem": "", "cpu_test_status_name": "Passed", "memory_test_status": 2, "other_test_status_name": "Passed", "virtualblockdevice_set": [], "cpu_speed": 0, "resource_uri": "/MAAS/api/2.0/machines/g8xyqs/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/rackcontrollers/{system_id}/?op=details
Returns system details -- for example, LLDP and lshw
XML dumps.
Returns a {detail_type: xml, ...}
map, where detail_type
is
something like "lldp" or "lshw".
Note that this is returned as BSON and not JSON. This is for efficiency,
but mainly because JSON can't do binary content without applying
additional encoding like base-64. The example output below is
represented in ASCII using bsondump example.bson
and is for
demonstrative purposes.
Parameters
{system_id} (String): Required. The node's system_id.
Success
HTTP Status Code : 200
Content
{ "lldp": { "$binary": "cjBZSWw2S1ZkRA==", "$type": "00" }, "lshw": { "$binary": "Nkd5MzRLYjBkTQ==", "$type": "00" } }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/rackcontrollers/{system_id}/?op=list_boot_images
Lists all available boot images for a given rack controller system_id and whether they are in sync with the region controller.
Parameters
{system_id} (String): Required. The rack controller system_id for which you want to list boot images.
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/rackcontrollers/{system_id}/?op=power_parameters
Gets power parameters for a given system_id, if any. For some types of power control this will include private information such as passwords and secret keys.
Note that this method is reserved for admin users and returns a 403 if the user is not one.
Success
HTTP Status Code : 200
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/rackcontrollers/{system_id}/?op=query_power_state
Gets the power state of a given node. MAAS sends a request to the node's power controller, which asks it about the node's state. The reply to this could be delayed by up to 30 seconds while waiting for the power controller to respond. Use this method sparingly as it ties up an appserver thread while waiting.
Parameters
system_id (String): Required. The node to query.
Success
HTTP Status Code : 200
JSON
{ "state": "on" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/rackcontrollers/{system_id}/?op=abort
Abort a node's current operation.
Parameters
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to abort the current operation.
POST /MAAS/api/2.0/rackcontrollers/{system_id}/?op=import_boot_images
Import boot images on a given rack controller or all rack controllers.
Parameters
{system_id} (String): Required. A rack controller system_id.
Success
HTTP Status Code : 200
Content : Import of boot images started on <rack controller name>
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/rackcontrollers/{system_id}/?op=override_failed_testing
Ignore failed tests and put node back into a usable state.
Parameters
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to override tests.
POST /MAAS/api/2.0/rackcontrollers/{system_id}/?op=power_off
Powers off a given node.
Parameters
stop_mode (String): Optional. Power-off mode. If 'soft', perform a soft power down if the node's power type supports it, otherwise perform a hard power off. For all values other than 'soft', and by default, perform a hard power off. A soft power off generally asks the OS to shutdown the system gracefully before powering off, while a hard power off occurs immediately without any warning to the OS.
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
JSON
{ "cpu_count": 1, "fqdn": "node2.maas", "hostname": "node2", "power_state": "on", "cpu_test_status": -1, "storage": 8000, "osystem": "ubuntu", "cpu_test_status_name": "Unknown", "testing_status": 2, "iscsiblockdevice_set": [], "boot_interface": { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" }, "boot_disk": { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" }, "bcaches": [], "cpu_speed": 2500, "ip_addresses": [ "172.16.99.5" ], "virtualblockdevice_set": [], "special_filesystems": [], "owner_data": {}, "physicalblockdevice_set": [ { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "testing_status_name": "Passed", "disable_ipv4": false, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" } ], "architecture": "amd64/generic", "commissioning_status": 2, "hwe_kernel": "ga-18.04", "current_installation_result_id": 8, "swap_size": null, "memory": 1024, "pod": { "id": 1, "name": "MyPodName", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "current_commissioning_result_id": 6, "hardware_info": { "system_vendor": "QEMU", "system_product": "Standard PC (i440FX + PIIX, 1996)", "system_version": "pc-i440fx-bionic", "system_serial": "Unknown", "cpu_model": "QEMU Virtual CPU version 2.5+", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "1.10.2-1ubuntu1", "mainboard_firmware_date": "04/01/2014" }, "pool": { "name": "newname", "description": "new description", "id": 1, "resource_uri": "/MAAS/api/2.0/resourcepool/1/" }, "current_testing_result_id": 7, "tag_names": [ "virtual", "mypod" ], "storage_test_status": 2, "address_ttl": null, "status_message": "'cloudinit' running modules for final", "cache_sets": [], "other_test_status_name": "Unknown", "node_type_name": "Machine", "distro_series": "bionic", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "min_hwe_kernel": "", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "system_id": "e8xa8m", "locked": false, "power_type": "virsh", "node_type": 0, "memory_test_status": -1, "memory_test_status_name": "Unknown", "status": 6, "netboot": false, "volume_groups": [], "raids": [], "default_gateways": { "ipv4": { "gateway_ip": "172.16.99.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status_name": "Passed", "status_action": "modules-final", "other_test_status": -1, "status_name": "Deployed", "storage_test_status_name": "Passed", "owner": "admin", "resource_uri": "/MAAS/api/2.0/machines/e8xa8m/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to power off the node.
POST /MAAS/api/2.0/rackcontrollers/{system_id}/?op=power_on
Turn on the given node with optional user-data and comment.
Parameters
user_data (String): Optional. Base64-encoded blob of data to be made available to the nodes through the metadata service.
comment (String): Optional. Comment for the event log.
Success
HTTP Status Code : 204
JSON
{ "cpu_count": 1, "fqdn": "node2.maas", "hostname": "node2", "power_state": "on", "cpu_test_status": -1, "storage": 8000, "osystem": "ubuntu", "cpu_test_status_name": "Unknown", "testing_status": 2, "iscsiblockdevice_set": [], "boot_interface": { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" }, "boot_disk": { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" }, "bcaches": [], "cpu_speed": 2500, "ip_addresses": [ "172.16.99.5" ], "virtualblockdevice_set": [], "special_filesystems": [], "owner_data": {}, "physicalblockdevice_set": [ { "firmware_version": null, "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "block_size": 4096, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "id_path": "/dev/vda", "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "size": 8000000000, "tags": [ "rotary" ], "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "testing_status_name": "Passed", "disable_ipv4": false, "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "model": "", "path": "/dev/disk/by-dname/vda", "serial": "", "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 2, "used_for": "ext4 formatted filesystem mounted at /", "system_id": "e8xa8m", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "available_size": 0, "used_size": 7999586304, "name": "vda", "id": 2, "used_for": "MBR partitioned with 1 partition", "partition_table_type": "MBR", "system_id": "e8xa8m", "filesystem": null, "uuid": null, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "fabric_id": 1, "primary_rack": "mhce3f", "secondary_rack": null, "space": "FooSpace", "name": "untagged", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "vendor": "QEMU", "enabled": true, "children": [], "name": "ens4", "id": 5, "discovered": [], "parents": [], "effective_mtu": 1500, "product": "Standard PC (i440FX + PIIX, 1996)", "firmware_version": null, "system_id": "e8xa8m", "mac_address": "52:54:00:52:a5:9e", "tags": [], "type": "physical", "params": "", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" } ], "architecture": "amd64/generic", "commissioning_status": 2, "hwe_kernel": "ga-18.04", "current_installation_result_id": 8, "swap_size": null, "memory": 1024, "pod": { "id": 1, "name": "MyPodName", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "current_commissioning_result_id": 6, "hardware_info": { "system_vendor": "QEMU", "system_product": "Standard PC (i440FX + PIIX, 1996)", "system_version": "pc-i440fx-bionic", "system_serial": "Unknown", "cpu_model": "QEMU Virtual CPU version 2.5+", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "1.10.2-1ubuntu1", "mainboard_firmware_date": "04/01/2014" }, "pool": { "name": "newname", "description": "new description", "id": 1, "resource_uri": "/MAAS/api/2.0/resourcepool/1/" }, "current_testing_result_id": 7, "tag_names": [ "virtual", "mypod" ], "storage_test_status": 2, "address_ttl": null, "status_message": "'cloudinit' running modules for final", "cache_sets": [], "other_test_status_name": "Unknown", "node_type_name": "Machine", "distro_series": "bionic", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "min_hwe_kernel": "", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "system_id": "e8xa8m", "locked": false, "power_type": "virsh", "node_type": 0, "memory_test_status": -1, "memory_test_status_name": "Unknown", "status": 6, "netboot": false, "volume_groups": [], "raids": [], "default_gateways": { "ipv4": { "gateway_ip": "172.16.99.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "commissioning_status_name": "Passed", "status_action": "modules-final", "other_test_status": -1, "status_name": "Deployed", "storage_test_status_name": "Passed", "owner": "admin", "resource_uri": "/MAAS/api/2.0/machines/e8xa8m/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user is not authorized to power on the node.
HTTP Status Code : 503
Content : Returns 503 if the start-up attempted to allocate an IP address, and there were no IP addresses available on the relevant cluster interface.
POST /MAAS/api/2.0/rackcontrollers/{system_id}/?op=test
Begins the testing process for a given node.
A node in the 'ready', 'allocated', 'deployed', 'broken', or any failed state may run tests. If testing is started and successfully passes from 'broken' or any failed state besides 'failed commissioning' the node will be returned to a ready state. Otherwise the node will return to the state it was when testing started.
Parameters
enable_ssh (Int): Optional. Whether to enable SSH for the testing environment using the user's SSH key(s). 0 == false. 1 == true.
testing_scripts (String): Optional. A comma-separated list of testing script names and tags to be run. By default all tests tagged 'commissioning' will be run.
Success
HTTP Status Code : 204
JSON
{ "cpu_speed": 2500, "disable_ipv4": false, "cache_sets": [], "other_test_status_name": "Unknown", "memory_test_status": -1, "tag_names": [ "virtual", "mypod" ], "netboot": false, "power_type": "virsh", "hostname": "node2", "node_type": 0, "testing_status": 0, "default_gateways": { "ipv4": { "gateway_ip": "172.16.99.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "raids": [], "current_installation_result_id": 8, "locked": false, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "iscsiblockdevice_set": [], "current_commissioning_result_id": 6, "current_testing_result_id": 49, "osystem": "ubuntu", "cpu_count": 1, "node_type_name": "Machine", "blockdevice_set": [ { "id_path": "/dev/vda", "size": 8000000000, "block_size": 4096, "tags": [ "rotary" ], "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "filesystem": null, "model": "", "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "serial": "", "partition_table_type": "MBR", "type": "physical", "id": 2, "path": "/dev/disk/by-dname/vda", "system_id": "e8xa8m", "uuid": null, "available_size": 0, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "device_id": 2, "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "system_id": "e8xa8m", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "name": "vda", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "boot_interface": { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "52:54:00:52:a5:9e", "parents": [], "effective_mtu": 1500, "discovered": [], "type": "physical", "children": [], "product": "Standard PC (i440FX + PIIX, 1996)", "params": "", "tags": [], "id": 5, "vendor": "QEMU", "system_id": "e8xa8m", "enabled": true, "name": "ens4", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" }, "pod": { "id": 1, "name": "MyPodName", "resource_uri": "/MAAS/api/2.0/pods/1/" }, "storage_test_status": 0, "architecture": "amd64/generic", "memory_test_status_name": "Unknown", "storage": 8000, "status_action": "modules-final", "virtualblockdevice_set": [], "special_filesystems": [], "other_test_status": -1, "status_name": "Testing", "volume_groups": [], "ip_addresses": [ "172.16.99.5" ], "hardware_info": { "system_vendor": "QEMU", "system_product": "Standard PC (i440FX + PIIX, 1996)", "system_version": "pc-i440fx-bionic", "system_serial": "Unknown", "cpu_model": "QEMU Virtual CPU version 2.5+", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "1.10.2-1ubuntu1", "mainboard_firmware_date": "04/01/2014" }, "swap_size": null, "owner_data": {}, "status": 21, "cpu_test_status_name": "Unknown", "boot_disk": { "firmware_version": null, "id_path": "/dev/vda", "block_size": 4096, "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "filesystem": null, "model": "", "size": 8000000000, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "serial": "", "partition_table_type": "MBR", "type": "physical", "tags": [ "rotary" ], "id": 2, "path": "/dev/disk/by-dname/vda", "system_id": "e8xa8m", "uuid": null, "available_size": 0, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "device_id": 2, "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "system_id": "e8xa8m", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "name": "vda", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" }, "address_ttl": null, "system_id": "e8xa8m", "memory": 1024, "domain": { "authoritative": true, "ttl": null, "resource_record_count": 0, "is_default": true, "id": 0, "name": "maas", "resource_uri": "/MAAS/api/2.0/domains/0/" }, "min_hwe_kernel": "", "physicalblockdevice_set": [ { "firmware_version": null, "id_path": "/dev/vda", "block_size": 4096, "used_size": 7999586304, "used_for": "MBR partitioned with 1 partition", "filesystem": null, "model": "", "size": 8000000000, "storage_pool": "30c2ef09-cfca-4a17-b2b0-2b69bf4d62d8", "serial": "", "partition_table_type": "MBR", "type": "physical", "tags": [ "rotary" ], "id": 2, "path": "/dev/disk/by-dname/vda", "system_id": "e8xa8m", "uuid": null, "available_size": 0, "partitions": [ { "uuid": "b4922056-6481-4d40-87cd-5bac47dca519", "size": 7994343424, "bootable": false, "tags": [], "used_for": "ext4 formatted filesystem mounted at /", "filesystem": { "fstype": "ext4", "label": "root", "uuid": "bc478524-ad85-419f-8795-aa7b89590f6f", "mount_point": "/", "mount_options": null }, "device_id": 2, "type": "partition", "id": 2, "path": "/dev/disk/by-dname/vda-part1", "system_id": "e8xa8m", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/partition/2" } ], "name": "vda", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/blockdevices/2/" } ], "owner": "admin", "power_state": "on", "hwe_kernel": "ga-18.04", "testing_status_name": "Pending", "pool": { "name": "newname", "description": "new description", "id": 1, "resource_uri": "/MAAS/api/2.0/resourcepool/1/" }, "fqdn": "node2.maas", "status_message": "'cloudinit' running modules for final", "commissioning_status": 2, "distro_series": "bionic", "cpu_test_status": -1, "storage_test_status_name": "Pending", "bcaches": [], "interface_set": [ { "firmware_version": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "links": [ { "id": 13, "mode": "auto", "ip_address": "172.16.99.5", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "primary_rack": "mhce3f", "space": "FooSpace", "id": 5002, "fabric": "fabric-1", "fabric_id": 1, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "FooSpace", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "mac_address": "52:54:00:52:a5:9e", "parents": [], "effective_mtu": 1500, "discovered": [], "type": "physical", "children": [], "product": "Standard PC (i440FX + PIIX, 1996)", "params": "", "tags": [], "id": 5, "vendor": "QEMU", "system_id": "e8xa8m", "enabled": true, "name": "ens4", "resource_uri": "/MAAS/api/2.0/nodes/e8xa8m/interfaces/5/" } ], "commissioning_status_name": "Passed", "resource_uri": "/MAAS/api/2.0/machines/e8xa8m/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/rackcontrollers/{system_id}/
Updates a rack controller with the given system_id.
Parameters
power_type (String): Optional. The new power type for the given rack controller. If you use the default value, power_parameters will be set to an empty string. See the Power types section for a list of available power types. Note that only admin users can set this parameter.
power_parameters (String): Required. The new value for the 'param' power parameter. This is a dynamic parameter that depends on the rack controller's power_type. See the Power types section for a list of available parameters based on power type. Note that only admin users can set these parameters.
power_parameters_skip_check (Boolean): Optional. If true, the new power parameters for the given rack controller will be checked against the expected parameters for the rack controller's power type. Default is false.
zone (String): Optional. The name of a valid zone in which to place the given rack controller.
Success
HTTP Status Code : 200
Content
{ "status_action": null, "current_commissioning_result_id": null, "swap_size": null, "memory_test_status_name": "Unknown", "system_id": "fcka3t", "tag_names": [], "cpu_speed": 0, "architecture": "i386/generic", "hostname": "happy-rack", "osystem": "", "power_state": "error", "commissioning_status": -1, "node_type": 2, "storage_test_status_name": "Unknown", "interface_set": [ { "name": "eth0", "tags": [ "tag-OrWiIM", "tag-pqdlf2", "tag-dV5KD9" ], "links": [], "enabled": true, "vendor": null, "product": null, "discovered": null, "params": "", "parents": [], "id": 6, "type": "physical", "children": [ "bond0" ], "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "id": 5001, "space": "management", "fabric": "fabric-0", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "firmware_version": null, "mac_address": "f9:d6:ff:1b:a9:64", "system_id": "fcka3t", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/fcka3t/interfaces/6/" }, { "name": "eth1", "tags": [ "tag-haHza9", "tag-eeoWc0", "tag-QA6OlX" ], "links": [], "enabled": true, "vendor": null, "product": null, "discovered": null, "params": "", "parents": [], "id": 7, "type": "physical", "children": [ "bond0" ], "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "id": 5001, "space": "management", "fabric": "fabric-0", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "firmware_version": null, "mac_address": "4f:e6:e6:df:61:ec", "system_id": "fcka3t", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/fcka3t/interfaces/7/" }, { "name": "eth2", "tags": [ "tag-f8dE7r", "tag-2JAAF4", "tag-fnPMf8" ], "links": [ { "id": 5, "mode": "static", "ip_address": "172.16.2.3", "subnet": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "id": 5003, "space": "management", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "enabled": true, "vendor": null, "product": null, "discovered": null, "params": "", "parents": [], "id": 8, "type": "physical", "children": [], "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "id": 5003, "space": "management", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "firmware_version": null, "mac_address": "ac:8e:44:fc:d0:97", "system_id": "fcka3t", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/fcka3t/interfaces/8/" }, { "name": "bond0", "tags": [ "tag-G8LyjU", "tag-RFRUSW", "tag-pQ5KBJ" ], "links": [ { "id": 4, "mode": "static", "ip_address": "172.16.1.3", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "id": 5001, "space": "management", "fabric": "fabric-0", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "enabled": true, "vendor": null, "product": null, "discovered": null, "params": "", "parents": [ "eth0", "eth1" ], "id": 9, "type": "bond", "children": [ "vlan10" ], "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "id": 5001, "space": "management", "fabric": "fabric-0", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "firmware_version": null, "mac_address": "b6:b4:a9:23:a9:af", "system_id": "fcka3t", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/fcka3t/interfaces/9/" }, { "name": "vlan10", "tags": [ "tag-fWHlGc", "tag-TCXO7q", "tag-HvGT57" ], "links": [ { "id": 6, "mode": "static", "ip_address": "172.16.3.3", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "10", "fabric_id": 0, "secondary_rack": null, "id": 5002, "space": "internal", "fabric": "fabric-0", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "enabled": true, "vendor": null, "product": null, "discovered": null, "params": "", "parents": [ "bond0" ], "id": 10, "type": "vlan", "children": [], "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "10", "fabric_id": 0, "secondary_rack": null, "id": 5002, "space": "internal", "fabric": "fabric-0", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "firmware_version": null, "mac_address": "b6:b4:a9:23:a9:af", "system_id": "fcka3t", "effective_mtu": 1500, "resource_uri": "/MAAS/api/2.0/nodes/fcka3t/interfaces/10/" } ], "fqdn": "happy-rack.maas", "testing_status": -1, "cpu_test_status_name": "Unknown", "memory_test_status": -1, "other_test_status_name": "Unknown", "version": null, "memory": 0, "distro_series": "", "storage_test_status": -1, "service_set": [ { "name": "http", "status": "unknown", "status_info": "" }, { "name": "dhcpd6", "status": "dead", "status_info": "" }, { "name": "tftp", "status": "dead", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd", "status": "dead", "status_info": "" }, { "name": "rackd", "status": "dead", "status_info": "" }, { "name": "syslog_rack", "status": "unknown", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "" }, { "name": "ntp_rack", "status": "dead", "status_info": "" } ], "cpu_test_status": -1, "other_test_status": -1, "power_type": "virsh", "current_testing_result_id": null, "current_installation_result_id": null, "ip_addresses": [ "172.16.2.3", "172.16.1.3", "172.16.3.3" ], "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "is_default": true, "id": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "testing_status_name": "Unknown", "node_type_name": "Rack controller", "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "cpu_count": 0, "commissioning_status_name": "Unknown", "resource_uri": "/MAAS/api/2.0/rackcontrollers/fcka3t/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : This method is reserved for admin users.
RackControllers
Manage the collection of all rack controllers in MAAS.
GET /MAAS/api/2.0/rackcontrollers/
List nodes visible to current user, optionally filtered by criteria.
Nodes are sorted by id (i.e. most recent last) and grouped by type.
Parameters
hostname (String): Optional. Only nodes relating to the node with the matching hostname will be returned. This can be specified multiple times to see multiple nodes.
mac_address (String): Optional. Only nodes relating to the node owning the specified MAC address will be returned. This can be specified multiple times to see multiple nodes.
id (String): Optional. Only nodes relating to the nodes with matching system ids will be returned.
domain (String): Optional. Only nodes relating to the nodes in the domain will be returned.
zone (String): Optional. Only nodes relating to the nodes in the zone will be returned.
pool (String): Optional. Only nodes belonging to the pool will be returned.
agent_name (String): Optional. Only nodes relating to the nodes with matching agent names will be returned.
Success
HTTP Status Code : 200
JSON
[ { "commissioning_status": 2, "version": "2.5.0~beta3-7325-g1425f6d4c-0ubuntu1~18.04.1", "node_type_name": "Region and rack controller", "ip_addresses": [ "10.55.32.135", "192.168.122.1" ], "storage_test_status": -1, "cpu_count": 4, "hostname": "mymaas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 23, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "swap_size": null, "power_type": "", "memory": 8192, "current_testing_result_id": null, "osystem": "ubuntu", "node_type": 4, "service_set": [ { "name": "proxy", "status": "running", "status_info": "" }, { "name": "bind9", "status": "running", "status_info": "" }, { "name": "ntp_region", "status": "running", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "syslog_region", "status": "running", "status_info": "" }, { "name": "ntp_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd", "status": "running", "status_info": "" }, { "name": "tftp", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "http", "status": "running", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "syslog_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd6", "status": "off", "status_info": "" }, { "name": "rackd", "status": "running", "status_info": "" } ], "other_test_status": -1, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "status_action": "", "commissioning_status_name": "Passed", "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "mac_address": "fa:16:3e:b8:af:ff", "tags": [], "params": "", "id": 1, "discovered": null, "product": "OpenStack Nova", "parents": [], "type": "physical", "name": "ens3", "enabled": true, "effective_mtu": 1500, "vendor": "OpenStack Foundation", "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 1, "mode": "static", "ip_address": "10.55.32.135", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/1/" }, { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "mac_address": "52:54:00:09:88:41", "tags": [], "params": "", "id": 17, "discovered": null, "product": null, "parents": [], "type": "bridge", "name": "virbr0", "enabled": true, "effective_mtu": 1500, "vendor": null, "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 17, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/17/" } ], "cpu_speed": 2400, "testing_status_name": "Unknown", "tag_names": [ "virtual" ], "current_commissioning_result_id": 1, "system_id": "6gsym8", "distro_series": "bionic", "cpu_test_status": -1, "memory_test_status_name": "Unknown", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "33313934-3432-5a43-4339-343532355a35", "cpu_model": "Intel Core i7 9xx (Nehalem Class Core i7)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "other_test_status_name": "Unknown", "fqdn": "mymaas.maas", "power_state": "unknown", "memory_test_status": -1, "current_installation_result_id": null, "storage_test_status_name": "Unknown", "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "resource_uri": "/MAAS/api/2.0/rackcontrollers/6gsym8/" } ]
GET /MAAS/api/2.0/rackcontrollers/?op=describe_power_types
Queries all rack controllers for power information.
Success
HTTP Status Code : 200
Content
{ "7xtf67": { "power_pass": "", "power_address": "qemu+ssh://user@192.168.1.5/system" }, "fcka3t": { "power_pass": "test123!!", "power_address": "qemu+ssh://user@192.168.1.10/system" } }
GET /MAAS/api/2.0/rackcontrollers/?op=is_registered
Returns whether or not the given MAC address is registered within this MAAS (and attached to a non-retired node).
Parameters
mac_address (URL String): Required. The MAC address to be checked.
Success
HTTP Status Code : 200
Boolean
false
Error
HTTP Status Code : 400
Content
No provided mac_address!
GET /MAAS/api/2.0/rackcontrollers/?op=power_parameters
Get power parameters for multiple machines. To request power parameters
for a specific machine or more than one machine:
op=power_parameters&id=abc123&id=def456
.
Parameters
id (URL String): Optional. A system ID. To request more than one
machine, provide multiple id
arguments in the request. Only machines
with matching system ids will be returned.
Success
HTTP Status Code : 200
JSON
{ "dypesm": { "power_address": "qemu+ssh://ubuntu@172.16.1.28/system", "power_id": "driven-bat" }, "xs7qfn": { "power_address": "qemu+ssh://ubuntu@172.16.1.134/system", "power_id": "nice-shad" } }
Error
HTTP Status Code : 403
Content : The user is not authorized to view the power parameters.
POST /MAAS/api/2.0/rackcontrollers/?op=import_boot_images
Imports boot images on all rack controllers.
Success
HTTP Status Code : 200
Content : Import of boot images started on all rack controllers
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/rackcontrollers/?op=set_zone
Assigns a given node to a given zone.
Parameters
zone (String): Required. The zone name.
nodes (String): Required. The node to add.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 400
Content : The given parameters were not correct.
RAID Device
Manage a specific RAID (Redundant Array of Independent Disks) on a machine.
DELETE /MAAS/api/2.0/nodes/{system_id}/raid/{id}/
Delete a RAID with the given id on a machine with the given system_id.
Parameters
{system_id} (String): Required. The system_id of the machine containing the RAID.
{id} (Int): Required. A RAID id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
GET /MAAS/api/2.0/nodes/{system_id}/raid/{id}/
Read RAID with the given id on a machine with the given system_id.
Parameters
{system_id} (String): Required. The system_id of the machine containing the RAID.
{id} (Int): Required. A RAID id.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/nodes/{system_id}/raid/{id}/
Update a RAID with the given id on a machine with the given system_id.
Parameters
{system_id} (String): Required. The system_id of the machine containing the RAID.
{id} (Int): Required. A RAID id.
name (String): Optional. Name of the RAID.
uuid (String): Optional. UUID of the RAID.
add_block_devices (String): Optional. Block devices to add to the RAID.
remove_block_devices (String): Optional. Block devices to remove from the RAID.
add_spare_devices (String): Optional. Spare block devices to add to the RAID.
remove_spare_devices (String): Optional. Spare block devices to remove from the RAID.
add_partitions (String): Optional. Partitions to add to the RAID.
remove_partitions (String): Optional. Partitions to remove from the RAID.
add_spare_partitions (String): Optional. Spare partitions to add to the RAID.
remove_spare_partitions (String): Optional. Spare partitions to remove from the RAID.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
RAID Devices
Manage all RAIDs (Redundant Array of Independent Disks) on a machine.
GET /MAAS/api/2.0/nodes/{system_id}/raids/
List all RAIDs belonging to a machine with the given system_id.
Parameters
{system_id} (String): Required. The system_id of the machine containing the RAIDs.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/raids/
Set up a RAID on a machine with the given system_id.
Parameters
{system_id} (String): Required. The system_id of the machine on which to set up the RAID.
name (String): Optional. Name of the RAID.
uuid (String): Optional. UUID of the RAID.
level (Int): Required. RAID level.
block_devices (String): Optional. Block devices to add to the RAID.
spare_devices (String): Optional. Spare block devices to add to the RAID.
partitions (String): Optional. Partitions to add to the RAID.
spare_partitions (String): Optional. Spare partitions to add to the RAID.
Success
HTTP Status Code : 200
JSON
{ "message": "Information about this object is not available at this time." }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content
Cannot create RAID because the machine is not Ready.
RegionController
Manage an individual region controller.
The region controller is identified by its system_id.
DELETE /MAAS/api/2.0/regioncontrollers/{system_id}/
Deletes a region controller with the given system_id.
A region controller cannot be deleted if it hosts pod virtual machines. Use force to override this behavior. Forcing deletion will also remove hosted pods.
Parameters
{system_id} (String): Required. The region controller's system_id.
force (Boolean): Optional. Tells MAAS to override disallowing deletion of region controllers that host pod virtual machines.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content : The user does not have permission to delete the rack controller.
HTTP Status Code : 400
Content : If MAAS is unable to delete the region controller.
GET /MAAS/api/2.0/regioncontrollers/{system_id}/
Reads a node with the given system_id.
Parameters
{system_id} (String): Required. A node's system_id.
Success
HTTP Status Code : 200
JSON
{ "boot_interface": { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, "memory": 8192, "tag_names": [], "current_installation_result_id": null, "fqdn": "causal-quagga.maas", "disable_ipv4": false, "distro_series": "", "ip_addresses": [], "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "node_type": 0, "min_hwe_kernel": null, "commissioning_status_name": "Passed", "domain": { "authoritative": true, "ttl": null, "name": "maas", "resource_record_count": 0, "id": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "boot_disk": { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, "system_id": "g8xyqs", "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "blockdevice_set": [ { "id_path": null, "size": 2250362368, "block_size": 512, "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "id_path": null, "size": 1443074048, "block_size": 4096, "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "current_commissioning_result_id": 198, "cpu_test_status": 2, "address_ttl": null, "cache_sets": [], "storage": 3693.436416, "node_type_name": "Machine", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "cpu_count": 7, "storage_test_status_name": "Passed", "owner": "user2", "status": 20, "volume_groups": [], "hwe_kernel": null, "netboot": true, "current_testing_result_id": 199, "commissioning_status": 2, "testing_status_name": "Passed", "architecture": "i386/generic", "locked": false, "power_state": "error", "memory_test_status_name": "Passed", "power_type": "virsh", "interface_set": [ { "system_id": "g8xyqs", "name": "eth-jJ5ZwN", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 112, "params": "", "type": "physical", "firmware_version": null, "mac_address": "3d:fd:40:ef:70:e8", "parents": [], "tags": [ "tag-M21kgB", "tag-CpnGzQ", "tag-Wgd7Eu" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/112/" }, { "system_id": "g8xyqs", "name": "eth-ex07mq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 113, "params": "", "type": "physical", "firmware_version": null, "mac_address": "8f:75:69:58:26:47", "parents": [], "tags": [ "tag-ymen6c", "tag-oKQ7iK", "tag-yQLBgJ" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/113/" }, { "system_id": "g8xyqs", "name": "eth-CE1j2X", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [ "bond-VpkNvO" ], "discovered": null, "id": 114, "params": "", "type": "physical", "firmware_version": null, "mac_address": "b0:5e:ed:8d:d8:36", "parents": [], "tags": [ "tag-LJPUwT", "tag-U5zGn3", "tag-dHGEeD" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/114/" }, { "system_id": "g8xyqs", "name": "bond-VpkNvO", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "untagged", "fabric_id": 2, "id": 5005, "secondary_rack": null, "space": "undefined", "primary_rack": null, "fabric": "fabric-2", "resource_uri": "/MAAS/api/2.0/vlans/5005/" }, "vendor": null, "enabled": true, "children": [], "discovered": null, "id": 115, "params": "", "type": "bond", "firmware_version": null, "mac_address": "0a:87:3f:94:0e:68", "parents": [ "eth-CE1j2X", "eth-ex07mq", "eth-jJ5ZwN" ], "tags": [ "tag-HwhC7n", "tag-WHGBJc", "tag-yY8Ap5" ], "links": [], "effective_mtu": 1500, "product": null, "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/interfaces/115/" } ], "owner_data": {}, "bcaches": [], "hostname": "causal-quagga", "raids": [], "other_test_status": 2, "status_action": "action-BqENyW", "special_filesystems": [], "physicalblockdevice_set": [ { "firmware_version": "firmware_version-tnhqNO", "partitions": [], "system_id": "g8xyqs", "name": "name-rcEM1G", "id_path": null, "block_size": 512, "model": "model-RAViIE", "available_size": 2250362368, "id": 75, "filesystem": null, "size": 2250362368, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-qlOilQ", "path": "/dev/disk/by-dname/name-rcEM1G", "tags": [ "tag-OKbSzN", "tag-IExJAF", "tag-p2t26t" ], "storage_pool": "pool_id-ry2OnY", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/75/" }, { "firmware_version": "firmware_version-UW8ucD", "partitions": [], "system_id": "g8xyqs", "name": "name-a5uEVy", "id_path": null, "block_size": 4096, "model": "model-0mBTZN", "available_size": 1443074048, "id": 76, "filesystem": null, "size": 1443074048, "type": "physical", "used_size": 0, "partition_table_type": null, "serial": "serial-fbDnkc", "path": "/dev/disk/by-dname/name-a5uEVy", "tags": [ "tag-sgRDAF", "tag-kytOd1", "tag-acWXTG" ], "storage_pool": "pool_id-aMRZUu", "uuid": null, "used_for": "Unused", "resource_uri": "/MAAS/api/2.0/nodes/g8xyqs/blockdevices/76/" } ], "iscsiblockdevice_set": [], "testing_status": 2, "default_gateways": { "ipv4": { "gateway_ip": null, "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "storage_test_status": 2, "pod": { "id": 5, "name": "sacred-hen", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "swap_size": null, "status_message": "desc-eqGqfo", "status_name": "Failed to exit rescue mode", "osystem": "", "cpu_test_status_name": "Passed", "memory_test_status": 2, "other_test_status_name": "Passed", "virtualblockdevice_set": [], "cpu_speed": 0, "resource_uri": "/MAAS/api/2.0/machines/g8xyqs/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/regioncontrollers/{system_id}/?op=details
Returns system details -- for example, LLDP and lshw
XML dumps.
Returns a {detail_type: xml, ...}
map, where detail_type
is
something like "lldp" or "lshw".
Note that this is returned as BSON and not JSON. This is for efficiency,
but mainly because JSON can't do binary content without applying
additional encoding like base-64. The example output below is
represented in ASCII using bsondump example.bson
and is for
demonstrative purposes.
Parameters
{system_id} (String): Required. The node's system_id.
Success
HTTP Status Code : 200
Content
{ "lldp": { "$binary": "cjBZSWw2S1ZkRA==", "$type": "00" }, "lshw": { "$binary": "Nkd5MzRLYjBkTQ==", "$type": "00" } }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/regioncontrollers/{system_id}/?op=power_parameters
Gets power parameters for a given system_id, if any. For some types of power control this will include private information such as passwords and secret keys.
Note that this method is reserved for admin users and returns a 403 if the user is not one.
Success
HTTP Status Code : 200
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/regioncontrollers/{system_id}/
Updates a region controller with the given system_id.
Parameters
{system_id} (String): Required. The region controller's system_id.
power_type (String): Optional. The new power type for this region controller. If you use the default value, power_parameters will be set to the empty string. Available to admin users. See the Power types section for a list of the available power types.
power_parameters (String): Required. The new value for the 'param1' power parameter. Note that this is dynamic as the available parameters depend on the selected value of the region controller's power_type. Available to admin users. See the Power types section for a list of the available power parameters for each power type.
power_parameters_skip_check (Boolean): Optional. Whether or not the new power parameters for this region controller should be checked against the expected power parameters for the region controller's power type ('true' or 'false'). The default is 'false'.
zone (String): Optional. Name of a valid physical zone in which to place this region controller.
Success
HTTP Status Code : 200
JSON
{ "distro_series": "bionic", "swap_size": null, "commissioning_status_name": "Passed", "cpu_test_status": -1, "status_action": "", "storage_test_status_name": "Unknown", "domain": { "authoritative": true, "ttl": null, "name": "maas", "id": 0, "is_default": true, "resource_record_count": 0, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "commissioning_status": 2, "cpu_count": 4, "power_type": "", "current_commissioning_result_id": 1, "node_type_name": "Region and rack controller", "current_testing_result_id": null, "other_test_status_name": "Unknown", "architecture": "amd64/generic", "testing_status": -1, "fqdn": "maas-run.maas", "ip_addresses": [ "192.168.122.115", "172.16.99.11" ], "hostname": "maas-run", "tag_names": [ "virtual" ], "interface_set": [ { "enabled": true, "tags": [], "effective_mtu": 1500, "vendor": "Intel Corp.", "firmware_version": "N/A", "links": [ { "id": 1, "mode": "static", "ip_address": "192.168.122.115", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "undefined", "fabric": "fabric-0", "name": "untagged", "id": 5001, "primary_rack": null, "secondary_rack": null, "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": "192.168.122.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "undefined", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "type": "physical", "parents": [], "discovered": null, "product": "Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz", "mac_address": "00:16:3e:b1:d3:42", "name": "eth0", "id": 1, "params": "", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "undefined", "fabric": "fabric-0", "name": "untagged", "id": 5001, "primary_rack": null, "secondary_rack": null, "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "system_id": "ccfqya", "children": [], "resource_uri": "/MAAS/api/2.0/nodes/ccfqya/interfaces/1/" }, { "enabled": true, "tags": [], "effective_mtu": 1500, "vendor": "Intel Corp.", "firmware_version": "N/A", "links": [], "type": "physical", "parents": [], "discovered": null, "product": "Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz", "mac_address": "00:16:3e:ae:15:33", "name": "eth1", "id": 2, "params": "", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "space": "undefined", "fabric": "fabric-1", "name": "untagged", "id": 5002, "primary_rack": "ccfqya", "secondary_rack": null, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "system_id": "ccfqya", "children": [ "br0" ], "resource_uri": "/MAAS/api/2.0/nodes/ccfqya/interfaces/2/" }, { "enabled": true, "tags": [], "effective_mtu": 1500, "vendor": "Intel Corp.", "firmware_version": "N/A", "links": [ { "id": 2, "mode": "static", "ip_address": "172.16.99.11", "subnet": { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "space": "undefined", "fabric": "fabric-1", "name": "untagged", "id": 5002, "primary_rack": "ccfqya", "secondary_rack": null, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": "172.16.99.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "undefined", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "type": "bridge", "parents": [ "eth1" ], "discovered": null, "product": "Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz", "mac_address": "06:36:08:d9:69:b5", "name": "br0", "id": 3, "params": "", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "space": "undefined", "fabric": "fabric-1", "name": "untagged", "id": 5002, "primary_rack": "ccfqya", "secondary_rack": null, "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "system_id": "ccfqya", "children": [], "resource_uri": "/MAAS/api/2.0/nodes/ccfqya/interfaces/3/" } ], "memory_test_status": -1, "cpu_speed": 2400, "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Intel(R) Core(TM) i5-6300U CPU", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "version": "2.5.0~beta4-7361-g401d6c73d-0ubuntu1~18.04.1", "node_type": 4, "testing_status_name": "Unknown", "power_state": "unknown", "current_installation_result_id": null, "storage_test_status": -1, "osystem": "ubuntu", "memory": 11864, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "memory_test_status_name": "Unknown", "other_test_status": -1, "cpu_test_status_name": "Unknown", "system_id": "ccfqya", "resource_uri": "/MAAS/api/2.0/rackcontrollers/ccfqya/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
This method is reserved for admin users.
RegionControllers
Manage the collection of all region controllers in MAAS.
GET /MAAS/api/2.0/regioncontrollers/
List nodes visible to current user, optionally filtered by criteria.
Nodes are sorted by id (i.e. most recent last) and grouped by type.
Parameters
hostname (String): Optional. Only nodes relating to the node with the matching hostname will be returned. This can be specified multiple times to see multiple nodes.
mac_address (String): Optional. Only nodes relating to the node owning the specified MAC address will be returned. This can be specified multiple times to see multiple nodes.
id (String): Optional. Only nodes relating to the nodes with matching system ids will be returned.
domain (String): Optional. Only nodes relating to the nodes in the domain will be returned.
zone (String): Optional. Only nodes relating to the nodes in the zone will be returned.
pool (String): Optional. Only nodes belonging to the pool will be returned.
agent_name (String): Optional. Only nodes relating to the nodes with matching agent names will be returned.
Success
HTTP Status Code : 200
JSON
[ { "commissioning_status": 2, "version": "2.5.0~beta3-7325-g1425f6d4c-0ubuntu1~18.04.1", "node_type_name": "Region and rack controller", "ip_addresses": [ "10.55.32.135", "192.168.122.1" ], "storage_test_status": -1, "cpu_count": 4, "hostname": "mymaas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 23, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "swap_size": null, "power_type": "", "memory": 8192, "current_testing_result_id": null, "osystem": "ubuntu", "node_type": 4, "service_set": [ { "name": "proxy", "status": "running", "status_info": "" }, { "name": "bind9", "status": "running", "status_info": "" }, { "name": "ntp_region", "status": "running", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "syslog_region", "status": "running", "status_info": "" }, { "name": "ntp_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd", "status": "running", "status_info": "" }, { "name": "tftp", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "http", "status": "running", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "syslog_rack", "status": "unknown", "status_info": "managed by the region" }, { "name": "dhcpd6", "status": "off", "status_info": "" }, { "name": "rackd", "status": "running", "status_info": "" } ], "other_test_status": -1, "testing_status": -1, "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "status_action": "", "commissioning_status_name": "Passed", "interface_set": [ { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "mac_address": "fa:16:3e:b8:af:ff", "tags": [], "params": "", "id": 1, "discovered": null, "product": "OpenStack Nova", "parents": [], "type": "physical", "name": "ens3", "enabled": true, "effective_mtu": 1500, "vendor": "OpenStack Foundation", "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 1, "mode": "static", "ip_address": "10.55.32.135", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": true, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric_id": 0, "secondary_rack": null, "space": "undefined", "fabric": "fabric-0", "primary_rack": "6gsym8", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/1/" }, { "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "mac_address": "52:54:00:09:88:41", "tags": [], "params": "", "id": 17, "discovered": null, "product": null, "parents": [], "type": "bridge", "name": "virbr0", "enabled": true, "effective_mtu": 1500, "vendor": null, "system_id": "6gsym8", "children": [], "firmware_version": null, "links": [ { "id": 17, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "untagged", "fabric_id": 1, "secondary_rack": null, "space": "undefined", "fabric": "fabric-1", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/2/" } } ], "resource_uri": "/MAAS/api/2.0/nodes/6gsym8/interfaces/17/" } ], "cpu_speed": 2400, "testing_status_name": "Unknown", "tag_names": [ "virtual" ], "current_commissioning_result_id": 1, "system_id": "6gsym8", "distro_series": "bionic", "cpu_test_status": -1, "memory_test_status_name": "Unknown", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "33313934-3432-5a43-4339-343532355a35", "cpu_model": "Intel Core i7 9xx (Nehalem Class Core i7)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "other_test_status_name": "Unknown", "fqdn": "mymaas.maas", "power_state": "unknown", "memory_test_status": -1, "current_installation_result_id": null, "storage_test_status_name": "Unknown", "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "resource_uri": "/MAAS/api/2.0/rackcontrollers/6gsym8/" } ]
GET /MAAS/api/2.0/regioncontrollers/?op=is_registered
Returns whether or not the given MAC address is registered within this MAAS (and attached to a non-retired node).
Parameters
mac_address (URL String): Required. The MAC address to be checked.
Success
HTTP Status Code : 200
Boolean
false
Error
HTTP Status Code : 400
Content
No provided mac_address!
POST /MAAS/api/2.0/regioncontrollers/?op=set_zone
Assigns a given node to a given zone.
Parameters
zone (String): Required. The zone name.
nodes (String): Required. The node to add.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 403
Content
This method is reserved for admin users.
HTTP Status Code : 400
Content : The given parameters were not correct.
Resource pool
Manage a resource pool.
DELETE /MAAS/api/2.0/resourcepool/{id}/
Deletes a resource pool.
Parameters
{id} (URL String): Required. The resource pool name/id to delete.
Success
HTTP Status Code : 204
Content
<no content>
Error
HTTP Status Code : Always returns 204.
Content
<no content>
GET /MAAS/api/2.0/resourcepool/{id}/
Returns a resource pool.
Parameters
{id} (URL String): Required. A resource pool id/name.
Success
HTTP Status Code : 200
Content
{ "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/resourcepool/{id}/
Updates a resource pool's name or description.
Note that any other given parameters are silently ignored.
Parameters
{id} (URL String): Required. The resource pool id/name to update.
description (String): Optional. A brief description of the resource pool.
name (String): Optional. The resource pool's new name.
Success
HTTP Status Code : 200
Content
{ "name": "test-update-renamed", "description": "This is a new resource pool for updating.", "id": 80, "resource_uri": "/MAAS/api/2.0/resourcepool/80/" }
Error
HTTP Status Code : 404
Content
Not Found
Resource pools
Manage resource pools.
GET /MAAS/api/2.0/resourcepools/
Get a listing of all resource pools.
Note that there is always at least one resource pool: default.
Success
HTTP Status Code : 200
Content
[ { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" } ]
POST /MAAS/api/2.0/resourcepools/
Creates a new resource pool.
Parameters
name (String): Required. The new resource pool's name.
description (String): Optional. A brief description of the new resource pool.
Success
HTTP Status Code : 200
Content
{ "name": "test-W83ncaWh", "description": "This is a new resource pool.", "id": 82, "resource_uri": "/MAAS/api/2.0/resourcepool/82/" }
Error
HTTP Status Code : 400
Content
{"name": ["Resource pool with this Name already exists."]}
SSH Key
Manage an SSH key.
SSH keys can be retrieved or deleted.
DELETE /MAAS/api/2.0/account/prefs/sshkeys/{id}/
Deletes the SSH key with the given ID.
Parameters
id (Int): Required. An SSH key ID.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
Can't delete a key you don't own.
GET /MAAS/api/2.0/account/prefs/sshkeys/{id}/
Retrieves an SSH key with the given ID.
Parameters
id (Int): Required. An SSH key ID.
Success
HTTP Status Code : 200
JSON
{ "key": "ssh-rsa AAAAB7NzaC1yc2EAAAADAQABAAABAQDhaFwhxa50r2InCHaSSCOB+PP572+Hra6CzFexUQBABJDHfcbbvFeAkjWIUIH9bAVolkHulDegc/6JbMy6p9E8TMqi4dQ1FV4VX/cFtbfJPlLVOrysTKuarRGnh0/1nKnYedfwpjF4HubuI55bgU/Strx/UYCr/WiFHSS7ExpnJJcuIwKeN1tZtVdVKy4j//EPt7GipBcAjpIB0hpFxBdxlm7GswDU+WZNEbSaNN6mkupVwkQdBdoaywlUl6iStzI7moAiIE37uSzi8xcovLBpHsfVKQyY1pSqC7E3L+qdu4MlioKiyYlsvaIk8BVj0QLGmGqvWZGUKcZF4OJxA15B jsseidel@linmbpro", "id": 11, "keysource": "lp:user", "resource_uri": "/MAAS/api/2.0/account/prefs/sshkeys/11/" }
Error
HTTP Status Code : 404
Content
Not Found
SSH Keys
Manage the collection of all the SSH keys in this MAAS.
GET /MAAS/api/2.0/account/prefs/sshkeys/
List all keys belonging to the requesting user.
Success
HTTP Status Code : 200
JSON
[ { "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/L1pGwyIs9mxP1MkuPVrEMfcl+qEg9wChnN/n4fGwFIJ9vXFBV8pu8rvcsigx/Ar2wZRHGIO/cwHeC+rR+jG5zw4ZyD5d+ISfVoyKsOviAQzXJTCjdx4aLItVA6LYZiv8Z3fondqpzFuVph+D/hc1sBNxlPJcFF3RJcCTf92xYyQfUlZo/RYPHzgWDYWYScoZXOxLms2ZKtyuqQFyKmlcTzlTWoYGeTtqEq5OCWG/PSlTopGqRtoZXSATAOfCDH1kyOqAtehtn6ehZ013u4Kb8d8nD66SeLOBG5xQUbm7U1LkfVLGMrXlJOhrJ58JsNTx9sq8ouNO9VknbhvWD5aH user@mymachine", "id": 5, "keysource": "lp:user", "resource_uri": "/MAAS/api/2.0/account/prefs/sshkeys/5/" }, { "key": "ssh-rsa AAAAB3NzaC1tc2EAAAADAQABAAABAQC5zQ1NvtYWGYKpLgW0QWBiGyt225JRAO9Wa9mlNG5Otq7PJ6PkIMZKrmfZnpYFoMe8gzY/FT5wqfzzKBxvHPFkSS24MIiRN6VDlE0rZJnugd2ijpmYKXwVMHFHWIbBLqES3ssO3VePF67Y4Agt7JRqDlF2C9ttQXXbu23fvccpDIzt6tPtPDJzNo3M1JexxRNMuyb0moNeHISGTTFCL8LSuVn8MvpqXLqBqR5Q0nchgym+f6nWQMknpLNA0531W/2ZOMa2h5vtWDoVPisGmOzlV41dpDOWG4wr120Yn6Q8thTh2tQbS0/UjThPnjrUjs9nJxg5X0MPkzEuoXo3KWEh user2@myothermachine", "id": 6, "keysource": "lp:user2", "resource_uri": "/MAAS/api/2.0/account/prefs/sshkeys/6/" } ]
POST /MAAS/api/2.0/account/prefs/sshkeys/
Add a new SSH key to the requesting or supplied user's account.
Parameters
key (String): Required. A public SSH key should be provided in the request payload as form data with the name 'key':
key: "key-type public-key-data"
key-type
: ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-dss, ssh-ed25519, ssh-rsapublic key data
: Base64-encoded key data.
Success
HTTP Status Code : 201
JSON
{ "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRShb/bGd0DSYljfCwFI4D12wDk/qW9cSb3T++mytvfmXsisf8+ql5qEr+a0hsn6hkOMTcwdC5q/fVEo/P4KXj1DI9XEJ+j2sRj3Lw/bn+mpFmSsEUmv+PLzpQSX0JXOu2N8VjfgINJSXRrAmk6cmuc4Ro119dkYu/i7VIHiWSan0FY+P6ipaqien/m7mc1M1JhDyfO6ubQAfsP49+vqP+RmXPLhjmtf4yBVMnQavITtRctFBXf7PyvPgSrSCNS+M6+FZIjS79ctEpi8HUZDOCCZ7xS5vuJNtPcp3vwBOUNzVStBi/GzNYdbhubQnlHGzLJRBp64OWVasn/pkBfXUB", "keysource": null, "id": 12 }
POST /MAAS/api/2.0/account/prefs/sshkeys/?op=import
Import the requesting user's SSH keys for a given protocol and authorization ID in protocol:auth_id format.
Parameters
keysource (String): Required. The source of the keys to import should be provided in the request payload as form data:
E.g.
source:user
source
: lp (Launchpad), gh (GitHub)user
: User login
Success
HTTP Status Code : 200
JSON
[ { "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/L1pGwyIs9mxP1MkuPVrEMfcl+qEg9wChnN/n4fGwFIJ9vXFBV8pu8rvcsigx/Ar2wZRHGIO/cwHeC+rR+jG5zw4ZyD5d+ISfVoyKsOviAQzXJTCjdx4aLItVA6LYZiv8Z3fondqpzFuVph+D/hc1sBNxlPJcFF3RJcCTf92xYyQfUlZo/RYPHzgWDYWYScoZXOxLms2ZKtyuqQFyKmlcTzlTWoYGeTtqEq5OCWG/PSlTopGqRtoZXSATAOfCDH1kyOqAtehtn6ehZ013u4Kb8d8nD66SeLOBG5xQUbm7U1LkfVLGMrXlJOhrJ58JsNTx9sq8ouNO9VknbhvWD5aH user@mymachine", "id": 5, "keysource": "lp:user", "resource_uri": "/MAAS/api/2.0/account/prefs/sshkeys/5/" }, { "key": "ssh-rsa AAAAB3NzaC1tc2EAAAADAQABAAABAQC5zQ1NvtYWGYKpLgW0QWBiGyt225JRAO9Wa9mlNG5Otq7PJ6PkIMZKrmfZnpYFoMe8gzY/FT5wqfzzKBxvHPFkSS24MIiRN6VDlE0rZJnugd2ijpmYKXwVMHFHWIbBLqES3ssO3VePF67Y4Agt7JRqDlF2C9ttQXXbu23fvccpDIzt6tPtPDJzNo3M1JexxRNMuyb0moNeHISGTTFCL8LSuVn8MvpqXLqBqR5Q0nchgym+f6nWQMknpLNA0531W/2ZOMa2h5vtWDoVPisGmOzlV41dpDOWG4wr120Yn6Q8thTh2tQbS0/UjThPnjrUjs9nJxg5X0MPkzEuoXo3KWEh user2@myothermachine", "id": 6, "keysource": "lp:user2", "resource_uri": "/MAAS/api/2.0/account/prefs/sshkeys/6/" } ]
SSL Key
Manage an SSL key.
SSL keys can be retrieved or deleted.
DELETE /MAAS/api/2.0/account/prefs/sslkeys/{id}/
Deletes the SSL key with the given ID.
Parameters
id (Int): Required. An SSH key ID.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
Can't delete a key you don't own.
GET /MAAS/api/2.0/account/prefs/sslkeys/{id}/
Retrieves an SSL key with the given ID.
Parameters
id (Int): Required. An SSL key ID.
Success
HTTP Status Code : 200
JSON
{ "key": "-----BEGIN CERTIFICATE-----\r\nMIIDYDCCAkigAwIBAgIJANv2xTlvnerlMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\r\nBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX\r\naWRnaXRzIFB0eSBMdGQwHhcNMTgxMTIxMjMxNjUwWhcNMjgxMTE4MjMxNjUwWjBF\r\nMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50\r\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEAqD8WoD9CWZ6gpwN7nGZfWjVMYRs2Mv+aaureSQudpE53XOGTrMBBxon2\r\nJNp6a1BwpOIl1sbTsYPDyOVhZZ4vRdHQ2pGSW8b4eKQqaB8Ae9w55gMxvUgK1e6t\r\nIe8Quhb7bs2UsaG/6vDRJetmSiX6ASjcBNG/0X6IJGsw0J5m+sgKLJwb49ZU72eZ\r\nGNwV1nJcz741AMpKU4apeafmSYQSfie+kSP9uDqekNzSDx615+HrClSdGwwya1P/\r\nE6Xb3WvgRnh30HJpZG61E6+vUfYYJtowLaj0gaWY6ohjkVHmgfIvHTVI7p7d0jZ4\r\nZvZgw2nWDSm/qV/Cl2embYWVUyctaQIDAQABo1MwUTAdBgNVHQ4EFgQUmZyWKIt8\r\nlUJUBj7f8kiOEs/Xih8wHwYDVR0jBBgwFoAUmZyWKIt8lUJUBj7f8kiOEs/Xih8w\r\nDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAje7KLWW/tf2tx2/g\r\nXmkltSQLfhL+mTVCUm3LaxDrDR5Iw0igngBekxACyqy20OyVl26bybYxAAGIZC+s\r\nax24ARKizUhd/FTFya7Xc4bEvWOcytcODUOBCuAmbRn/saeGVC+b81OjF+ndkXso\r\nweQ7YADaZQQD8ZkaPCzz8jQBe4AL48lA7TovHDDk68XDgYkcyArvGsQpo1527NYZ\r\nngMT9th7eWeHD+AAo9LGE9D4+6FoPo0Wloq9pCarM7q53Vp7pEOwar8Z3N9+Wms3\r\nrw4e59fnqslCXdztMO7Y4VTsyRUR6c9tEou560i48PXIYuGHf18ioouGg50XPT5Z\r\nFnCh/w==\r\n-----END CERTIFICATE-----", "id": 2 }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 403
Content
Can't get a key you don't own.
SSL Keys
Operations on multiple keys.
GET /MAAS/api/2.0/account/prefs/sslkeys/
List all keys belonging to the requesting user.
Success
HTTP Status Code : 200
JSON
[ { "key": "-----BEGIN CERTIFICATE-----\r\nMIIDYDCCAkigAwIBAgIJANv2xTlvnerlMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\r\nBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX\r\naWRnaXRzIFB0eSBMdGQwHhcNMTgxMTIxMjMxNjUwWhcNMjgxMTE4MjMxNjUwWjBF\r\nMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50\r\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEAqD8WoD9CWZ6gpwN7nGZfWjVMYRs2Mv+aaureSQudpE53XOGTrMBBxon2\r\nJNp6a1BwpOIl1sbTsYPDyOVhZZ4vRdHQ2pGSW8b4eKQqaB8Ae9w55gMxvUgK1e6t\r\nIe8Quhb7bs2UsaG/6vDRJetmSiX6ASjcBNG/0X6IJGsw0J5m+sgKLJwb49ZU72eZ\r\nGNwV1nJcz741AMpKU4apeafmSYQSfie+kSP9uDqekNzSDx615+HrClSdGwwya1P/\r\nE6Xb3WvgRnh30HJpZG61E6+vUfYYJtowLaj0gaWY6ohjkVHmgfIvHTVI7p7d0jZ4\r\nZvZgw2nWDSm/qV/Cl2embYWVUyctaQIDAQABo1MwUTAdBgNVHQ4EFgQUmZyWKIt8\r\nlUJUBj7f8kiOEs/Xih8wHwYDVR0jBBgwFoAUmZyWKIt8lUJUBj7f8kiOEs/Xih8w\r\nDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAje7KLWW/tf2tx2/g\r\nXmkltSQLfhL+mTVCUm3LaxDrDR5Iw0igngBekxACyqy20OyVl26bybYxAAGIZC+s\r\nax24ARKizUhd/FTFya7Xc4bEvWOcytcODUOBCuAmbRn/saeGVC+b81OjF+ndkXso\r\nweQ7YADaZQQD8ZkaPCzz8jQBe4AL48lA7TovHDDk68XDgYkcyArvGsQpo1527NYZ\r\nngMT9th7eWeHD+AAo9LGE9D4+6FoPo0Wloq9pCarM7q53Vp7pEOwar8Z3N9+Wms3\r\nrw4e59fnqslCXdztMO7Y4VTsyRUR6c9tEou560i48PXIYuGHf17ioouGg50XPT5Z\r\nFnCh/w==\r\n-----END CERTIFICATE-----", "id": 1, "resource_uri": "/MAAS/api/2.0/account/prefs/sslkeys/1/" } ]
POST /MAAS/api/2.0/account/prefs/sslkeys/
Add a new SSL key to the requesting user's account.
Parameters
key (String): Required. An SSL key should be provided in the request payload as form data with the name 'key':
key: "key data"
key data
: The contents of a pem file.
Success
HTTP Status Code : 201
JSON
{ "key": "-----BEGIN CERTIFICATE-----\r\nMIIDYDCCAkigAwIBAgIJANv2xTlvnerlMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\r\nBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX\r\naWRnaXRzIFB0eSBMdGQwHhcNMTgxMTIxMjMxNjUwWhcNMjgxMTE4MjMxNjUwWjBF\r\nMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50\r\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEAqD8WoD9CWZ6gpwN7nGZfWjVMYRs2Mv+aaureSQudpE53XOGTrMBBxon2\r\nJNp6a1BwpOIl1sbTsYPDyOVhZZ4vRdHQ2pGSW8b4eKQqaB8Ae9w55gMxvUgK1e6t\r\nIe8Quhb7bs2UsaG/6vDRJetmSiX6ASjcBNG/0X6IJGsw0J5m+sgKLJwb49ZU72eZ\r\nGNwV1nJcz741AMpKU4apeafmSYQSfie+kSP9uDqekNzSDx615+HrClSdGwwya1P/\r\nE6Xb3WvgRnh30HJpZG61E6+vUfYYJtowLaj0gaWY6ohjkVHmgfIvHTVI7p7d0jZ4\r\nZvZgw2nWDSm/qV/Cl2embYWVUyctaQIDAQABo1MwUTAdBgNVHQ4EFgQUmZyWKIt8\r\nlUJUBj7f8kiOEs/Xih8wHwYDVR0jBBgwFoAUmZyWKIt8lUJUBj7f8kiOEs/Xih8w\r\nDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAje7KLWW/tf2tx2/g\r\nXmkltSQLfhL+mTVCUm3LaxDrDR5Iw0igngBekxACyqy20OyVl26bybYxAAGIZC+s\r\nax24ARKizUhd/FTFya7Xc4bEvWOcytcODUOBCuAmbRn/saeGVC+b81OjF+ndkXso\r\nweQ7YADaZQQD8ZkaPCzz8jQBe4AL48lA7TovHDDk68XDgYkcyArvGsQpo1527NYZ\r\nngMT9th7eWeHD+AAo9LGE9D4+6FoPo0Wloq9pCarM7q53Vp7pEOwar8Z3N9+Wms3\r\nrw4e59fnqslCXdztMO7Y4VTsyRUR6c9tEou560i48PXIYuGHf18ioouGg50XPT5Z\r\nFnCh/w==\r\n-----END CERTIFICATE-----", "id": 2 }
Space
Manage space.
DELETE /MAAS/api/2.0/spaces/{id}/
Deletes a space with the given ID.
Parameters
{id} (Int): Required. The space's ID.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/spaces/{id}/
Gets a space with the given ID.
Parameters
{id} (Int): Required. The space's ID.
Success
HTTP Status Code : 200
JSON
{ "resource_uri": "/MAAS/api/2.0/spaces/5/", "subnets": [], "vlans": [], "id": 5, "name": "newspace" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/spaces/{id}/
Updates a space with the given ID.
Parameters
{id} (Int): Required. The space's ID.
name (String): Required. The name of the new space.
description (String): Optional. A description of the new space.
Success
HTTP Status Code : 200
JSON
{ "resource_uri": "/MAAS/api/2.0/spaces/5/", "subnets": [], "vlans": [], "id": 5, "name": "newspacename" }
Error
HTTP Status Code : 404
Content
Not Found
Spaces
Manage spaces.
GET /MAAS/api/2.0/spaces/
Generates a list of all spaces.
Success
HTTP Status Code : 200
JSON
[ { "subnets": [ { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "id": 5003, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-1", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": "192.168.122.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 6, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/6/" }, { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "id": 5003, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-1", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 2, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/2/" }, { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "id": 5001, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-0", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 7, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/7/" }, { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "id": 5001, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-0", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } ], "id": 1, "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "id": 5003, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-1", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "id": 5001, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-0", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5001/" } ], "name": "management", "resource_uri": "/MAAS/api/2.0/spaces/1/" }, { "subnets": [], "id": 2, "vlans": [], "name": "storage", "resource_uri": "/MAAS/api/2.0/spaces/2/" }, { "subnets": [ { "name": "name-c2ULe1", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "id": 5002, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "internal", "fabric": "fabric-0", "name": "10", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.4.0/24", "rdns_mode": 2, "gateway_ip": "172.16.4.1", "dns_servers": [ "fd08:fef7:5c1f:a2e6:3d8e:6c3b:89f9:80cb", "fc67:ad6a:88fe:9192:62f9:e882:8bcc:339e", "255.59.162.158" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 4, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/4/" }, { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "id": 5002, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "internal", "fabric": "fabric-0", "name": "10", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" } ], "id": 3, "vlans": [ { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "id": 5002, "primary_rack": "7xtf67", "secondary_rack": "76y7pg", "space": "internal", "fabric": "fabric-0", "name": "10", "resource_uri": "/MAAS/api/2.0/vlans/5002/" } ], "name": "internal", "resource_uri": "/MAAS/api/2.0/spaces/3/" }, { "subnets": [ { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "id": 5004, "primary_rack": null, "secondary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 5, "space": "ipv6-testbed", "resource_uri": "/MAAS/api/2.0/subnets/5/" } ], "id": 4, "vlans": [ { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 1, "id": 5004, "primary_rack": null, "secondary_rack": null, "space": "ipv6-testbed", "fabric": "fabric-1", "name": "42", "resource_uri": "/MAAS/api/2.0/vlans/5004/" } ], "name": "ipv6-testbed", "resource_uri": "/MAAS/api/2.0/spaces/4/" }, { "subnets": [], "id": -1, "vlans": [ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 12, "id": 5016, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-12", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5016/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 11, "id": 5015, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-11", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5015/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 10, "id": 5014, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-10", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5014/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 9, "id": 5013, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-9", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5013/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 8, "id": 5012, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-8", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5012/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 7, "id": 5011, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-7", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5011/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 6, "id": 5010, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-6", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5010/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 5, "id": 5009, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-5", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5009/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 4, "id": 5008, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-4", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5008/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 3, "id": 5007, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-3", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5007/" }, { "vid": 3743, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 2, "id": 5006, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-2", "name": "3743", "resource_uri": "/MAAS/api/2.0/vlans/5006/" }, { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 2, "id": 5005, "primary_rack": null, "secondary_rack": null, "space": "undefined", "fabric": "fabric-2", "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5005/" } ], "name": "undefined", "resource_uri": "/MAAS/api/2.0/spaces/undefined/" } ]
POST /MAAS/api/2.0/spaces/
Create a new space.
Parameters
name (String): Required. The name of the new space.
description (String): Optional. A description of the new space.
Success
HTTP Status Code : 200
JSON
{ "id": 5, "name": "newspace", "vlans": [], "resource_uri": "/MAAS/api/2.0/spaces/5/", "subnets": [] }
Error
HTTP Status Code : 400
Content : Space with this name already exists.
Static route
Manage static route.
DELETE /MAAS/api/2.0/static-routes/{id}/
Deletes the static route with the given ID.
Parameters
{id} (Int): Required. A static-route ID.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/static-routes/{id}/
Gets a static route with the given ID.
Parameters
{id} (Int): Required. A static-route ID.
Success
HTTP Status Code : 200
JSON
{ "source": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "name": "untagged", "space": "management", "fabric": "fabric-0", "id": 5001, "primary_rack": "7xtf67", "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "destination": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "name": "10", "space": "internal", "fabric": "fabric-0", "id": 5002, "primary_rack": "7xtf67", "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" }, "gateway_ip": "172.16.1.5", "metric": 0, "id": 14, "resource_uri": "/MAAS/api/2.0/static-routes/14/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/static-routes/{id}/
Updates a static route with the given ID.
Parameters
{id} (Int): Required. A static-route ID.
source (String): Optional. Source subnet name for the route.
destination (String): Optional. Destination subnet name for the route.
gateway_ip (String): Optional. IP address of the gateway on the source subnet.
metric (Int): Optional. Weight of the route on a deployed machine.
Success
HTTP Status Code : 200
JSON
{ "source": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-0", "primary_rack": "7xtf67", "fabric_id": 0, "name": "untagged", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "destination": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "internal", "fabric": "fabric-0", "primary_rack": "7xtf67", "fabric_id": 0, "name": "10", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" }, "gateway_ip": "172.16.1.3", "metric": 0, "id": 13, "resource_uri": "/MAAS/api/2.0/static-routes/13/" }
Error
HTTP Status Code : 404
Content
Not Found
Static routes
Manage static routes.
GET /MAAS/api/2.0/static-routes/
Lists all static routes.
Success
HTTP Status Code : 200
JSON
[ { "source": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "space": "management", "id": 5001, "name": "untagged", "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "destination": { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-1", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "space": "management", "id": 5003, "name": "untagged", "fabric_id": 1, "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" }, "gateway_ip": "172.16.1.236", "metric": 53, "id": 1, "resource_uri": "/MAAS/api/2.0/static-routes/1/" }, { "source": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "space": "management", "id": 5001, "name": "untagged", "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "destination": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric": "fabric-0", "secondary_rack": "76y7pg", "primary_rack": "7xtf67", "space": "internal", "id": 5002, "name": "10", "fabric_id": 0, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" }, "gateway_ip": "172.16.1.185", "metric": 212, "id": 2, "resource_uri": "/MAAS/api/2.0/static-routes/2/" } ]
POST /MAAS/api/2.0/static-routes/
Creates a static route.
Parameters
source (String): Required. Source subnet name for the route.
destination (String): Required. Destination subnet name for the route.
gateway_ip (String): Required. IP address of the gateway on the source subnet.
metric (Int): Optional. Weight of the route on a deployed machine.
Success
HTTP Status Code : 200
JSON
{ "source": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "management", "fabric": "fabric-0", "primary_rack": "7xtf67", "fabric_id": 0, "name": "untagged", "id": 5001, "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, "destination": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "space": "internal", "fabric": "fabric-0", "primary_rack": "7xtf67", "fabric_id": 0, "name": "10", "id": 5002, "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" }, "gateway_ip": "172.16.1.3", "metric": 0, "id": 13, "resource_uri": "/MAAS/api/2.0/static-routes/13/" }
Subnet
Manage subnet.
DELETE /MAAS/api/2.0/subnets/{id}/
Delete a subnet with the given ID.
Parameters
{id} (Int): Required. A subnet ID.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/subnets/{id}/
Get information about a subnet with the given ID.
Parameters
{id} (Int): Required. A subnet ID.
Success
HTTP Status Code : 200
JSON
{ "name": "172.16.5.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "secondary_rack": "76y7pg", "id": 5001, "fabric": "fabric-0", "name": "untagged", "space": "management", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.5.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 9, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/9/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/subnets/{id}/?op=ip_addresses
Returns a summary of IP addresses assigned to this subnet.
Parameters
{id} (Int): Required. A subnet ID.
with_username (Int): Optional. If '0', suppresses the display of usernames associated with each address. '1' == True, '0' == False. (Default: '1')
with_summary (Int): Optional. If '0', suppresses the display of nodes, BMCs, and and DNS records associated with each address. '1' == True, '0' == False. (Default: True)
with_node_summary (Int): Optional. Deprecated. Use 'with_summary'.
Success
HTTP Status Code : 200
JSON
[ { "ip": "172.16.2.3", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:06:19", "updated": "Tue, 27 Nov. 2018 18:06:19", "node_summary": { "system_id": "76y7pg", "node_type": 2, "fqdn": "happy-rack.maas", "hostname": "happy-rack", "is_container": false, "via": "eth2" } }, { "ip": "172.16.2.4", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:06:19", "updated": "Tue, 27 Nov. 2018 18:06:19", "node_summary": { "system_id": "nfkend", "node_type": 3, "fqdn": "happy-region.maas", "hostname": "happy-region", "is_container": false, "via": "eth2" } }, { "ip": "172.16.2.11", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:25", "updated": "Tue, 27 Nov. 2018 18:07:25", "node_summary": { "system_id": "dq3sda", "node_type": 0, "fqdn": "kind-dory.maas", "hostname": "kind-dory", "is_container": false, "via": "eth-xnY2lB" }, "user": "user2" }, { "ip": "172.16.2.26", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:09", "updated": "Tue, 27 Nov. 2018 18:07:09", "node_summary": { "system_id": "seebkg", "node_type": 0, "fqdn": "grown-cougar.maas", "hostname": "grown-cougar", "is_container": false, "via": "eth-GZF5ig" }, "user": "user2" }, { "ip": "172.16.2.62", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:24", "updated": "Tue, 27 Nov. 2018 18:07:24", "node_summary": { "system_id": "r7enqt", "node_type": 0, "fqdn": "nice-gannet.maas", "hostname": "nice-gannet", "is_container": false, "via": "eth-nlvMd2" }, "user": "user1" }, { "ip": "172.16.2.63", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:06:29", "updated": "Tue, 27 Nov. 2018 18:06:29", "node_summary": { "system_id": "pme7wb", "node_type": 0, "fqdn": "solid-liger.sample", "hostname": "solid-liger", "is_container": false, "via": "eth-2VCthm" } }, { "ip": "172.16.2.109", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:25", "updated": "Tue, 27 Nov. 2018 18:07:25", "node_summary": { "system_id": "dq3sda", "node_type": 0, "fqdn": "kind-dory.maas", "hostname": "kind-dory", "is_container": false, "via": "eth-fS18k5" }, "user": "user2" }, { "ip": "172.16.2.111", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:07", "updated": "Tue, 27 Nov. 2018 18:07:07", "node_summary": { "system_id": "ydpcwh", "node_type": 0, "fqdn": "game-owl.ubnt", "hostname": "game-owl", "is_container": false, "via": "eth-Cyk2jC" }, "user": "user2" }, { "ip": "172.16.2.116", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:10", "updated": "Tue, 27 Nov. 2018 18:07:10", "node_summary": { "system_id": "seebkg", "node_type": 0, "fqdn": "grown-cougar.maas", "hostname": "grown-cougar", "is_container": false, "via": "eth-0nEEnB" }, "user": "user2" }, { "ip": "172.16.2.134", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:24", "updated": "Tue, 27 Nov. 2018 18:07:24", "node_summary": { "system_id": "r7enqt", "node_type": 0, "fqdn": "nice-gannet.maas", "hostname": "nice-gannet", "is_container": false, "via": "eth-dMPw46" }, "user": "user1" }, { "ip": "172.16.2.206", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:24", "updated": "Tue, 27 Nov. 2018 18:07:24", "node_summary": { "system_id": "r7enqt", "node_type": 0, "fqdn": "nice-gannet.maas", "hostname": "nice-gannet", "is_container": false, "via": "eth-6Wz9hw" }, "user": "user1" }, { "ip": "172.16.2.235", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:29", "updated": "Tue, 27 Nov. 2018 18:07:29", "node_summary": { "system_id": "7ghwxs", "node_type": 0, "fqdn": "alert-lion.sample", "hostname": "alert-lion", "is_container": false, "via": "bond-wnZNKS" }, "user": "user2" }, { "ip": "172.16.2.252", "alloc_type": 1, "created": "Tue, 27 Nov. 2018 18:07:32", "updated": "Tue, 27 Nov. 2018 18:07:32", "node_summary": { "system_id": "dnq43f", "node_type": 0, "fqdn": "square-hornet.maas", "hostname": "square-hornet", "is_container": false, "via": "eth-3GCPHI" }, "user": "user2" } ]
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/subnets/{id}/?op=reserved_ip_ranges
Lists IP ranges currently reserved in the subnet.
Parameters
{id} (Int): Required. A subnet ID.
Success
HTTP Status Code : 200
JSON
[ { "start": "172.16.2.1", "end": "172.16.2.1", "num_addresses": 1, "purpose": [ "gateway-ip" ] }, { "start": "172.16.2.3", "end": "172.16.2.4", "num_addresses": 2, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.11", "end": "172.16.2.11", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.26", "end": "172.16.2.26", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.62", "end": "172.16.2.63", "num_addresses": 2, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.101", "end": "172.16.2.101", "num_addresses": 1, "purpose": [ "gateway-ip" ] }, { "start": "172.16.2.109", "end": "172.16.2.109", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.111", "end": "172.16.2.111", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.116", "end": "172.16.2.116", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.134", "end": "172.16.2.134", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.174", "end": "172.16.2.174", "num_addresses": 1, "purpose": [ "gateway-ip" ] }, { "start": "172.16.2.206", "end": "172.16.2.206", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.235", "end": "172.16.2.235", "num_addresses": 1, "purpose": [ "assigned-ip" ] }, { "start": "172.16.2.237", "end": "172.16.2.237", "num_addresses": 1, "purpose": [ "gateway-ip" ] }, { "start": "172.16.2.252", "end": "172.16.2.252", "num_addresses": 1, "purpose": [ "assigned-ip" ] } ]
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/subnets/{id}/?op=statistics
Returns statistics for the specified subnet, including:
- num_available: the number of available IP addresses
- largest_available: the largest number of contiguous free IP addresses
- num_unavailable: the number of unavailable IP addresses
- total_addresses: the sum of the available plus unavailable addresses
- usage: the (floating point) usage percentage of this subnet
- usage_string: the (formatted unicode) usage percentage of this subnet
- ranges: the specific IP ranges present in ths subnet (if specified)
Note: to supply additional optional parameters for this request, add
them to the request URI: e.g.
/subnets/1/?op=statistics&include_suggestions=1
Parameters
{id} (Int): Required. A subnet ID.
include_ranges (Int): Optional. If '1', includes detailed information about the usage of this range. '1' == True, '0' == False.
include_suggestions (Int): Optional. If '1', includes the suggested gateway and dynamic range for this subnet, if it were to be configured. '1' == True, '0' == False.
Success
HTTP Status Code : 200
JSON
{ "num_available": 232, "largest_available": 41, "num_unavailable": 22, "total_addresses": 254, "usage": 0.08661417322834646, "usage_string": "9%", "available_string": "91%", "first_address": "172.16.1.1", "last_address": "172.16.1.254", "ip_version": 4 }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/subnets/{id}/?op=unreserved_ip_ranges
Lists IP ranges currently unreserved in the subnet.
Parameters
{id} (Int): Required. A subnet ID.
Success
HTTP Status Code : 200
JSON
[ { "start": "172.16.2.2", "end": "172.16.2.2", "num_addresses": 1 }, { "start": "172.16.2.5", "end": "172.16.2.10", "num_addresses": 6 }, { "start": "172.16.2.12", "end": "172.16.2.25", "num_addresses": 14 }, { "start": "172.16.2.27", "end": "172.16.2.61", "num_addresses": 35 }, { "start": "172.16.2.64", "end": "172.16.2.100", "num_addresses": 37 }, { "start": "172.16.2.102", "end": "172.16.2.108", "num_addresses": 7 }, { "start": "172.16.2.110", "end": "172.16.2.110", "num_addresses": 1 }, { "start": "172.16.2.112", "end": "172.16.2.115", "num_addresses": 4 }, { "start": "172.16.2.117", "end": "172.16.2.133", "num_addresses": 17 }, { "start": "172.16.2.135", "end": "172.16.2.173", "num_addresses": 39 }, { "start": "172.16.2.175", "end": "172.16.2.205", "num_addresses": 31 }, { "start": "172.16.2.207", "end": "172.16.2.234", "num_addresses": 28 }, { "start": "172.16.2.236", "end": "172.16.2.236", "num_addresses": 1 }, { "start": "172.16.2.238", "end": "172.16.2.251", "num_addresses": 14 }, { "start": "172.16.2.253", "end": "172.16.2.254", "num_addresses": 2 } ]
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/subnets/{id}/
Update a subnet with the given ID.
Parameters
{id} (Int): Required. A subnet ID.
cidr (String): Optional. The network CIDR for this subnet.
name (String): Optional. The subnet's name.
description (String): Optional. The subnet's description.
vlan (String): Optional. VLAN this subnet belongs to. Defaults to the default VLAN for the provided fabric or defaults to the default VLAN in the default fabric (if unspecified).
fabric (String): Optional. Fabric for the subnet. Defaults to the fabric the provided VLAN belongs to, or defaults to the default fabric.
vid (Int): Optional. VID of the VLAN this subnet belongs to. Only used when vlan is not provided. Picks the VLAN with this VID in the provided fabric or the default fabric if one is not given.
space (String): Optional. Space this subnet is in. Defaults to the default space.
gateway_ip (String): Optional. The gateway IP address for this subnet.
rdns_mode (Int): Optional. How reverse DNS is handled for this subnet. One of:
0
Disabled: No reverse zone is created.1
Enabled: Generate reverse zone.2
RFC2317: Extends '1' to create the necessary parent zone with the appropriate CNAME resource records for the network, if the the network is small enough to require the support described in RFC2317.
allow_dns (Int): Optional. Configure MAAS DNS to allow DNS resolution from this subnet. '0' == False,'1' == True.
allow_proxy (Int): Optional. Configure maas-proxy to allow requests from this subnet. '0' == False, '1' == True.
dns_servers (String): Optional. Comma-seperated list of DNS servers for this subnet.
managed (Int): Optional. In MAAS 2.0+, all subnets are assumed to be managed by default.
Only managed subnets allow DHCP to be enabled on their related dynamic ranges. (Thus, dynamic ranges become "informational only"; an indication that another DHCP server is currently handling them, or that MAAS will handle them when the subnet is enabled for management.)
Managed subnets do not allow IP allocation by default. The meaning of a "reserved" IP range is reversed for an unmanaged subnet. (That is, for managed subnets, "reserved" means "MAAS cannot allocate any IP address within this reserved block". For unmanaged subnets, "reserved" means "MAAS must allocate IP addresses only from reserved IP ranges."
Success
HTTP Status Code : 200
JSON
{ "name": "172.16.5.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "management", "fabric": "fabric-0", "id": 5001, "name": "untagged", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.5.0/24", "rdns_mode": 2, "gateway_ip": "", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 9, "resource_uri": "/MAAS/api/2.0/subnets/9/" }
Error
HTTP Status Code : 404
Content
Not Found
Subnets
Manage subnets.
GET /MAAS/api/2.0/subnets/
Get a list of all subnets.
Success
HTTP Status Code : 200
JSON
[ { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "management", "fabric": "fabric-0", "id": 5001, "name": "untagged", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 1, "resource_uri": "/MAAS/api/2.0/subnets/1/" }, { "name": "name-v5djzQ", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 1, "space": "management", "fabric": "fabric-1", "id": 5003, "name": "untagged", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5003/" }, "cidr": "172.16.2.0/24", "rdns_mode": 2, "gateway_ip": "172.16.2.1", "dns_servers": [ "fcb0:c682:8c15:817d:7d80:2713:e225:5624", "fd66:86c9:6a50:27cd:de13:3f1c:40d1:8aac", "120.129.237.29" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 2, "resource_uri": "/MAAS/api/2.0/subnets/2/" }, { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "internal", "fabric": "fabric-0", "id": 5002, "name": "10", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 3, "resource_uri": "/MAAS/api/2.0/subnets/3/" }, { "name": "name-c2ULe1", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "internal", "fabric": "fabric-0", "id": 5002, "name": "10", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.4.0/24", "rdns_mode": 2, "gateway_ip": "172.16.4.1", "dns_servers": [ "fd08:fef7:5c1f:a2e6:3d8e:6c3b:89f9:80cb", "fc67:ad6a:88fe:9192:62f9:e882:8bcc:339e", "255.59.162.158" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "internal", "id": 4, "resource_uri": "/MAAS/api/2.0/subnets/4/" }, { "name": "name-m3vYqT", "vlan": { "vid": 42, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": null, "fabric_id": 1, "space": "ipv6-testbed", "fabric": "fabric-1", "id": 5004, "name": "42", "primary_rack": null, "resource_uri": "/MAAS/api/2.0/vlans/5004/" }, "cidr": "2001:db8:42::/64", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [ "fd15:6cb0:a55c:235f:e78f:ba4f:2eb4:6b3", "fcc5:8b5e:c55b:90e0:8be:6b87:eb5:f4c7" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "ipv6-testbed", "id": 5, "resource_uri": "/MAAS/api/2.0/subnets/5/" }, { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "management", "fabric": "fabric-0", "id": 5001, "name": "untagged", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": "192.168.122.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 6, "resource_uri": "/MAAS/api/2.0/subnets/6/" }, { "name": "172.16.99.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "management", "fabric": "fabric-0", "id": 5001, "name": "untagged", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.99.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 7, "resource_uri": "/MAAS/api/2.0/subnets/7/" } ]
POST /MAAS/api/2.0/subnets/
Creates a new subnet.
Parameters
cidr (String): Required. The network CIDR for this subnet.
name (String): Optional. The subnet's name.
description (String): Optional. The subnet's description.
vlan (String): Optional. VLAN this subnet belongs to. Defaults to the default VLAN for the provided fabric or defaults to the default VLAN in the default fabric (if unspecified).
fabric (String): Optional. Fabric for the subnet. Defaults to the fabric the provided VLAN belongs to, or defaults to the default fabric.
vid (Int): Optional. VID of the VLAN this subnet belongs to. Only used when vlan is not provided. Picks the VLAN with this VID in the provided fabric or the default fabric if one is not given.
space (String): Optional. Space this subnet is in. Defaults to the default space.
gateway_ip (String): Optional. The gateway IP address for this subnet.
rdns_mode (Int): Optional. How reverse DNS is handled for this subnet. One of:
0
Disabled: No reverse zone is created.1
Enabled: Generate reverse zone.2
RFC2317: Extends '1' to create the necessary parent zone with the appropriate CNAME resource records for the network, if the the network is small enough to require the support described in RFC2317.
allow_dns (Int): Optional. Configure MAAS DNS to allow DNS resolution from this subnet. '0' == False,'1' == True.
allow_proxy (Int): Optional. Configure maas-proxy to allow requests from this subnet. '0' == False, '1' == True.
dns_servers (String): Optional. Comma-seperated list of DNS servers for this subnet.
managed (Int): Optional. In MAAS 2.0+, all subnets are assumed to be managed by default.
Only managed subnets allow DHCP to be enabled on their related dynamic ranges. (Thus, dynamic ranges become "informational only"; an indication that another DHCP server is currently handling them, or that MAAS will handle them when the subnet is enabled for management.)
Managed subnets do not allow IP allocation by default. The meaning of a "reserved" IP range is reversed for an unmanaged subnet. (That is, for managed subnets, "reserved" means "MAAS cannot allocate any IP address within this reserved block". For unmanaged subnets, "reserved" means "MAAS must allocate IP addresses only from reserved IP ranges."
Success
HTTP Status Code : 200
JSON
{ "name": "172.16.5.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "secondary_rack": "76y7pg", "fabric_id": 0, "space": "management", "fabric": "fabric-0", "id": 5001, "name": "untagged", "primary_rack": "7xtf67", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.5.0/24", "rdns_mode": 2, "gateway_ip": "", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "space": "management", "id": 9, "resource_uri": "/MAAS/api/2.0/subnets/9/" }
Tag
Tags are properties that can be associated with a Node and serve as criteria for selecting and allocating nodes.
A Tag is identified by its name.
DELETE /MAAS/api/2.0/tags/{name}/
Deletes a tag by name.
Parameters
{name} (URL String): Required. A tag name.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/tags/{name}/
Returns a JSON object containing information about a specific tag.
Parameters
{name} (URL String): Required. A tag name.
Success
HTTP Status Code : 200
JSON
{ "name": "virtual", "definition": "", "comment": "", "kernel_opts": null, "resource_uri": "/MAAS/api/2.0/tags/virtual/" }
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/tags/{name}/?op=devices
Get a JSON list containing device objects that match the given tag name.
Parameters
{name} (URL String): Required. A tag name.
Success
JSON
[ { "tag_names": [ "virtual" ], "interface_set": [ { "id": 130, "name": "eth-tNqklu", "tags": [ "tag-YYQK5S", "tag-MUmKRU", "tag-dh0kc2" ], "links": [], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "bb:f7:55:fd:0f:34", "system_id": "nqg6dg", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5013, "name": "untagged", "fabric": "fabric-9", "primary_rack": null, "fabric_id": 9, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5013/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/nqg6dg/interfaces/130/" } ], "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "node_type": 1, "hostname": "calm-bobcat", "system_id": "nqg6dg", "owner_data": {}, "parent": null, "address_ttl": null, "owner": null, "ip_addresses": [], "node_type_name": "Device", "fqdn": "calm-bobcat.maas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "resource_uri": "/MAAS/api/2.0/devices/nqg6dg/" } ]
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/tags/{name}/?op=machines
Get a JSON list containing machine objects that match the given tag name.
Parameters
{name} (URL String): Required. A tag name.
Success
JSON
[ { "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "storage": 3865.490432, "min_hwe_kernel": "", "interface_set": [ { "id": 94, "name": "eth-x2dFvx", "tags": [ "tag-fAzmsZ", "tag-doKrVe", "tag-ejryXL" ], "links": [ { "id": 39, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "dd:c6:80:1a:c7:80", "system_id": "ssqcgt", "parents": [], "children": [ "eth-x2dFvx.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/94/" }, { "id": 95, "name": "eth-gtMGIr", "tags": [ "tag-rW3Lmf", "tag-DdASuZ", "tag-MS8EYC" ], "links": [ { "id": 40, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "52:db:98:ef:1e:b5", "system_id": "ssqcgt", "parents": [], "children": [ "eth-gtMGIr.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/95/" }, { "id": 96, "name": "eth-3cXhBN", "tags": [ "tag-QisnXF", "tag-duMUg2", "tag-06ARMg" ], "links": [ { "id": 41, "mode": "static", "ip_address": "172.16.1.22", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "e3:72:73:60:9a:b9", "system_id": "ssqcgt", "parents": [], "children": [ "eth-3cXhBN.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/96/" }, { "id": 97, "name": "eth-x2dFvx.10", "tags": [ "tag-Y5zzv5", "tag-w5vECc", "tag-o4znE9" ], "links": [ { "id": 42, "mode": "static", "ip_address": "172.16.4.56", "subnet": { "name": "name-c2ULe1", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.4.0/24", "rdns_mode": 2, "gateway_ip": "172.16.4.1", "dns_servers": [ "fd08:fef7:5c1f:a2e6:3d8e:6c3b:89f9:80cb", "fc67:ad6a:88fe:9192:62f9:e882:8bcc:339e", "255.59.162.158" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 4, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/4/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "dd:c6:80:1a:c7:80", "system_id": "ssqcgt", "parents": [ "eth-x2dFvx" ], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "vendor": null, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/97/" }, { "id": 98, "name": "eth-gtMGIr.10", "tags": [ "tag-wS4OXL", "tag-Wm3I55", "tag-LE5UYY" ], "links": [ { "id": 43, "mode": "static", "ip_address": "172.16.3.102", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "52:db:98:ef:1e:b5", "system_id": "ssqcgt", "parents": [ "eth-gtMGIr" ], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "vendor": null, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/98/" }, { "id": 99, "name": "eth-3cXhBN.10", "tags": [ "tag-Zp22Uh", "tag-PhIZjP", "tag-QtYg8x" ], "links": [ { "id": 44, "mode": "static", "ip_address": "172.16.3.23", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "e3:72:73:60:9a:b9", "system_id": "ssqcgt", "parents": [ "eth-3cXhBN" ], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "vendor": null, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/99/" } ], "iscsiblockdevice_set": [], "node_type": 0, "memory_test_status_name": "Failed", "bcaches": [], "memory_test_status": 3, "ip_addresses": [ "172.16.1.22", "172.16.4.56", "172.16.3.102", "172.16.3.23" ], "swap_size": null, "volume_groups": [], "testing_status": 3, "node_type_name": "Machine", "current_testing_result_id": 153, "power_type": "virsh", "fqdn": "chief-hippo.ubnt", "storage_test_status_name": "Failed", "storage_test_status": 3, "status_name": "Rescue mode", "locked": false, "netboot": true, "tag_names": [ "virtual" ], "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "boot_disk": { "firmware_version": "firmware_version-rszebt", "uuid": null, "id": 65, "model": "model-u038bu", "name": "name-2V9gLL", "tags": [ "tag-wSvQ4O", "tag-52MbPv", "tag-JKilHY" ], "partitions": [], "partition_table_type": null, "used_size": 0, "storage_pool": "pool_id-aMRZUu", "id_path": null, "system_id": "ssqcgt", "block_size": 512, "filesystem": null, "used_for": "Unused", "serial": "serial-Lh6Yv9", "path": "/dev/disk/by-dname/name-2V9gLL", "type": "physical", "size": 3865490432, "available_size": 3865490432, "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/blockdevices/65/" }, "commissioning_status": 2, "cpu_test_status": 3, "current_installation_result_id": null, "owner_data": {}, "power_state": "on", "current_commissioning_result_id": 152, "status": 16, "hwe_kernel": null, "boot_interface": { "id": 94, "name": "eth-x2dFvx", "tags": [ "tag-fAzmsZ", "tag-doKrVe", "tag-ejryXL" ], "links": [ { "id": 39, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "dd:c6:80:1a:c7:80", "system_id": "ssqcgt", "parents": [], "children": [ "eth-x2dFvx.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/94/" }, "special_filesystems": [], "cpu_speed": 0, "architecture": "amd64/generic", "blockdevice_set": [ { "id_path": null, "size": 3865490432, "block_size": 512, "tags": [ "tag-wSvQ4O", "tag-52MbPv", "tag-JKilHY" ], "uuid": null, "id": 65, "model": "model-u038bu", "name": "name-2V9gLL", "partitions": [], "partition_table_type": null, "used_size": 0, "storage_pool": "pool_id-aMRZUu", "system_id": "ssqcgt", "filesystem": null, "used_for": "Unused", "serial": "serial-Lh6Yv9", "path": "/dev/disk/by-dname/name-2V9gLL", "type": "physical", "available_size": 3865490432, "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/blockdevices/65/" } ], "cpu_test_status_name": "Failed", "other_test_status": 2, "hostname": "chief-hippo", "memory": 4096, "default_gateways": { "ipv4": { "gateway_ip": "172.16.1.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "distro_series": "", "status_action": "action-ft28IH", "owner": "user1", "commissioning_status_name": "Passed", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "pod": { "id": 5, "name": "normal-trout", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "cache_sets": [], "testing_status_name": "Failed", "disable_ipv4": false, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-rszebt", "uuid": null, "id": 65, "model": "model-u038bu", "name": "name-2V9gLL", "tags": [ "tag-wSvQ4O", "tag-52MbPv", "tag-JKilHY" ], "partitions": [], "partition_table_type": null, "used_size": 0, "storage_pool": "pool_id-aMRZUu", "id_path": null, "system_id": "ssqcgt", "block_size": 512, "filesystem": null, "used_for": "Unused", "serial": "serial-Lh6Yv9", "path": "/dev/disk/by-dname/name-2V9gLL", "type": "physical", "size": 3865490432, "available_size": 3865490432, "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/blockdevices/65/" } ], "osystem": "", "system_id": "ssqcgt", "address_ttl": null, "raids": [], "cpu_count": 5, "virtualblockdevice_set": [], "other_test_status_name": "Passed", "status_message": "desc-SfeEsi", "domain": { "authoritative": true, "ttl": null, "id": 2, "name": "ubnt", "resource_record_count": 0, "is_default": false, "resource_uri": "/MAAS/api/2.0/domains/2/" }, "resource_uri": "/MAAS/api/2.0/machines/ssqcgt/" } ]
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/tags/{name}/?op=nodes
Get a JSON list containing node objects that match the given tag name.
Parameters
{name} (URL String): Required. A tag name.
Success
JSON
[ { "interface_set": [ { "id": 1, "name": "ens3", "tags": [ "tag-0wj45r", "tag-ylwPaA", "tag-s8HCFS" ], "links": [ { "id": 59, "mode": "static", "ip_address": "10.55.32.42", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 6, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/6/" } } ], "firmware_version": "N/A", "effective_mtu": 1500, "product": "OpenStack Nova", "mac_address": "fa:16:3e:3d:03:02", "system_id": "7xtf67", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": "OpenStack Foundation", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/7xtf67/interfaces/1/" }, { "id": 134, "name": "virbr0", "tags": [], "links": [ { "id": 60, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5017, "name": "untagged", "fabric": "fabric-13", "primary_rack": null, "fabric_id": 13, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 7, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/7/" } } ], "firmware_version": "N/A", "effective_mtu": 1500, "product": "OpenStack Nova", "mac_address": "52:54:00:95:f3:f3", "system_id": "7xtf67", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5017, "name": "untagged", "fabric": "fabric-13", "primary_rack": null, "fabric_id": 13, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }, "vendor": "OpenStack Foundation", "type": "bridge", "resource_uri": "/MAAS/api/2.0/nodes/7xtf67/interfaces/134/" } ], "node_type": 4, "memory_test_status_name": "Unknown", "memory_test_status": -1, "ip_addresses": [ "10.55.32.42", "192.168.122.1" ], "swap_size": null, "testing_status": -1, "node_type_name": "Region and rack controller", "current_testing_result_id": null, "power_type": "virsh", "fqdn": "spence-devmaas.maas", "storage_test_status_name": "Unknown", "storage_test_status": -1, "tag_names": [ "virtual" ], "zone": { "name": "zone-obryVj", "description": "qRwvQuFIpM", "id": 4, "resource_uri": "/MAAS/api/2.0/zones/zone-obryVj/" }, "commissioning_status": 2, "cpu_test_status": -1, "current_installation_result_id": null, "power_state": "on", "current_commissioning_result_id": 228, "cpu_speed": 2500, "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "other_test_status": -1, "hostname": "spence-devmaas", "memory": 8192, "commissioning_status_name": "Passed", "distro_series": "bionic", "status_action": "", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "30353036-3837-5a43-3331-353234584a58", "cpu_model": "Westmere E56xx/L56xx/X56xx (Nehalem-C)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "service_set": [ { "name": "proxy", "status": "unknown", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd6", "status": "dead", "status_info": "" }, { "name": "ntp_rack", "status": "dead", "status_info": "" }, { "name": "syslog_region", "status": "unknown", "status_info": "" }, { "name": "http", "status": "unknown", "status_info": "" }, { "name": "tftp", "status": "dead", "status_info": "" }, { "name": "bind9", "status": "unknown", "status_info": "" }, { "name": "rackd", "status": "dead", "status_info": "" }, { "name": "ntp_region", "status": "unknown", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "" }, { "name": "syslog_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd", "status": "dead", "status_info": "" } ], "testing_status_name": "Unknown", "osystem": "ubuntu", "version": "", "system_id": "7xtf67", "cpu_count": 4, "other_test_status_name": "Unknown", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "resource_uri": "/MAAS/api/2.0/rackcontrollers/7xtf67/" }, { "pool": { "name": "default", "description": "Default pool", "id": 0, "resource_uri": "/MAAS/api/2.0/resourcepool/0/" }, "storage": 3865.490432, "min_hwe_kernel": "", "interface_set": [ { "id": 94, "name": "eth-x2dFvx", "tags": [ "tag-fAzmsZ", "tag-doKrVe", "tag-ejryXL" ], "links": [ { "id": 39, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "dd:c6:80:1a:c7:80", "system_id": "ssqcgt", "parents": [], "children": [ "eth-x2dFvx.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/94/" }, { "id": 95, "name": "eth-gtMGIr", "tags": [ "tag-rW3Lmf", "tag-DdASuZ", "tag-MS8EYC" ], "links": [ { "id": 40, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "52:db:98:ef:1e:b5", "system_id": "ssqcgt", "parents": [], "children": [ "eth-gtMGIr.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/95/" }, { "id": 96, "name": "eth-3cXhBN", "tags": [ "tag-QisnXF", "tag-duMUg2", "tag-06ARMg" ], "links": [ { "id": 41, "mode": "static", "ip_address": "172.16.1.22", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "e3:72:73:60:9a:b9", "system_id": "ssqcgt", "parents": [], "children": [ "eth-3cXhBN.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/96/" }, { "id": 97, "name": "eth-x2dFvx.10", "tags": [ "tag-Y5zzv5", "tag-w5vECc", "tag-o4znE9" ], "links": [ { "id": 42, "mode": "static", "ip_address": "172.16.4.56", "subnet": { "name": "name-c2ULe1", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.4.0/24", "rdns_mode": 2, "gateway_ip": "172.16.4.1", "dns_servers": [ "fd08:fef7:5c1f:a2e6:3d8e:6c3b:89f9:80cb", "fc67:ad6a:88fe:9192:62f9:e882:8bcc:339e", "255.59.162.158" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 4, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/4/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "dd:c6:80:1a:c7:80", "system_id": "ssqcgt", "parents": [ "eth-x2dFvx" ], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "vendor": null, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/97/" }, { "id": 98, "name": "eth-gtMGIr.10", "tags": [ "tag-wS4OXL", "tag-Wm3I55", "tag-LE5UYY" ], "links": [ { "id": 43, "mode": "static", "ip_address": "172.16.3.102", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "52:db:98:ef:1e:b5", "system_id": "ssqcgt", "parents": [ "eth-gtMGIr" ], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "vendor": null, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/98/" }, { "id": 99, "name": "eth-3cXhBN.10", "tags": [ "tag-Zp22Uh", "tag-PhIZjP", "tag-QtYg8x" ], "links": [ { "id": 44, "mode": "static", "ip_address": "172.16.3.23", "subnet": { "name": "name-zznp45", "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "cidr": "172.16.3.0/24", "rdns_mode": 2, "gateway_ip": "172.16.3.1", "dns_servers": [ "fd98:8601:90d0:c8c:dd2e:ba51:fa5a:dcfa", "11.209.150.208", "fde6:f9ef:3ee9:c5de:2a66:1582:cc83:abaf" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 3, "space": "internal", "resource_uri": "/MAAS/api/2.0/subnets/3/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "e3:72:73:60:9a:b9", "system_id": "ssqcgt", "parents": [ "eth-3cXhBN" ], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5002, "name": "10", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "internal", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }, "vendor": null, "type": "vlan", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/99/" } ], "iscsiblockdevice_set": [], "node_type": 0, "memory_test_status_name": "Failed", "bcaches": [], "memory_test_status": 3, "ip_addresses": [ "172.16.1.22", "172.16.4.56", "172.16.3.102", "172.16.3.23" ], "swap_size": null, "volume_groups": [], "testing_status": 3, "node_type_name": "Machine", "current_testing_result_id": 153, "power_type": "virsh", "fqdn": "chief-hippo.ubnt", "storage_test_status_name": "Failed", "storage_test_status": 3, "status_name": "Rescue mode", "locked": false, "netboot": true, "tag_names": [ "virtual" ], "zone": { "name": "zone-north", "description": "xsMaq90fRE", "id": 2, "resource_uri": "/MAAS/api/2.0/zones/zone-north/" }, "boot_disk": { "firmware_version": "firmware_version-rszebt", "uuid": null, "id": 65, "model": "model-u038bu", "name": "name-2V9gLL", "tags": [ "tag-wSvQ4O", "tag-52MbPv", "tag-JKilHY" ], "partitions": [], "partition_table_type": null, "used_size": 0, "storage_pool": "pool_id-aMRZUu", "id_path": null, "system_id": "ssqcgt", "block_size": 512, "filesystem": null, "used_for": "Unused", "serial": "serial-Lh6Yv9", "path": "/dev/disk/by-dname/name-2V9gLL", "type": "physical", "size": 3865490432, "available_size": 3865490432, "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/blockdevices/65/" }, "commissioning_status": 2, "cpu_test_status": 3, "current_installation_result_id": null, "owner_data": {}, "power_state": "on", "current_commissioning_result_id": 152, "status": 16, "hwe_kernel": null, "boot_interface": { "id": 94, "name": "eth-x2dFvx", "tags": [ "tag-fAzmsZ", "tag-doKrVe", "tag-ejryXL" ], "links": [ { "id": 39, "mode": "auto", "subnet": { "name": "name-rLI3eq", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "172.16.1.0/24", "rdns_mode": 2, "gateway_ip": "172.16.1.1", "dns_servers": [ "fd89:8724:81f1:5512:557f:99c3:6967:8d63" ], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 1, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/1/" } } ], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "dd:c6:80:1a:c7:80", "system_id": "ssqcgt", "parents": [], "children": [ "eth-x2dFvx.10" ], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/interfaces/94/" }, "special_filesystems": [], "cpu_speed": 0, "architecture": "amd64/generic", "blockdevice_set": [ { "id_path": null, "size": 3865490432, "block_size": 512, "tags": [ "tag-wSvQ4O", "tag-52MbPv", "tag-JKilHY" ], "uuid": null, "id": 65, "model": "model-u038bu", "name": "name-2V9gLL", "partitions": [], "partition_table_type": null, "used_size": 0, "storage_pool": "pool_id-aMRZUu", "system_id": "ssqcgt", "filesystem": null, "used_for": "Unused", "serial": "serial-Lh6Yv9", "path": "/dev/disk/by-dname/name-2V9gLL", "type": "physical", "available_size": 3865490432, "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/blockdevices/65/" } ], "cpu_test_status_name": "Failed", "other_test_status": 2, "hostname": "chief-hippo", "memory": 4096, "default_gateways": { "ipv4": { "gateway_ip": "172.16.1.1", "link_id": null }, "ipv6": { "gateway_ip": null, "link_id": null } }, "distro_series": "", "status_action": "action-ft28IH", "owner": "user1", "commissioning_status_name": "Passed", "hardware_info": { "system_vendor": "Unknown", "system_product": "Unknown", "system_version": "Unknown", "system_serial": "Unknown", "cpu_model": "Unknown", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Unknown", "mainboard_firmware_date": "Unknown" }, "pod": { "id": 5, "name": "normal-trout", "resource_uri": "/MAAS/api/2.0/pods/5/" }, "cache_sets": [], "testing_status_name": "Failed", "disable_ipv4": false, "physicalblockdevice_set": [ { "firmware_version": "firmware_version-rszebt", "uuid": null, "id": 65, "model": "model-u038bu", "name": "name-2V9gLL", "tags": [ "tag-wSvQ4O", "tag-52MbPv", "tag-JKilHY" ], "partitions": [], "partition_table_type": null, "used_size": 0, "storage_pool": "pool_id-aMRZUu", "id_path": null, "system_id": "ssqcgt", "block_size": 512, "filesystem": null, "used_for": "Unused", "serial": "serial-Lh6Yv9", "path": "/dev/disk/by-dname/name-2V9gLL", "type": "physical", "size": 3865490432, "available_size": 3865490432, "resource_uri": "/MAAS/api/2.0/nodes/ssqcgt/blockdevices/65/" } ], "osystem": "", "system_id": "ssqcgt", "address_ttl": null, "raids": [], "cpu_count": 5, "virtualblockdevice_set": [], "other_test_status_name": "Passed", "status_message": "desc-SfeEsi", "domain": { "authoritative": true, "ttl": null, "id": 2, "name": "ubnt", "resource_record_count": 0, "is_default": false, "resource_uri": "/MAAS/api/2.0/domains/2/" }, "resource_uri": "/MAAS/api/2.0/machines/ssqcgt/" }, { "tag_names": [ "virtual" ], "interface_set": [ { "id": 130, "name": "eth-tNqklu", "tags": [ "tag-YYQK5S", "tag-MUmKRU", "tag-dh0kc2" ], "links": [], "firmware_version": null, "effective_mtu": 1500, "product": null, "mac_address": "bb:f7:55:fd:0f:34", "system_id": "nqg6dg", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5013, "name": "untagged", "fabric": "fabric-9", "primary_rack": null, "fabric_id": 9, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5013/" }, "vendor": null, "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/nqg6dg/interfaces/130/" } ], "zone": { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, "node_type": 1, "hostname": "calm-bobcat", "system_id": "nqg6dg", "owner_data": {}, "parent": null, "address_ttl": null, "owner": null, "ip_addresses": [], "node_type_name": "Device", "fqdn": "calm-bobcat.maas", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "resource_uri": "/MAAS/api/2.0/devices/nqg6dg/" } ]
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/tags/{name}/?op=rack_controllers
Get a JSON list containing rack-controller objects that match the given tag name.
Parameters
{name} (URL String): Required. A tag name.
Success
JSON
[ { "interface_set": [ { "id": 1, "name": "ens3", "tags": [ "tag-0wj45r", "tag-ylwPaA", "tag-s8HCFS" ], "links": [ { "id": 59, "mode": "static", "ip_address": "10.55.32.42", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 6, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/6/" } } ], "firmware_version": "N/A", "effective_mtu": 1500, "product": "OpenStack Nova", "mac_address": "fa:16:3e:3d:03:02", "system_id": "7xtf67", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": "OpenStack Foundation", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/7xtf67/interfaces/1/" }, { "id": 134, "name": "virbr0", "tags": [], "links": [ { "id": 60, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5017, "name": "untagged", "fabric": "fabric-13", "primary_rack": null, "fabric_id": 13, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 7, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/7/" } } ], "firmware_version": "N/A", "effective_mtu": 1500, "product": "OpenStack Nova", "mac_address": "52:54:00:95:f3:f3", "system_id": "7xtf67", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5017, "name": "untagged", "fabric": "fabric-13", "primary_rack": null, "fabric_id": 13, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }, "vendor": "OpenStack Foundation", "type": "bridge", "resource_uri": "/MAAS/api/2.0/nodes/7xtf67/interfaces/134/" } ], "node_type": 4, "memory_test_status_name": "Unknown", "memory_test_status": -1, "ip_addresses": [ "10.55.32.42", "192.168.122.1" ], "swap_size": null, "testing_status": -1, "node_type_name": "Region and rack controller", "current_testing_result_id": null, "power_type": "virsh", "fqdn": "spence-devmaas.maas", "storage_test_status_name": "Unknown", "storage_test_status": -1, "tag_names": [ "virtual" ], "zone": { "name": "zone-obryVj", "description": "qRwvQuFIpM", "id": 4, "resource_uri": "/MAAS/api/2.0/zones/zone-obryVj/" }, "commissioning_status": 2, "cpu_test_status": -1, "current_installation_result_id": null, "power_state": "on", "current_commissioning_result_id": 228, "cpu_speed": 2500, "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "other_test_status": -1, "hostname": "spence-devmaas", "memory": 8192, "commissioning_status_name": "Passed", "distro_series": "bionic", "status_action": "", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "30353036-3837-5a43-3331-353234584a58", "cpu_model": "Westmere E56xx/L56xx/X56xx (Nehalem-C)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "service_set": [ { "name": "proxy", "status": "unknown", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd6", "status": "dead", "status_info": "" }, { "name": "ntp_rack", "status": "dead", "status_info": "" }, { "name": "syslog_region", "status": "unknown", "status_info": "" }, { "name": "http", "status": "unknown", "status_info": "" }, { "name": "tftp", "status": "dead", "status_info": "" }, { "name": "bind9", "status": "unknown", "status_info": "" }, { "name": "rackd", "status": "dead", "status_info": "" }, { "name": "ntp_region", "status": "unknown", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "" }, { "name": "syslog_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd", "status": "dead", "status_info": "" } ], "testing_status_name": "Unknown", "osystem": "ubuntu", "version": "", "system_id": "7xtf67", "cpu_count": 4, "other_test_status_name": "Unknown", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "resource_uri": "/MAAS/api/2.0/rackcontrollers/7xtf67/" } ]
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/tags/{name}/?op=region_controllers
Get a JSON list containing region-controller objects that match the given tag name.
Parameters
{name} (URL String): Required. A tag name.
Success
JSON
[ { "interface_set": [ { "id": 1, "name": "ens3", "tags": [ "tag-0wj45r", "tag-ylwPaA", "tag-s8HCFS" ], "links": [ { "id": 59, "mode": "static", "ip_address": "10.55.32.42", "subnet": { "name": "10.55.32.0/20", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "cidr": "10.55.32.0/20", "rdns_mode": 2, "gateway_ip": "10.55.32.1", "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 6, "space": "management", "resource_uri": "/MAAS/api/2.0/subnets/6/" } } ], "firmware_version": "N/A", "effective_mtu": 1500, "product": "OpenStack Nova", "mac_address": "fa:16:3e:3d:03:02", "system_id": "7xtf67", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "name": "untagged", "fabric": "fabric-0", "primary_rack": null, "fabric_id": 0, "secondary_rack": null, "space": "management", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }, "vendor": "OpenStack Foundation", "type": "physical", "resource_uri": "/MAAS/api/2.0/nodes/7xtf67/interfaces/1/" }, { "id": 134, "name": "virbr0", "tags": [], "links": [ { "id": 60, "mode": "static", "ip_address": "192.168.122.1", "subnet": { "name": "192.168.122.0/24", "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5017, "name": "untagged", "fabric": "fabric-13", "primary_rack": null, "fabric_id": 13, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }, "cidr": "192.168.122.0/24", "rdns_mode": 2, "gateway_ip": null, "dns_servers": [], "allow_dns": true, "allow_proxy": true, "active_discovery": false, "managed": true, "id": 7, "space": "undefined", "resource_uri": "/MAAS/api/2.0/subnets/7/" } } ], "firmware_version": "N/A", "effective_mtu": 1500, "product": "OpenStack Nova", "mac_address": "52:54:00:95:f3:f3", "system_id": "7xtf67", "parents": [], "children": [], "params": "", "enabled": true, "discovered": null, "vlan": { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5017, "name": "untagged", "fabric": "fabric-13", "primary_rack": null, "fabric_id": 13, "secondary_rack": null, "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }, "vendor": "OpenStack Foundation", "type": "bridge", "resource_uri": "/MAAS/api/2.0/nodes/7xtf67/interfaces/134/" } ], "node_type": 4, "memory_test_status_name": "Unknown", "memory_test_status": -1, "ip_addresses": [ "10.55.32.42", "192.168.122.1" ], "swap_size": null, "testing_status": -1, "node_type_name": "Region and rack controller", "current_testing_result_id": null, "power_type": "virsh", "fqdn": "spence-devmaas.maas", "storage_test_status_name": "Unknown", "storage_test_status": -1, "tag_names": [ "virtual" ], "zone": { "name": "zone-obryVj", "description": "qRwvQuFIpM", "id": 4, "resource_uri": "/MAAS/api/2.0/zones/zone-obryVj/" }, "commissioning_status": 2, "cpu_test_status": -1, "current_installation_result_id": null, "power_state": "on", "current_commissioning_result_id": 228, "cpu_speed": 2500, "architecture": "amd64/generic", "cpu_test_status_name": "Unknown", "other_test_status": -1, "hostname": "spence-devmaas", "memory": 8192, "commissioning_status_name": "Passed", "distro_series": "bionic", "status_action": "", "hardware_info": { "system_vendor": "OpenStack Foundation", "system_product": "OpenStack Nova", "system_version": "2013.2.3", "system_serial": "30353036-3837-5a43-3331-353234584a58", "cpu_model": "Westmere E56xx/L56xx/X56xx (Nehalem-C)", "mainboard_vendor": "Unknown", "mainboard_product": "Unknown", "mainboard_firmware_version": "Bochs", "mainboard_firmware_date": "01/01/2011" }, "service_set": [ { "name": "proxy", "status": "unknown", "status_info": "" }, { "name": "proxy_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd6", "status": "dead", "status_info": "" }, { "name": "ntp_rack", "status": "dead", "status_info": "" }, { "name": "syslog_region", "status": "unknown", "status_info": "" }, { "name": "http", "status": "unknown", "status_info": "" }, { "name": "tftp", "status": "dead", "status_info": "" }, { "name": "bind9", "status": "unknown", "status_info": "" }, { "name": "rackd", "status": "dead", "status_info": "" }, { "name": "ntp_region", "status": "unknown", "status_info": "" }, { "name": "regiond", "status": "running", "status_info": "" }, { "name": "dns_rack", "status": "unknown", "status_info": "" }, { "name": "syslog_rack", "status": "unknown", "status_info": "" }, { "name": "dhcpd", "status": "dead", "status_info": "" } ], "testing_status_name": "Unknown", "osystem": "ubuntu", "version": "", "system_id": "7xtf67", "cpu_count": 4, "other_test_status_name": "Unknown", "domain": { "authoritative": true, "ttl": null, "id": 0, "name": "maas", "resource_record_count": 0, "is_default": true, "resource_uri": "/MAAS/api/2.0/domains/0/" }, "resource_uri": "/MAAS/api/2.0/rackcontrollers/7xtf67/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/tags/{name}/?op=rebuild
Tells MAAS to rebuild the tag-to-node mappings. This is a maintenance operation and should not be necessary under normal circumstances. Adding nodes or updating a tag definition should automatically trigger the mapping rebuild.
Parameters
{name} (URL String): Required. A tag name.
Success
JSON
{ "rebuilding": "footag" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/tags/{name}/?op=update_nodes
Add or remove nodes associated with the given tag. Note that you must
supply either the add
or remove
parameter.
Parameters
{name} (URL String): Required. A tag name.
add (String): Optional. The system_id to tag.
remove (String): Optional. The system_id to untag.
definition (String): Optional. If given, the definition (XPATH expression) will be validated against the current definition of the tag. If the value does not match, MAAS assumes the worker is out of date and will drop the update.
rack_controller (String): Optional. The system ID of the rack controller that processed the given tag initially. If not given, the requester must be a MAAS admin. If given, the requester must be the rack controller.
Success
JSON
{ "added": 1, "removed": 0 }
Error
HTTP Status Code : 403
Content
Must be a superuser or supply a rack_controller.
HTTP Status Code : 409
Content
Definition supplied 'foobar' doesn't match current definition ''
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/tags/{name}/
Update elements of a given tag.
Parameters
{name} (URL String): Required. The tag to update.
name (String): Optional. The new tag name. Because the name will be used in urls, it should be short.
comment (String): Optional. A description of what the the tag will be used for in natural language.
definition (String): Optional. An XPATH query that is evaluated
against the hardware_details stored for all nodes (i.e. the output of
lshw -xml
).
Success
HTTP Status Code : 200
JSON
{ "name": "my_tag", "definition": "", "comment": "a comment about this tag", "kernel_opts": "", "resource_uri": "/MAAS/api/2.0/tags/my_tag/" }
Error
HTTP Status Code : 404
Content
Not Found
Tags
Manage all tags known to MAAS.
GET /MAAS/api/2.0/tags/
Outputs a JSON object containing an array of all currently defined tag objects.
Success
JSON
[ { "name": "virtual", "definition": "", "comment": "", "kernel_opts": null, "resource_uri": "/MAAS/api/2.0/tags/virtual/" } ]
POST /MAAS/api/2.0/tags/
Create a new tag.
Parameters
name (String): Required. The new tag name. Because the name will be used in urls, it should be short.
comment (String): Optional. A description of what the the tag will be used for in natural language.
definition (String): Optional. An XPATH query that is evaluated
against the hardware_details stored for all nodes (i.e. the output of
lshw -xml
).
kernel_opts (String): Optional. Nodes associated with this tag
will add this string to their kernel options when booting. The value
overrides the global kernel_opts
setting. If more than one tag is
associated with a node, the one with the lower alphabetical name will be
picked. For example, 01-my-tag
will be chosen instead of
99-tag-name
.
Success
JSON
{ "name": "footag", "definition": "", "comment": "some comment", "kernel_opts": "", "resource_uri": "/MAAS/api/2.0/tags/footag/" }
Error
HTTP Status Code : 403
Content
No content
User
Manage a user account.
DELETE /MAAS/api/2.0/users/{username}/
Deletes a given username.
Parameters
{username} (String): Required. The username to delete.
Success
HTTP Status Code : 204
GET /MAAS/api/2.0/users/{username}/
Retrieve a user's details.
Parameters
{username} (String): Required. A username.
Success
HTTP Status Code : 200
JSON
{ "is_superuser": false, "username": "foobar", "email": "foo@foobar.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/foobar/" }
Error
HTTP Status Code : 404
Content
Not Found
Users
Manage the user accounts of this MAAS.
GET /MAAS/api/2.0/users/
List users
Success
HTTP Status Code : 200
JSON
[ { "is_superuser": false, "username": "ZZaqFHnASE", "email": "th851JAwIa@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/ZZaqFHnASE/" }, { "is_superuser": false, "username": "zZrMZtK.kq", "email": "lmcdDnyn5H@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/zZrMZtK.kq/" } ]
GET /MAAS/api/2.0/users/?op=whoami
Returns the currently logged-in user.
Success
HTTP Status Code : 200
JSON
{ "is_superuser": true, "username": "admin", "email": "NN7ER2rH6x@example.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/admin/" }
POST /MAAS/api/2.0/users/
Creates a MAAS user account.
This is not safe: the password is sent in plaintext. Avoid it for production, unless you are confident that you can prevent eavesdroppers from observing the request.
Parameters
username (String): Required. Identifier-style username for the new user.
email (String): Required. Email address for the new user.
password (String): Required. Password for the new user.
is_superuser (Boolean): Required. Whether the new user is to be an administrator. ('0' == False, '1' == True)
Success
HTTP Status Code : 200
JSON
{ "is_superuser": false, "username": "foobar", "email": "foo@foobar.com", "is_local": true, "resource_uri": "/MAAS/api/2.0/users/foobar/" }
Error
HTTP Status Code : 400
Content
No provided username!
MAAS version
Information about this MAAS instance.
GET /MAAS/api/2.0/version/
Read version and capabilities of this MAAS instance.
Success
HTTP Status Code : 200
JSON
{ "capabilities": [ "networks-management", "static-ipaddresses", "ipv6-deployment-ubuntu", "devices-management", "storage-deployment-ubuntu", "network-deployment-ubuntu", "bridging-interface-ubuntu", "bridging-automatic-ubuntu", "authenticate-api" ], "version": "2.5.0 from source", "subversion": "git+2f25a2cc0930c0e411106f119bc455c161d75b1a" }
VLAN
Manage a VLAN on a fabric.
DELETE /MAAS/api/2.0/fabrics/{fabric_id}/vlans/{vid}/
Delete VLAN on a given fabric.
Parameters
{fabric_id} (Int): Required. Fabric ID containing the VLAN to delete.
{vid} (Int): Required. VLAN ID of the VLAN to delete.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
GET /MAAS/api/2.0/fabrics/{fabric_id}/vlans/{vid}/
Retrieves a VLAN on a given fabric_id.
Parameters
{fabric_id} (Int): Required. The fabric_id containing the VLAN.
{vid} (Int): Required. The VLAN ID.
Success
HTTP Status Code : 200
JSON
{ "vid": 10, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "fabric_id": 0, "name": "10", "primary_rack": "7xtf67", "space": "internal", "secondary_rack": "76y7pg", "id": 5002, "fabric": "fabric-0", "resource_uri": "/MAAS/api/2.0/vlans/5002/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/fabrics/{fabric_id}/vlans/{vid}/
Updates a given VLAN.
Parameters
{fabric_id} (Int): Required. Fabric ID containing the VLAN.
{vid} (Int): Required. VLAN ID of the VLAN.
name (String): Optional. Name of the VLAN.
description (String): Optional. Description of the VLAN.
mtu (Int): Optional. The MTU to use on the VLAN.
dhcp_on (Boolean): Optional. Whether or not DHCP should be managed on the VLAN.
primary_rack (String): Optional. The primary rack controller managing the VLAN (system_id).
secondary_rack (String): Optional. The secondary rack controller managing the VLAN (system_id).
relay_vlan (Int): Optional. Relay VLAN ID. Only set when this VLAN will be using a DHCP relay to forward DHCP requests to another VLAN that MAAS is managing. MAAS will not run the DHCP relay itself, it must be configured to proxy reqests to the primary and/or secondary rack controller interfaces for the VLAN specified in this field.
space (String): Optional. The space this VLAN should be placed in. Passing in an empty string (or the string 'undefined') will cause the VLAN to be placed in the 'undefined' space.
Success
HTTP Status Code : 200
JSON
{ "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "id": 5001, "primary_rack": "7xtf67", "fabric_id": 0, "space": "management", "secondary_rack": "76y7pg", "name": "untagged", "fabric": "fabric-0", "resource_uri": "/MAAS/api/2.0/vlans/5001/" }
Error
HTTP Status Code : 404
Content
Not Found
VLANs
Manage VLANs on a fabric.
GET /MAAS/api/2.0/fabrics/{fabric_id}/vlans/
List all VLANs belonging to given fabric.
Parameters
{fabric_id} (Int): Required. The fabric for which to list the VLANs.
Success
HTTP Status Code : 200
JSON
[ { "vid": 0, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "space": "undefined", "fabric_id": 10, "secondary_rack": null, "fabric": "fabric-10", "id": 5014, "primary_rack": null, "name": "untagged", "resource_uri": "/MAAS/api/2.0/vlans/5014/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/fabrics/{fabric_id}/vlans/
Creates a new VLAN.
Parameters
{fabric_id} (Int): Required. The fabric_id on which to add the new VLAN.
name (String): Optional. Name of the VLAN.
description (String): Optional. Description of the new VLAN.
vid (Int): Required. VLAN ID of the new VLAN.
mtu (Int): Optional. The MTU to use on the VLAN.
space (String): Optional. The space this VLAN should be placed in. Passing in an empty string (or the string 'undefined') will cause the VLAN to be placed in the 'undefined' space.
Success
HTTP Status Code : 200
JSON
{ "vid": 4000, "mtu": 1500, "dhcp_on": false, "external_dhcp": null, "relay_vlan": null, "name": "4000", "primary_rack": null, "secondary_rack": null, "fabric_id": 0, "id": 5017, "fabric": "fabric-0", "space": "undefined", "resource_uri": "/MAAS/api/2.0/vlans/5017/" }
Error
HTTP Status Code : 404
Content
Not Found
Volume group
Manage volume group on a machine.
DELETE /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/
Delete a volume group with the given id from the machine with the given system_id.
Parameters
{system_id} (String): Required. The machine system_id containing the volume group.
{id} (Int): Required. The id of the volume group.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
GET /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/
Read a volume group with the given id on the machine with the given system_id.
Parameters
{system_id} (String): Required. The machine system_id on which to create the volume group.
{id} (Int): Required. The id of the volume group.
Success
HTTP Status Code : 200
JSON
{ "human_used_size": "0 bytes", "uuid": "36f9585d-3ae0-429c-abb7-9d584bc6f941", "human_available_size": "8.0 GB", "system_id": "ccrfnk", "id": 1, "logical_volumes": [], "size": 7990149120, "devices": [ { "uuid": "ecfa7d5b-bb76-4443-83ab-ad600c23b4de", "size": 7994343424, "bootable": false, "tags": [], "system_id": "ccrfnk", "id": 2, "used_for": "LVM volume for my_volume_group", "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 1, "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "cad18fde-2fc7-4aa5-a15b-739f88c3b671", "mount_point": null, "mount_options": null }, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/2" } ], "available_size": 7990149120, "used_size": 0, "human_size": "8.0 GB", "name": "my_volume_group", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/volume-group/1/" }
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/?op=create_logical_volume
Create a logical volume in the volume group with the given id on the machine with the given system_id.
Parameters
{system_id} (String): Required. The machine system_id containing the volume group.
{id} (Int): Required. The id of the volume group.
name (String): Required. Name of the logical volume.
uuid (String): Optional. (optional) UUID of the logical volume.
size (String): Required. Size of the logical volume. Must be
larger than or equal to 4,194,304 bytes. E.g. 4194304
.
Success
HTTP Status Code : 200
JSON
{ "system_id": "ccrfnk", "uuid": "5b805aa2-3614-4b70-b99c-9c3ff65df4c3", "used_size": 0, "name": "my_volume_group-my_logical_volume", "size": 4194304, "available_size": 4194304, "id": 2, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/2/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
POST /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/?op=delete_logical_volume
Delete a logical volume in the volume group with the given id on the machine with the given system_id.
Note: this operation returns HTTP status code 204 even if the logical volume id does not exist.
Parameters
{system_id} (String): Required. The machine system_id containing the volume group.
{id} (Int): Required. The id of the volume group.
id (Int): Required. The logical volume id.
Success
HTTP Status Code : 204
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
PUT /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/
Update a volume group with the given id on the machine with the given system_id.
Parameters
{system_id} (String): Required. The machine system_id containing the volume group.
{id} (Int): Required. The id of the volume group.
name (String): Optional. Name of the volume group.
uuid (String): Optional. UUID of the volume group.
add_block_devices (String): Optional. Block devices to add to the volume group.
remove_block_devices (String): Optional. Block devices to remove from the volume group.
add_partitions (String): Optional. Partitions to add to the volume group.
remove_partitions (String): Optional. Partitions to remove from the volume group.
Success
HTTP Status Code : 200
JSON
{ "human_used_size": "0 bytes", "uuid": "36f9585d-3ae0-429c-abb7-9d584bc6f941", "human_available_size": "8.0 GB", "system_id": "ccrfnk", "id": 1, "logical_volumes": [], "size": 7990149120, "devices": [ { "uuid": "ecfa7d5b-bb76-4443-83ab-ad600c23b4de", "size": 7994343424, "bootable": false, "tags": [], "system_id": "ccrfnk", "id": 2, "used_for": "LVM volume for my_volume_group", "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "device_id": 1, "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "cad18fde-2fc7-4aa5-a15b-739f88c3b671", "mount_point": null, "mount_options": null }, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/2" } ], "available_size": 7990149120, "used_size": 0, "human_size": "8.0 GB", "name": "my_volume_group", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/volume-group/1/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Volume groups
Manage volume groups on a machine.
GET /MAAS/api/2.0/nodes/{system_id}/volume-groups/
List all volume groups belonging to a machine with the given system_id.
Parameters
{system_id} (String): Required. The machine system_id containing the volume groups.
Success
HTTP Status Code : 200
JSON
[ { "logical_volumes": [], "system_id": "ccrfnk", "human_size": "8.0 GB", "human_used_size": "0 bytes", "uuid": "36f9585d-3ae0-429c-abb7-9d584bc6f941", "human_available_size": "8.0 GB", "used_size": 0, "name": "my_volume_group", "size": 7990149120, "devices": [ { "uuid": "ecfa7d5b-bb76-4443-83ab-ad600c23b4de", "size": 7994343424, "bootable": false, "tags": [], "system_id": "ccrfnk", "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "cad18fde-2fc7-4aa5-a15b-739f88c3b671", "mount_point": null, "mount_options": null }, "used_for": "LVM volume for my_volume_group", "type": "partition", "path": "/dev/disk/by-dname/vda-part1", "id": 2, "device_id": 1, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/2" } ], "available_size": 7990149120, "id": 1, "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/volume-group/1/" } ]
Error
HTTP Status Code : 404
Content
Not Found
POST /MAAS/api/2.0/nodes/{system_id}/volume-groups/
Create a volume group belonging to a machine with the given system_id.
Note that at least one valid block device or partition is required.
Parameters
{system_id} (String): Required. The machine system_id on which to create the volume group.
name (String): Required. Name of the volume group.
uuid (String): Optional. (optional) UUID of the volume group.
block_devices (String): Optional. Block devices to add to the volume group.
partitions (String): Optional. Partitions to add to the volume group.
Success
HTTP Status Code : 200
JSON
{ "available_size": 7990149120, "size": 7990149120, "human_used_size": "0 bytes", "devices": [ { "uuid": "ecfa7d5b-bb76-4443-83ab-ad600c23b4de", "size": 7994343424, "bootable": false, "tags": [], "used_for": "LVM volume for my_volume_group", "device_id": 1, "path": "/dev/disk/by-dname/vda-part1", "id": 2, "filesystem": { "fstype": "lvm-pv", "label": null, "uuid": "cad18fde-2fc7-4aa5-a15b-739f88c3b671", "mount_point": null, "mount_options": null }, "type": "partition", "system_id": "ccrfnk", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/blockdevices/1/partition/2" } ], "logical_volumes": [], "id": 1, "used_size": 0, "human_size": "8.0 GB", "human_available_size": "8.0 GB", "system_id": "ccrfnk", "uuid": "36f9585d-3ae0-429c-abb7-9d584bc6f941", "name": "my_volume_group", "resource_uri": "/MAAS/api/2.0/nodes/ccrfnk/volume-group/1/" }
Error
HTTP Status Code : 404
Content
Not Found
HTTP Status Code : 409
Content : The requested machine is not ready.
Zone
Manage a physical zone.
Any node is in a physical zone, or "zone" for short. The meaning of a physical zone is up to you: it could identify e.g. a server rack, a network, or a data centre. Users can then allocate nodes from specific physical zones, to suit their redundancy or performance requirements.
This functionality is only available to administrators. Other users can view physical zones, but not modify them.
DELETE /MAAS/api/2.0/zones/{name}/
Deletes a zone.
Parameters
{name} (URL String): Required. The zone to delete.
Success
HTTP Status Code : 204
Content
<no content>
Error
HTTP Status Code : Always returns 204.
Content
<no content>
GET /MAAS/api/2.0/zones/{name}/
Returns a named zone.
Parameters
{name} (URL String): Required. A zone name
Success
HTTP Status Code : 200
Content
{ "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }
Error
HTTP Status Code : 404
Content
Not Found
PUT /MAAS/api/2.0/zones/{name}/
Updates a zone's name or description.
Note that only 'name' and 'description' parameters are honored. Others, such as 'resource-uri' or 'id' will be ignored.
Parameters
{name} (URL String): Required. The zone to update.
description (String): Optional. A brief description of the new zone.
name (String): Optional. The zone's new name.
Success
HTTP Status Code : 200
Content
{ "name": "test-update-renamed", "description": "This is a new zone for updating.", "id": 151, "resource_uri": "/MAAS/api/2.0/zones/test-update-renamed/" }
Error
HTTP Status Code : 404
Content
Not Found
Zones
Manage physical zones.
GET /MAAS/api/2.0/zones/
Get a listing of all zones. Note that there is always at least one zone: default.
Success
HTTP Status Code : 200
Content
[ { "name": "default", "description": "", "id": 1, "resource_uri": "/MAAS/api/2.0/zones/default/" }, ... ]
POST /MAAS/api/2.0/zones/
Creates a new zone.
Parameters
name (String): Required. The new zone's name.
description (String): Optional. A brief description of the new zone.
Success
HTTP Status Code : 204
Content
{ "name": "test-hYnxCnjS", "description": "This is a new zone.", "id": 153, "resource_uri": "/MAAS/api/2.0/zones/test-hYnxCnjS/" }
Error
HTTP Status Code : 400
Content
{"name": ["Physical zone with this Name already exists."]}
Power types
This is the list of the supported power types and their associated power parameters. Note that the list of usable power types for a particular rack controller might be a subset of this list if the rack controller in question is from an older version of MAAS.
amt (Intel AMT)
Power parameters:
- power_pass (Power password).
- power_address (Power address).
apc (American Power Conversion (APC) PDU)
Power parameters:
- power_address (IP for APC PDU).
- node_outlet (APC PDU node outlet number (1-16)).
- power_on_delay (Power ON outlet delay (seconds)). Default: '5'.
dli (Digital Loggers, Inc. PDU)
Power parameters:
- outlet_id (Outlet ID).
- power_address (Power address).
- power_user (Power user).
- power_pass (Power password).
fence_cdu (Sentry Switch CDU)
Power parameters:
- power_address (Power address).
- power_id (Power ID).
- power_user (Power user).
- power_pass (Power password).
hmc (IBM Hardware Management Console (HMC))
Power parameters:
- power_address (IP for HMC).
- power_user (HMC username).
- power_pass (HMC password).
- server_name (HMC Managed System server name).
- lpar (HMC logical partition).
ipmi (IPMI)
Power parameters:
- power_driver (Power driver). Choices: 'LAN' (LAN [IPMI 1.5]), 'LAN_2_0' (LAN_2_0 [IPMI 2.0]) Default: 'LAN_2_0'.
- power_boot_type (Power boot type). Choices: 'auto' (Automatic), 'legacy' (Legacy boot), 'efi' (EFI boot) Default: 'auto'.
- power_address (IP address).
- power_user (Power user).
- power_pass (Power password).
- mac_address (Power MAC).
manual (Manual)
Power parameters:
moonshot (HP Moonshot - iLO4 (IPMI))
Power parameters:
- power_address (Power address).
- power_user (Power user).
- power_pass (Power password).
- power_hwaddress (Power hardware address).
mscm (HP Moonshot - iLO Chassis Manager)
Power parameters:
- power_address (IP for MSCM CLI API).
- power_user (MSCM CLI API user).
- power_pass (MSCM CLI API password).
- node_id (Node ID - Must adhere to cXnY format (X=cartridge number, Y=node number).).
msftocs (Microsoft OCS - Chassis Manager)
Power parameters:
- power_address (Power address).
- power_port (Power port).
- power_user (Power user).
- power_pass (Power password).
- blade_id (Blade ID (Typically 1-24)).
nova (OpenStack Nova)
Power parameters:
- nova_id (Host UUID).
- os_tenantname (Tenant name).
- os_username (Username).
- os_password (Password).
- os_authurl (Auth URL).
recs_box (Christmann RECS|Box Power Driver)
Power parameters:
- node_id (Node ID).
- power_address (Power address).
- power_port (Power port).
- power_user (Power user).
- power_pass (Power password).
redfish (Redfish)
Power parameters:
- power_address (Redfish address).
- power_user (Redfish user).
- power_pass (Redfish password).
- node_id (Node ID).
sm15k (SeaMicro 15000)
Power parameters:
- system_id (System ID).
- power_address (Power address).
- power_user (Power user).
- power_pass (Power password).
- power_control (Power control type). Choices: 'ipmi' (IPMI), 'restapi' (REST API v0.9), 'restapi2' (REST API v2.0) Default: 'ipmi'.
ucsm (Cisco UCS Manager)
Power parameters:
- uuid (Server UUID).
- power_address (URL for XML API).
- power_user (API user).
- power_pass (API password).
virsh (Virsh (virtual systems))
Power parameters:
- power_address (Virsh address).
- power_pass (Virsh password (optional)).
- power_id (Virsh VM ID).
vmware (VMware)
Power parameters:
- power_vm_name (VM Name (if UUID unknown)).
- power_uuid (VM UUID (if known)).
- power_address (VMware hostname).
- power_user (VMware username).
- power_pass (VMware password).
- power_port (VMware API port (optional)).
- power_protocol (VMware API protocol (optional)).
wedge (Facebook's Wedge)
Power parameters:
- power_address (IP address).
- power_user (Power user).
- power_pass (Power password).
rsd (Rack Scale Design)
Power parameters:
- power_address (Pod address).
- power_user (Pod user).
- power_pass (Pod password).
- node_id (Node ID).
Pod types
This is the list of the supported pod types and their associated parameters. Note that the list of usable pod types for a particular rack controller might be a subset of this list if the rack controller in question is from an older version of MAAS.
rsd (Rack Scale Design)
Parameters:
- power_address (Pod address).
- power_user (Pod user).
- power_pass (Pod password).
- node_id (Node ID).
virsh (Virsh (virtual systems))
Parameters:
- power_address (Virsh address).
- power_pass (Virsh password (optional)).
- power_id (Virsh VM ID).