diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-03-06 17:10:52 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-03-06 17:10:52 -0500 |
commit | 27ad683638a30e202a0def71485fade430976856 (patch) | |
tree | 514ea8a309a0a8e09c9bf1e837f6a851eb284f40 /cloudinit/DataSourceMaaS.py | |
parent | 0e2e852bb448553479e68e91896419f3e06a6a19 (diff) | |
download | vyos-cloud-init-27ad683638a30e202a0def71485fade430976856.tar.gz vyos-cloud-init-27ad683638a30e202a0def71485fade430976856.zip |
file for user-data should be 'user-data' (including the '-')
Diffstat (limited to 'cloudinit/DataSourceMaaS.py')
-rw-r--r-- | cloudinit/DataSourceMaaS.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cloudinit/DataSourceMaaS.py b/cloudinit/DataSourceMaaS.py index c25652b1..88686b13 100644 --- a/cloudinit/DataSourceMaaS.py +++ b/cloudinit/DataSourceMaaS.py @@ -137,7 +137,7 @@ def read_maas_seed_dir(seed_d): * hostname * user-data """ - files = ('hostname', 'instance-id', 'userdata') + files = ('hostname', 'instance-id', 'user-data') md = {} if not os.path.isdir(seed_d): @@ -166,7 +166,7 @@ def read_maas_seed_url(seed_url, header_cb=None, timeout=None): * <seed_url>/hostname * <seed_url>/user-data """ - files = ('hostname', 'instance-id', 'userdata') + files = ('hostname', 'instance-id', 'user-data') md = {} for fname in files: @@ -190,23 +190,23 @@ def check_seed_contents(content, seed): Either return a (userdata, metadata) tuple or Raise MaasSeedDirMalformed or MaasSeedDirNone """ - md_required = ('userdata', 'instance-id', 'hostname') + md_required = ('user-data', 'instance-id', 'hostname') found = content.keys() if len(content) == 0: raise MaasSeedDirNone("%s: no data files found" % seed) - if 'userdata' not in content: - raise MaasSeedDirMalformed("%s: missing userdata" % seed) + if 'user-data' not in content: + raise MaasSeedDirMalformed("%s: missing user-data" % seed) missing = [k for k in md_required if k not in found] if len(missing): raise MaasSeedDirMalformed("%s: missing files %s" % (seed, missing)) - userdata = content['userdata'] + userdata = content['user-data'] md = { } for (key, val) in content.iteritems(): - if key == 'userdata': + if key == 'user-data': continue md[key] = val |