~abentley/charmworld/remove-018-migration

Viewing all changes in revision 424.

  • Committer: Rick Harding
  • Author(s): Richard Harding
  • Date: 2013-10-18 19:09:00 UTC
  • mfrom: (418.4.13 proof-config)
  • Revision ID: rick.harding@canonical.com-20131018190900-fysu1ymw1d2rsrma
Add charm config proofing and update api response

- Move proof logic into a new lib/proof.py module
- Update the proof api call to look through the bundles and proof them
- Change errors to be catchable exceptions, the exception contains both a msg
and debug_info we expose via the api call
- Update the api call to provide a summary error_messages (for Marco's needs)
but keep the details in the actual list of errors with the messages and the
debug info we have that went into those errors.

Sample proof api call and response:
http://paste.mitechie.com/show/1049/


Note: this is only adding the new proof checks of validating the
config/options from the charm found in the database to the options defined in
the bundle.

- Validate the option exists in the charm we found in the db
- Validate that the type is of the correct type.
- Validate that the charm we found has options at all.

QA
---
You have to ingest the charms so that we can validate them. You can then toss
the yaml file (as a single string) to the proof api endpoint as a POST'd key
deployer_file. Right now it only handles yaml.

R=
CC=
https://codereview.appspot.com/14789043

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: