Blank Description for projects being handled incorrectly

Bug #1168317 reported by David Geng on 2013-04-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
David Geng

Bug Description

Invoking keystone api to create tenant via json and xml with empty description, the result is different, description is empty of json response, while the xml response is {}

JSON: request
curl -X POST -H "X-Auth-Token: 03ac2380c4a549d1af8bb4542bcdf383" -d '{"tenant":{"name":"test1","description":"","enabled":"true"}}' -H "Content-Type: application/json"

keystone tenant-get 9405381772cf4d56a6e7598fa6f738b5
| Property | Value |
| description | |
| enabled | True |
| id | 9405381772cf4d56a6e7598fa6f738b5 |
| name | test |

XML: request<?xml version="1.0" encoding="UTF-8"?>
<tenant xmlns="" enabled="true" name="demo3">

result:keystone tenant-get 94ebd5eea09c43eaa2fa61e00dec0a83
| Property | Value |
| description | {} |
| enabled | True |
| id | 94ebd5eea09c43eaa2fa61e00dec0a83 |
| name | demo |

David Geng (genggjh) wrote :

Need make the behavior consistent on keystone response between xml and json formatter

Changed in keystone:
assignee: nobody → David Geng (genggjh)

Fix proposed to branch: master

Changed in keystone:
status: New → In Progress

Submitter: Jenkins
Branch: master

commit 9b9a3d53a901da7ef2b80f62e7e6a668be161bec
Author: gengjh <email address hidden>
Date: Fri Apr 12 20:44:41 2013 +0800

    Set empty element to ""

    When serializer xml formatter response need set empty element to "" to
    align with JSON formatter.

    Fix bug 1168317

    Change-Id: I4985791095f43eac88fe42ec16f6a78bbf77ec07

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-05-29
Changed in keystone:
milestone: none → havana-1
status: Fix Committed → Fix Released
hanzhf (hanzhf) wrote :

We also met this problem in grizzly, can this fix be merged into Stable-grizzly ?

David Geng (genggjh) on 2013-06-05
tags: added: grizzly-backport-potential
Dolph Mathews (dolph) on 2013-06-05
Changed in keystone:
importance: Undecided → Low
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-1 → 2013.2
Alan Pevec (apevec) on 2014-03-30
tags: removed: grizzly-backport-potential
no longer affects: keystone/grizzly
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers