[stats] Fuel-stats analytics handler /api/v1/json/oswls returns unicode data

Bug #1443448 reported by Andrey Sledzinskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Alexander Kislitsky

Bug Description

/api/v1/json/oswls returns unicode data like that:
{u'current': [{u'created_at': u'2015-04-11T22:11:42Z', u'minDisk': 0, u'updated_at': u'2015-04-11T22:11:44Z', u'sizeBytes': 13167616, u'minRam': 64, u'id': u'4052ca22-fbeb-47d5-8a5d-0305d6e28370'}], u'removed': [], u'modified': [], u'added': [{u'id': u'4052ca22-fbeb-47d5-8a5d-0305d6e28370', u'time': u'13:17:27.850471'}]}

It would be great it to be 'str' object

tags: added: feature-stats non-release
removed: stats
Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-stats (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-stats (master)

Reviewed: https://review.openstack.org/172977
Committed: https://git.openstack.org/cgit/stackforge/fuel-stats/commit/?id=40d2eafc281c84ecf7c3da4bf63af0fea7d50257
Submitter: Jenkins
Branch: master

commit 40d2eafc281c84ecf7c3da4bf63af0fea7d50257
Author: Alexander Kislitsky <email address hidden>
Date: Mon Apr 13 19:00:53 2015 +0300

    Json DB fields export in json exporter fixed

    In previous implementation we should additionaly call json.loads
    on DB json fields for restoring object after export.
    Casting of all DB fields to strings in row_as_dict has been removed.
    Only unserializable fields converted now.
    row_as_dict renamed to row_as_serializable_dict.

    Change-Id: I190391f03068a8f932c6839ae6efb3c2f9fb3afd
    Closes-Bug: #1443448

Changed in fuel:
status: In Progress → Fix Committed
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.