diff options
author | Joshua Powers <josh.powers@canonical.com> | 2017-09-11 10:29:19 -0700 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-09-13 21:16:43 -0400 |
commit | 1ac4bc2a4758d330bb94cd1b2391121cf461ff6a (patch) | |
tree | 40f2e93a89a7d3b830fecf5b1d6c2208ffaf25d5 /cloudinit | |
parent | ed8f1b159174715403cb1ffa200ff6d080770152 (diff) | |
download | vyos-cloud-init-1ac4bc2a4758d330bb94cd1b2391121cf461ff6a.tar.gz vyos-cloud-init-1ac4bc2a4758d330bb94cd1b2391121cf461ff6a.zip |
tests: execute: support command as string
If a string is passed to execute, then invoke 'bash', '-c',
'string'. That allows the less verbose execution of simple
commands:
image.execute("ls /run")
compared to the more explicit but longer winded:
image.execute(["ls", "/run"])
If 'env' was ever modified in execute or a method that it called,
then the next invocation's default value would be changed. Instead
use None and then set to a new empty dict in the method.
Diffstat (limited to 'cloudinit')
0 files changed, 0 insertions, 0 deletions