Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement simple node template substitution #90

Open
aszs opened this issue Nov 10, 2021 · 0 comments
Open

Implement simple node template substitution #90

aszs opened this issue Nov 10, 2021 · 0 comments

Comments

@aszs
Copy link
Member

aszs commented Nov 10, 2021

We want ensembles to have a public type, substitution_mapping can provide this.
There are a couple of simple versions of substitution_mapping to consider:

  • just provider a node_template
  • just provide a node_type only and treat topology_templates inputs and outputs as properties and attributes
    Should we add node_type to external declaration for validation?

Implementation notes:

  • substitution happens in _handle_nested_tosca_templates_with_topology but only from imported templates, not from the "inventory"
  • nodetemplate.sub_mapping_tosca_template is never used
  • substitution_mappings is described as a list in TOSCA 1.3 grammar
  • how to handle root instance? how to serialize/load?
  • add an "export" directive? a "root" directive?
  • loaded imported template with the node's properties and have the nodespec point to the substituted node_template

Alternatively

Instead of a substitution mapping what if we just added a directive named "export" or "root" or "public"?

  aNodeTemplate:
  type: mytype
    directives:
    - root
    properties: 
     foo: {get_input: foo}
    capabilities:
      kkk:
``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant