Unicode error when getting integer/datetime trait
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
High
|
ZhiQiang Fan |
Bug Description
When i try to get an integer or datetime trait with cli im getting a unicode error:
$ ceilometer trait-list -e compute.
WARNING (http:173) Request returned failure status.
HTTPBadRequest (HTTP 400) ERROR Invalid input for field/attribute value. Value: '20'. Wrong type. Expected '<type 'unicode'>', got '<type 'long'>'
$ ceilometer trait-list -e compute.
WARNING (http:173) Request returned failure status.
HTTPBadRequest (HTTP 400) ERROR Invalid input for field/attribute value. Value: '2014-05-29 12:15:49.954393'. Wrong type. Expected '<type 'unicode'>', got '<type 'datetime.
If i get an string trait it works fine:
$ ceilometer trait-list -e compute.
+------
| Trait Name | Value | Data Type |
+------
| host | redstack | string |
+------
Debug info:
DEBUG (http:121)
HTTP/1.0 400 Bad Request
date: Thu, 29 May 2014 12:45:18 GMT
content-length: 231
content-type: application/json
server: WSGIServer/0.1 Python/2.7.6
{"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Invalid input for field/attribute value. Value: '2014-05-29 12:15:49.954393'. Wrong type. Expected '<type 'unicode'>', got '<type 'datetime.
WARNING (http:173) Request returned failure status.
Traceback (most recent call last):
File "/usr/local/
sys.
File "/opt/stack/
CeilometerS
File "/opt/stack/
args.
File "/opt/stack/
traits = cc.traits.
File "/opt/stack/
return self._list(path)
File "/opt/stack/
resp, body = self.api.
File "/opt/stack/
resp, body_iter = self._http_
File "/opt/stack/
raise exc.from_
ceilometerclien
description: | updated |
description: | updated |
Changed in ceilometer: | |
assignee: | nobody → ZhiQiang Fan (aji-zqfan) |
Changed in ceilometer: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in ceilometer: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | juno-2 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/97588
Review: https:/