summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-03-31 14:20:00 -0400
committerScott Moser <smoser@ubuntu.com>2015-03-31 14:20:00 -0400
commit8165000c3975db07cb5b8b29410635dd6c9345bd (patch)
tree4d445f0902a4ad8abf6666191a9ec24513ed2e66 /cloudinit
parent25e57d42bb0a3c5d1c424cb73a40b5419a4676bd (diff)
downloadvyos-cloud-init-8165000c3975db07cb5b8b29410635dd6c9345bd.tar.gz
vyos-cloud-init-8165000c3975db07cb5b8b29410635dd6c9345bd.zip
adjust cc_snappy for snappy install package with config.
It was believed that to install a package with config the command was: snappy install --config=config-file <package> Instead, what was implemented in snappy was: snappy install <package> [<config-file>] This modifies cloud-init to invoke the latter and changes the tests appropriately. LP: #1438836
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_snappy.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/cloudinit/config/cc_snappy.py b/cloudinit/config/cc_snappy.py
index 131ee7ea..6a7ae09b 100644
--- a/cloudinit/config/cc_snappy.py
+++ b/cloudinit/config/cc_snappy.py
@@ -19,7 +19,7 @@ Example config:
This defaults to 'False'. Set to a non-false value to enable ssh service
- snap installation and config
The above would install 'etcd', and then install 'pkg2.smoser' with a
- '--config=<file>' argument where 'file' as 'config-blob' inside it.
+ '<config-file>' argument where 'config-file' has 'config-blob' inside it.
If 'pkgname' is installed already, then 'snappy config pkgname <file>'
will be called where 'file' has 'pkgname-config-blob' as its content.
@@ -33,8 +33,7 @@ Example config:
<packages_dir>/foo.config
<packages_dir>/bar.snap
cloud-init will invoke:
- snappy install "--config=<packages_dir>/foo.config" \
- <packages_dir>/foo.snap
+ snappy install <packages_dir>/foo.snap <packages_dir>/foo.config
snappy install <packages_dir>/bar.snap
Note, that if provided a 'config' entry for 'ubuntu-core', then
@@ -171,13 +170,13 @@ def render_snap_op(op, name, path=None, cfgfile=None, config=None):
cmd = [SNAPPY_CMD, op]
if op == 'install':
- if cfgfile:
- cmd.append('--config=' + cfgfile)
if path:
cmd.append("--allow-unauthenticated")
cmd.append(path)
else:
cmd.append(name)
+ if cfgfile:
+ cmd.append(cfgfile)
elif op == 'config':
cmd += [name, cfgfile]