lp:~fwereade/pyjuju/private-cloud-fixes
- Get this branch:
- bzr branch lp:~fwereade/pyjuju/private-cloud-fixes
Branch merges
- William Reade: Pending requested
-
Diff: 202 lines (+37/-43)6 files modifiedjuju/control/legacy.py (+10/-25)
juju/control/tests/test_add_unit.py (+3/-6)
juju/control/tests/test_deploy.py (+2/-6)
juju/providers/ec2/__init__.py (+9/-4)
juju/providers/ec2/tests/test_provider.py (+12/-1)
juju/providers/ec2/utils.py (+1/-1)
Branch information
Recent revisions
- 511. By William Reade
-
don't expose constraints on non-aws ec2 clouds; don't warn about legacy keys when they're still valid
- 510. By William Reade
-
Implement maas-name constraint
Descended from lp:~julian-edwards/juju/name-constraints; but uses new-style
constraints registration.Also uses a custom ubuntu-series constraint to forbid use of charms written
for systems we can't yet provision with MAAS.R=allenap, hazmat
CC=
https://codereview. appspot. com/5938050 - 509. By William Reade
-
Add get-constraints command
Takes any number of machine names, service names, and unit names; outputs
yaml-formatted dict of name:constraints (showing the full computed
constraints dict for each entity).R=hazmat
CC=
https://codereview. appspot. com/5935047 - 508. By William Reade
-
Providers are now directly responsible for their own constraints
This is really just a rearrangement of code; nothing fundamental has
actually changed, except that Constraints.from_strs is entirely gone; and
trying to construct Constraints(None, data) will no longer produce a viable
specimen.R=hazmat
CC=
https://codereview. appspot. com/5939046 - 507. By William Reade
-
Remove most remaining direct uses of Constraints
The contents of constraint_test will soon scatter amongst the providers;
leaving them in as verification for now.R=hazmat
CC=
https://codereview. appspot. com/5933050 - 506. By William Reade
-
All Constraints construction in "real" code now goes via a provider
Specifically, the base provider's get_constraint_set method calls through
to the existing get_constraint_set function in constraints (so, specific
providers don't yet create the ConstraintSets themselves); but the state
methods and command line tools which need to use constraints now use only
constraints as mediated by the provider.Constraint.
from_strs, and .__init__(None, data), continue to work, due to
the sheer weight of tests using them (and the fact that the diff is big
enough already); expect a followup tidying this up.The vast majority of this diff is, however, quite easy to process: because
we need a provider to construct a Constraints, and we need a Constraints to
construct a service, a very large number of tests came to require an
/environment node; I think that now all the random ad-hoc config hackery is
gone, and most test cases need no more than a self.push_default_ config( ),
which itself replaces a large amount of very repetitive code scattered
across the tests.R=hazmat
CC=
https://codereview. appspot. com/5936048 - 505. By William Reade
-
Split ConstraintSet out of Constraints
This paves the way for independent constraint sets via .get_constraint_set
methods on individual MachineProviders, which ConstraintSets are themselves
responsible for parsing and loading actual Constraints objects (which
otherwise function as before).To make the change as clear as possible, Constraints.
from_strs and .__init__
have been retained with minimal changes; followup branches, without which
this branch should NOT be merged, are coming soon; they will (1) retire
those methods (which will involve irritating changes across the tests, in
which we are forced to make actual providers available) and (2) finally
implement get_machine_constraints methods on the various providers; if I can
figure out smaller steps I will ofc take them.I also changed the constraints we have available:
Because we don't want constraints that Just Don't Work, only ec2 exposes the
arch/cpu/mem constraints (final orchestra and maas constraints remain
questionable, but those 3 are simply not possible).Because constraints was being rearranged anyway, ec2-instance-type is now
instance-type and is integrated with the arch/cpu/mem constraints.R=hazmat
CC=
https://codereview. appspot. com/5919049
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:pyjuju