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

Substitution mapping and selectable nodes #164

Open
lauwers opened this issue May 23, 2024 · 0 comments
Open

Substitution mapping and selectable nodes #164

lauwers opened this issue May 23, 2024 · 0 comments

Comments

@lauwers
Copy link
Contributor

lauwers commented May 23, 2024

I'd like to add support for mapping requirements to selectable nodes. I have a common use case where a host requirement in a substituted node needs to be mapped multiple times (to each of the host requirements of the nodes in the substituting template). Rather than defining multiple mappings, it would be more elegant to define a selectable host node in the substituting template and map the host requirement once to the selectable node. I think this could be done elegantly using a simple extension to the requirement mapping syntax as follows:

service_template:
  substitution_mappings:
    requirements:
      - server: [client, server] # traditional requirement mapping
      - host: compute # mapping to selectable node
  node_templates:
    client:
      type: Client
      requirements:
        - server:
            count: 1
       - host: host
    compute:
      type: Compute
      directives: [select]
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