Fix bug where software_type of main instance is *impossible* to set reliably

parent 88c95b9f
...@@ -19,6 +19,8 @@ from flask import jsonify ...@@ -19,6 +19,8 @@ from flask import jsonify
import slapos.slap import slapos.slap
# Global variable
global_software_type = 'default'
# Setup default flask (werkzeug) parser # Setup default flask (werkzeug) parser
...@@ -105,8 +107,9 @@ def requestInstance(config, software_type=None): ...@@ -105,8 +107,9 @@ def requestInstance(config, software_type=None):
""" """
Request the main instance of our environment Request the main instance of our environment
""" """
if not software_type: if software_type:
software_type = None global global_software_type
global_software_type = software_type
slap = slapos.slap.slap() slap = slapos.slap.slap()
profile = getCurrentSoftwareReleaseProfile(config) profile = getCurrentSoftwareReleaseProfile(config)
...@@ -122,7 +125,7 @@ def requestInstance(config, software_type=None): ...@@ -122,7 +125,7 @@ def requestInstance(config, software_type=None):
profile, profile,
partition_reference=getSoftwareReleaseName(config), partition_reference=getSoftwareReleaseName(config),
partition_parameter_kw=partition_parameter_kw, partition_parameter_kw=partition_parameter_kw,
software_type=software_type, software_type=global_software_type,
filter_kw=None, filter_kw=None,
state=None, state=None,
shared=False) shared=False)
......
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