Made sg updater elevate during job creation

Change-Id: I232dca65c9be3427c95c300eaafaa84f401b40b7
JIRA:NCP-1172
This commit is contained in:
Justin Hammond 2016-09-23 11:57:10 -05:00
parent 764224c456
commit 12208f4f2d
1 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ class QuarkSGAsyncProcessCallback(object):
resource_id=rule_id,
tenant_id=db_sg['tenant_id'])
job_body = dict(job=job_body)
job = job_api.create_job(context, job_body)
job = job_api.create_job(context.elevated(), job_body)
rpc_client = QuarkSGAsyncProducerClient()
try:
rpc_client.populate_subtasks(context, sg, job['id'])
@ -135,7 +135,7 @@ class QuarkSGProducerCallback(object):
resource_id=port['id'],
parent_id=parent_job_id)
job_body = dict(job=job_body)
job = job_api.create_job(context, job_body)
job = job_api.create_job(context.elevated(), job_body)
rpc_consumer = QuarkSGAsyncConsumerClient()
try:
rpc_consumer.update_port(context, port['id'], job['id'])
@ -209,7 +209,7 @@ class QuarkSGConsumerCallback(object):
portid, retries, error)
update_body = dict(completed=True, status=status_str)
update_body = dict(job=update_body)
job_api.update_job(context, jobid, update_body)
job_api.update_job(context.elevated(), jobid, update_body)
class QuarkSGAsyncConsumer(base_worker.QuarkAsyncPluginBase):