REST API does not provide tag_names field for controllers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Mike Pontillo | ||
2.4 |
Fix Committed
|
Medium
|
Mike Pontillo |
Bug Description
When a region controller is tagged following this steps:
$ maas my-maas region-controllers read | jq -rc .[].system_id
g8tmfb
$ maas my-maas tags create name=deployer
Success.
Machine-readable output follows:
{
"kernel_opts": "",
"definition": "",
"name": "deployer",
"comment": "",
"resource_uri": "/MAAS/
}
$ maas my-maas tag update-nodes deployer add=g8tmfb
Success.
Machine-readable output follows:
{
"added": 1,
"removed": 0
}
$ maas my-maas region-controller read g8tmfb | jq .tag_names
null
$ maas my-maas node read g8tmfb | jq .tag_names
null
I was expecting to retrieve the tag in the region controller definition, same as machine does.
In the web UI region controller tag is present.
Example for compute node:
$ maas my-maas machine read pm6pxt | jq .tag_names
["compute"]
The only way the tag_names of the region controller can be retrieved is to iterate over all tags and check if the region controller ID is present.
$ maas my-maas tag nodes deployer | jq -rc .[].system_id
g8tmfb
Related branches
- Mike Pontillo (community): Approve
-
Diff: 47 lines (+4/-0)4 files modifiedsrc/maasserver/api/rackcontrollers.py (+1/-0)
src/maasserver/api/regioncontrollers.py (+1/-0)
src/maasserver/api/tests/test_rackcontroller.py (+1/-0)
src/maasserver/api/tests/test_regioncontroller.py (+1/-0)
- Newell Jensen (community): Approve
-
Diff: 47 lines (+4/-0)4 files modifiedsrc/maasserver/api/rackcontrollers.py (+1/-0)
src/maasserver/api/regioncontrollers.py (+1/-0)
src/maasserver/api/tests/test_rackcontroller.py (+1/-0)
src/maasserver/api/tests/test_regioncontroller.py (+1/-0)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 2.5.0 |
summary: |
- Region-controller no field tag_names + REST API does not provide tag_names field for controllers |
Changed in maas: | |
assignee: | nobody → Mike Pontillo (mpontillo) |
milestone: | 2.5.0 → 2.4.x |
milestone: | 2.4.x → 2.5.0beta1 |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |