Commit d54c8b06 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Use text_content for instance_xml and sets a default (if the user don' input)

parent 1b68e796
...@@ -31,12 +31,18 @@ if person is None: ...@@ -31,12 +31,18 @@ if person is None:
if software_type in [None, ""]: if software_type in [None, ""]:
software_type = "RootSoftwareInstance" software_type = "RootSoftwareInstance"
if text_content == "":
text_content = """
<?xml version="1.0" encoding="utf-8" ?>
<instance>
</instance>"""
request_kw = {} request_kw = {}
request_kw.update( request_kw.update(
software_release=url, software_release=url,
software_title=title, software_title=title,
software_type=software_type, software_type=software_type,
instance_xml=instance_xml, instance_xml=text_content,
sla_xml="", sla_xml="",
shared=shared, shared=shared,
state="started", state="started",
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>title, instance_xml="", software_type=None, shared=False, computer_guid=None</string> </value> <value> <string>title, text_content="", software_type=None, shared=False, computer_guid=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment