Interface outputs

Added support for outputs in operation definition.
References: https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/os/TOSCA-Simple-Profile-YAML-v1.3-os.html#DEFN_ELEMENT_OPERATION_DEF (section 3.6.17.1 Keynames)

Change-Id: I71b497076135a50df27f8768d28c183c8d605d71
This commit is contained in:
Roman Stolyarov 2022-11-30 13:48:49 +03:00 committed by Manpreet Kaur
parent dcff68fd8a
commit c34dd4b6af
1 changed files with 5 additions and 1 deletions

View File

@ -20,7 +20,8 @@ SECTIONS = (LIFECYCLE, CONFIGURE, LIFECYCLE_SHORTNAME,
'tosca.interfaces.relationship.Configure',
'Standard', 'Configure')
INTERFACEVALUE = (IMPLEMENTATION, INPUTS) = ('implementation', 'inputs')
INTERFACEVALUE = (IMPLEMENTATION, INPUTS, OUTPUTS) = \
('implementation', 'inputs', 'outputs')
INTERFACE_DEF_RESERVED_WORDS = ['type', 'inputs', 'derived_from', 'version',
'description']
@ -39,6 +40,7 @@ class InterfacesDef(StatefulEntityType):
self.value = value
self.implementation = None
self.inputs = None
self.outputs = None
self.defs = {}
if interfacename == LIFECYCLE_SHORTNAME:
self.interfacetype = LIFECYCLE
@ -71,6 +73,8 @@ class InterfacesDef(StatefulEntityType):
self.implementation = j
elif i == INPUTS:
self.inputs = j
elif i == OUTPUTS:
self.outputs = j
else:
what = ('"interfaces" of template "%s"' %
self.node_template.name)