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

Issue 77820044: Add EnvironCapability to state.Policy

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

Description

Add EnvironCapability to state.Policy environs.EnvironCapability is moved to the state package, extended with the SupportsUnitPlacement method, and added to the state.Policy interface. Methods for creating machines and assigning units to them are now modified to use the SupportsUnitPlacement method to enable policy implementations to block adding of empty machines (juju add-machine) and to block unit placement (deploy/add-unit --to). Also, a new EnvironBase type is added to provider/common, which implements some default behaviour common to all providers such as the new SupportsUnitPlacement method. A followup will override the default behaviour of SupportsUnitPlacement in the Azure provider, blocking placement if in availability-sets-enabled mode. https://code.launchpad.net/~axwalk/juju-core/state-environcapability/+merge/211749 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Add EnvironCapability to state.Policy #

Total comments: 2

Patch Set 3 : Add EnvironCapability to state.Policy #

Patch Set 4 : Add EnvironCapability to state.Policy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -33 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M agent/bootstrap_test.go View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M environs/interface.go View 1 2 3 3 chunks +2 lines, -16 lines 0 comments Download
M environs/statepolicy.go View 1 2 3 2 chunks +8 lines, -10 lines 0 comments Download
M provider/azure/environ.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A provider/common/policies.go View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
M provider/dummy/environs.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M provider/ec2/ec2.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M provider/joyent/environ.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M provider/local/environ.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M provider/maas/environ.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M provider/manual/environ.go View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M provider/openstack/provider.go View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M state/addmachine.go View 1 2 3 3 chunks +15 lines, -0 lines 0 comments Download
M state/conn_test.go View 1 2 3 2 chunks +10 lines, -2 lines 0 comments Download
A state/environcapability_test.go View 1 2 3 1 chunk +116 lines, -0 lines 0 comments Download
M state/policy.go View 1 2 3 4 chunks +49 lines, -3 lines 0 comments Download
M state/unit.go View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 9
axw
Please take a look.
10 years, 1 month ago (2014-03-19 14:52:09 UTC) #1
fwereade
LGTM. Don't quite love the "Base" name but I guess its semantic payload is close ...
10 years, 1 month ago (2014-03-19 15:15:17 UTC) #2
hduran
On 2014/03/19 15:15:17, fwereade wrote: > LGTM. Don't quite love the "Base" name but I ...
10 years, 1 month ago (2014-03-19 18:37:43 UTC) #3
axw
On 2014/03/19 18:37:43, hduran wrote: > On 2014/03/19 15:15:17, fwereade wrote: > > LGTM. Don't ...
10 years, 1 month ago (2014-03-20 03:32:47 UTC) #4
axw
Please take a look.
10 years, 1 month ago (2014-03-20 03:36:02 UTC) #5
fwereade
LGTM modulo further naming quibbles which I will leave to your judgment. https://codereview.appspot.com/77820044/diff/20001/provider/azure/environ.go File provider/azure/environ.go ...
10 years, 1 month ago (2014-03-24 09:45:56 UTC) #6
axw
Please take a look. https://codereview.appspot.com/77820044/diff/20001/provider/azure/environ.go File provider/azure/environ.go (right): https://codereview.appspot.com/77820044/diff/20001/provider/azure/environ.go#newcode55 provider/azure/environ.go:55: common.DoesSupportUnitPlacement On 2014/03/24 09:45:57, fwereade ...
10 years, 1 month ago (2014-03-24 14:46:38 UTC) #7
fwereade
On 2014/03/24 14:46:38, axw wrote: > Please take a look. > > https://codereview.appspot.com/77820044/diff/20001/provider/azure/environ.go > File ...
10 years, 1 month ago (2014-03-27 12:29:50 UTC) #8
axw
10 years ago (2014-04-03 03:42:37 UTC) #9
Please take a look.
Sign in to reply to this message.

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