there is useless 'u' in the return info of "glance image-tag-update"

Bug #1534046 reported by hgangwx
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Abijitha Nadagouda

Bug Description

[Summary]
there is useless 'u' in the return info of "glance image-tag-update"

[Topo]
devstack all-in-one node

[Description and expect result]
no useless 'u' in the return info of "glance image-tag-update"

[Reproduceable or not]
reproduceable

[Recreate Steps]
1) there is useless 'u' in the return info of "glance image-tag-update":
root@45-59:/opt/stack/devstack# glance image-tag-update 1acacb75-ce92-40da-aa1e-73efa034a911 abc
+--------------------------------------+------------------+
| ID | Tags |
+--------------------------------------+------------------+
| 1acacb75-ce92-40da-aa1e-73efa034a911 | [u'ABC', u'abc'] | >>>ISSUE
+--------------------------------------+------------------+
root@45-59:/opt/stack/devstack#

[Configration]
reproduceable bug, no need

[logs]
reproduceable bug, no need

[Root cause anlyze or debug inf]
reproduceable bug

[Attachment]
None

linwei,wu (wlwwu)
Changed in python-glanceclient:
assignee: nobody → linwei,wu (wlwwu)
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Well, it's not exactly a *useless* u, it indicates that the string is unicode. It is, however, an implementation detail that ideally wouldn't be exposed to users. Apparently, we're just dumping out the content of the tag list to the console without bothering to process the individual strings to convert them into some native format.

I suggest taking a look at how the keystoneclient is handling this, as is described in bug https://bugs.launchpad.net/python-glanceclient/+bug/1533090 and propose a patch to the python-glanceclient.

Changed in python-glanceclient:
status: New → Triaged
Changed in python-glanceclient:
assignee: linwei,wu (wlwwu) → Jaspreet Singh Rawel (jaspreetsinghrawel)
Changed in python-glanceclient:
assignee: Jaspreet Singh Rawel (jaspreetsinghrawel) → Abijitha Nadagouda (abijithanadagouda)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/540254
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=195add500bac78637f94a008feee986b7800968d
Submitter: Zuul
Branch: master

commit 195add500bac78637f94a008feee986b7800968d
Author: Abijitha Nadagouda <email address hidden>
Date: Fri Feb 2 10:26:23 2018 +0530

    Removes unicode 'u' response from "glance image-tag-update"

    "glance image-tag-update" command returns unicoded response
    for lists. Therefore it requires print_list method from util
    class to handle such case. Added unicode_key_value_to_string()
    method to remove extra 'u' from lists and dictionaries. This
    fix is inspired from cinderclient's implementation.

    Change-Id: I16a04e8d34f7629f72fe389456001ca1db9335ea
    Closes-bug: #1534046

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 2.11.1

This issue was fixed in the openstack/python-glanceclient 2.11.1 release.

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.