Skip to content

Commit

Permalink
dsl: python to yaml: serialize attributes that match the pattern "{in…
Browse files Browse the repository at this point in the history
…terface_name}_default_inputs" as interface level inputs on TOSCA types or templates.
  • Loading branch information
aszs committed Oct 27, 2024
1 parent f6e71f6 commit 83e4bbb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tosca-package/tosca/_tosca.py
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,9 @@ def _interfaces_yaml(
i_def["type"] = name
if cls_or_self._interface_requirements:
i_def["requirements"] = cls_or_self._interface_requirements
default_inputs = getattr(cls_or_self, f"{shortname}_default_inputs", None)
if default_inputs:
i_def["inputs"] = to_tosca_value(default_inputs, dict_cls)
interfaces[shortname] = i_def
if c in cls.__bases__:
direct_bases.append(shortname)
Expand Down

0 comments on commit 83e4bbb

Please sign in to comment.