trove show does not show correct output when instance name is used

Bug #1322822 reported by Sushil Kumar on 2014-05-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-troveclient
Low
Greg Lucas

Bug Description

trove show API can be used with instance ID or instance name, but the output shown is different for these options

$ trove list
+--------------------------------------+-------------------------+-----------+-------------------+--------+-----------+------+
| ID | Name | Datastore | Datastore Version | Status | Flavor ID | Size |
+--------------------------------------+-------------------------+-----------+-------------------+--------+-----------+------+
| 77dd24cc-3136-4386-89b8-4f674b33d8c7 | test_vm_2014May08091518 | mysql | 5.5 | ACTIVE | 6 | 2 |
| c2dc18df-6641-4c6a-a3f4-f7cc9ca65be2 | test_vm_2014May12080822 | mysql | 5.5 | ACTIVE | 6 | 2 |
+--------------------------------------+-------------------------+-----------+-------------------+--------+-----------+------+

$ trove show 77dd24cc-3136-4386-89b8-4f674b33d8c7
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| created | 2014-05-08T09:15:20 |
| datastore | mysql |
| datastore_version | 5.5 |
| flavor | 6 |
| id | 77dd24cc-3136-4386-89b8-4f674b33d8c7 |
| ip | 10.0.0.2 |
| name | test_vm_2014May08091518 |
| status | ACTIVE |
| updated | 2014-05-08T09:15:26 |
| volume | 2 |
| volume_used | 0.17 |
+-------------------+--------------------------------------+

$ trove show test_vm_2014May08091518
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| created | 2014-05-08T09:15:20 |
| datastore | mysql |
| datastore_version | 5.5 |
| flavor | {u'id': u'6', u'links': [{u'href': u'https://10.1.0.8:8779/v1.0/5cc7f344990e4543adf2c329120ec3c1/flavors/6', u'rel': u'self'}, {u'href': u'https://10.1.0.8:8779/flavors/6', u'rel': u'bookmark'}]} |
| id | 77dd24cc-3136-4386-89b8-4f674b33d8c7 |
| ip | 10.0.0.2 |
| name | test_vm_2014May08091518 |
| status | ACTIVE |
| updated | 2014-05-08T09:15:26 |
| volume | {u'used': 0.17, u'size': 2} |
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

trove show when used with name shows output in dictionary/json output for flavor/volume

Fix proposed to branch: master
Review: https://review.openstack.org/95334

Changed in python-troveclient:
assignee: nobody → Sushil Kumar (sushil-kumar2)
status: New → In Progress
Changed in python-troveclient:
importance: Undecided → Low
milestone: none → juno-1
Changed in python-troveclient:
milestone: juno-1 → juno-3
Auston McReynolds (amcrn) wrote :

sushil: are you still working on this, or can we let someone else take a stab at it?

Changed in python-troveclient:
assignee: Sushil Kumar (sushil-kumar2) → Greg Lucas (glucas-q)

Reviewed: https://review.openstack.org/113745
Committed: https://git.openstack.org/cgit/openstack/python-troveclient/commit/?id=73a30b3078b2b7f82569227c2250e8bcee7b128e
Submitter: Jenkins
Branch: master

commit 73a30b3078b2b7f82569227c2250e8bcee7b128e
Author: Greg Lucas <email address hidden>
Date: Tue Aug 12 21:19:19 2014 -0400

    Clean up shell display of slave info

    Suppress links and improve display of slave information for the 'show' and
    'create' commands. Also refactor shell.py to avoid repeating the code for
    displaying an instance.

    The revised print_instance method also avoids bug 1322822 where the order
    in which attributes are queried can affect the display output.

    Depends-On: If8a154083d0095606fb3ee115cc9b66ab788cbb4

    Partially-Implements: blueprint replication-v1
    Partial-Bug: 1322822
    Change-Id: Ie1ac42d61e920ac8ea1ebab35c2db096fd313077

Doug Shelley (0-doug) on 2014-09-22
Changed in python-troveclient:
status: In Progress → Fix Committed

Change abandoned by Nikhil Manchanda (<email address hidden>) on branch: master
Review: https://review.openstack.org/95334
Reason: Abandoning patches that have a negative review and are older than 4 weeks as part of a house-keeping sweep. Please feel free to restore the patch if it is still actively being worked on.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers