Merge lp:~gz/pyjuju/os_remove_placement_config_really into lp:pyjuju
Proposed by
Martin Packman
Status: | Merged |
---|---|
Approved by: | Kapil Thangavelu |
Approved revision: | 564 |
Merged at revision: | 574 |
Proposed branch: | lp:~gz/pyjuju/os_remove_placement_config_really |
Merge into: | lp:pyjuju |
Diff against target: |
71 lines (+45/-1) 2 files modified
juju/environment/config.py (+0/-1) juju/environment/tests/test_config.py (+45/-0) |
To merge this branch: | bzr merge lp:~gz/pyjuju/os_remove_placement_config_really |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+122301@code.launchpad.net |
Description of the change
Really remove placement from openstack environment config
Missed the most important line in the previous branch killing
'placement' as a config key in the openstack provider.
As penance have added the testing that should have existed previously.
Note that default-series and default-
in config, but could perhaps be optional now.
To post a comment you must log in.
Reviewers: mp+122301_ code.launchpad. net,
Message:
Please take a look.
Description:
Really remove placement from openstack environment config
Missed the most important line in the previous branch killing
'placement' as a config key in the openstack provider.
As penance have added the testing that should have existed previously. instance- type are still required
Note that default-series and default-
in config, but could perhaps be optional now.
https:/ /code.launchpad .net/~gz/ juju/os_ remove_ placement_ config_ really/ +merge/ 122301
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/6493069/
Affected files: t/config. py t/tests/ test_config. py
A [revision details]
M juju/environmen
M juju/environmen
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/environmen t/config. py nt/config. py' t/config. py 2012-08-29 16:41:48 +0000 t/config. py 2012-08-31 15:03:31 +0000
"auth-url" : String(),
"project- name": String(),
"use-floating- ip": Bool(),
"auth-mode" : _OPENSTACK_ AUTH_MODE,
"region" : String(),
"default- series" : String(),
=== modified file 'juju/environme
--- juju/environmen
+++ juju/environmen
@@ -67,7 +67,6 @@
- "placement": _EITHER_PLACEMENT,
Index: juju/environmen t/tests/ test_config. py nt/tests/ test_config. py' t/tests/ test_config. py 2012-04-13 18:01:18 +0000 t/tests/ test_config. py 2012-08-31 15:05:28 +0000
default- series: oneiric
=== modified file 'juju/environme
--- juju/environmen
+++ juju/environmen
@@ -59,6 +59,17 @@
"""
+SAMPLE_OPENSTACK = """ instance- type: m1-sample
+environments:
+ sample:
+ type: openstack
+ admin-secret: sekret
+ control-bucket: container
+ default-image-id: 42
+ default-
+ default-series: precise
+"""
+
class EnvironmentsCon figTestBase( TestCase) :
@@ -750,3 +761,37 @@
EnvironmentsCon figError, self.config.load, self.other_path)
self. assertIn( "expected 'local', got 'unassigned'", str(error)) requires_ default_ image_id( self): SAMPLE_ OPENSTACK) "environments" ]["sample" ]["default- image-id" ] config( yaml.dump( config) , other_path=True) figError, self.config.load, self.other_path) "default- image-id: required value not found", ignores_ placement( self): SAMPLE_ OPENSTACK) "environments" ]["sample" ]["type" ] = "openstack_s3" "environments" ]["sample" ]["placement" ] = "whatever"
error = self.assertRaises(
+
+ def test_openstack_
+ """A VM image must be supplied for openstack provider."""
+ config = yaml.load(
+ del config[
+ self.write_
+ error = self.assertRaises(
+ EnvironmentsCon
+ self.assertIn(
str(error))
+
+ def test_openstack_
+ """The placement config is not verified for openstack provider."""
+ config = yaml.load(
+ config[
+ config[
+ self.writ...