Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Issue 5957043: Implement environment constraints

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by fwereade
Modified:
12 years, 1 month ago
Reviewers:
mp+99852
Visibility:
Public.

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: * 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. https://code.launchpad.net/~fwereade/juju/env-constraints/+merge/99852 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : Implement environment constraints #

Total comments: 8

Patch Set 3 : Implement environment constraints #

Unified diffs Side-by-side diffs Delta from patch set Stats (+486 lines, -306 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M juju/agents/tests/test_provision.py View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M juju/control/bootstrap.py View 3 chunks +11 lines, -2 lines 0 comments Download
M juju/control/constraints_get.py View 1 2 4 chunks +27 lines, -14 lines 0 comments Download
M juju/control/constraints_set.py View 4 chunks +12 lines, -9 lines 0 comments Download
M juju/control/deploy.py View 3 chunks +2 lines, -8 lines 0 comments Download
M juju/control/initialize.py View 3 chunks +7 lines, -1 line 0 comments Download
M juju/control/tests/test_add_unit.py View 1 chunk +1 line, -5 lines 0 comments Download
M juju/control/tests/test_bootstrap.py View 1 2 1 chunk +11 lines, -14 lines 0 comments Download
M juju/control/tests/test_constraints_get.py View 1 2 5 chunks +43 lines, -1 line 0 comments Download
M juju/control/tests/test_constraints_set.py View 3 chunks +12 lines, -9 lines 0 comments Download
M juju/control/tests/test_deploy.py View 1 chunk +2 lines, -6 lines 0 comments Download
M juju/control/tests/test_initialize.py View 1 2 2 chunks +26 lines, -3 lines 0 comments Download
M juju/control/utils.py View 1 chunk +6 lines, -0 lines 0 comments Download
M juju/environment/tests/test_config.py View 1 chunk +14 lines, -5 lines 0 comments Download
M juju/providers/common/base.py View 1 chunk +2 lines, -2 lines 0 comments Download
M juju/providers/common/bootstrap.py View 2 chunks +3 lines, -7 lines 0 comments Download
M juju/providers/common/cloudinit.py View 6 chunks +15 lines, -2 lines 0 comments Download
M juju/providers/common/launch.py View 1 chunk +1 line, -0 lines 0 comments Download
M juju/providers/common/tests/data/cloud_init_bootstrap View 1 chunk +2 lines, -2 lines 0 comments Download
M juju/providers/common/tests/data/cloud_init_bootstrap_zookeepers View 1 chunk +2 lines, -2 lines 0 comments Download
M juju/providers/common/tests/data/cloud_init_distro View 1 chunk +4 lines, -3 lines 0 comments Download
M juju/providers/common/tests/data/cloud_init_ppa View 1 chunk +4 lines, -3 lines 0 comments Download
M juju/providers/common/tests/test_bootstrap.py View 5 chunks +12 lines, -5 lines 0 comments Download
M juju/providers/common/tests/test_cloudinit.py View 3 chunks +4 lines, -1 line 0 comments Download
M juju/providers/dummy.py View 1 chunk +1 line, -1 line 0 comments Download
M juju/providers/ec2/tests/common.py View 1 chunk +2 lines, -2 lines 0 comments Download
M juju/providers/ec2/tests/data/bootstrap_cloud_init View 1 chunk +4 lines, -4 lines 0 comments Download
M juju/providers/ec2/tests/test_bootstrap.py View 7 chunks +28 lines, -33 lines 0 comments Download
M juju/providers/local/__init__.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/providers/local/tests/test_provider.py View 5 chunks +7 lines, -4 lines 0 comments Download
M juju/providers/orchestra/tests/data/bootstrap_user_data View 1 chunk +3 lines, -2 lines 0 comments Download
M juju/providers/orchestra/tests/test_bootstrap.py View 5 chunks +23 lines, -14 lines 0 comments Download
M juju/providers/tests/test_dummy.py View 3 chunks +3 lines, -3 lines 0 comments Download
M juju/state/environment.py View 1 2 3 chunks +41 lines, -25 lines 0 comments Download
M juju/state/initialize.py View 2 chunks +19 lines, -25 lines 0 comments Download
M juju/state/machine.py View 1 1 chunk +5 lines, -5 lines 0 comments Download
M juju/state/service.py View 1 4 chunks +39 lines, -18 lines 0 comments Download
M juju/state/tests/test_environment.py View 2 chunks +37 lines, -48 lines 0 comments Download
M juju/state/tests/test_initialize.py View 4 chunks +29 lines, -14 lines 0 comments Download
M juju/state/tests/test_service.py View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 6
fwereade
Please take a look.
12 years, 1 month ago (2012-03-29 02:30:31 UTC) #1
fwereade
Please take a look.
12 years, 1 month ago (2012-03-29 15:43:28 UTC) #2
hazmat
LGTM, some minors on docs. https://codereview.appspot.com/5957043/diff/1/juju/control/constraints_get.py File juju/control/constraints_get.py (right): https://codereview.appspot.com/5957043/diff/1/juju/control/constraints_get.py#newcode51 juju/control/constraints_get.py:51: yield esm.set_config_state(env_config, environment.name) so ...
12 years, 1 month ago (2012-03-29 19:52:52 UTC) #3
fwereade
https://codereview.appspot.com/5957043/diff/3001/juju/agents/tests/test_provision.py File juju/agents/tests/test_provision.py (right): https://codereview.appspot.com/5957043/diff/3001/juju/agents/tests/test_provision.py#newcode56 juju/agents/tests/test_provision.py:56: reactor.callLater(0.3, self.push_default_config, False) On 2012/03/29 19:52:53, hazmat wrote: > ...
12 years, 1 month ago (2012-03-30 08:15:38 UTC) #4
fwereade
Sorry, didn't see the comments on patch set 1. https://codereview.appspot.com/5957043/diff/1/juju/control/constraints_get.py File juju/control/constraints_get.py (right): https://codereview.appspot.com/5957043/diff/1/juju/control/constraints_get.py#newcode51 juju/control/constraints_get.py:51: ...
12 years, 1 month ago (2012-03-30 08:57:22 UTC) #5
fwereade
12 years, 1 month ago (2012-03-30 09:13:44 UTC) #6
*** Submitted:

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:

* 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.

R=hazmat
CC=
https://codereview.appspot.com/5957043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b