Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Profile-YAML
    • Labels:
      None
    • Proposal:
      Hide

      NEW PROPOSAL:

      frontend:
      type: tosca.nodes.WebApplication.WordPress
      properties:

      1. ...
        attributes:
        url: { get_operation_output: [ SELF, tosca.interfaces.node.lifecycle.Standard, create, url_from_script ] }

        interfaces:
        tosca.interfaces.node.lifecycle.Standard:
        create:
        implementation: scripts/frontend/create.sh # This script outputs two env vars: "url_from_script" and "data_dir_from_script"
        inputs:
        ip_address:

        { get_attribute: [my_server, ip_address] }

        configure:
        implementation: scripts/frontend/configure.sh
        inputs:
        data_dir_from_script:

        { get_operation_output: [ SELF, tosca.interfaces.node.lifecycle.Standard, create, data_dir_from_script ] }

      outputs:
      url_output:
      value:

      { get_attribute: [ frontend, url ] }

      PREVIOUS PROPOSAL:

      frontend:
      type: tosca.nodes.WebApplication.WordPress
      properties:

      1. ...
        interfaces:
        tosca.interfaces.node.lifecycle.Standard:
        create: scripts/frontend/create.sh
        inputs:
        ip_address: { get_attribute: [my_server, ip_address] }

        outputs:
        url_from_script:

        { set_attribute: [frontend, url] }

      Staying with the recommendation of environment variables, the "url_from_script" output is an env var that was exposed by the operation

      This example shows the concept but we might need to think of a better syntax because normally, i.e. in most or all cases, the "thing" before the colon gets assigned the "thing" after the colon.

      Show
      NEW PROPOSAL: frontend: type: tosca.nodes.WebApplication.WordPress properties: ... attributes: url: { get_operation_output: [ SELF, tosca.interfaces.node.lifecycle.Standard, create, url_from_script ] } interfaces: tosca.interfaces.node.lifecycle.Standard: create: implementation: scripts/frontend/create.sh # This script outputs two env vars: "url_from_script" and "data_dir_from_script" inputs: ip_address: { get_attribute: [my_server, ip_address] } configure: implementation: scripts/frontend/configure.sh inputs: data_dir_from_script: { get_operation_output: [ SELF, tosca.interfaces.node.lifecycle.Standard, create, data_dir_from_script ] } outputs: url_output: value: { get_attribute: [ frontend, url ] } PREVIOUS PROPOSAL: frontend: type: tosca.nodes.WebApplication.WordPress properties: ... interfaces: tosca.interfaces.node.lifecycle.Standard: create: scripts/frontend/create.sh inputs: ip_address: { get_attribute: [my_server, ip_address] } outputs: url_from_script: { set_attribute: [frontend, url] } Staying with the recommendation of environment variables, the "url_from_script" output is an env var that was exposed by the operation This example shows the concept but we might need to think of a better syntax because normally, i.e. in most or all cases, the "thing" before the colon gets assigned the "thing" after the colon.
    • Resolution:
      Show
      Fixed in Simple Profile v1.0 WD03, Rev04: https://www.oasis-open.org/apps/org/workgroup/tosca/download.php/54229/TOSCA-Simple-Profile-YAML-v1.0-wd03-Rev04a.docx

      Description

      In accordance to the method one can pass inputs to an operation.

      The recommended way of implementation is using environment variables as described here: https://www.oasis-open.org/committees/download.php/48637/Implementer%20Recommendation%20-%20Script%20Invocation%28commented%29.doc

      This issue raises the need to define how an operation can expose outputs that will be applied to the service template and can be passed to other operations.

      This issue relates to TOSCA-120 - "Mechanism for Parameter Passing compatible with v1.0" and TOSCA-132 - "WD02 - Use "set_property" methods to "push" values from template inputs to nodes (templates/types)"

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              MosheElisha Moshe Elisha (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: