A new constraints Validator implementation
is introduced, which provides validation
and merging support for constraints. It
allows for conflicting attributes and
unsupported attributes to be registered,
and does the right thing with these.
To illustrate the point, a new constraints
attribute instance-type is also added, which
will be used in a followup branch.
Affected files (+757, -184 lines):
A [revision details]
M constraints/constraints.go
M constraints/constraints_test.go
A constraints/export_test.go
A constraints/validation.go
A constraints/validation_test.go
M state/addmachine.go
M state/prechecker_test.go
M state/service.go
Reviewers: mp+215807_ code.launchpad. net,
Message:
Please take a look.
Description:
New constraints validation and merge
A new constraints Validator implementation
is introduced, which provides validation
and merging support for constraints. It
allows for conflicting attributes and
unsupported attributes to be registered,
and does the right thing with these.
To illustrate the point, a new constraints
attribute instance-type is also added, which
will be used in a followup branch.
https:/ /code.launchpad .net/~wallyworl d/juju- core/constraint s-validation- merge/+ merge/215807
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/87970043/
Affected files (+757, -184 lines): constraints. go constraints_ test.go export_ test.go validation. go validation_ test.go r_test. go
A [revision details]
M constraints/
M constraints/
A constraints/
A constraints/
A constraints/
M state/addmachine.go
M state/prechecke
M state/service.go