Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@xxxxxxxxx> --- virtinst/install/cloudinit.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/virtinst/install/cloudinit.py b/virtinst/install/cloudinit.py index 3cb13484..8041cc86 100644 --- a/virtinst/install/cloudinit.py +++ b/virtinst/install/cloudinit.py @@ -9,31 +9,22 @@ class CloudInitData(): root_password = None -def create_metadata(scratchdir, hostname=None): - if hostname: - instance = hostname - else: - hostname = instance = "localhost" - content = 'instance-id: %s\n' % instance - content += 'hostname: %s\n' % hostname - log.debug("Generated cloud-init metadata:\n%s", content) +def create_metadata(scratchdir): fileobj = tempfile.NamedTemporaryFile( prefix="virtinst-", suffix="-metadata", dir=scratchdir, delete=False) filename = fileobj.name + content = "" with open(filename, "w") as f: f.write(content) + log.debug("Generated cloud-init metadata\n%s", content) return filename -def create_userdata(scratchdir, cloudinit_data, username=None, password=None): +def create_userdata(scratchdir, cloudinit_data): content = "#cloud-config\n" - if username: - content += "name: %s\n" % username - if password: - content += "password: %s\n" % password rootpass = cloudinit_data.root_password if rootpass == "generate": -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list