add get_public_ssh_keys and get_hostname methods to DataSourceOVF.py

This commit is contained in:
Scott Moser
2011-01-25 20:15:48 -05:00
parent 72b3285ad1
commit c826d27388

View File

@@ -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