diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-07-09 14:13:24 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-07-09 14:13:24 -0400 |
commit | d1d96451a420672a01d9097cc0b14ee13e8a9256 (patch) | |
tree | 5eb6af4a12b602911070f02c13684c39370bb272 | |
parent | 00319aaf5777883cff311778744e4cd72d42a496 (diff) | |
download | vyos-cloud-init-d1d96451a420672a01d9097cc0b14ee13e8a9256.tar.gz vyos-cloud-init-d1d96451a420672a01d9097cc0b14ee13e8a9256.zip |
add stub for ssh keys
The idea is that in the future, the DataSources get_data could
check to see if there were ssh keys provided. if there were, it could
poll and wait (or inotify) until the <fp>.crt files appeared in the
/var/lib/walinux directory. Once they did, it'd populate the metadata's
public keys.
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index 6a04b333..143b7e4a 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -114,6 +114,18 @@ def find_child(node, filter_func): return ret +def load_azure_ovf_pubkeys(sshnode): + # in the future this would return a list of dicts like: + # [{'fp': '6BE7A7C3C8A8F4B123CCA5D0C2F1BE4CA7B63ED7', + # 'path': 'where/to/go'}] + # + # <SSH><PublicKeys> + # <PublicKey><Fingerprint>ABC</FingerPrint><Path>/ABC</Path> + # ... + # </PublicKeys></SSH> + return [] + + def read_azure_ovf(contents): try: dom = minidom.parseString(contents) @@ -169,6 +181,8 @@ def read_azure_ovf(contents): md['local-hostname'] = value elif name == "dscfg": cfg['datasource'] = {DS_NAME: util.load_yaml(value, default={})} + elif name == "ssh": + cfg['_pubkeys'] = loadAzurePubkeys(child) elif simple: if name in md_props: md[name] = value |