device¶
delete¶
Delete a device with the given system_id.
maas $PROFILE device delete [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
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.
maas $PROFILE device details [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
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.
maas $PROFILE device power-parameters [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
read¶
Reads a node with the given system_id.
maas $PROFILE device read [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
restore-default-configuration¶
Restore the configuration options of a device with the given system_id to default values.
maas $PROFILE device restore-default-configuration [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
restore-networking-configuration¶
Restore the networking options of a device with the given system_id to default values.
maas $PROFILE device restore-networking-configuration [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
set-owner-data¶
Deprecated, use set-workload-annotations instead.
maas $PROFILE device set-owner-data [--help] [-d] [-k] system_id
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
set-workload-annotations¶
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 workload annotations are removed when the machine is no longer allocated to a user.
maas $PROFILE device set-workload-annotations [--help] [-d] [-k] system_id [data ...]
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
Keywords¶
Keyword “key”¶
Optional String. key can be any string value.
Note: This command accepts JSON.
update¶
Update a device with a given system_id.
maas $PROFILE device update [--help] [-d] [-k] system_id [data ...]
Positional arguments¶
Argument |
Effect |
|---|---|
system_id |
The system ID of the machine/device (e.g., |
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
Keywords¶
Keyword “hostname”¶
Optional String. The hostname for this device.
Keyword “description”¶
Optional String. The optional description for this machine.
Keyword “domain”¶
Optional String. The domain for this device.
Keyword “parent”¶
Optional String. system_id to indicate this device’s parent. If the parent is already set and this parameter is omitted, the parent will be unchanged.
Keyword “zone”¶
Optional String. Name of a valid physical zone in which to place this node.
Note: This command accepts JSON.
devices create¶
Create a new device.
maas $PROFILE devices create [--help] [-d] [-k] [data ...]
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
Keywords¶
Keyword “hostname”¶
Optional String. A hostname. If not given, one will be generated.
Keyword “description”¶
Optional String. A optional description.
Keyword “domain”¶
Optional String. The domain of the device. If not given the default domain is used.
Keyword “mac_addresses”¶
Optional String. One or more MAC addresses for the device.
Keyword “parent”¶
Optional String. The system id of the parent.
Note: This command accepts JSON.
devices is-registered¶
Returns whether or not the given MAC address is registered within this MAAS (and attached to a non-retired node).
maas $PROFILE devices is-registered [--help] [-d] [-k] [data ...]
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
Keywords¶
Keyword “mac_address”¶
Optional URL String. The MAC address to be checked.
Note: This command accepts JSON.
devices read¶
List nodes visible to current user, optionally filtered by criteria. Nodes are sorted by id (i.e. most recent last) and grouped by type.
maas $PROFILE devices read [--help] [-d] [-k] [data ...]
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
Keywords¶
Keyword “hostname”¶
Optional String. Only nodes relating to the node with the matching hostname will be returned. This can be specified multiple times to see multiple nodes.
Keyword “cpu_count”¶
Optional Int. Only nodes with the specified minimum number of CPUs will be included.
Keyword “mem”¶
Optional String. Only nodes with the specified minimum amount of RAM (in MiB) will be included.
Keyword “mac_address”¶
Optional String. Only nodes relating to the node owning the specified MAC address will be returned. This can be specified multiple times to see multiple nodes.
Keyword “id”¶
Optional String. Only nodes relating to the nodes with matching system ids will be returned.
Keyword “domain”¶
Optional String. Only nodes relating to the nodes in the domain will be returned.
Keyword “zone”¶
Optional String. Only nodes relating to the nodes in the zone will be returned.
Keyword “pool”¶
Optional String. Only nodes belonging to the pool will be returned.
Keyword “agent_name”¶
Optional String. Only nodes relating to the nodes with matching agent names will be returned.
Keyword “fabrics”¶
Optional String. Only nodes with interfaces in specified fabrics will be returned.
Keyword “not_fabrics”¶
Optional String. Only nodes with interfaces not in specified fabrics will be returned.
Keyword “vlans”¶
Optional String. Only nodes with interfaces in specified VLANs will be returned.
Keyword “not_vlans”¶
Optional String. Only nodes with interfaces not in specified VLANs will be returned.
Keyword “subnets”¶
Optional String. Only nodes with interfaces in specified subnets will be returned.
Keyword “not_subnets”¶
Optional String. Only nodes with interfaces not in specified subnets will be returned.
Keyword “link_speed”¶
Optional String. Only nodes with interfaces with link speeds greater than or equal to link_speed will be returned.
Keyword “status”¶
Optional String. Only nodes with specified status will be returned.
Keyword “pod”¶
Optional String. Only nodes that belong to a specified pod will be returned.
Keyword “not_pod”¶
Optional String. Only nodes that don’t belong to a specified pod will be returned.
Keyword “pod_type”¶
Optional String. Only nodes that belong to a pod of the specified type will be returned.
Keyword “not_pod_type”¶
Optional String. Only nodes that don’t belong to a pod of the specified type will be returned.
Keyword “devices”¶
Optional String. Only return nodes which have one or more devices containing the following constraints in the format key=value[,key2=value2[,…]] Each key can be one of the following: - vendor_id: The device vendor id - product_id: The device product id - vendor_name: The device vendor name, not case sensitive - product_name: The device product name, not case sensitive - commissioning_driver: The device uses this driver during commissioning.
Keyword “arch”¶
Optional String. Only nodes with the specified architecture will be returned.
Keyword “not_arch”¶
Optional String. Only nodes without the specified architecture will be returned.
Keyword “cpu_speed”¶
Optional String. Only nodes with CPUs running at the specified speed (in MHz) will be returned.
Keyword “deployment_target”¶
Optional String. Only nodes with the specified deployment target will be returned.
Keyword “not_deployment_target”¶
Optional String. Only nodes without the specified deployment target will be returned.
Keyword “fabric_classes”¶
Optional String. Attached to fabric with specified classes.
Keyword “not_fabric_classes”¶
Optional String. Not attached to fabric with specified classes.
Keyword “interfaces”¶
Optional String. Only nodes with interfaces matching the specified constraints will be returned.
Keyword “not_hostname”¶
Optional String. Hostnames to ignore.
Keyword “not_id”¶
Optional String. System IDs to ignore.
Keyword “not_domain”¶
Optional String. Domain names to ignore.
Keyword “not_agent_name”¶
Optional String. Excludes nodes with events matching the agent name.
Keyword “not_in_pool”¶
Optional String. Only nodes not in the specified resource pools will be returned.
Keyword “not_in_zone”¶
Optional String. Not in zone.
Keyword “not_owner”¶
Optional String. Only nodes not owned by the specified users will be returned.
Keyword “not_power_state”¶
Optional String. Only nodes not in the specified power states will be returned.
Keyword “not_simple_status”¶
Optional String. Exclude nodes with the specified simplified status.
Keyword “not_status”¶
Optional String. Exclude nodes with the specified status.
Keyword “owner”¶
Optional String. Only nodes owned by the specified users will be returned.
Keyword “power_state”¶
Optional String. Only nodes in the specified power states will be returned.
Keyword “simple_status”¶
Optional String. Only includes nodes with the specified simplified status.
Keyword “storage”¶
Optional String. Only nodes with storage matching the specified constraints will be returned.
Keyword “system_id”¶
Optional String. Only nodes with the specified system IDs will be returned.
devices set-zone¶
Assigns a given node to a given zone.
maas $PROFILE devices set-zone [--help] [-d] [-k] [data ...]
Command-line options¶
Option |
Effect |
|---|---|
–help, -h |
Show this help message and exit. |
-d, –debug |
Display more information about API responses. |
-k, –insecure |
Disable SSL certificate check. |
Keywords¶
Keyword “zone”¶
Optional String. The zone name.
Keyword “nodes”¶
Optional String. The node to add.
Note: This command accepts JSON.