refactor for the profile context
This commit is contained in:
parent
ad269a2ff2
commit
1013a3b35b
|
@ -64,8 +64,7 @@ class Profile(object):
|
|||
kwargs = {
|
||||
'id': record.id,
|
||||
'spec': record.spec,
|
||||
'profile_context': context.RequestContext.from_dict(
|
||||
record.context or {}),
|
||||
'profile_context': record.context,
|
||||
'permission': record.permission,
|
||||
'tags': record.tags,
|
||||
'created_time': record.created_time,
|
||||
|
|
|
@ -92,6 +92,11 @@ class StackProfile(base.Profile):
|
|||
ctx.update(stack_context)
|
||||
self.context = context.RequestContext.from_dict(ctx)
|
||||
|
||||
if self.profile_context:
|
||||
ctx = self.context.to_dict()
|
||||
ctx.update(self.profile_context)
|
||||
self.context = context.RequestContext.from_dict(ctx)
|
||||
|
||||
self.hc = heatclient.HeatClient(self.context)
|
||||
return self.hc
|
||||
|
||||
|
|
Loading…
Reference in New Issue