ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tal Liron <...@cloudify.co>
Subject Re: Service Composition / Substitution Mapping
Date Tue, 05 Sep 2017 15:09:27 GMT
On Sun, Sep 3, 2017 at 4:06 AM, Ran Ziv <ran@cloudify.co> wrote:

> I too agree with the notion that picking a substituting service template
> explicitly is against the spirit of this feature, for the reasons Avia has
> explained.
> If a specific template is needed, why not import it directly, or require a
> more specific capability offered by the substituting service template?
>

Just like you can specify a specific node template for a requirement, I
believe it can be useful and often necessary to specify a substituted
service template.

Let me try an example:

topology_template:
  node_templates:
    my_app:
      type: WebApp
      requirements:
        host:
          capability: tosca.capabilities.Container
          node: my_host # explicit node template
        db:
          capability: MongoDb
    my_host:
      type: VirtualMachine

  policies:
    substitution:
      type: aria.Substitution
      targets: [ my_app ]
      properties:
        requirements: # map of strings to requirement policy infos
          db:
            service_template: /opt/templates/MongoDbCluster.csar # explicit
service template

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message