Remove stack ObjectField from resource

This causes the stack record to be loaded every time a resource is
loaded, and it is not used for anything other than getting the stack
ID, which is already available via the stack_id field.

Change-Id: I45ce9d18984f4881151dba496482713a62c9eae9
Partial-Bug: #1578854
This commit is contained in:
Steve Baker 2016-05-10 17:35:15 +12:00
parent ef47b4cf5c
commit 50f5142eca
2 changed files with 1 additions and 3 deletions

View File

@ -1735,7 +1735,7 @@ class EngineService(service.Service):
raise exception.EntityNotFound(entity='Resource',
name=physical_resource_id)
stack = parser.Stack.load(cnxt, stack_id=rs.stack.id)
stack = parser.Stack.load(cnxt, stack_id=rs.stack_id)
resource = stack[rs.name]
return dict(resource.identifier())

View File

@ -29,7 +29,6 @@ from heat.db import api as db_api
from heat.objects import base as heat_base
from heat.objects import fields as heat_fields
from heat.objects import resource_data
from heat.objects import stack
cfg.CONF.import_opt('encrypt_parameters_and_properties', 'heat.common.config')
@ -66,7 +65,6 @@ class Resource(
resource_data.ResourceData,
nullable=True
),
'stack': fields.ObjectField(stack.Stack),
'engine_id': fields.StringField(nullable=True),
'atomic_key': fields.IntegerField(nullable=True),
'current_template_id': fields.IntegerField(),