summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/capabilities.py6
-rw-r--r--tosca2heat/tosca-parser/toscaparser/entity_template.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/capabilities.py b/tosca2heat/tosca-parser/toscaparser/capabilities.py
index c23ef72..1708fd8 100644
--- a/tosca2heat/tosca-parser/toscaparser/capabilities.py
+++ b/tosca2heat/tosca-parser/toscaparser/capabilities.py
@@ -16,10 +16,11 @@ from toscaparser.properties import Property
class Capability(object):
'''TOSCA built-in capabilities type.'''
- def __init__(self, name, properties, definition):
+ def __init__(self, name, properties, definition, custom_def):
self.name = name
self._properties = properties
self.definition = definition
+ self.custom_def = custom_def
def get_properties_objects(self):
'''Return a list of property objects.'''
@@ -30,7 +31,8 @@ class Capability(object):
props_def = self.definition.get_properties_def()
if props_def and name in props_def:
properties.append(Property(name, value,
- props_def[name].schema))
+ props_def[name].schema,
+ self.custom_def))
return properties
def get_properties(self):
diff --git a/tosca2heat/tosca-parser/toscaparser/entity_template.py b/tosca2heat/tosca-parser/toscaparser/entity_template.py
index cc3d620..d454ac0 100644
--- a/tosca2heat/tosca-parser/toscaparser/entity_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/entity_template.py
@@ -164,7 +164,7 @@ class EntityTemplate(object):
if 'properties' in props and props['properties']:
properties.update(props['properties'])
- cap = Capability(name, properties, c)
+ cap = Capability(name, properties, c, self.custom_def)
capability.append(cap)
return capability