Merge lp:~chad.smith/charms/trusty/landscape-client/landscape-client-scrub-whitespace into lp:charms/trusty/landscape-client
Status: | Merged |
---|---|
Approved by: | Chad Smith |
Approved revision: | 55 |
Merged at revision: | 55 |
Proposed branch: | lp:~chad.smith/charms/trusty/landscape-client/landscape-client-scrub-whitespace |
Merge into: | lp:charms/trusty/landscape-client |
Diff against target: |
44 lines (+22/-1) 2 files modified
hooks/hooks.py (+1/-1) hooks/test_hooks.py (+21/-0) |
To merge this branch: | bzr merge lp:~chad.smith/charms/trusty/landscape-client/landscape-client-scrub-whitespace |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bogdana Vereha (community) | Approve | ||
Adam Collard | Approve | ||
Review via email: mp+290525@code.launchpad.net |
Commit message
landscape-client charm now strips leading and trailing whitespace from any provided service config settings provided by juju set X=""" Y """. Helps with include-file:// juju-deployer directives that may contain newlines.
Description of the change
landscape-client charm now strips leading and trailing whitespace from any provided service config settings provided by juju.
For dev testing:
juju switch local
juju bootstrap
# setup a landscape account with freshdata
# set account registration key to asdfasdf (example IP of local 'OPL': 192.168.2.11)
echo -e "asdfasdf\n" > /tmp/my-regkey
Use a bundle something like the following:
local-client:
series: trusty
services:
ubuntu:
charm: cs:trusty/ubuntu-1
branch: lp:~chad.smith/charms/trusty/landscape-client/landscape-client-scrub-whitespace
relations:
- [ubuntu, landscape-client]
# client should register despite the newline in the /tmp/my-regkey
# juju ssh ubuntu/0 'sudo cat /etc/landscape/
# ensure registration-key does not contain a newline, like the following:
registration_key = """asdfasdf
"""
Looks good! +1