set/unset command classes should inherit from Command, not ShowOne.
Bug #1546065 reported by
Tang Chen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Fix Released
|
Low
|
Tang Chen |
Bug Description
In OSC, set/unset command classes should inherit from class Command. There are 5 classes remain inheriting class ShowOne.
1. SetSecurityGroup
2. SetAgent
3. SetAggregate
4. SetFlavor
5. UnsetFlavor
They should be changed to inherit from class Command.
Changed in python-openstackclient: | |
assignee: | nobody → Tang Chen (tangchen) |
To post a comment you must log in.
BTW, two questions:
1. Is unset command necessary ? For example, "set xxx=None" means unset this property. But of course, I think this depends on the implementation on the server side.
2. For example, "flavor set --property ram=128", this won't update the ram of the flavor, but set a property named "ram" in the flavor._info. And the output may confuse the users:
+------ ------- ------- ------- -+----- ------- ------- ------- ------- -----+ ------- ------- ------- -+----- ------- ------- ------- ------- -----+ DISABLED: disabled | False | EXT-DATA: ephemeral | 0 | 7751-412a- a4d6-b9b429dcd7 f7 | access: is_public | True | ------- ------- ------- -+----- ------- ------- ------- ------- -----+
| Field | Value |
+------
| OS-FLV-
| OS-FLV-
| disk | 0 |
| id | c0215db9-
| name | m1.aaa |
| os-flavor-
| properties | ram='1024' |
| ram | 256 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+------
Shall we fix this problem ?