support for chinese name to show

Bug #1710329 reported by zhengliuyang on 2017-08-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Undecided
zhengliuyang

Bug Description

I create a project with a chinese name, then get the project with the name.

openstack --debug project show 中文

REQ: curl -g -i -X GET http://10.43.166.109:35357/v2.0/tenants -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}fe395e6a71aed0df6b06ef64cde70a93e3338f7b"
"GET /v2.0/tenants HTTP/1.1" 200 584
RESP: [200] Content-Length: 584 Vary: X-Auth-Token Connection: keep-alive Date: Sat, 23 Jun 2001 02:24:46 GMT Content-Type: application/json X-Openstack-Request-Id: req-5e4c498e-a474-4fa1-9614-b350d60d036a

/usr/lib/python2.7/site-packages/keystoneclient/base.py:283: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  for (attr, value) in searches):
No tenant with a name or ID of '中文' exists.

my env variable is as:
export OS_USERNAME=admin
export OS_PASSWORD=keystone
export OS_AUTH_URL=http://10.43.166.109:5000/v2.0
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

zhengliuyang (zlyqqq) on 2017-08-12
Changed in python-keystoneclient:
assignee: nobody → zhengliuyang (zlyqqq)
Changed in python-keystoneclient:
status: New → In Progress
zhengliuyang (zlyqqq) on 2017-08-12
description: updated
Gage Hugo (gagehugo) wrote :

Can replicate with v3 projects on master

http://paste.openstack.org/show/619364/

Gage Hugo (gagehugo) wrote :

I wonder if this has something to do with keystone itself, I cannot curl against keystone itself:

curl -g -i -X GET http://controller:35357/v3/projects/ 中文 -H "Accept: application/json" -H "X-Auth-Token: [omitted]"

HTTP/1.1 404 Not Found
Date: Thu, 24 Aug 2017 21:02:46 GMT
Server: Apache/2.4.25 (Raspbian)
Content-Length: 98
Vary: X-Auth-Token
x-openstack-request-id: req-126e6bd9-6e9f-41a8-893a-2a3adacdd579
Content-Type: application/json

{"error": {"message": "Could not find project: \u4e2d\u6587.", "code": 404, "title": "Not Found"}}

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

Other bug subscribers