Merge "Don't import Properties class directly"

This commit is contained in:
Jenkins 2014-09-08 08:58:36 +00:00 committed by Gerrit Code Review
commit 99fccaf375

View File

@ -27,7 +27,7 @@ from heat.engine import attributes
from heat.engine import environment from heat.engine import environment
from heat.engine import event from heat.engine import event
from heat.engine import function from heat.engine import function
from heat.engine.properties import Properties from heat.engine import properties
from heat.engine import resources from heat.engine import resources
from heat.engine import rsrc_defn from heat.engine import rsrc_defn
from heat.engine import scheduler from heat.engine import scheduler
@ -1065,18 +1065,18 @@ class Resource(object):
as parameters, and the resource's attributes_schema is mapped as as parameters, and the resource's attributes_schema is mapped as
outputs outputs
''' '''
(parameters, properties) = (Properties. schema = cls.properties_schema
schema_to_parameters_and_properties( params, props = (properties.Properties.
cls.properties_schema)) schema_to_parameters_and_properties(schema))
resource_name = cls.__name__ resource_name = cls.__name__
return { return {
'HeatTemplateFormatVersion': '2012-12-12', 'HeatTemplateFormatVersion': '2012-12-12',
'Parameters': parameters, 'Parameters': params,
'Resources': { 'Resources': {
resource_name: { resource_name: {
'Type': resource_type, 'Type': resource_type,
'Properties': properties 'Properties': props
} }
}, },
'Outputs': attributes.Attributes.as_outputs(resource_name, cls) 'Outputs': attributes.Attributes.as_outputs(resource_name, cls)