diff options
author | 2017-09-26 20:40:39 +0800 | |
---|---|---|
committer | 2017-09-26 20:47:53 +0800 | |
commit | 000ea52b78b072435f01d67dd799023117e67a2e (patch) | |
tree | 1f14cdb4485e2184904b553b82afd9e7139a18e5 /nfvparser/toscaparser/capabilities.py | |
parent | 53065490134870ead778bff590cfd9e43ddd9f77 (diff) |
Sync code from nfv-toscaprser
Currently nfv-toscaparser has published the regular version of 0.5.1
the patch will synchronize the code.
JIRA: MODELING-23
Change-Id: If95579fc366b69b2b14b2e441ff9a3e6807e3820
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'nfvparser/toscaparser/capabilities.py')
-rw-r--r-- | nfvparser/toscaparser/capabilities.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nfvparser/toscaparser/capabilities.py b/nfvparser/toscaparser/capabilities.py index c23ef72..1708fd8 100644 --- a/nfvparser/toscaparser/capabilities.py +++ b/nfvparser/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): |