Merge lp:~nobuto/maas-deployer/kernel-opts into lp:~maas-deployers/maas-deployer/next

Proposed by Nobuto Murata
Status: Merged
Merged at revision: 23
Proposed branch: lp:~nobuto/maas-deployer/kernel-opts
Merge into: lp:~maas-deployers/maas-deployer/next
Diff against target: 28 lines (+4/-2)
2 files modified
examples/deployment.yaml (+2/-0)
maas_deployer/vmaas/maasclient/clidriver.py (+2/-2)
To merge this branch: bzr merge lp:~nobuto/maas-deployer/kernel-opts
Reviewer Review Type Date Requested Status
MAAS Deployers Pending
Review via email: mp+268569@code.launchpad.net

Description of the change

maas-deployer already has ability to set kernel_opts. However it was not properly quoted.

quote value for maas set-config to handle commands like below,
LP: #1481688

$ maas maas maas set-config \
    name=kernel_opts value='console=tty0 console=ttyS1,115200n8'

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/deployment.yaml'
2--- examples/deployment.yaml 2015-08-11 08:55:09 +0000
3+++ examples/deployment.yaml 2015-08-20 05:01:14 +0000
4@@ -33,6 +33,8 @@
5 main_archive: http://archive.ubuntu.com/ubuntu
6 upstream_dns: 192.168.122.1
7 maas_name: automaas
8+ # kernel_opts: "console=tty0 console=ttyS1,115200n8"
9+ # ntp_server: ntp.ubuntu.com
10
11 # This section is used to define the networking parameters for when
12 # the node first comes up. It is fed into the meta-data cloud-init
13
14=== modified file 'maas_deployer/vmaas/maasclient/clidriver.py'
15--- maas_deployer/vmaas/maasclient/clidriver.py 2015-08-11 08:55:09 +0000
16+++ maas_deployer/vmaas/maasclient/clidriver.py 2015-08-20 05:01:14 +0000
17@@ -51,9 +51,9 @@
18 value = kwargs[key]
19 if isinstance(value, list):
20 for v in value:
21- cmdarr.append("%s=%s" % (key, str(v)))
22+ cmdarr.append("%s='%s'" % (key, str(v)))
23 else:
24- cmdarr.append("%s=%s" % (key, str(value)))
25+ cmdarr.append("%s='%s'" % (key, str(value)))
26 stdout = execc(cmdarr)[0]
27
28 display_stdout = stdout

Subscribers

People subscribed via source and target branches

to all changes: