Merge lp:~frankban/lpsetup/juju-fixes into lp:lpsetup

Proposed by Francesco Banconi
Status: Merged
Approved by: Francesco Banconi
Approved revision: 61
Merged at revision: 61
Proposed branch: lp:~frankban/lpsetup/juju-fixes
Merge into: lp:lpsetup
Diff against target: 44 lines (+5/-4)
2 files modified
lpsetup/subcommands/initlxc.py (+2/-2)
lpsetup/tests/subcommands/test_initlxc.py (+3/-2)
To merge this branch: bzr merge lp:~frankban/lpsetup/juju-fixes
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+116597@code.launchpad.net

Commit message

Fixed --install-subunit.

Description of the change

== Changes ==

Fixed initlxc command to actually pass `install_subunit` to the *create_lxc* step.
This way --install-subunit is honored when executing the command.

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Thanks Francesco

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lpsetup/subcommands/initlxc.py'
--- lpsetup/subcommands/initlxc.py 2012-07-20 16:18:59 +0000
+++ lpsetup/subcommands/initlxc.py 2012-07-25 08:30:30 +0000
@@ -65,7 +65,7 @@
65 apt_get_install('haveged', caller=call)65 apt_get_install('haveged', caller=call)
6666
6767
68def create_lxc(lxc_name, lxc_arch, lxc_os, user, install_subunit=False):68def create_lxc(lxc_name, lxc_arch, lxc_os, user, install_subunit):
69 """Create the LXC named `lxc_name` sharing `user` home directory.69 """Create the LXC named `lxc_name` sharing `user` home directory.
7070
71 The container will be used as development environment or as base template71 The container will be used as development environment or as base template
@@ -212,7 +212,7 @@
212 """212 """
213213
214 create_lxc_step = (create_lxc,214 create_lxc_step = (create_lxc,
215 'lxc_name', 'lxc_arch', 'lxc_os', 'user')215 'lxc_name', 'lxc_arch', 'lxc_os', 'user', 'install_subunit')
216 start_lxc_step = (start_lxc,216 start_lxc_step = (start_lxc,
217 'lxc_name')217 'lxc_name')
218 wait_for_lxc_step = (wait_for_lxc,218 wait_for_lxc_step = (wait_for_lxc,
219219
=== modified file 'lpsetup/tests/subcommands/test_initlxc.py'
--- lpsetup/tests/subcommands/test_initlxc.py 2012-07-18 10:53:15 +0000
+++ lpsetup/tests/subcommands/test_initlxc.py 2012-07-25 08:30:30 +0000
@@ -20,7 +20,8 @@
2020
21initialize_step = (initlxc.initialize, ['user'])21initialize_step = (initlxc.initialize, ['user'])
22create_lxc_step = (22create_lxc_step = (
23 initlxc.create_lxc, ['lxc_name', 'lxc_arch', 'lxc_os', 'user'])23 initlxc.create_lxc,
24 ['lxc_name', 'lxc_arch', 'lxc_os', 'user', 'install_subunit'])
24start_lxc_step = (initlxc.start_lxc, ['lxc_name'])25start_lxc_step = (initlxc.start_lxc, ['lxc_name'])
25wait_for_lxc_step = (initlxc.wait_for_lxc, ['lxc_name', 'ssh_key_path'])26wait_for_lxc_step = (initlxc.wait_for_lxc, ['lxc_name', 'ssh_key_path'])
26install_lpsetup_in_lxc_step = (27install_lpsetup_in_lxc_step = (
@@ -40,7 +41,7 @@
40 lxc_os = random.choice(settings.LXC_GUEST_CHOICES)41 lxc_os = random.choice(settings.LXC_GUEST_CHOICES)
41 return (42 return (
42 lxc_name, '-A', lxc_arch, '-R', lxc_os,43 lxc_name, '-A', lxc_arch, '-R', lxc_os,
43 '--stop-lxc') + inithost_arguments44 '--stop-lxc', '--install-subunit') + inithost_arguments
4445
4546
46class InitLxcTest(StepsBasedSubCommandTestMixin, unittest.TestCase):47class InitLxcTest(StepsBasedSubCommandTestMixin, unittest.TestCase):

Subscribers

People subscribed via source and target branches

to all changes: