diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-04-04 21:35:32 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-04-04 21:35:32 -0400 |
commit | 7b2fc4e014e6b7a43e6b8fc719d82c3d0b0a8bed (patch) | |
tree | 12859523160be456f76e0d0c33010bd6f0452ce8 /cloudinit/util.py | |
parent | b39abf5bbe51d62d1ef1dd1e813720eafc1ddc85 (diff) | |
download | vyos-cloud-init-7b2fc4e014e6b7a43e6b8fc719d82c3d0b0a8bed.tar.gz vyos-cloud-init-7b2fc4e014e6b7a43e6b8fc719d82c3d0b0a8bed.zip |
initial checkin of kernel commandline cloud-config url support
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 9133426c..47397418 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -840,3 +840,16 @@ def wait_for_url(urls, max_wait=None, timeout=None, time.sleep(sleeptime) return False + + +def keyval_str_to_dict(kvstring): + ret = {} + for tok in kvstring.split(): + try: + (key, val) = tok.split("=", 1) + except ValueError: + key = tok + val = True + ret[key] = val + + return(ret) |