trove show shows different outputs for name & id of an instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-troveclient |
Fix Released
|
Undecided
|
Sushil Kumar |
Bug Description
trove show shows different outputs for name & id of an instance, the sample output is as follows:
ubuntu@testzone:~$ trove list
+------
| ID | Name | Datastore | Datastore Version | Status | Flavor ID | Size |
+------
| 37bab8ae-
| 49b9b6c4-
+------
ubuntu@testzone:~$ trove show test1
+------
| Property | Value |
+------
| datastore | mysql |
| datastore_version | 5.5 |
| flavor | 6 |
| id | 37bab8ae-
| ip | 10.0.0.2 |
| name | test1 |
| status | ACTIVE |
| volume | 1 |
+------
ubuntu@testzone:~$ trove show 37bab8ae-
+------
| Property | Value |
+------
| created | 2014-10-21T09:46:50 |
| datastore | mysql |
| datastore_version | 5.5 |
| flavor | 6 |
| id | 37bab8ae-
| ip | 10.0.0.2 |
| name | test1 |
| status | ACTIVE |
| updated | 2014-10-21T09:46:54 |
| volume | 1 |
| volume_used | 0.13 |
+------
Changed in python-troveclient: | |
milestone: | none → 1.2.0 |
status: | Fix Committed → Fix Released |
the client finds the information about an instance from the method findall
https:/ /github. com/openstack/ python- troveclient/ blob/master/ troveclient/ base.py# L221-L238
This works when used with instance id as it hits the server with the url
http://<trove_ server> :8779/v1. 0/<tenant_ id>/instances/ <instance_ id>
but when it searches for name it does a search on http://<trove_ server> :8779/v1. 0/<tenant_ id>/instances and then finds the matching name
Now the difference arises because of the different result sets in both outputs
Like when it fetches the instances list it fetches lesser information which is then presented to printing formatter resulting in different outputs for different types on inputs