* bootstrap now accepts --constraints;
* set-constraints now works without --service;
* get-constraints now accepts empty args and outputs env constraints.
In developer terms:
* EnvironmentStateManager has new methods for get/set constraints;
* A new /constraints node is used to store environment constraints (if
you
can think of a better way to do this, bearing in mind that we can't
create
/environment until we've got data for the PA in there, please tell
me);
* MachineProvider.bootstrap now requires a Constraints;
* CloudInit now needs a Constraints when setting up a master;
* juju-admin initialize now accept --constraints-data;
* get-constraints and set-constraints take an apparent long way round to
construct their constraints (they sync environents.yaml so that a
provider
can be created from it by EnvironmentStateManager -- but ESM is used
internally in a number of places, and the fact that we have a provider
already available at the juju.control level is not so helpful);
* an awful lot of the diff is tedious test fixing in juju.providers.
Affected files:
A [revision details]
M juju/agents/tests/test_provision.py
M juju/control/bootstrap.py
M juju/control/constraints_get.py
M juju/control/constraints_set.py
M juju/control/deploy.py
M juju/control/initialize.py
M juju/control/tests/test_add_unit.py
M juju/control/tests/test_bootstrap.py
M juju/control/tests/test_constraints_get.py
M juju/control/tests/test_constraints_set.py
M juju/control/tests/test_deploy.py
M juju/control/tests/test_initialize.py
M juju/control/utils.py
M juju/environment/tests/test_config.py
M juju/providers/common/base.py
M juju/providers/common/bootstrap.py
M juju/providers/common/cloudinit.py
M juju/providers/common/launch.py
M juju/providers/common/tests/data/cloud_init_bootstrap
M juju/providers/common/tests/data/cloud_init_bootstrap_zookeepers
M juju/providers/common/tests/data/cloud_init_distro
M juju/providers/common/tests/data/cloud_init_ppa
M juju/providers/common/tests/test_bootstrap.py
M juju/providers/common/tests/test_cloudinit.py
M juju/providers/dummy.py
M juju/providers/ec2/tests/common.py
M juju/providers/ec2/tests/data/bootstrap_cloud_init
M juju/providers/ec2/tests/test_bootstrap.py
M juju/providers/local/__init__.py
M juju/providers/local/tests/test_provider.py
M juju/providers/orchestra/tests/data/bootstrap_user_data
M juju/providers/orchestra/tests/test_bootstrap.py
M juju/providers/tests/test_dummy.py
M juju/state/environment.py
M juju/state/initialize.py
M juju/state/machine.py
M juju/state/service.py
M juju/state/tests/test_environment.py
M juju/state/tests/test_initialize.py
M juju/state/tests/test_service.py
Reviewers: mp+99852_ code.launchpad. net,
Message:
Please take a look.
Description:
Implement environment constraints
In user-visible terms:
* bootstrap now accepts --constraints;
* set-constraints now works without --service;
* get-constraints now accepts empty args and outputs env constraints.
In developer terms:
* EnvironmentStat eManager has new methods for get/set constraints; .bootstrap now requires a Constraints; eManager -- but ESM is used
* A new /constraints node is used to store environment constraints (if
you
can think of a better way to do this, bearing in mind that we can't
create
/environment until we've got data for the PA in there, please tell
me);
* MachineProvider
* CloudInit now needs a Constraints when setting up a master;
* juju-admin initialize now accept --constraints-data;
* get-constraints and set-constraints take an apparent long way round to
construct their constraints (they sync environents.yaml so that a
provider
can be created from it by EnvironmentStat
internally in a number of places, and the fact that we have a provider
already available at the juju.control level is not so helpful);
* an awful lot of the diff is tedious test fixing in juju.providers.
https:/ /code.launchpad .net/~fwereade/ juju/env- constraints/ +merge/ 99852
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/5957043/
Affected files: tests/test_ provision. py bootstrap. py constraints_ get.py constraints_ set.py deploy. py initialize. py tests/test_ add_unit. py tests/test_ bootstrap. py tests/test_ constraints_ get.py tests/test_ constraints_ set.py tests/test_ deploy. py tests/test_ initialize. py utils.py t/tests/ test_config. py common/ base.py common/ bootstrap. py common/ cloudinit. py common/ launch. py common/ tests/data/ cloud_init_ bootstrap common/ tests/data/ cloud_init_ bootstrap_ zookeepers common/ tests/data/ cloud_init_ distro common/ tests/data/ cloud_init_ ppa common/ tests/test_ bootstrap. py common/ tests/test_ cloudinit. py dummy.py ec2/tests/ common. py ec2/tests/ data/bootstrap_ cloud_init ec2/tests/ test_bootstrap. py local/_ _init__ .py local/tests/ test_provider. py orchestra/ tests/data/ bootstrap_ user_data orchestra/ tests/test_ bootstrap. py tests/test_ dummy.py environment. py initialize. py machine. py service. py tests/test_ environment. py tests/test_ initialize. py tests/test_ service. py
A [revision details]
M juju/agents/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/control/
M juju/environmen
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/state/
M juju/state/
M juju/state/
M juju/state/
M juju/state/
M juju/state/
M juju/state/