summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceAliYun.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2018-03-20 16:37:36 -0600
committerChad Smith <chad.smith@canonical.com>2018-03-20 16:37:36 -0600
commit685f9901b820a457912959bdd4f389835e965524 (patch)
treecde3672a93f9660515099e453e956746c4182719 /cloudinit/sources/DataSourceAliYun.py
parent7deec7b6a1fce87dc2d9cd886053804bbc70380e (diff)
downloadvyos-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/DataSourceAliYun.py')
-rw-r--r--cloudinit/sources/DataSourceAliYun.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceAliYun.py b/cloudinit/sources/DataSourceAliYun.py
index 7ac8288d..22279d09 100644
--- a/cloudinit/sources/DataSourceAliYun.py
+++ b/cloudinit/sources/DataSourceAliYun.py
@@ -22,7 +22,7 @@ class DataSourceAliYun(EC2.DataSourceEc2):
super(DataSourceAliYun, self).__init__(sys_cfg, distro, paths)
self.seed_dir = os.path.join(paths.seed_dir, "AliYun")
- def get_hostname(self, fqdn=False, _resolve_ip=False):
+ def get_hostname(self, fqdn=False, resolve_ip=False, metadata_only=False):
return self.metadata.get('hostname', 'localhost.localdomain')
def get_public_ssh_keys(self):