08 OpenStack Guide v0
08 OpenStack Guide v0
This returns the pod parameters, if any, configured for a pod. For some types of pod this will
include private information such as passwords and secret keys.
...]
Returns 404 if the pod is not found. Returns 403 if the user does not have permission to compose
machine.
Performs pod discovery and updates all discovered information and discovered machines.
Returns 404 if the pod is not found. Returns 403 if the user does not have permission to refresh
the pod.
PUT /api/2.0/pods/{id}/
Returns 404 if the pod is not found. Returns 403 if the user does not have permission to update
the pod.
Pods
GET /api/2.0/pods/
List pods.
POST /api/2.0/pods/
Create a Pod.
Returns 503 if the pod could not be discovered. Returns 404 if the pod is not found. Returns 403
if the user does not have permission to create a pod.
RackController
DELETE /api/2.0/rackcontrollers/{system_id}/
Returns 404 if the node is not found. Returns 403 if the user does not have permission to delete
the node. Returns 204 if the node is successfully deleted.
GET /api/2.0/rackcontrollers/{system_id}/
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.
Shows all available boot images and lists whether they are in sync with the region.
This method is reserved for admin users and returns a 403 if the user is not one.
This returns the power parameters, if any, configured for a node. For some types of power control
this will include private information such as passwords and secret keys.
Send 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.
Returns 404 if the node is not found. Returns node's power state.
POST /api/2.0/rackcontrollers/{system_id}/ op=abort
Returns 404 if the node could not be found. Returns 403 if the user does not have permission to
abort the current operation.
param stop_mode An 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.
type stop_mode unicode
param comment Optional comment for the event log.
type comment unicode
Returns 404 if the node is not found. Returns 403 if the user does not have permission to stop the
node.
Turn on a node.
param user_data If present, this blob of user-data to be made available to the nodes
through the metadata service.
type user_data base64-encoded unicode
param comment Optional comment for the event log.
type comment unicode
Ideally we'd have MIME multipart and content-transfer-encoding etc. deal with the encapsulation
of binary data, but couldn't make it work with the framework in reasonable time so went for a
dumb, manual encoding instead.
Returns 404 if the node is not found. Returns 403 if the user does not have permission to start the
machine. Returns 503 if the start-up attempted to allocate an IP address, and there were no IP
addresses available on the relevant cluster interface.
param enable_ssh Whether to enable SSH for the testing environment using the user's
SSH key(s).
type enable_ssh bool ('0' for False, '1' for True)
param testing_scripts A comma seperated list of testing script names and tags to be
run. By default all tests tagged 'commissioning' will be run.
type testing_scripts string
A node in the 'ready', 'allocated', 'deployed', 'broken', or any failed state may run tests. If testing is
started and successfully passes from a '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.
PUT /api/2.0/rackcontrollers/{system_id}/
param power_type The new power type for this rack 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.
type power_type unicode
param power_parameters_{param1} The new value for the 'param1' power parameter.
Note that this is dynamic as the available parameters depend on the selected value of the
rack 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.
type power_parameters_{param1} unicode
param power_parameters_skip_check Whether or not the new power parameters for
this rack controller should be checked against the expected power parameters for the rack
controller's power type ('true' or 'false'). The default is 'false'.
type power_parameters_skip_check unicode
param zone Name of a valid physical zone in which to place this rack controller.
type zone unicode
Returns 404 if the rack controller is not found. Returns 403 if the user does not have permission
to update the rack controller.
RackControllers
GET /api/2.0/rackcontrollers/
Nodes are sorted by id (i.e. most recent last) and grouped by type.
param hostname An optional hostname. Only nodes relating to the node with the
matching hostname will be returned. This can be specified multiple times to see multiple
nodes.
type hostname unicode
param mac_address An optional MAC address. Only nodes relating to the node owning
the specified MAC address will be returned. This can be specified multiple times to see
multiple nodes.
type mac_address unicode
param id An optional list of system ids. Only nodes relating to the nodes with matching
system ids will be returned.
type id unicode
param domain An optional name for a dns domain. Only nodes relating to the nodes in
the domain will be returned.
type domain unicode
param zone An optional name for a physical zone. Only nodes relating to the nodes in
the zone will be returned.
type zone unicode
param agent_name An optional agent name. Only nodes relating to the nodes with
matching agent names will be returned.
type agent_name unicode
return a list of dicts that describe the power types in this format.
Returns whether or not the given MAC address is registered within this MAAS (and attached to a
non-retired node).
param id An optional list of system ids. Only machines with matching system ids will be
returned.
type id iterable
return A dictionary of power parameters, keyed by machine system_id.
param zone Zone name. If omitted, the zone is "none" and the nodes will be taken out of
their physical zones.
param nodes system_ids of the nodes whose zones are to be set. (An empty list is
acceptable).
RAID Device
DELETE /api/2.0/nodes/{system_id}/raid/{id}/
Returns 404 if the machine or RAID is not found. Returns 409 if the machine is not Ready.
GET /api/2.0/nodes/{system_id}/raid/{id}/
PUT /api/2.0/nodes/{system_id}/raid/{id}/
Returns 404 if the machine or RAID is not found. Returns 409 if the machine is not Ready.
RAID Devices
GET /api/2.0/nodes/{system_id}/raids/
POST /api/2.0/nodes/{system_id}/raids/
Creates a RAID
Returns 404 if the machine is not found. Returns 409 if the machine is not Ready.
RegionController
DELETE /api/2.0/regioncontrollers/{system_id}/
GET /api/2.0/regioncontrollers/{system_id}/
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.
This method is reserved for admin users and returns a 403 if the user is not one.
This returns the power parameters, if any, configured for a node. For some types of power control
this will include private information such as passwords and secret keys.
PUT /api/2.0/regioncontrollers/{system_id}/
param power_type 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.
type power_type unicode
param power_parameters_{param1} 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.
type power_parameters_{param1} unicode
param power_parameters_skip_check 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'.
type power_parameters_skip_check unicode
param zone Name of a valid physical zone in which to place this region controller.
type zone unicode
Returns 404 if the region controller is not found. Returns 403 if the user does not have permission
to update the region controller.
RegionControllers
GET /api/2.0/regioncontrollers/
Nodes are sorted by id (i.e. most recent last) and grouped by type.
param hostname An optional hostname. Only nodes relating to the node with the
matching hostname will be returned. This can be specified multiple times to see multiple
nodes.
type hostname unicode
param mac_address An optional MAC address. Only nodes relating to the node owning
the specified MAC address will be returned. This can be specified multiple times to see
multiple nodes.
type mac_address unicode
param id An optional list of system ids. Only nodes relating to the nodes with matching
system ids will be returned.
type id unicode
param domain An optional name for a dns domain. Only nodes relating to the nodes in
the domain will be returned.
type domain unicode
param zone An optional name for a physical zone. Only nodes relating to the nodes in
the zone will be returned.
type zone unicode
param agent_name An optional agent name. Only nodes relating to the nodes with
matching agent names will be returned.
type agent_name unicode
Returns whether or not the given MAC address is registered within this MAAS (and attached to a
non-retired node).
param mac_address The mac address to be checked.
type mac_address unicode
return 'true' or 'false'.
rtype unicode
param zone Zone name. If omitted, the zone is "none" and the nodes will be taken out of
their physical zones.
param nodes system_ids of the nodes whose zones are to be set. (An empty list is
acceptable).
SSH Key
DELETE /api/2.0/account/prefs/sshkeys/{id}/
Returns 404 if the key does not exist. Returns 401 if the key does not belong to the calling user.
GET /api/2.0/account/prefs/sshkeys/{id}/
SSH Keys
GET /api/2.0/account/prefs/sshkeys/
The request payload should contain the public SSH key data in form data whose name is "key".
Import SSH keys for a given protocol and authorization ID in protocol:auth_id format.
SSL Key
DELETE /api/2.0/account/prefs/sslkeys/{id}/
Returns 401 if the key does not belong to the requesting user. Returns 204 if the key is
successfully deleted.
GET /api/2.0/account/prefs/sslkeys/{id}/
Returns 404 if the key with id is not found. Returns 401 if the key does not belong to the
requesting user.
SSL Keys
GET /api/2.0/account/prefs/sslkeys/
POST /api/2.0/account/prefs/sslkeys/
The request payload should contain the SSL key data in form data whose name is "key".
Space
Manage space.
DELETE /api/2.0/spaces/{id}/
Delete space.
GET /api/2.0/spaces/{id}/
Read space.
PUT /api/2.0/spaces/{id}/
Update space.
Spaces
Manage spaces.
GET /api/2.0/spaces/
POST /api/2.0/spaces/
Create a space.
Static route
GET /api/2.0/static-routes/{id}/
PUT /api/2.0/static-routes/{id}/
Static routes
GET /api/2.0/static-routes/
POST /api/2.0/static-routes/
Subnet
Manage subnet.
DELETE /api/2.0/subnets/{id}/
Delete subnet.
GET /api/2.0/subnets/{id}/
Read subnet.
with_username If False, suppresses the display of usernames associated with each address.
(Default: True)
with_summary If False, suppresses the display of nodes, BMCs, and and DNS records associated
with each address. (Default: True)
include_ranges If True, includes detailed information about the usage of this range.
include_suggestions If True, includes the suggested gateway and dynamic range for this subnet, if
it were to be configured.