RelaxNG schema contains duplicate elements => is invalid

Bug #885025 reported by justinsb on 2011-11-02
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
John Garbutt

Bug Description

The RelaxNG schema contains elements with the same name & namespace but different structure for flavors, images and servers. I'm pretty sure this is illegal - how could a validating parser know which syntax to choose?

This is a serious blocker for me - the EC2 API is incomplete, while the OpenStack API is not sufficiently well specified to use from a strongly-typed language. The XML schema would normally be the answer but RelaxNG isn't as widely supported as XSD, and the schema looks like it is incorrect anyway. :-(

Tags: api Edit Tag help
Thierry Carrez (ttx) on 2011-11-10
tags: added: osapi-1.1
Changed in nova:
importance: Undecided → High
status: New → Confirmed
Vish Ishaya (vishvananda) wrote :

justin. Any idea how we can write a test validating this in python so we can make sure it is legal?

justinsb (justin-fathomdb) wrote :

I could take a stab at this on the bug squashing day...

Changed in nova:
assignee: nobody → justinsb (justin-fathomdb)
Changed in nova:
status: Confirmed → Triaged

Justin, are you still working on this?

All,
Does not seem to be bothering anyone else, can we lower the Importance?

-- dims

Tom Fifield (fifieldt) wrote :

Since we haven't heard from Justin in over two years, de-assigning. If this was done in error, please revert.

Changed in nova:
assignee: justinsb (justin-fathomdb) → nobody
Chris St. Pierre (stpierre) wrote :

I have proposed a fix for this in https://review.openstack.org/#/c/98215/

Joe Gordon (jogo) on 2014-06-19
Changed in nova:
importance: High → Medium
Changed in nova:
assignee: nobody → Chris St. Pierre (stpierre)
status: Triaged → In Progress
Sean Dague (sdague) on 2014-09-17
tags: added: api
removed: osapi-1.1
Changed in nova:
assignee: Chris St. Pierre (stpierre) → John Garbutt (johngarbutt)

Reviewed: https://review.openstack.org/98215
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c41e6cf794e6d68ae083960e195c92e2ac487df1
Submitter: Jenkins
Branch: master

commit c41e6cf794e6d68ae083960e195c92e2ac487df1
Author: Chris St. Pierre <email address hidden>
Date: Fri Jul 11 09:52:24 2014 -0400

    Revise compute API schemas and add tests

    This revises the servers, images, and flavors schemas to avoid a
    duplicate definition of the top-level tags in those schemas. Instead,
    of defines each schema to allow either a list of tags with only
    name/id (as in the index listings), or a list of fully-defined
    servers/images/flavors. It is not permitted to mix and match.

    It also adds three kinds of unit tests for the API schemas:

    * A basic check to ensure that the schema files are valid RelaxNG;
    * A check to ensure that the collected body of schema files does not
      contain duplicate top-level tag definitions;
    * Explicit test XML documents.

    Closes-Bug: 885025
    Change-Id: I542b420de34fd82bb2a2813f36637aef2c2d5c92

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-12-18
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers