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
1=== modified file 'lpsetup/subcommands/initlxc.py'
2--- lpsetup/subcommands/initlxc.py 2012-07-20 16:18:59 +0000
3+++ lpsetup/subcommands/initlxc.py 2012-07-25 08:30:30 +0000
4@@ -65,7 +65,7 @@
5 apt_get_install('haveged', caller=call)
6
7
8-def create_lxc(lxc_name, lxc_arch, lxc_os, user, install_subunit=False):
9+def create_lxc(lxc_name, lxc_arch, lxc_os, user, install_subunit):
10 """Create the LXC named `lxc_name` sharing `user` home directory.
11
12 The container will be used as development environment or as base template
13@@ -212,7 +212,7 @@
14 """
15
16 create_lxc_step = (create_lxc,
17- 'lxc_name', 'lxc_arch', 'lxc_os', 'user')
18+ 'lxc_name', 'lxc_arch', 'lxc_os', 'user', 'install_subunit')
19 start_lxc_step = (start_lxc,
20 'lxc_name')
21 wait_for_lxc_step = (wait_for_lxc,
22
23=== modified file 'lpsetup/tests/subcommands/test_initlxc.py'
24--- lpsetup/tests/subcommands/test_initlxc.py 2012-07-18 10:53:15 +0000
25+++ lpsetup/tests/subcommands/test_initlxc.py 2012-07-25 08:30:30 +0000
26@@ -20,7 +20,8 @@
27
28 initialize_step = (initlxc.initialize, ['user'])
29 create_lxc_step = (
30- initlxc.create_lxc, ['lxc_name', 'lxc_arch', 'lxc_os', 'user'])
31+ initlxc.create_lxc,
32+ ['lxc_name', 'lxc_arch', 'lxc_os', 'user', 'install_subunit'])
33 start_lxc_step = (initlxc.start_lxc, ['lxc_name'])
34 wait_for_lxc_step = (initlxc.wait_for_lxc, ['lxc_name', 'ssh_key_path'])
35 install_lpsetup_in_lxc_step = (
36@@ -40,7 +41,7 @@
37 lxc_os = random.choice(settings.LXC_GUEST_CHOICES)
38 return (
39 lxc_name, '-A', lxc_arch, '-R', lxc_os,
40- '--stop-lxc') + inithost_arguments
41+ '--stop-lxc', '--install-subunit') + inithost_arguments
42
43
44 class InitLxcTest(StepsBasedSubCommandTestMixin, unittest.TestCase):

Subscribers

People subscribed via source and target branches

to all changes: