Uploaded image for project: 'OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC'
  1. OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC
  2. TOSCA-19

The current version of TOSCA does not support to share EnvironmentConstraint among several NodeTemplate. This document presents a method to realize the element sharing.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: CSD04
    • Fix Version/s: CSD04
    • Component/s: Spec
    • Labels:
      None
    • Proposal:
      Hide

      My suggestion is that as well as EnvironmentConstraint in EnvironmentConstraints defined in a NodeTemplate, it can be defined under a TopologyTemplate. So, the one defined in a TopologyTemplate can be referred by several NodeTemplate. The following is an example. Two applications are respectively deployed on two application servers. The two servers employ a same security setting, which is defined in an EnvironmentConstraint. So, the shared EnvironmentConstraint (named "SecuritySetting") included in an EnvironmentConstraints can be defined under the "webApplication" TopologyTemplate, and then be referred by the two servers' NodeTempalte (see those words in red).

      <TopologyTemplate id="webApplication">
      <EnvironmentContraints>
      <EnvironmentContraint name=" SecuritySetting",
      contraintType="example.com/securitysetting">
      constraint type specific content
      </EnvironmentContraint >
      </EnvironmentContraints >

      <NodeTemplate id="MyApplication1", name="My First Application ",
      nodeType="Application" />
      <NodeTemplate id="MyApplication2", name="My Second Application ",
      nodeType="Application" />

      <NodeTemplate id="MyAppServer1", name="My First Application Server",
      nodeType="AppServer">
      <EnvironmentContraints>
      <EnvironmentContraint name="MySecuritySetting1", ref="SecuritySetting">
      </EnvironmentContraints >
      </NodeTemplate>
      <NodeTemplate id="MyAppServer2", name="My Second Application Server",
      nodeType="AppServer">
      <EnvironmentContraints>
      <EnvironmentContraint name="MySecuritySetting2", ref="SecuritySetting"/>
      <EnvironmentContraint constraintType="example.com/AuthenticationSettings/MyAuthenticationSetting"/>
      </EnvironmentContraints >
      </NodeTemplate>

      <RelationshipTemplate id="MyDeploymentRelationship1",
      relationshipType="deployedOn">
      <SourceElement id=" MyApplication1"/>
      <TargetElement id="MyAppServer1"/>
      </RelationshipTemplate>
      <RelationshipTemplate id="MyDeploymentRelationship2",
      relationshipType="deployedOn">
      <SourceElement id=" MyApplication2"/>
      <TargetElement id="MyAppServer2"/>
      </RelationshipTemplate>
      </TopologyTemplate>

      Show
      My suggestion is that as well as EnvironmentConstraint in EnvironmentConstraints defined in a NodeTemplate, it can be defined under a TopologyTemplate. So, the one defined in a TopologyTemplate can be referred by several NodeTemplate. The following is an example. Two applications are respectively deployed on two application servers. The two servers employ a same security setting, which is defined in an EnvironmentConstraint. So, the shared EnvironmentConstraint (named "SecuritySetting") included in an EnvironmentConstraints can be defined under the "webApplication" TopologyTemplate, and then be referred by the two servers' NodeTempalte (see those words in red). <TopologyTemplate id="webApplication"> <EnvironmentContraints> <EnvironmentContraint name=" SecuritySetting", contraintType="example.com/securitysetting"> constraint type specific content </EnvironmentContraint > </EnvironmentContraints > <NodeTemplate id="MyApplication1", name="My First Application ", nodeType="Application" /> <NodeTemplate id="MyApplication2", name="My Second Application ", nodeType="Application" /> <NodeTemplate id="MyAppServer1", name="My First Application Server", nodeType="AppServer"> <EnvironmentContraints> <EnvironmentContraint name="MySecuritySetting1", ref="SecuritySetting"> </EnvironmentContraints > </NodeTemplate> <NodeTemplate id="MyAppServer2", name="My Second Application Server", nodeType="AppServer"> <EnvironmentContraints> <EnvironmentContraint name="MySecuritySetting2", ref="SecuritySetting"/> <EnvironmentContraint constraintType="example.com/AuthenticationSettings/MyAuthenticationSetting"/> </EnvironmentContraints > </NodeTemplate> <RelationshipTemplate id="MyDeploymentRelationship1", relationshipType="deployedOn"> <SourceElement id=" MyApplication1"/> <TargetElement id="MyAppServer1"/> </RelationshipTemplate> <RelationshipTemplate id="MyDeploymentRelationship2", relationshipType="deployedOn"> <SourceElement id=" MyApplication2"/> <TargetElement id="MyAppServer2"/> </RelationshipTemplate> </TopologyTemplate>

      Description

      In the current version of TOSCA, the EnvironmentConstraint in EnvironmentConstraints is defined in a NodeTemplate. So, if several NodeTempalte have the same EnvironmentConstraint, this EnvironmentConstraint should be defined in each NodeTemplate. Therefore, one EnvironmentConstraint is defined several times totally.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              PaulZhang Paul Zhang
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: