aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/resource_inventory/models.py')
-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):
"""