From 5ce0a52b17e530436c298e1b581d37bac853f5a7 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Thu, 7 Oct 2021 17:14:01 -0400 Subject: Manually merge CI files Signed-off-by: Sawyer Bergeron Change-Id: Ic63d5da699578007ef2f2cc373350ded06c66971 --- src/resource_inventory/models.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/resource_inventory') diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index 71046a8..6117035 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -169,23 +169,23 @@ class CloudInitFile(models.Model): @classmethod def create(cls, text="", priority=0): - prepended_text = "#cloud-config\n" - mstrat = CloudInitFile.merge_strategy() - prepended_text = prepended_text + yaml.dump({"merge_strategy": mstrat}) + "\n" - print("in cloudinitfile create") - text = prepended_text + text - cloud_dict = { - "datasource": { - "None": { - "metadata": { - "instance-id": str(uuid.uuid4()) - }, - "userdata_raw": text, - }, - }, - "datasource_list": ["None"], - } - return CloudInitFile.objects.create(priority=priority, text=yaml.dump(cloud_dict)) + #prepended_text = "#cloud-config\n" + #mstrat = CloudInitFile.merge_strategy() + #prepended_text = prepended_text + yaml.dump({"merge_strategy": mstrat}) + "\n" + #print("in cloudinitfile create") + #text = prepended_text + text + #cloud_dict = { + # "datasource": { + # "None": { + # "metadata": { + # "instance-id": str(uuid.uuid4()) + # }, + # "userdata_raw": text, + # }, + # }, + # "datasource_list": ["None"], + # } + return CloudInitFile.objects.create(priority=priority, text=text) class ResourceTemplate(models.Model): """ -- cgit 1.2.3-korg