- job['t_from'] = json_element['scheduled_start']
- #Get resources id list for the job
- job['resource_ids'] = \
- [ node_dict['id'] for node_dict in json_element['resources'] ]
+ #In case it is a real reservation (not asap case)
+ if json_element['scheduled_start']:
+ job['t_from'] = json_element['scheduled_start']
+ job['t_until'] = int(json_element['scheduled_start']) + \
+ int(json_element['walltime'])
+ #Get resources id list for the job
+ job['resource_ids'] = \
+ [ node_dict['id'] for node_dict in json_element['resources'] ]
+ else:
+ job['t_from'] = "As soon as possible"
+ job['t_until'] = "As soon as possible"
+ job['resource_ids'] = ["Undefined"]
+