Merge lp://qastaging/~justin-fathomdb/nova/skip-validation-openstack11 into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Work in progress
Proposed branch: lp://qastaging/~justin-fathomdb/nova/skip-validation-openstack11
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Prerequisite: lp://qastaging/~justin-fathomdb/nova/check-xsd
Diff against target: 151 lines (+82/-0)
4 files modified
nova/api/openstack/servers.py (+10/-0)
nova/api/openstack/validation.py (+8/-0)
nova/tests/api/openstack/test_servers.py (+36/-0)
nova/wsgi.py (+28/-0)
To merge this branch: bzr merge lp://qastaging/~justin-fathomdb/nova/skip-validation-openstack11
Reviewer Review Type Date Requested Status
Dan Prince (community) Needs Fixing
Christopher MacGown (community) Approve
termie (community) Approve
Review via email: mp+56702@code.qastaging.launchpad.net

Description of the change

While the OS API 1.1 schema is broken, let's have a flag to skip validation of it

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

This branch also has an additional pre-req (though it probably doesn't need it) - the osapi-xml-serialization branch. Hence the diff below is not yet very useful until the pre-reqs merge. It's really just this bit:

 +# NOTE(justinsb): Until the OS 1.1 schema is fixed, don't bother checking it
30 +flags.DEFINE_bool('validate_openstack_11',
31 + False,
32 + 'Should we validate openstack 1.1 schema?')
33

+ if xmlns == common.XML_NS_V11:
41 + if not FLAGS.validate_openstack_11:
42 + return True
43 +
44

Revision history for this message
termie (termie) wrote :

Ah, I see here where the flag I was discussing in the other patch is defined.

As a somewhat arbitrary stylistic approach for XML in python, I feel that the current best library is etree rather than minidom, the syntax is much more pythonic (and no mixedCase) and requires less push-ups than DOM. Not gating this patch in any way, but worth looking into.

For example, most of the foo.getAttribute('bar', 'baz') would just be foo.get('bar', 'baz')

review: Approve
Revision history for this message
Christopher MacGown (0x44) wrote :

This lgtm.

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

The prerequisite lp:~justin-fathomdb/nova/check-xsd has not yet been merged into lp:nova.

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

Hi Justin,

I get a conflict when trying to merge this branch w/ trunk:

Text conflict in nova/wsgi.py

review: Needs Fixing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

The prerequisite lp:~justin-fathomdb/nova/check-xsd has not yet been merged into lp:nova.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Quite a few conflicts...

Unmerged revisions

856. By justinsb

Fix pep8

855. By justinsb

Temporary workaround - don't bother validating against the broken OpenStack 1.1 schema

854. By justinsb

Better formed output: if an order is specified for elements, follow the order

853. By justinsb

Merged with lp:~rackspace-titan/nova/osapi-xml-serialization

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

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.