=== modified file 'lava_dispatcher/__init__.py'
@@ -18,7 +18,6 @@
# along
# with this program; if not, see <http://www.gnu.org/licenses>.
-import sys
from datetime import datetime
import json
import traceback
@@ -39,7 +38,8 @@
self.load_job_data(job_json)
dispatcher_config = get_config("lava-dispatcher")
self.context = LavaContext(
- self.target, self.image_type, dispatcher_config, oob_file)
+ self.target, self.image_type, dispatcher_config, oob_file,
+ self.job_data)
def load_job_data(self, job_json):
self.job_data = json.loads(job_json)
@@ -106,8 +106,9 @@
class LavaContext(object):
- def __init__(self, target, image_type, dispatcher_config, oob_file):
+ def __init__(self, target, image_type, dispatcher_config, oob_file, job_data):
self.config = dispatcher_config
+ self.job_data = job_data
device_config = get_device_config(target)
if device_config.get('client_type') != 'conmux':
raise RuntimeError(
=== modified file 'lava_dispatcher/actions/launch_control.py'
@@ -42,9 +42,10 @@
f = open(bundle)
content = f.read()
f.close()
+ job_name = self.context.job_data.get('job_name', "LAVA Results")
try:
print >> self.context.oob_file, 'dashboard-put-result:', \
- dashboard.put_ex(content, bundle, stream)
+ dashboard.put_ex(content, job_name, stream)
except xmlrpclib.Fault, err:
print "xmlrpclib.Fault occurred"
print "Fault code: %d" % err.faultCode
@@ -150,8 +151,9 @@
attributes.update(self.context.test_data.get_metadata())
test_run['attributes'] = attributes
json_bundle = json.dumps(main_bundle)
+ job_name = self.context.job_data.get('job_name', "LAVA Results")
print >> self.context.oob_file, 'dashboard-put-result:', \
- dashboard.put_ex(json_bundle, 'lava-dispatcher.bundle', stream)
+ dashboard.put_ex(json_bundle, job_name, stream)
if status == 'fail':
raise OperationFailed(err_msg)