GET /tenants XSD schema validation fails

Bug #992214 reported by Liem Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Won't Fix
Medium
Unassigned

Bug Description

Example (using sample data) (2012.1 tag)

<?xml version="1.0" encoding="UTF-8"?>
<tenants xmlns="http://docs.openstack.org/identity/api/v2.0">
  <tenant id="13a5829cc7b84750a60cdc71ee62f15f" enabled="true" name="admin"/>
  <tenant id="4ab192b13c2d4ab1956a8360ad844a6c" enabled="true" name="demo"/>
</tenants>

There are 2 errors, according to tenant.xsd:

1) description field is missing
2) id is not of type XSD:id (http://www.w3.org/TR/REC-xml-names/#NT-NCName)

So, the above should have been something like:

<?xml version="1.0" encoding="UTF-8"?>
<tenants xmlns="http://docs.openstack.org/identity/api/v2.0">
    <tenant id="A13a5829cc7b84750a60cdc71ee62f15f" enabled="true" name="admin">
        <description>Admin</description>
    </tenant>
    <tenant id="B4ab192b13c2d4ab1956a8360ad844a6c" enabled="true" name="demo">
        <description>Demo</description>
    </tenant>
</tenants>

Revision history for this message
Liem Nguyen (liemmn) wrote :

Why do we enforce the id to start out with a letter (other than the fact that it is an XSD thing)? This is inconvenient for those RDBMS backend that uses a sequence for example for id generation. Also, changing the id format makes migration harder.

Joseph Heck (heckj)
Changed in keystone:
status: New → Triaged
importance: Undecided → Medium
Dolph Mathews (dolph)
Changed in keystone:
assignee: nobody → Carlos Marín (carlos-g-marin)
Revision history for this message
Dolph Mathews (dolph) wrote :

Unassigning due to inactivity.

Changed in keystone:
assignee: Carlos Marín (carlos-g-marin) → nobody
Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

Where do you find the tenants.xsd file?

Revision history for this message
Dolph Mathews (dolph) wrote :
Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

Then id has been changed to xsd:string type[1]. So no need to change it .

[1] https://github.com/openstack/identity-api/blob/master/openstack-identity-api/v2.0/src/docbkx/xsd/tenant.xsd#L80

Changed in keystone:
assignee: nobody → Jeffrey Zhang (jeffrey4l)
status: Triaged → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

Automatically unassigning due to inactivity.

Changed in keystone:
assignee: Lei Zhang (jeffrey4l) → nobody
status: In Progress → Triaged
Revision history for this message
David Stanek (dstanek) wrote :

XML support is deprecated and slated for removal

Changed in keystone:
status: Triaged → Won't Fix
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.