Merge lp://qastaging/~justin-fathomdb/nova/check-xsd into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Work in progress
Proposed branch: lp://qastaging/~justin-fathomdb/nova/check-xsd
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Prerequisite: lp://qastaging/~justin-fathomdb/nova/add-xsd
Diff against target: 4565 lines (+4364/-9)
24 files modified
nova/api/direct.py (+1/-3)
nova/api/openstack/common.py (+49/-1)
nova/api/openstack/schemas/v1.1/actions.xsd (+370/-0)
nova/api/openstack/schemas/v1.1/api-common.xjb (+11/-0)
nova/api/openstack/schemas/v1.1/api-common.xsd (+67/-0)
nova/api/openstack/schemas/v1.1/api.xjb (+17/-0)
nova/api/openstack/schemas/v1.1/api.xsd (+117/-0)
nova/api/openstack/schemas/v1.1/atom.xjb (+11/-0)
nova/api/openstack/schemas/v1.1/atom/atom.xsd (+115/-0)
nova/api/openstack/schemas/v1.1/atom/xml.xsd (+287/-0)
nova/api/openstack/schemas/v1.1/backup.xsd (+378/-0)
nova/api/openstack/schemas/v1.1/common.xsd (+125/-0)
nova/api/openstack/schemas/v1.1/extensions.xsd (+56/-0)
nova/api/openstack/schemas/v1.1/faults.xsd (+482/-0)
nova/api/openstack/schemas/v1.1/flavor.xsd (+156/-0)
nova/api/openstack/schemas/v1.1/image.xsd (+286/-0)
nova/api/openstack/schemas/v1.1/ipgroup.xsd (+231/-0)
nova/api/openstack/schemas/v1.1/limits.xsd (+282/-0)
nova/api/openstack/schemas/v1.1/server.xsd (+1010/-0)
nova/api/openstack/schemas/v1.1/version.xsd (+200/-0)
nova/api/openstack/validation.py (+85/-0)
nova/tests/fake_flags.py (+6/-0)
nova/wsgi.py (+21/-5)
tools/pip-requires (+1/-0)
To merge this branch: bzr merge lp://qastaging/~justin-fathomdb/nova/check-xsd
Reviewer Review Type Date Requested Status
Mark Washenberger (community) Needs Fixing
Dan Prince (community) Needs Fixing
Todd Willey (community) Needs Information
Vish Ishaya (community) Needs Information
Review via email: mp+56658@code.qastaging.launchpad.net

Commit message

Validate XML output against schemas

Description of the change

Check XML schemas. By default, we just warn if XML output is invalid according to the schema. By tweaking flags, we can run XML even on JSON output and/or turn warnings into errors. That's in fake_flags.py, but is commented out for now because it just causes too many errors.

This has an additional pre-req branch lp:~justin-fathomdb/nova/bug740576 (XML namespace support)

Also, v1.1 schema checking is FUBAR: Bug #752929

To post a comment you must log in.
Revision history for this message
justinsb (justin-fathomdb) wrote :

The additional pre-req has now merged, so no pre-req beyond the marked one any more :-)

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Why the change in api/direct.py? I don't think direct api uses a schema.

review: Needs Information
Revision history for this message
justinsb (justin-fathomdb) wrote :

Removed the extraneous change to api/direct.py, by ensuring that default_xmlns was optional all the way up the callchain. I think I had it non-optional to "encourage" people to think about whether they should have a namespace :-)

Revision history for this message
Jay Pipes (jaypipes) wrote :

As mentioned on IRC, I think this branch would be fine if the 1.1 XSD was removed. Let's try to focus on the 1.0 spec for Cactus.

Revision history for this message
Todd Willey (xtoddx) wrote :

Where is the validate_xml flag actually used, in the case I want to turn off validation in production? Perhaps you're going to put it in the get_validator method in wsgi.py?

review: Needs Information
Revision history for this message
Dan Prince (dan-prince) wrote :

This branch fails to merge with lp:nova:

Text conflict in nova/wsgi.py
Text conflict in tools/pip-requires
2 conflicts encountered.

review: Needs Fixing
Revision history for this message
Mark Washenberger (markwash) wrote :

Now up to 3 conflicts:

Text conflict in nova/tests/fake_flags.py
Text conflict in nova/wsgi.py
Text conflict in tools/pip-requires
3 conflicts encountered.

Setting to WIP in accordance with the policy Vish proposed.

review: Needs Fixing

Unmerged revisions

853. By justinsb

Made the _serialize default_xmlns argument optional, revert change to direct.py

852. By justinsb

Merged with lp:~justin-fathomdb/nova/bug740576 and thereby with trunk

851. By justinsb

For now, tolerate the stuff that's broken and dial back the tests so that we don't have to raise 200 bugs yet

850. By justinsb

Imported 1.1 schema from http://bazaar.launchpad.net/~annegentle/openstack-manuals/trunk/files/head:/doc/source/docbkx/openstack-compute-api/

849. By justinsb

Added validation code

848. By justinsb

Merged with trunk

847. By justinsb

Moved CloudServers v1.0 under nova/api/openstack/schemas

846. By justinsb

Moved rackspace.xsd so that the relative URLs work

845. By justinsb

Added common.xsd that I had missed

844. By justinsb

Import of Rackspace CloudServers API v1.0 XSD

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.