aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2021-10-07 17:14:01 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2021-10-07 17:14:01 -0400
commit5ce0a52b17e530436c298e1b581d37bac853f5a7 (patch)
tree28c1c83bba8e898b099f8abfe9d5d517a5326197 /src/resource_inventory
parent5b70b8f1b8bbbe6aeec43b8d8dfdc6b7cc68bc9c (diff)
Manually merge CI files
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Ic63d5da699578007ef2f2cc373350ded06c66971
Diffstat (limited to 'src/resource_inventory')
-rw-r--r--src/resource_inventory/models.py34
1 files changed, 17 insertions, 17 deletions
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):
"""