summaryrefslogtreecommitdiff
path: root/cloudinit/DataSourceMAAS.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-03-16 13:14:27 -0400
committerScott Moser <smoser@ubuntu.com>2012-03-16 13:14:27 -0400
commit6d8f796239ed635f2e4de97d167e54f74baba2a2 (patch)
tree00acd09c56db1e622c1d2f94ce13fc80297a662a /cloudinit/DataSourceMAAS.py
parent3522b7b49368f486f61c220151212f68e9cc9782 (diff)
downloadvyos-cloud-init-6d8f796239ed635f2e4de97d167e54f74baba2a2.tar.gz
vyos-cloud-init-6d8f796239ed635f2e4de97d167e54f74baba2a2.zip
add supprot for reading public-keys from DataSourcMAAS
Diffstat (limited to 'cloudinit/DataSourceMAAS.py')
-rw-r--r--cloudinit/DataSourceMAAS.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/cloudinit/DataSourceMAAS.py b/cloudinit/DataSourceMAAS.py
index 80d3fd6e..61a0038f 100644
--- a/cloudinit/DataSourceMAAS.py
+++ b/cloudinit/DataSourceMAAS.py
@@ -139,7 +139,7 @@ def read_maas_seed_dir(seed_d):
* local-hostname
* user-data
"""
- files = ('local-hostname', 'instance-id', 'user-data')
+ files = ('local-hostname', 'instance-id', 'user-data', 'public-keys')
md = {}
if not os.path.isdir(seed_d):
@@ -165,11 +165,14 @@ def read_maas_seed_url(seed_url, header_cb=None, timeout=None,
be given to urllib2.Request()
Expected format of seed_url is are the following files:
- * <seed_url>/<version>/instance-id
- * <seed_url>/<version>/local-hostname
+ * <seed_url>/<version>/meta-data/instance-id
+ * <seed_url>/<version>/meta-data/local-hostname
* <seed_url>/<version>/user-data
"""
- files = ('meta-data/local-hostname', 'meta-data/instance-id', 'user-data')
+ files = ('meta-data/local-hostname',
+ 'meta-data/instance-id',
+ 'meta-data/public-keys',
+ 'user-data')
base_url = "%s/%s" % (seed_url, version)
md = {}