Commit 5544e081 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio_ui_test: Pre-Create Theia rather them webrunner for testing

parent 979a0c36
# PreferenceTool # PreferenceTool
from DateTime import DateTime from DateTime import DateTime
software_version = "1.0.289"
portal = context.getPortalObject() portal = context.getPortalObject()
preference = portal.portal_preferences.getActiveSystemPreference() preference = portal.portal_preferences.getActiveSystemPreference()
...@@ -39,46 +41,46 @@ except KeyError: ...@@ -39,46 +41,46 @@ except KeyError:
) )
kvm_software_release.edit( kvm_software_release.edit(
url_string="https://lab.nexedi.com/nexedi/slapos/raw/1.0.164/software/kvm/software.cfg", url_string="https://lab.nexedi.com/nexedi/slapos/raw/%s/software/kvm/software.cfg" % software_version,
) )
if kvm_software_release.getValidationState() == "draft": if kvm_software_release.getValidationState() == "draft":
kvm_software_release.publishAlive() kvm_software_release.publishAlive()
try: try:
slaprunner_product = context.software_product_module["slaprunner"] theia_product = context.software_product_module["theia"]
except KeyError: except KeyError:
slaprunner_product = context.software_product_module.newContent( theia_product = context.software_product_module.newContent(
id="slaprunner", id="theia",
title="Webrunner", title="Theia",
product_line ="software/application", product_line ="software/application",
reference="slaprunner", reference="theia",
portal_type="Software Product" portal_type="Software Product"
) )
if slaprunner_product.getValidationState() == "draft": if theia_product.getValidationState() == "draft":
slaprunner_product.publish() theia_product.publish()
try: try:
slaprunner_software_release = context.software_release_module["slaprunner"] theia_software_release = context.software_release_module["theia"]
except KeyError: except KeyError:
slaprunner_software_release = context.software_release_module.newContent( theia_software_release = context.software_release_module.newContent(
id="slaprunner", id="theia",
title="Webrunner", title="Theia",
portal_type="Software Release", portal_type="Software Release",
version="0.1", version="0.1",
language="en", language="en",
effective_date=DateTime('2018/03/14 00:00:00 UTC'), effective_date=DateTime('2018/03/14 00:00:00 UTC'),
aggregate="software_product_module/slaprunner" aggregate="software_product_module/theia"
) )
slaprunner_software_release.edit( theia_software_release.edit(
url_string="https://lab.nexedi.com/nexedi/slapos/raw/1.0.164/software/slaprunner/software.cfg" url_string="https://lab.nexedi.com/nexedi/slapos/raw/%s/software/theia/software.cfg" % software_version
) )
if slaprunner_software_release.getValidationState() == "draft": if theia_software_release.getValidationState() == "draft":
slaprunner_software_release.publishAlive() theia_software_release.publishAlive()
portal = context.getPortalObject() portal = context.getPortalObject()
......
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