Add an extra copy of neutron info after run_job

Since the neutron info in a job execution is
a Resource type and Resource does not have a
deepcopy() attribute, we have to copy the
neutron info explicitly when updating
job_execution.extra after returning from a call
to engine.run_job().

Change-Id: I9880436eeb3349d72e08125040017fb7870996c5
Closes-Bug: #1554119
This commit is contained in:
Trevor McKay 2016-03-07 12:55:43 -05:00
parent 0666f709b6
commit 00d8381cdc

View File

@ -119,6 +119,8 @@ def _run_job(job_execution_id):
update_dict['info'] = {'status': status}
if extra:
curr_extra = job_execution.extra.copy()
if 'neutron' in curr_extra:
curr_extra['neutron'] = curr_extra['neutron'].copy()
curr_extra.update(extra)
update_dict['extra'] = curr_extra