From f69109bb2be91a7210a88bfb1b4467f80dc6ba64 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 25 Jan 2011 20:15:48 -0500 Subject: add get_public_ssh_keys and get_hostname methods to DataSourceOVF.py --- cloudinit/DataSourceOVF.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3