diff options
author | Chad Smith <chad.smith@canonical.com> | 2018-03-20 16:37:36 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2018-03-20 16:37:36 -0600 |
commit | 685f9901b820a457912959bdd4f389835e965524 (patch) | |
tree | cde3672a93f9660515099e453e956746c4182719 /cloudinit/sources/DataSourceOpenNebula.py | |
parent | 7deec7b6a1fce87dc2d9cd886053804bbc70380e (diff) | |
download | vyos-cloud-init-685f9901b820a457912959bdd4f389835e965524.tar.gz vyos-cloud-init-685f9901b820a457912959bdd4f389835e965524.zip |
datasources: fix DataSource subclass get_hostname method signature
DataSource.get_hostname call signature changed to allow for metadata_only
parameter. The metadata_only=True parameter is passed to get_hostname
during init-local stage in order to set the system hostname if present in
metadata prior to initial network bring up.
Fix subclasses of DataSource which have overridden get_hostname to allow
for metadata_only param.
LP: #1757176
Diffstat (limited to 'cloudinit/sources/DataSourceOpenNebula.py')
-rw-r--r-- | cloudinit/sources/DataSourceOpenNebula.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py index 02cb98f7..d4a41116 100644 --- a/cloudinit/sources/DataSourceOpenNebula.py +++ b/cloudinit/sources/DataSourceOpenNebula.py @@ -102,7 +102,7 @@ class DataSourceOpenNebula(sources.DataSource): else: return None - def get_hostname(self, fqdn=False, resolve_ip=None): + def get_hostname(self, fqdn=False, resolve_ip=False, metadata_only=False): if resolve_ip is None: if self.dsmode == sources.DSMODE_NETWORK: resolve_ip = True |