diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-01-25 20:15:48 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-01-25 20:15:48 -0500 |
commit | f69109bb2be91a7210a88bfb1b4467f80dc6ba64 (patch) | |
tree | e167f400d85e176497f28cfa2d5704737aaf3c87 /cloudinit | |
parent | 03cfadb84c60e1e43ac332aaf637437271283cca (diff) | |
download | vyos-cloud-init-f69109bb2be91a7210a88bfb1b4467f80dc6ba64.tar.gz vyos-cloud-init-f69109bb2be91a7210a88bfb1b4467f80dc6ba64.zip |
add get_public_ssh_keys and get_hostname methods to DataSourceOVF.py
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/DataSourceOVF.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cloudinit/DataSourceOVF.py b/cloudinit/DataSourceOVF.py index 0918b772..98a2f79d 100644 --- a/cloudinit/DataSourceOVF.py +++ b/cloudinit/DataSourceOVF.py @@ -105,6 +105,13 @@ class DataSourceOVF(DataSource.DataSource): self.cfg = cfg return True + def get_public_ssh_keys(self): + if not 'public-keys' in self.metadata: return([]) + return([self.metadata['public-keys'],]) + + def get_hostname(self): + return(self.metadata['local-hostname']) + # the data sources' config_obj is a cloud-config formated # object that came to it from ways other than cloud-config # because cloud-config content would be handled elsewhere |