blob: a22355873884ec2df2054350cbd13616e5e89594 [file] [log] [blame]
Susanta Gautam745a1f92021-04-22 18:31:59 +05451from oslo_context import context
2from oslo_log import log
3from oslo_utils import timeutils
4
5LOG = log.getLogger(__name__)
6
7
8class RequestContext(context.RequestContext):
Susanta Gautam73a52bb2021-04-27 16:01:11 +05459 """Added security context with request parameters from openstack common library"""
Susanta Gautam745a1f92021-04-22 18:31:59 +054510
Susanta Gautam73a52bb2021-04-27 16:01:11 +054511 def __init__(
12 self,
13 backup_id=None,
14 volume_id=None,
15 instance_id=None,
16 executed_at=None,
17 backup_status=None,
18 **kwargs
19 ):
Susanta Gautam745a1f92021-04-22 18:31:59 +054520 self.backup_id = backup_id
21 self.volume_id = volume_id
22 self.instance_id = instance_id
23 self.backup_id = backup_id
24 self.executed_at = executed_at
25
26
27def make_context(*args, **kwargs):
28 return RequestContext(*args, **kwargs)