show traits does not give much info

Bug #2069938 reported by Amit Uniyal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
placement
New
Undecided
Unassigned

Bug Description

trait show API only returns 204, not even trait ID if trait exits, which does not help much, it should tell more.
https://docs.openstack.org/api-ref/placement/#show-traits

Show should atleast have in-use information.

$ openstack trait show CUSTOM_WB_HOST2
+-------+-----------------+
| Field | Value |
+-------+-----------------+
| name | CUSTOM_WB_HOST2 |
+-------+-----------------+

Use case: # it may not be something operator really do
operator need to delete a trait

$ openstack trait delete CUSTOM_WB_HOST2
The trait CUSTOM_WB_HOST2 is in use by a resource provider. (HTTP 409)

trait DB do not have status or in-use field.

MariaDB [placement]> desc traits
    -> ;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | UNI | NULL | |
+------------+--------------+------+-----+---------+----------------+

Amit Uniyal (auniyal)
description: updated
Amit Uniyal (auniyal)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.