~wallyworld/juju-core/fast-lxc-everywhere

« back to all changes in this revision

Viewing changes to cmd/juju/bootstrap.go

  • Committer: Tarmac
  • Author(s): Ian Booth
  • Date: 2014-04-24 12:33:19 UTC
  • mfrom: (2664.1.4 constraints-vocab)
  • Revision ID: tarmac-20140424123319-iifvboa1kjuprj7l
[r=wallyworld] Support constraints vocabs

Add support to constraints validation for
vocabs for each attribute. eg arch and
instance-type can only have well defined
values for each provider. The vocab check
is part of constraints validation.

https://codereview.appspot.com/96730043/

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
        if err != nil {
121
121
                return err
122
122
        }
123
 
        validator := environ.ConstraintsValidator()
 
123
        validator, err := environ.ConstraintsValidator()
 
124
        if err != nil {
 
125
                return err
 
126
        }
124
127
        unsupported, err := validator.Validate(c.Constraints)
125
128
        if len(unsupported) > 0 {
126
129
                logger.Warningf("unsupported constraints: %v", err)