Merge lp:~fwereade/pyjuju/no-private-cloud-constraints into lp:~fwereade/pyjuju/constraints-compatibility
Proposed by
William Reade
Status: | Merged |
---|---|
Merged at revision: | 523 |
Proposed branch: | lp:~fwereade/pyjuju/no-private-cloud-constraints |
Merge into: | lp:~fwereade/pyjuju/constraints-compatibility |
Diff against target: |
176 lines (+64/-14) 7 files modified
juju/providers/ec2/__init__.py (+1/-2) juju/providers/ec2/launch.py (+1/-1) juju/providers/ec2/tests/common.py (+7/-6) juju/providers/ec2/tests/test_launch.py (+29/-0) juju/providers/ec2/tests/test_provider.py (+1/-3) juju/providers/ec2/tests/test_utils.py (+22/-1) juju/providers/ec2/utils.py (+3/-1) |
To merge this branch: | bzr merge lp:~fwereade/pyjuju/no-private-cloud-constraints |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Reade | Pending | ||
Review via email: mp+101592@code.launchpad.net |
Description of the change
Disable constraints on private clouds
Private clouds (defined as those with an ec2-uri config setting) now expose
no constraints at all; everything in the ec2 provider that uses constraints
now knows not to assume that any keys are present other than provider-type
and ubuntu-series.
To post a comment you must log in.
Reviewers: mp+101592_ code.launchpad. net,
Message:
Please take a look.
Description:
Disable constraints on private clouds
Private clouds (defined as those with an ec2-uri config setting) now
expose
no constraints at all; everything in the ec2 provider that uses
constraints
now knows not to assume that any keys are present other than
provider-type
and ubuntu-series.
https:/ /code.launchpad .net/~fwereade/ juju/no- private- cloud-constrain ts/+merge/ 101592
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/6003046/
Affected files: ec2/__init_ _.py ec2/launch. py ec2/tests/ common. py ec2/tests/ test_launch. py ec2/tests/ test_provider. py ec2/tests/ test_utils. py ec2/utils. py
A [revision details]
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
M juju/providers/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: juju/providers/ ec2/__init_ _.py /ec2/__ init__. py' ec2/__init_ _.py 2012-04-11 00:09:41 +0000 ec2/__init_ _.py 2012-04-11 15:47:12 +0000 set(self) : ovider, self).get_ constraint_ set()
cs.register_ generics( INSTANCE_ TYPES.keys( ))
cs.register( "ec2-zone" , converter= convert_ zone)
=== modified file 'juju/providers
--- juju/providers/
+++ juju/providers/
@@ -74,8 +74,7 @@
def get_constraint_
"""Return the set of constraints that are valid for this
provider."""
cs = yield super(MachinePr
- if 1: # These keys still need to be valid (instance-type and
ec2-zone)
- #if self.using_amazon:
+ if self.using_amazon:
# Expose EC2 instance types/zones on AWS itelf, not private
clouds.
Index: juju/providers/ ec2/launch. py /ec2/launch. py' ec2/launch. py 2012-03-27 22:46:44 +0000 ec2/launch. py 2012-04-11 15:47:12 +0000
"$(curl http:// 169.254. 169.254/ 1.0/meta- data/instance- id)")
=== modified file 'juju/providers
--- juju/providers/
+++ juju/providers/
@@ -34,7 +34,7 @@
user_data = cloud_init.render()
- availability_zone = self._constrain ts["ec2- zone"] ts.get( "ec2-zone" )
region = self._provider. config. get("region" , DEFAULT_REGION)
availability_ zone = region + availability_zone
+ availability_zone = self._constrain
if availability_zone is not None:
Index: juju/providers/ ec2/tests/ common. py /ec2/tests/ common. py' ec2/tests/ common. py 2012-04-11 00:09:41 +0000 ec2/tests/ common. py 2012-04-11 15:47:12 +0000
get_ public_ key(MATCH( match_config) )
self. mocker. result( "zebra" )
=== modified file 'juju/providers
--- juju/providers/
+++ juju/providers/
@@ -101,12 +101,13 @@
- get_ami_args = get_ami_args or ( replace( .ec2.utils. get_current_ ami") *get_ami_ args)
- "splendid", "amd64", "us-east-1", False, False)
- get_ami = self.mocker.
- "juju.providers
- get_ami(
- self.mocker.r...