maas-cli doesn't show zone as one of the parameters that could be updated in a node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Julian Edwards |
Bug Description
root@autopkgtest:~# maas maas node update -h
usage: /usr/lib/
[-h] [-d] [-k] system_id [data [data ...]]
Update a specific Node.
positional arguments:
system_id
data
:param hostname: The new hostname for this node.
:type hostname: unicode
:param architecture: The new architecture for this node (see
vocabulary `ARCHITECTURE`).
:type architecture: unicode
:param power_type: The new power type for this node (see
vocabulary `POWER_TYPE`). Note that if you set power_type to
use the default value, power_parameters will be set to the empty
string. Available to admin users.
:type power_type: unicode
:param power_parameter
power parameter. Note that this is dynamic as the available
parameters depend on the selected value of the Node's power_type.
For instance, if the power_type is 'ether_wake', the only valid
parameter is 'power_address' so one would want to pass 'myaddress'
as the value of the 'power_
Available to admin users.
:type power_parameter
:param power_parameter
parameters for this node should be checked against the expected
power parameters for the node's power type ('true' or 'false').
The default is 'false'.
:type power_parameter
root@autopkgtest:~# maas maas node update node-0ffc4d1c-
{
"status": 0,
"macaddress
{
},
{
}
],
"hostname": "qqq9p.maas",
"power_type": "ipmi",
"routers": null,
"netboot": true,
"cpu_count": 0,
"storage": 0,
"system_id": "node-0ffc4d1c-
"architecture": "amd64/generic",
"memory": 0,
"owner": null,
"tag_names": [],
"ip_addresses": [
],
"resource_uri": "/MAAS/
}
Although the command returns successfully and looking in the web ui the node is in the 'test-zone', the returned JSON doesn't show the zone the node belongs to.
Related branches
- Gavin Panella (community): Approve
-
Diff: 70 lines (+17/-0)3 files modifiedsrc/maasserver/api.py (+3/-0)
src/maasserver/tests/test_api_enlistment.py (+3/-0)
src/maasserver/tests/test_api_node.py (+11/-0)
Changed in maas: | |
assignee: | nobody → Julian Edwards (julian-edwards) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
There are two bugs here:
1. the docstring for NodeHandler. update( ) does not have zone listed as a param NODE_FIELDS is out of date
2. DISPLAYED_