Topology and Orchestration Specification for Cloud Applications Version 1.0

Committee Specification Draft 03

19 July 2012

Specification URIs

This version:

http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd03/TOSCA-v1.0-csd03.doc (Authoritative)

http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd03/TOSCA-v1.0-csd03.html

http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd03/TOSCA-v1.0-csd03.pdf

Previous version:

http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd02/TOSCA-v1.0-csd02.doc (Authoritative)

http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd02/TOSCA-v1.0-csd02.html

http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd02/TOSCA-v1.0-csd02.pdf

Latest version:

http://docs.oasis-open.org/tosca/TOSCA/v1.0/TOSCA-v1.0.doc (Authoritative)

http://docs.oasis-open.org/tosca/TOSCA/v1.0/TOSCA-v1.0.html

http://docs.oasis-open.org/tosca/TOSCA/v1.0/TOSCA-v1.0.pdf

Technical Committee:

OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC

Chairs:

Paul Lipton (paul.lipton@ca.com), CA Technologies

Simon Moser (smoser@de.ibm.com), IBM

Editors:

Derek Palma (dpalma@vnomic.com), Vnomic

Thomas Spatzier (thomas.spatzier@de.ibm.com), IBM

Additional artifacts:

This prose specification is one component of a Work Product which also includes:

·         XML schemas: http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd03/schemas/

Declared XML namespace:

·         http://docs.oasis-open.org/tosca/ns/2011/12

Abstract:

The concept of a “service template” is used to specify the “topology” (or structure) and “orchestration” (or invocation of management behavior) of IT services (or simply “services” from here on). Typically, services are provisioned in an IT infrastructure and their management behavior must be orchestrated in accordance with constraints or policies from there on, for example in order to achieve service level objectives.

This specification introduces the formal description of Service Templates, including their structure, properties, and behavior.

Status:

This document was last revised or approved by the OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC on the above date. The level of approval is also listed above. Check the “Latest version” location noted above for possible later revisions of this document.

Technical Committee members should send comments on this specification to the Technical Committee’s email list. Others should send comments to the Technical Committee by using the “Send A Comment” button on the Technical Committee’s web page at http://www.oasis-open.org/committees/tosca/.

For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the Technical Committee web page (http://www.oasis-open.org/committees/tosca/ipr.php).

Citation format:

When referencing this specification the following citation format should be used:

[TOSCA-v1.0]

Topology and Orchestration Specification for Cloud Applications Version 1.0. 19 July 2012. OASIS Committee Specification Draft 03.
http://docs.oasis-open.org/tosca/TOSCA/v1.0/csd03/TOSCA-v1.0-csd03.html.

Notices

Copyright © OASIS Open 2012. All Rights Reserved.

All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification.

OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this specification by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification. OASIS may include such claims on its website, but disclaims any obligation to do so.

OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Committee Specification or OASIS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.

The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see http://www.oasis-open.org/policies-guidelines/trademark for above guidance.

 

Table of Contents

1        Introduction. 6

2        Language Design. 7

2.1 Dependencies on Other Specifications. 7

2.2 Notational Conventions. 7

2.3 Normative References. 7

2.4 Non-Normative References. 8

2.5 Namespaces. 8

2.6 Language Extensibility. 8

2.7 Overall Language Structure. 9

2.7.1 Syntax. 9

2.7.2 Properties. 9

3        Core Concepts and Usage Pattern. 13

3.1 Core Concepts. 13

3.2 Service Templates and Artifacts. 14

3.3 Archive Format for Cloud Applications. 15

3.4 Use Cases. 16

3.4.1 Services as Marketable Entities. 16

3.4.2 Portability of Service Templates. 17

3.4.3 Service Composition. 17

3.4.4 Relation to Virtual Images. 17

4        Node Types. 18

4.1 Syntax. 18

4.2 Properties. 20

4.3 Derivation Rules. 23

4.4 Example. 24

5        Relationship Types. 26

5.1 Syntax. 26

5.2 Properties. 26

5.3 Derivation Rules. 28

5.4 Example. 28

6        Topology Template. 30

6.1 Syntax. 30

6.2 Properties. 32

6.3 Example. 36

7        Plans. 38

7.1 Syntax. 38

7.2 Properties. 38

7.3 Use of Process Modeling Languages. 39

7.4 Example. 39

8        Cloud Service Archive (CSAR) 41

8.1 Overall Structure of a CSAR. 41

8.2 TOSCA Meta File. 41

8.3 Example. 42

9        Security Considerations. 46

10      Conformance. 47

Appendix A.       Portability and Interoperability Considerations. 48

Appendix B.       Acknowledgements. 49

Appendix C.       Complete TOSCA Grammar 51

Appendix D.       TOSCA Schema. 57

Appendix E.       Sample. 69

E.1 Sample Service Topology Definition. 69

Appendix F.        Revision History. 73

 

 


1      Introduction

IT services (or just services in what follows) are the main asset within IT environments in general, and in cloud environments in particular. The advent of cloud computing suggests the utility of standards that enable the (semi-) automatic creation and management of services (a.k.a. service automation). These standards describe a service and how to manage it independent of the supplier creating the service and independent of any particular cloud provider and the technology hosting the service. Making service topologies (i.e. the individual components of a service and their relations) and their orchestration plans (i.e. the management procedures to create and modify a service) interoperable elements, enables their exchange between different environments. This specification explains how to define services in a portable and interoperable manner in a Service Template document.

2      Language Design

The TOSCA language introduces a grammar for describing service templates by means of Topology Templates and plans. The focus is on design time aspects, i.e. the description of services to ensure their exchange. Runtime aspects are addressed by providing a container for specifying models of plans which support the management of instances of services.

The language provides an extension mechanism that can be used to extend the definitions with additional vendor-specific or domain-specific information.

2.1 Dependencies on Other Specifications

TOSCA utilizes the following specifications:

and relates to:

2.2 Notational Conventions

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC2119].

This specification follows XML naming and design rules as described in [UNCEFACT XMLNDR], i.e. uses upper camel-case notation for XML element names and lower camel-case notation for XML attribute names.

2.3 Normative References

[RFC2119]               S. Bradner, Key words for use in RFCs to Indicate Requirement Levels, http://www.ietf.org/rfc/rfc2119.txt, IETF RFC 2119, March 1997.

[RFC 2396]              Uniform Resource Identifiers (URI): Generic Syntax, RFC 2396, available via http://www.faqs.org/rfcs/rfc2396.html

[BPEL 2.0]              OASIS Web Services Business Process Execution Language (WS-BPEL) 2.0, http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.pdf

[BPMN 2.0]             OMG Business Process Model and Notation (BPMN) Version 2.0, http://www.omg.org/spec/BPMN/2.0/

[OVF]                     Open Virtualization Format Specification Version 1.1.0, http://www.dmtf.org/standards/published_documents/DSP0243_1.1.0.pdf

[WSDL 1.1]             Web Services Description Language (WSDL) Version 1.1, W3C Note, http://www.w3.org/TR/2001/NOTE-wsdl-20010315

[XML Base]             XML Base (Second Edition), W3C Recommendation, http://www.w3.org/TR/xmlbase/

[XML Infoset]          XML Information Set, W3C Recommendation, http://www.w3.org/TR/2001/REC-xml-infoset-20011024/

[XML Namespaces] Namespaces in XML 1.0 (Second Edition), W3C Recommendation, http://www.w3.org/TR/REC-xml-names/

[XML Schema Part 1]          XML Schema Part 1: Structures, W3C Recommendation, October 2004, http://www.w3.org/TR/xmlschema-1/

[XML Schema Part 2]          XML Schema Part 2: Datatypes, W3C Recommendation, October 2004, http://www.w3.org/TR/xmlschema-2/

[XMLSpec]             XML Specification, W3C Recommendation, February 1998, http://www.w3.org/TR/1998/REC-xml-19980210

[XPATH 1.0]            XML Path Language (XPath) Version 1.0, W3C Recommendation, November 1999, http://www.w3.org/TR/1999/REC-xpath-19991116

[UNCEFACT XMLNDR]        UN/CEFACT XML Naming and Design Rules Technical Specification, Version 3.0, http://www.unece.org/fileadmin/DAM/cefact/xml/UNCEFACT+XML+NDR+V3p0.pdf

 

2.4 Non-Normative References

 

 

2.5 Namespaces

This specification uses a number of namespace prefixes throughout; they are listed in Table 1. Note that the choice of any namespace prefix is arbitrary and not semantically significant (see [XML Namespaces]). Furthermore, the namespace http://docs.oasis-open.org/tosca/ns/2011/12 is assumed to be the default namespace, i.e. the corresponding namespace name ste is omitted in this specification to improve readability.

 

Prefix

Namespace

ste

http://docs.oasis-open.org/tosca/ns/2011/12

xs

http://www.w3.org/2001/XMLSchema

wsdl

http://schemas.xmlsoap.org/wsdl/

bpmn

http://www.omg.org/bpmn/2.0

Table 1: Prefixes and namespaces used in this specification

 

All information items defined by TOSCA are identified by one of the XML namespace URIs above [XML Namespaces]. A normative XML Schema [XML Schema Part 1, XML Schema Part 2] document for TOSCA can be obtained by dereferencing one of the XML namespace URIs.

2.6 Language Extensibility

The TOSCA extensibility mechanism allows:

The specification differentiates between mandatory and optional extensions (the section below explains the syntax used to declare extensions). If a mandatory extension is used, a compliant implementation MUST understand the extension. If an optional extension is used, a compliant implementation MAY ignore the extension.

2.7 Overall Language Structure

A Service Template is an XML document that consists of a Topology Template, Node Types, Relationship Types and Plans. This section explains the overall structure of a Service Template, the extension mechanism, and import features. Later sections describe in detail Topology Templates, Node Types, Relationship Types and Plans.

2.7.1 Syntax

1    <ServiceTemplate id="ID"

2                     name="string"?

3                     targetNamespace="anyURI">

4     

5      <Extensions>?

6        <Extension namespace="anyURI"

7                   mustUnderstand="yes|no"?/>+  

8      </Extensions>

9     

10    <Import namespace="anyURI"?

11            location="anyURI"?

12            importType="anyURI"/>*

13   

14    <Types>?

15      <xs:schema .../>*

16    </Types>

17   

18    (

19     <TopologyTemplate>

20            ...

21     </TopologyTemplate>

22    |

23     <TopologyTemplateReference reference="xs:QName">

24    )?

25   

26    <NodeTypes>?

27           ...

28    </NodeTypes>

29   

30    <RelationshipTypes>?

31           ...

32    </RelationshipTypes>

33   

34    <Plans>?

35           ...

36    </Plans>

37   

38  </ServiceTemplate>

2.7.2 Properties

The ServiceTemplate element has the following properties:

The namespace attribute specifies an absolute URI that identifies the imported definitions. This attribute is optional. An Import element without a namespace attribute indicates that external definitions are in use, which are not namespace-qualified. If a namespace attribute is specified then the imported definitions MUST be in that namespace. If no namespace is specified then the imported definitions MUST NOT contain a targetNamespace specification. The namespace http://www.w3.org/2001/XMLSchema is imported implicitly. Note, however, that there is no implicit XML Namespace prefix defined for http://www.w3.org/2001/XMLSchema.

The location attribute contains a URI indicating the location of a document that contains relevant definitions. The location URI MAY be a relative URI, following the usual rules for resolution of the URI base [XML Base, RFC 2396]. The location attribute is optional. An Import element without a location attribute indicates that external definitions are used but makes no statement about where those definitions might be found. The location attribute is a hint and a TOSCA compliant implementation is not obliged to retrieve the document being imported from the specified location.

The mandatory importType attribute identifies the type of document being imported by providing an absolute URI that identifies the encoding language used in the document. The value of the importType attribute MUST be set to http://docs.oasis-open.org/tosca/ns/2011/12 when importing Service Template documents, to http://schemas.xmlsoap.org/wsdl/ when importing WSDL 1.1 documents, and to http://www.w3.org/2001/XMLSchema when importing an XSD document.

According to these rules, it is permissible to have an Import element without namespace and location attributes, and only containing an importType attribute. Such an Import element indicates that external definitions of the indicated type are in use that are not namespace-qualified, and makes no statement about where those definitions might be found.

A Service Template MUST define or import all Topology Template, Node Types, Relationship Types, Plans, WSDL definitions, and XML Schema documents it uses. In order to support the use of definitions from namespaces spanning multiple documents, a Service Template MAY include more than one import declaration for the same namespace and importType. Where a service template has more than one import declaration for a given namespace and importType, each declaration MUST include a different location value. Import elements are conceptually unordered. A Service Template MUST be rejected if the imported documents contain conflicting definitions of a component used by the importing Service Template.

Documents (or namespaces) imported by an imported document (or namespace) are not transitively imported by a TOSCA compliant implementation. In particular, this means that if an external item is used by an element enclosed in the Service Template, then a document (or namespace) that defines that item MUST be directly imported by the Service Template. This requirement does not limit the ability of the imported document itself to import other documents or namespaces.

Note: The specification supports the use of any type system nested in the Types element. Nevertheless, only the support of xs:schema is REQUIRED from any compliant implementation.

A Service Template document can be intended to be instantiated into a service instance or it can be intended to be composed into other Service Templates. A Service Template document intended to be instantiated MUST contain either a TopologyTemplate or a TopologyTemplateReference, but not both. A Service Template document intended to be composed MUST include at least one of a NodeTypes, RelationshipTypes, or Plans element. This technique supports a modular definition of Service Templates. For example, one document can contain only Node Types that are referenced by a Service Template document that contains just a Topology Template and Plans. Similarly, Node Type Properties can be defined in separate XML Schema Definitions that are imported and referenced when defining a Node Type.

Example of the use of a type definition:

<Types>      

  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

             elementFormDefault="qualified"

             attributeFormDefault="unqualified">

    <xs:element name="ProjectProperties">

      <xs:complexType>

        <xs:sequence>

          <xs:element name="Owner" type="xs:string"/>

          <xs:element name="ProjectName" type="xs:string"/>

          <xs:element name="AccountID" type="xs:string"/>

        </xs:sequence>

      </xs:complexType>

    </xs:element>

  </xs:schema>

</Types>

All TOSCA elements MAY use the element documentation to provide annnotation for users. The content could be a plain text, HTML, and so on. The documentation element is optional and has the following syntax:

1    <documentation source="anyURI"? xml:lang="language"?>

2       ...

3    </documentation>

Example of use of a documentation:

<ServiceTemplate id="myService" name="My Service" ...>

  

  <documentation xml:lang="EN">

      This is a simple example of the usage of the documentation

      element as nested under a ServiceTemplate element.

   </documentation>

 

</ServiceTemplate>

3      Core Concepts and Usage Pattern

The main concepts behind TOSCA are described and some usage patterns of Service Templates are sketched.

3.1 Core Concepts

This specification defines a metamodel for defining IT services. This metamodel defines both the structure of a service as well as how to manage it. A Topology Template (also referred to as the topology model of a service) defines the structure of a service. Plans define the process models that are used to create and terminate a service as well as to manage a service during its whole lifetime. The major elements defining a service are depicted in Figure 1.

 

A Topology Template consists of a set of Node Templates and Relationship Templates that together define the topology model of a service as a (not necessarily connected) directed graph. A node in this graph is represented by a Node Template. A Node Template specifies the occurrence of a Node Type as a component of a service. A Node Type defines the properties of such a component (via Node Type Properties) and the operations (via Interfaces) available to manipulate the component. Node Types are defined separately for reuse purposes and a Node Template references a Node Type and adds usage constraints, such as how many times the component can occur.

Picture1

Figure 1: Structural Elements of a Service Template and their Relations

For example, consider a service that consists of an application server, a process engine, and a process model. A Topology Template defining that service would include one Node Template of Node Type “application server”, another Node Template of Node Type “process engine”, and a third Node Template of Node Type “process model”. The application server Node Type defines properties like the IP address of an instance of this type, an operation for installing the application server with the corresponding IP address, and an operation for shutting down an instance of this application server. A constraint in the Node Template can specify a range of IP addresses available when making a concrete application server available.

A Relationship Template specifies the occurrence of a relationship between nodes in a Topology Template. Each Relationship Template refers to a Relationship Type that defines the semantics and any properties of the relationship. Relationship Types are defined separately for reuse purposes. The Relationship Template indicates the elements it connects and the direction of the relationship by defining one source and one target element (in nested SourceElement and TargetElement elements). The Relationship Template also defines any constraints with the optional RelationshipConstraints element.

For example, a relationship can be established between the process engine Node Template and application server Node Template with the meaning “hosted by”, and between the process model Node Template and process engine Node Template with meaning “deployed on”.

A deployed service is an instance of a Service Template. More precisely, the instance is derived by instantiating the Topology Template of its Service Template, most often by running a special plan defined for the Service Template, often referred to as build plan. The build plan will provide actual values for the various properties of the various Node Templates and Relationship Templates of the Topology Template. These values can come from input passed in by users as triggered by human interactions defined within the build plan, by automated operations defined within the build plan (such as a directory lookup), or the templates can specify default values for some properties. The build plan will typically make use of operations of the Node Types of the Node Templates.

For example, the application server Node Template will be instantiated by installing an actual application server at a concrete IP address considering the specified range of IP addresses. Next, the process engine Node Template will be instantiated by installing a concrete process engine on that application server (as indicated by the “hosted by” relationship template). Finally, the process model Node Template will be instantiated by deploying the process model on that process engine (as indicated by the “deployed on” relationship template).

Plans defined in a Service Template describe the management aspects of service instances, especially their creation and termination. These plans are defined as process models, i.e. a workflow of one or more steps. Instead of providing another language for defining process models, the specification relies on existing languages like BPMN or BPEL. Relying on existing standards in this space facilitates portability and interoperability, but any language for defining process models can be used. The TOSCA metamodel provides containers to either refer to a process model (via Plan Model Reference) or to include the actual model in the plan (via Plan Model). A process model can contain tasks (using BPMN terminology) that refer to operations of Interfaces of Node Templates or any other interface (e.g. the invocation of an external service for licensing); in doing so, a plan can directly manipulate nodes of the topology of a service or interact with external systems.

3.2 Service Templates and Artifacts

An artifact represents the content required to realize a deployment such as an executable (e.g. a script, an executable program, an image), a configuration file or data file, or something that might be required so that another executable can run (e.g. a library). Artifacts can be of different types, for example EJBs or python scripts. The content of an artifact depends on its type. Typically, descriptive metadata will also be provided along with the artifact. This metadata might be needed to properly process the artifact, for example by describing the appropriate execution environment.

TOSCA distinguishes two kinds of artifacts: implementation artifacts and deployment artifacts. An implementation artifact represents the executable of an operation of a node type, and a deployment artifact represents the executable for materializing instances of a node. For example, a REST operation to store an image may have an implementation artifact that is a WAR file. The node type this REST operation is associated with may have the image itself as a deployment artifact.

The fundamental difference between implementation artifacts and deployment artifacts is twofold, namely

  1. the point in time when the artifact is deployed, and
  2. by what entity and to where the artifact is deployed.

The operations of a node type perform management actions on (instances of) the node type. The implementations of such operations can be provided as implementation artifacts. Thus, the implementation artifacts of the corresponding operations have to be deployed in the management environment before any management operation can be started. In other words, “a TOSCA supporting environment” (i.e. a so-called TOSCA container) must be able to process the set of implementation artifacts types required to execute those management operations. One such management operation could be the instantiation of a node type.

The instantiation of a node type can require providing deployment artifacts in the target managed environment. For this purpose, a TOSCA container supports a set of types of deployment artifacts that it can process. A service template that contains (implementation or deployment) artifacts of non-supported types cannot be processed by the container (resulting in an error during import).

3.3 Archive Format for Cloud Applications

In order to support in a certain environment the execution and management of the lifecycle of a cloud application, all corresponding artifacts must be available in that environment. This means that beside the service template of the cloud application, the deployment artifacts and implementation artifacts must be available in that environment. To ease the task of ensuring the availability of all of these, this specification defines a corresponding archive format called CSAR (Cloud Service ARchive).

Figure 2: Structure of the CSAR

A CSAR is a container file, i.e. it contains multiple files of possibly different file types. These files are typically organized in several subdirectories, each of which contains related files (and possibly other subdirectories etc). The organization into subdirectories and their content is specific for a particular cloud application. CSARs are zip files, typically compressed.

Each CSAR must contain a subdirectory called TOSCA-Metadata. This subdirectory must contain a so-called TOSCA meta file. This file is named TOSCA and has the file extension .meta. It represents metadata of the other files in the CSAR. This metadata is given in the format of name/value pairs. These name/value pairs are organized in blocks. Each block provides metadata of a certain artifact of the CSAR. An empty line separates the blocks in the TOSCA meta file.

Figure 3: Structure of the TOSCA Meta File

The first block of the TOSCA meta file (Block_0 in Figure 3) provides metadata of the CSAR itself (e.g. its version, creator etc). Each other block begins with a name/value pair that points to an artifact within the CSAR by means of a pathname. The remaining name/value pairs in a block are the proper metadata of the pointed to artifact. For example, a corresponding name/value pair specifies the MIME-type of the artifact.

Figure 4: Providing Metadata for Artifacts

 

3.4 Use Cases

The specification supports at least the following major use cases.

3.4.1 Services as Marketable Entities

Standardizing Service Templates will support the creation of a market for hosted IT services. Especially, a standard for specifying Topology Templates (i.e. the set of components a service consists of as well as their mutual dependencies) enables interoperable definitions of the structure of services. Such a service topology model could be created by a service developer who understands the internals of a particular service. The Service Template could then be published in catalogs of one or more service providers for selection and use by potential customers. Each service provider would map the specified service topology to its available concrete infrastructure in order to support concrete instances of the service and adapt the management plans accordingly.

Making a concrete instance of a Topology Template can be done by running a corresponding Plan (so-called instantiating management plan, a.k.a. build plan). This build plan could be provided by the service developer who also creates the Service Template. The build plan can be adapted to the concrete environment of a particular service provider. Other management plans useful in various states of the whole lifecycle of a service could be specified as part of a Service Template. Similar to build plans such management plans can be adapted to the concrete environment of a particular service provider.

Thus, not only the structure of a service can be defined in an interoperable manner, but also its management plans. These Plans describe how instances of the specified service are created and managed. Defining a set of management plans for a service will significantly reduce the cost of hosting a service by providing reusable knowledge about best practices for managing each service. While the modeler of a service can include deep domain knowledge into a plan, the user of such a service can use a plan by simply “invoking” it. This hides the complexity of the underlying service behavior. This is very similar to the situation resulting in the specification of ITIL.

3.4.2 Portability of Service Templates

Standardizing Service Templates supports the portability of definitions of IT Services. Here, portability denotes the ability of one cloud provider to understand the structure and behavior of a Service Template created by another party, e.g. another cloud provider, enterprise IT department, or service developer.

Note that portability of a service does not imply portability of its encompassed components. Portability of a service means that its definition can be understood in an interoperable manner, i.e. the topology model and corresponding plans are understood by standard compliant vendors. Portability of the individual components themselves making up a particular service has to be ensured by other means – if it is important for the service.

3.4.3 Service Composition

Standardizing Service Templates facilitates composing a service from components even if those components are hosted by different providers, including the local IT department, or in different automation environments, often built with technology from different suppliers. For example, large organizations could use automation products from different suppliers for different data centers, e.g., because of geographic distribution of data centers or organizational independence of each location. A Service Template provides an abstraction that does not make assumptions about the hosting environments.

3.4.4 Relation to Virtual Images

A cloud provider can host a service based on virtualized middleware stacks. These middleware stacks might be represented by an image definition such as an OVF [OVF] package. If OVF is used, a node in a Service Template can correspond to a virtual system or a component (OVF's "product") running in a virtual system, as defined in an OVF package. If the OVF package defines a virtual system collection containing multiple virtual systems, a sub-tree of a Service Template could correspond to the OVF virtual system collection.

A Service Template provides a way to declare the association of Service Template elements to OVF package elements. Such an association expresses that the corresponding Service Template element can be instantiated by deploying the corresponding OVF package element. These associations are not limited to OVF packages. The associations could be to other package types or to external service interfaces. This flexibility allows a Service Template to be composed from various virtualization technologies, service interfaces, and proprietary technology.

4      Node Types

This chapter specifies how Node Types are defined. A Node Type is a reusable entity that defines the type of one or more Node Templates. As such, a Node Type defines the structure of observable properties via Node Type Properties, i.e. the names, data types and allowed values the properties defined in Node Templates using a Node Type or instances of such Node Templates can have.

A Node Type can inherit properties from another Node Type by means of the DerivedFrom element. Node Types might be declared as abstract, meaning that they cannot be instantiated. The purpose of such abstract Node Types is to provide common properties and behavior for re-use in specialized, derived Node Types. Node Types might also be declared as final, meaning that they cannot be derived by other Node Types.

The functions that can be performed on (an instance of) a corresponding Node Template are defined by the Interfaces of the Node Type. Finally, management Policies are defined for a Node Type.

4.1 Syntax

1      <NodeTypes>?

2     

3       <NodeType id="ID"

4                 name="string"?

5                 abstract="yes|no"?

6                 final="yes|no"?>+

7     

8        <NodeTypeProperties element="QName"?

9                            type="QName"?/>?

10   

11      <DerivedFrom nodeTypeRef="QName"/>?

12   

13      <InstanceStates>?

14        <InstanceState state="anyURI">+

15      </InstanceStates>

16   

17      <Interfaces>?

18   

19        <Interface name="NCName | anyURI">+

20   

21          <Operation name="NCName">*

22   

23            (

24              <WSDL portType="QName"

25                    operation="NCName"/>

26             |

27              <REST method="GET | PUT | POST | DELETE"

28                    abs_path="anyURI"?

29                    absoluteURI="anyURI"?

30                    requestBody="QName"?

31                    responseBody="QName"?>

32   

33                <Parameters>?

34                  <Parameter name="string" required="yes|no"/>+

35                </Parameters>

36   

37                <Headers>?

38                  <Header name="string" required="yes|no"/>+

39                </Headers>

40   

41              </REST>

42             |

43              <ScriptOperation>

44   

45                <InputParameters>?

46   

47                  <InputParamter name="string"

48                                 type="string"

49                                 required="yes|no"/>+

50   

51                </InputParameters>

52   

53                <OutputParameters>?

54   

55                  <OutputParamter name="string"

56                                  type="string"

57                                  required="yes|no"/>+

58   

59                </OutputParameters>

60   

61              </ScriptOperation>

62            )

63   

64          </Operation>

65   

66          <ImplementationArtifacts>?

67                 

68            <ImplementationArtifact operationName="string"?

69                                    type="anyURI">+

70   

71              <RequiredContainerCapabilities>?

72                <RequiredContainerCapability capability="anyURI"/>+

73              </RequiredContainerCapabilities>

74   

75                     artifact specific content

76   

77            <ImplementationArtifact>

78   

79          </ImplementationArtifacts>

80   

81        </Interface>

82   

83      </Interfaces>

84   

85      <Policies>?

86        <Policy name="string" type="anyURI">+

87           policy specific content

88        </Policy>

89      </Policies>

90   

91      <DeploymentArtifacts>?

92        <DeploymentArtifact name="string" type="anyURI">+

93               artifact specific content

94        </DeploymentArtifact>

95      </DeploymentArtifacts>

96   

97     </NodeType>

98   

99    </NodeTypes>

4.2 Properties

The NodeType element has the following properties:

The NodeTypeProperties element has one but not both of the following properties:

The DerivedFrom element has the following properties:

The InstanceStates element has the following properties:

The InstanceState element has the following properties:

The Interface element has the following properties:

The Operation element has the following properties:

The ImplementationArtifacts element has the following properties:

 

Multiple implementation artifacts might be required for a single operation, e.g. in case a script operation is realized using different script languages in different environments.

The WSDL element has the following properties:

The REST element has the following properties:

Note, that the proper network location of the URI MUST be set as value of the Host header field of the request when using abs_path instead of absoluteURI

Note, that either the abs_path or the absoluteURI MUST be specified.

The ScriptOperation element has the following properties:

The ImplementationArtifact element has the following properties:

Each such dependency is explicitly declared by a separate RequiredContainerCapability element. The capability attribute of this element is a URI that denotes the corresponding requirement on the environment.

The Policy element has the following properties:

Consider a hypothetical billing policy. In this example the type www.sample.com/BillingPractice could define a policy for billing usage of a service instance. The policy specific content can define the interface providing the operations to perform billing. Further content could specify the granularity of the base for payment, e.g. it could provide an enumeration with the possible values “service”, “resource”, and “labor”. A value of “service” might specify that an instance of the corresponding node will be billed during its instance lifetime. A value of “resource” might specify that the resources consumed by an instance will be billed. A value of “labor” might specify that the use of a plan affecting a node instance will be billed.

The DeploymentArtifact element has the following properties:

Note, that the combination of name and type SHOULD be unique within the scope of the Node Type.

4.3 Derivation Rules

The following rules on combining definitions based on DerivedFrom apply:

4.4 Example

The following example defines the Node Type “Project”. It is defined in a Service Template “myService” within the target namespace “http://www.ibm.com/sample”. Thus, by importing the corresponding namespace in another Service Template, the Project Node Type is available for use in the other Service Template.

<ServiceTemplate id="myService" name="My Service"

                 targetNamespace="http://www.ibm.com/sample">

 

  <NodeTypes>

 

    <NodeType id="Project" name="My Project">

 

      <documentation xml:lang="EN">

        A reusable definition of a node type supporting

        the creation of new projects.

      </documentation>

 

      <NodeTypeProperties element="ProjectProperties"/>

 

      <InstanceStates>

        <InstanceState state="www.example.com/active"/>

        <InstanceState state="www.example.com/onHalt"/>

      </InstanceStates>

 

      <Interfaces>

        <Interface name="ProjectInterface">

          <Operation name="CreateProject">

            <ScriptOperation>

              <InputParameters>

                <InputParamter name="ProjectName"

                               type="string"/>

                <InputParamter name="Owner"

                               type="string"/>

                <InputParamter name="AccountID"

                               type="string"/>

              </InputParameters>

            </ScriptOperation>

          </Operation>

          <ImplementationArtifacts>

            <ImplementationArtifact operationName="CreateProject"

             type="http://www.example.com/ScriptArtifact/PhythonReference">

              scripts/phython/createProject.py

            </ImplementationArtifact>

          </ImplementationArtifacts>

        </Interface>

      </Interfaces>

 

    </NodeType>

 

  </NodeTypes>

 

</ServiceTemplate>

The Node Type “Project” has three Node Type Properties defined as an XML elelment in the Types element definition of the Service Template document: Owner, ProjectName and AccountID which are all of type “string”. An instance of the Node Type “Project” could be “active” (more precise in state www.example.com/active) or “on hold” (more precise in state “www.example.com/onHold”). A single Interface is defined for this Node Type, and this Interface is defined by an Operation, i.e. its actual implementation is defined by the definition of the Operation. The Operation has the name CreateProject and two Input Parameters (exploiting the default value “yes” of the attribute required of the InputParameter element). The names of these two Input Parameters are ProjectName and AccountID, both of type “string”.

5      Relationship Types

This chapter specifies how Relationship Types are defined. A Relationship Type is a reusable entity that defines the type of one or more Relationship Templates between Node Templates. As such, a Relationship Type can define the structure of observable properties via Relationship Type Properties. The functions that can be performed on (an instance of) a corresponding Relationship Template are defined by the Interfaces of the Relationship Type. Furthermore, a Relationship Type defines the potential states an instance of it might reveal at runtime. A Relationship Type can inherit the definitions just listed from another Relationship Type by means of the DerivedFrom element.

5.1 Syntax

1    <RelationshipTypes>

2     

3      <RelationshipType id="ID"

4                        name="string"?

5                        abstract="yes|no"?

6                        final="yes|no"?

7                        cascadingDeletion="yes|no"?>+

8     

9        <RelationshipTypeProperties element="QName"?

10                                  type="QName"?/>?

11   

12      <DerivedFrom relationshipTypeRef="QName"/>?

13   

14      <InstanceStates>?

15        <InstanceState state="anyURI">+

16      </InstanceStates>

17   

18      <SourceInterfaces>?

19        <Interface name="NCName | anyURI">+

20          ...

21        </Interface>

22      </SourceInterfaces>

23    

24      <TargetInterfaces>?

25        <Interface name="NCName | anyURI">+

26          ...

27        </Interface>

28      </TargetInterfaces>

29    

30      <ValidSource typeRef="QName"/>?

31    

32      <ValidTarget typeRef="QName"/>?

33   

34    </RelationshipType>

35   

36  </RelationshipTypes>

5.2 Properties

The RelationshipType element has the following properties:

The RelationshipTypeProperties element has the following properties:

Either the element attribute or the type attribute MUST be specified, but not both.

The InstanceStates element has the following properties:

The InstanceState element has the following properties:

5.3 Derivation Rules

The following rules on combining definitions based on DerivedFrom apply:

5.4 Example

The following example defines the Relationship Type “processDeployedOn”. The meaning of this Relationship Type is that “a process is deployed on a hosting environment”. When the source of an instance of a Relationship Template refering to this Relationship Type is deleted, its target is automatically deleted as well. The Relationship Type has Relationship Type Properties defined in the Types section of the same Service Template document as the “ProcessDeployedOnProperties” element. The states an instance of this Relationship Type can be in are also listed.

<RelationshipTypes>

 

  <RelationshipType id="processDeployedOn"

                    name="Process is deployed on"

                    cascadingDeletion="yes">

 

    <RelationshipTypeProperties element="ProcessDeployedOnProperties"/>

 

    <InstanceStates>

      <InstanceState state="www.example.com/successfullyDeployed"/>

      <InstanceState state="www.example.com/failed"/>

    </InstanceStates>

 

  </RelationshipType>

 

</RelationshipTypes>

6      Topology Template

This chapter specifies how Topology Templates are defined. A Topology Template defines the overall structure of an IT service, i.e. the components it consists of, the relations between those components, as well as grouping of components. The components of a service are referred to as Node Templates, the relations between the components are referred to as Relationship Templates, and groupings are referred to as Group Templates.

6.1 Syntax

1      <TopologyTemplate id="ID"

2                        name="string"?>

3     

4       (

5        <NodeTemplate id="ID"

6                      name="string"?

7                      nodeType="QName"

8                      minInstances="int"?

9                      maxInstances="int|string"?>

10   

11         <PropertyDefaults>?

12                XML fragment

13         </PropertyDefaults>

14   

15         <PropertyConstraints>?

16   

17           <PropertyConstraint property="string"

18                               constraintType="anyURI">+

19                constraint?

20           </PropertyConstraint>

21   

22         </PropertyConstraints>

23   

24         <Policies>?

25           <Policy name="string" type="anyURI">+

26              policy specific content

27           </Policy>

28         </Policies>

29   

30         <EnvironmentConstraints>?

31           <EnvironmentConstraint constraintType="anyURI">+

32                 constraint type specific content?

33           </EnvironmentConstraint>

34         </EnvironmentConstraints>

35   

36         <DeploymentArtifacts>?

37           <DeploymentArtifact name="string" type="anyURI">+

38                   artifact specific content

39           </DeploymentArtifact>

40         </DeploymentArtifacts>

41   

42         <ImplementationArtifacts>?       

43           <ImplementationArtifact operationName="string"

44                                   type="anyURI">+

45             <RequiredContainerCapabilities>?

46               <RequiredContainerCapability capability="anyURI"/>+

47             </RequiredContainerCapabilities>

48                    artifact specific content

49           <ImplementationArtifact>

50         </ImplementationArtifacts>

51   

52      </NodeTemplate>

53     |

54      <RelationshipTemplate id="ID"

55                            name="string"?

56                            relationshipType="QName">

57   

58          <SourceElement id="IDREF"/>

59   

60        ( <TargetElement id="IDREF"/>

61         |

62          <TargetElementReference id="QName"/>

63        ) 

64   

65         <PropertyDefaults>?

66                XML fragment

67         </PropertyDefaults>

68   

69         <PropertyConstraints>?

70   

71           <PropertyConstraint property="string"

72                               constraintType="anyURI">+

73                constraint?

74           </PropertyConstraint>

75   

76         </PropertyConstraints>

77   

78         <RelationshipConstraints>?

79   

80           <RelationshipConstraint constraintType="anyURI">+

81                constraint?

82           </RelationshipConstraint>

83   

84         </RelationshipConstraints>

85   

86      </RelationshipTemplate>

87     |

88      <GroupTemplate id="ID"

89                     name="string"?

90                     minInstances="int"?

91                     maxInstances="int|string"?>

92   

93         (

94          <NodeTemplate ... />

95         |

96          <RelationshipTemplate ... />

97         |

98          <GroupTemplate ... />

99         )+

100   

101       <Policies>?

102         <Policy name="string" type="anyURI">+

103           policy specific content

104         </Policy>

105       </Policies>

106 

107    </GroupTemplate>

108   )+

109 

110  </TopologyTemplate>

6.2 Properties

The TopologyTemplate element has the following properties:

A Topology Template can contain any number of Node Templates, Relationship Templates, or Group Templates (i.e. “elements”). For each specified Relationship Template (either defined as a direct child of the Topology Template or within a Group Template) the source element and target element MUST be specified in the Topology Template except for target elements that are referenced (via a target element reference).

The NodeTemplate element has the following properties:

The initial values are specified by providing an instance document of the XML schema of the corresponding Node Type Properties. This instance document considers the inheritance structure deduced by the DerivedFrom property of the Node Type referenced by the nodeType attribute of the Node Template.

The instance document of the XML schema might not validate against the existence constraints of the corresponding schema: not all Node Type properties might have an initial value assigned, i.e. mandatory elements or attributes might be missing in the instance provided by the Property Defaults element. Once the defined Node Template has been instantiated, any XML representation of the Node Type properties MUST validate according to the associated XML schema definition.

Each constraint is specified by means of a separate nested PropertyConstraint element. This element contains the actual encoding of the constraint.

Note, that a policy specified in the Node Template overrides any policy of the same name and type that might be specified with the Node Type of this Node Template.

Any policies of the Node Type that are not overridden are combined with the policies of the Node Template.

 

The operationName attribute specifies the name of the operation that is implemented by the implementation artifact under definition. The type attribute determines the specific content of the ImplementationArtifact element. For example, a script might be provided in place or by reference. A corresponding value of the type attribute indicates this.

 

The nested RequiredContainerCapabilities element specifies certain capabilities of the environment an implementation of an operation might depend on. For example, an implementation of an operation might use a particular interface for manipulating images, EJBs etc. Each such dependency is explicitly declared by a separate RequiredContainerCapability element. The capability attribute of this element is a URI that denotes the corresponding requirement on the environment.

Note, that an implementation artifact specified with the Node Template under definition overrides any implementation artifact with the same operationName and the same type specified with the Node Type given as value of the nodeType attribute of the Node Template under definition.

Otherwise, the implementation artifacts of the Node Type given as value of the nodeType attribute of the Node Template under definition and the implementation artifacts defined with the Node Template are combined.

The PropertyConstraint element has the following properties:

The Policy element has the following properties:

The EnvironmentConstraint element has the following properties:

The RelationshipTemplate element has the following properties:

The initial values are specified by providing an instance document of the XML schema of the corresponding Relationship Type properties.

The instance document of the XML schema might not validate against the existence constraints of the corresponding schema: not all Relationship Type properties might have an initial value assigned, i.e. mandatory elements or attributes might be missing in the instance provided by the Property Defaults element. Once the defined Relationship Template has been instantiated, any XML representation of the Relationship Type properties MUST validate according to the associated XML schema definition.

Each constraint is specified by means of a separate nested PropertyConstraint element. This element contains the actual encoding of the contraint.

Each constraint is specified by means of a separate nested RelationshipConstraint element. This element can contain the actual encoding of the contraint, or its constraintType attribute already denotes the constraint itself. The constraint type is specified by means of a URI, which defines both the semantic meaning of the constraint as well as the format of any content.

The GroupTemplate element has the following properties:

6.3 Example

The following Service Template defines a Topology Template in-place. The corresponding Topology Template contains two Node Templates called “MyApplication” and “MyAppServer”. These Node Templates have the node types “Application” and “ApplicationServer”, respectively, the definitions of which are imported by the Import element. The Node Template “MyApplication” is instantiated exactly once. Two of its Node Type Properties are initialized by a corresponding PropertyDefaults element. The Node Template “MyAppServer” can be instantiated as many times as needed. The “MyApplication” Node Template is connected with the “MyAppServer” Node Template via the Relationship Template named “MyDeploymentRelationship”; the behavior and semantics of the Relationship Template is defined in the Relationship Type “deployedOn” in the same Service Template document, saying that “MyApplication” is deployed on “MyAppServer”. When instantiating the “SampleApplication” Topology Template, instances of “MyApplication” and “MyAppServer” are related by means of corresponding instances of “MyDeploymentRelationship”.

<ServiceTemplate id="myService"

                 name="My Service"

                 targetNamespace="http://www.ibm.com/sample"

                 xmlns:abc="http://www.ibm.com/sample">

 

  <Import namespace="http://www.ibm.com/sample"

          importType="http://docs.oasis-open.org/tosca/ns/2011/12"/>

 

  <TopologyTemplate id="SampleApplication">

 

    <NodeTemplate id="MyApplication"

                  name="My Application"

                  nodeType="abc:Application">

      <PropertyDefaults>

        <ApplicationProperties> 

          <Owner>Frank</Owner>

          <InstanceName>Thomas’ favorite application</InstanceName>

        </ApplicationProperties>

       </PropertyDefaults>

    <NodeTemplate/>

 

    <NodeTemplate id="MyAppServer"

                  name="My Application Server"

                  nodeType="abc:ApplicationServer"

                  minInstances="0"

                  maxInstances="unbounded"/>

 

    <RelationshipTemplate id="MyDeploymentRelationship"

                          relationshipType="deployedOn">

      <SourceElement id="MyApplication"/>

      <TargetElement id="MyAppServer"/>

    </RelationshipTemplate>

 

  </TopologyTemplate>

 

</ServiceTemplate>

7      Plans

The operational management behavior of a Service Template is invoked by means of orchestration plans, or more simply, Plans. Plans consist of individual steps (aka tasks or activities) to be performed and the definition of the potential order of these steps. The execution of a step can be performed by one of the functions offered via the interfaces of a Node Template, by invoking operations of a Service Template API, or by invoking other operations being required in the context of a specific service. Plans are classified by a type, and the following two plan types are defined as part of the TOSCA specification. Build plans specify how instances of their associated Service Templates are made, and termination plans specify how an instance of a Service Template is removed from the environment. Other plan types for managing existing service instances throughout their life time are termed modification plans, and it is expected that such plan types will be defined subsequently by authors of service templates and domain expert groups.

7.1 Syntax

1    <Plans>

2     

3      <Plan id="ID"

4            name="string"?

5            planType="anyURI"

6            languageUsed="anyURI">+

7     

8         <PreCondition expressionLanguage="anyURI">?

9             condition

10       </PreCondition>

11   

12      ( <PlanModel>

13           actual plan

14        </PlanModel>

15       |

16        <PlanModelReference reference="anyURI"/>

17      )

18   

19    </Plan>

20   

21  </Plans>

7.2 Properties

The Plans element contains one or more Plan elements which have the following properties:

Note that all other plan types for managing service instances throughout their life time will be considered and referred to as modification plans in general.

Typically, the precondition will be an expression in the instance state attribute of some of the node templates or relationship templates of the topology template. It will be evaluated based on the actual values of the corresponding attributes at the time the plan is requested to be executed. Note, that any other kind of pre-condition is allowed.

7.3 Use of Process Modeling Languages

TOSCA does not specify a separate metamodel for defining plans. Instead, it is assumed that a process modelling language (a.k.a. metamodel) like BPEL [BPEL 2.0] or BPMN [BPMN 2.0] is used to define plans. The specification favours the use of BPMN for modeling plans.

7.4 Example

The following defines two Plans, one Plan for creating a new instance of the “SampleApplication” Topology Template (the plan is named “DeployApplication”), and one Plan for removing instances of “SampleApplication”. The Plan “DeployApplication” is a build plan specified in BPMN; the process model is immediately included in the Plan Model (note that the BPMN model is incomplete but used to show the mechanism of the PlanModel element). The Plan can only run when the PreCondition “Run only if funding is available” is satisfied. The Plan “RemoveApplication” is a termination plan specified in BPEL; the corresponding BPEL definition is defined elsewhere and only referenced by the PlanModelReference element.

<Plans>

 

  <Plan id="DeployApplication"

        name="Sample Application Build Plan"

        planType=
         "http://docs.oasis-open.org/tosca/ns/2011/12/PlanTypes/BuildPlan"

        languageUsed="http://www.omg.org/spec/BPMN/2.0/">

 

     <PreCondition expressionLanguage="www.example.com/text">?

         Run only if funding is available

     </PreCondition>

 

    <PlanModel>

      <process name="DeployNewApplication" id="p1">

        <documentation>This process deploys a new instance of the

          sample application.

        </documentation>

 

        <task id="t1" name="CreateAccount"/>

 

        <task id="t2" name="AcquireNetworkAddresses"

              isSequential="false"

              loopDataInput="t2Input.LoopCounter"/>

          <documentation>Assumption: t2 gets data of type “input”

             as input and this data has a field names “LoopCounter”

             that contains the actual multiplicity of the task.

          </documentation>

 

        <task id="t3" name="DeployApplicationServer"

              isSequential="false"

              loopDataInput="t3Input.LoopCounter"/>

 

        <task id="t4" name="DeployApplication"

              isSequential="false"

              loopDataInput="t4Input.LoopCounter"/>

 

        <sequenceFlow id="s1" targetRef="t2" sourceRef="t1"/>

        <sequenceFlow id="s2" targetRef="t3" sourceRef="t2"/>

        <sequenceFlow id="s3" targetRef="t4" sourceRef="t3"/>

      </process>

    </PlanModel>

  </Plan>

 

  <Plan id="RemoveApplication"

        planType="http://docs.oasis-

         open.org/tosca/ns/2011/12/PlanTypes/TerminationPlan"

        languageUsed=

         "http://docs.oasis-open.org/wsbpel/2.0/process/executable">

    <PlanModelReference reference="prj:RemoveApp"/>

  </Plan>

 

</Plans>

 

8      Cloud Service Archive (CSAR)

This section defines the metadata of a cloud service archive as well as its overall structure.

8.1 Overall Structure of a CSAR

A CSAR is a zip file containing at least two directories, the TOSCA-Metadata directory and the Service-Template directory. Beyond that, other directories may be contained in a CSAR, i.e. the creator of a CSAR has all freedom to define the content of a CSAR and the structuring of this content as appropriate for the cloud application.

The TOSCA-Metadata directory contains metadata describing the other content of the CSAR. This metadata is referred to as TOSCA meta file. This file is named TOSCA and has the file extension .meta.

The Service-Template directory contains one or more Service Template files (file extension .ste). These Service Template files contain definitions related to the cloud application of the CSAR. One of these Service Template files is distinguished as entry Service Template, i.e. it contains the definition of the structure and behavior of the cloud application, while the other Service Template files contain definitions that are referenced by the entry Service Template.

8.2 TOSCA Meta File

The TOSCA meta file includes metadata that allows interpreting the various artifacts within the CSAR properly. The TOSCA.meta file is contained in the TOSCA-Metadata directory of the CSAR.

A TOSCA meta file consists of name/value pairs. The name-part of a name/value pair is followed by a colon, followed by a blank, followed by the value-part of the name/value pair. The name MUST not contain a colon. Values that represent binary data must be base64 encoded. Values that extend beyond one line can be spread over multiple lines if each subsequent line starts with at least one space. Such spaces are then collapsed when the value string is read.

<name>: <value>

Each name/value pair is in a separate line. A list of related name/value pairs, i.e. a list of consecutive name/value pairs describing a particular file in a CSAR, is called a block. Blocks are separated by an empty line. The first block, called block_0, is metadata about the CSAR itself. All other blocks represent metadata of files in the CSAR.

The structure of block_0 in the TOSCA meta file is as follows:

TOSCA-Meta-File-Version: digit.digit

CSAR-Version: digit.digit

Created-By: string

Entry-Service-Template: filename

The name/value pairs are as follows:

The first line of a block (other than block_0) must be a name/value pair that has the name “Name” and the value of which is the path-name of the file described. The second line must be a name/value pair that has the name “Content-Type” describing the type of the file described; the format is that of a MIME type with type/subtype structure. The other name/value pairs that consecutively follow are file-type specific.

Name: <path-name_1>

Content-Type: type_1/subtype_1

<name_11>: <value_11>

<name_12>: <value_12>

...

<name_1n>: <value_1n>

 

 ...

 

Name: <path-name_k>

Content-Type: type_k/subtype_k

<name_k1>: <value_k1>

<name_k2>: <value_k2>

...

<name_km>: <value_km>

The name/value pairs are as follows:

 

Note that later directives override earlier directives. This allows for specifying global default directives that can be specialized by later directorives in the TOSCA meta file.

8.3 Example

Figure 5 depicts a sample Service Template of an application, named Payroll.ste. The application is a payroll application written in Java that must be deployed on a proper application server. The Service Template of the application defines the Node Template Payroll Application, the Node Template Application Server, as well as the Relationship Template deployed_on. The Payroll Application is associated with an EAR file (named Payroll.ear) which is provided as corresponding Deployment Artifact of the Payroll Application Node Template. An Amazon Machine Image (AMI) is the Deployment Artifact of the Application Server Node Template; this Deployment Artifact is a reference to the image in the Amazon EC2 environment. The Implementation Artifacts of some operations of the Node Templates are provided too; for example, the start operation of the Payroll Application is implemented by a Java API supported by the payrolladm.jar file, the installApp operation of the Application Server is realized by the Python script wsadmin.py, while the runInstances operation is a REST API available at Amazon for running instances of an AMI. Note, that the runInstances operation is not related to a particular implementation artifact because it is available as an Amazon Web Service (https://ec2.amazonaws.com/?Action=RunInstances); but the details of this REST API are specified with the operation of the Application Server Node Type.

Figure 5: Sample Service Template

The corresponding Node Types and Relationship Types have been defined in the PayrollTypes.ste document, which is imported by the Payroll Service Template. The following listing provides some of the details:

<ServiceTemplate id="Payroll"

                 targetNamespace="http://www.example.com/ste"

                 xmlns:pay="http://www.example.com/ste/Types">

 

  <Import namespace="http://www.example.com/ste/Types"

          location="http://www.example.com/ste/Types/PayrollTypes.ste"

          importType=" http://docs.oasis-open.org/ns/tosca/2011/12"/>

 

  <Types>

     ...

  </Types>

 

  <TopologyTemplate ID="PayrollTemplate">

 

    <NodeTemplate id="Payroll Application"

                  nodeType="pay:ApplicationNodeType">

       ...

 

       <DeploymentArtifacts>

         <DeploymentArtifact name="PayrollEAR"

                             type="http://www.example.com/

                                   ns/tosca/2011/12/

                                   DeploymentArtifactTypes/CSARref">

                EARs/Payroll.ear

         </DeploymentArtifact>

       </DeploymentArtifacts>

 

      <ImplementationArtifacts>              

        <ImplementationArtifact operationName="start"

                                type="http://www.example.com/

                                      ns/tosca/2011/12/

                                      ImplementationArtifactTypes/CSARref">

                JARs/payrolladm.jar

        <ImplementationArtifact>

      </ImplementationArtifacts>

 

    </NodeTemplate>

 

    <NodeTemplate id="Application Server"

                  nodeType="pay:ApplicationServerNodeType">

       ...

 

       <DeploymentArtifacts>

         <DeploymentArtifact name="ApplicationServerImage"

                             type="http://www.example.com/

                                   ns/tosca/2011/12/

                                   DeploymentArtifactTypes/AMIref">

                 ami-edf2cf99

         </DeploymentArtifact>

       </DeploymentArtifacts>

 

      <ImplementationArtifacts>              

        <ImplementationArtifact operationName="installApp"

                                type="http://www.example.com/

                                      ns/tosca/2011/12/

                                      ImplementationArtifactTypes/CSARref">

                 Python/wsadmin.py

        <ImplementationArtifact>

      </ImplementationArtifacts>

 

    </NodeTemplate>

 

    <RelationshipTemplate id="deployed_on"

                          relationshipType="pay:deployed_on">

        <SourceElement id="Payroll Application"/>

        <TargetElement id="Application Server"/>

    </RelationshipTemplate>

 

  </TopologyTemplate>

 

</ServiceTemplate>

 

The Payroll Application Node Template specifies the deployment artifact PayrollEAR. It is a reference to the CSAR containing the Payroll.ste file, which is indicated by the .../CSARref type of the DeploymentArtifact element. The type specific content is a path expression in the directory structure of the CSAR: it points to the Payroll.ear file in the EARs directory of the CSAR (see Figure 6 for the structure of the corresponding CSAR).

The Payroll Application Node Template also contains an ImplementationArtifact element. This element contains information about the implementation of the start operation by pointing to the payrolladm.jar file in the JARs directory of the CSAR.

The Application Server Node Template has a DeploymentArtifact called ApplicationServerImage that is a reference to an AMI (Amazon Machine Image), indicated by an .../AMIref type. It provides a Python script (the wsadmin.py file in the Python directory of the CSAR) as implementation of the install operation; the type of the implementation artifact is again a CSAR reference.

The corresponding CSAR has the following structure (see Figure 6): The TOSCA.meta file is contained in the TOSCA-Metadata directory. The Payroll.ste file itself is contained in the Service-Template directory. Also, the PayrollTypes.ste file is in this directory. The content of the other directories has been sketched before.

Figure 6: Structure of CSAR Sample

The TOSCA.meta file is as follows:

TOSCA-Meta-Version: 1.0

CSAR-Version: 1.0

Created-By: Frank

Entry-Service-Template: /Service-Template/Payroll.ste

 

Name: Service-Template/Payroll.ste 

Content-Type: application/vnd.oasis.service_template

 

Name: Service-Template/PayrollTypes.ste 

Content-Type: application/vnd.oasis.service_template

 

Name: Plans/AddUser.bpmn 

Content-Type: application/vnd.oasis.bpmn

 

Name: EARs/Payroll.ear

Content-Type: application/vnd.oasis.ear

 

Name: JARs/Payrolladm.jar

Content-Type: application/vnd.oasis.jar

 

Name: Python/wsadmin.py

Content-Type: application/vnd.oasis.py

 

9      Security Considerations

TOSCA does not mandate the use of any specific mechanism or technology for client authentication. However, a client MUST provide a principal or the principal MUST be obtainable by the infrastructure.

10   Conformance

This section is to be done.

Appendix A. Portability and Interoperability Considerations

This section illustrates the portability and interoperability aspects addressed by Service Templates:

Portability - The ability to take Service Templates created in one vendor's environment and use them in another vendor's environment.

Interoperability - The capability for multiple components (e.g. a task of a plan and the definition of a topology node) to interact using well-defined messages and protocols. This enables combining components from different vendors allowing seamless management of services.

Portability demands support of TOSCA elements.

Appendix B. Acknowledgements

The following individuals have participated in the creation of this specification and are gratefully acknowledged.

Participants:

Aaron Zhang

Huawei Technologies Co., Ltd.

Adolf Hohl

NetApp

Afkham Azeez

WSO2

Alex Heneveld

Cloudsoft Corporation Limited

Allen Bannon

SAP AG

Anthony Rutkowski

Yaana Technologies, LLC

Arvind Srinivasan

IBM

Bryan Haynie

VCE

Celso Rodriguez

ASG Software Solutions

Chandrasekhar Sundaresh

CA Technologies

Charith Wickramarachchi

WSO2

Colin Hopkinson

3M HIS

Dale Moberg

Axway Software

Debojyoti Dutta

Cisco Systems

Dee Schur

OASIS

Denis Nothern

CenturyLink

Denis Weerasiri

WSO2

Derek Palma

Vnomic

Dhiraj Pathak

PricewaterhouseCoopers LLP:

Diane Mueller

ActiveState Software, Inc.

Doug Davis

IBM

Duncan Johnston-Watt

Cloudsoft Corporation Limited

Efraim Moscovich

CA Technologies

Frank Leymann

IBM

Gerd Breiter

IBM

James Thomason

Gale Technologies

Jan Ignatius

Nokia Siemens Networks GmbH & Co. KG

Jim Marino

Individual

John Wilmes

Progress Software

Joseph Malek

VCE

Kevin Poulter

SAP AG

Koert Struijk

CA Technologies

Lee Thompson

Morphlabs, Inc.

Marvin Waschke

CA Technologies

Mascot Yu

Huawei Technologies Co., Ltd.

Matthew Dovey

JISC Executive, University of Bristol

Matthew Rutkowski

IBM

Michael Schuster

SAP AG

Mike Edwards

IBM

Naveen Joy

Cisco Systems

Nikki Heron

rPath, Inc.

Pascal Vitoux

ASG Software Solutions

Paul Fremantle

WSO2

Paul Lipton

CA Technologies

Rachid Sijelmassi

CA Technologies

Ravi Akireddy

Cisco Systems

Richard Bill

Jericho Systems

Richard Probst

SAP AG

Robert Evans

Zenoss, Inc.

Roland Wartenberg

Citrix Systems

Satoshi Konno

Morphlabs, Inc.

Sean Shen

China Internet Network Information Center(CNNIC)

Selvaratnam Uthaiyashankar

WSO2

Senaka Fernando

WSO2

Sherry Yu

Red Hat

Simon Moser

IBM

Srinath Perera

WSO2

Stephen Tyler

CA Technologies

Steve Fanshier

Software AG, Inc.

Steve Jones

Capgemini

Steve Winkler

SAP AG

Ted Streete

VCE

Thilina Buddhika

WSO2

Thomas Spatzier

IBM

Tobias Kunze

Red Hat

Wang Xuan

Primeton Technologies, Inc.

wayne adams

EMC

Wenbo Zhu

Google Inc.

Xiaonan Song

Primeton Technologies, Inc.

YanJiong WANG

Primeton Technologies, Inc.

Yi Zhang

Huawei Technologies Co., Ltd.

Zhexuan Song

Huawei Technologies Co., Ltd.

 

 

Appendix C. Complete TOSCA Grammar

Note: The following is a pseudo EBNF grammar notation meant for documentation purposes only. The grammar is not intended for machine processing.

1    <ServiceTemplate id="ID"

2                       name="string"?

3                       targetNamespace="anyURI">

4     

5      <Extensions>?

6        <Extension namespace="anyURI"

7                   mustUnderstand="yes|no"?/>+  

8      </Extensions>

9     

10    <Import namespace="anyURI"?

11            location="anyURI"?

12            importType="anyURI"/>*

13   

14    <Types>?

15      <xs:schema .../>*

16    </Types>

17   

18   (

19    <TopologyTemplateReference reference="QName"/>

20    |

21    <TopologyTemplate id="ID"

22                      name="string"?>

23   

24     (

25      <NodeTemplate id="ID"

26                    name="string"?

27                    nodeType="QName"

28                    minInstances="int"?

29                    maxInstances="int|string"?>

30   

31         <PropertyDefaults>?

32                XML fragment

33         </PropertyDefaults>

34   

35         <PropertyConstraints>?

36   

37           <PropertyConstraint property="string"

38                               constraintType="anyURI">+

39                constraint?

40           </PropertyConstraint>

41   

42         </PropertyConstraints>

43   

44         <Policies>?

45           <Policy name="string" type="anyURI">+

46              policy specific content

47           </Policy>

48         </Policies>

49   

50         <EnvironmentConstraints>?

51           <EnvironmentConstraint constraintType="anyURI">+

52                 constraint type specific content?

53           </EnvironmentConstraint>

54         </EnvironmentConstraints>

55   

56         <DeploymentArtifacts>?

57           <DeploymentArtifact name="string" type="anyURI">+

58                   artifact specific content

59           </DeploymentArtifact>

60         </DeploymentArtifacts>

61   

62         <ImplementationArtifacts>?       

63           <ImplementationArtifact operationName="string"

64                                   type="anyURI">+

65             <RequiredContainerCapabilities>?

66               <RequiredContainerCapability capability="anyURI"/>+

67             </RequiredContainerCapabilities>

68                    artifact specific content

69           <ImplementationArtifact>

70         </ImplementationArtifacts>

71   

72      </NodeTemplate>

73     |

74      <RelationshipTemplate id="ID"

75                            name="string"?

76                            relationshipType="QName">+

77   

78          <SourceElement id="IDREF"/>

79   

80        ( <TargetElement id="IDREF"/>

81         |

82          <TargetElementReference id="QName"/>

83        ) 

84   

85         <PropertyDefaults>?

86                XML fragment

87         </PropertyDefaults>

88   

89         <PropertyConstraints>?

90   

91           <PropertyConstraint property="string"

92                               constraintType="anyURI">+

93                constraint?

94           </PropertyConstraint>

95   

96         </PropertyConstraints>

97   

98         <RelationshipConstraints>?

99   

100         <RelationshipConstraint constraintType="anyURI">+

101              constraint?

102         </RelationshipConstraint>

103 

104       </RelationshipConstraints>

105 

106    </RelationshipTemplate>

107   |

108    <GroupTemplate id="ID"

109                   name="string"?

110                   minInstances="int"?

111                   maxInstances="int|string"?>

112 

113       (

114        <NodeTemplate ... />

115       |

116        <RelationshipTemplate ... />

117       |

118        <GroupTemplate ... />

119       )+

120   

121       <Policies>?

122         <Policy name="string" type="anyURI">+

123           policy specific content

124         </Policy>

125       </Policies>

126 

127    </GroupTemplate>

128   )+

129 

130  </TopologyTemplate>

131)?

132 

133  <NodeTypes>?

134 

135   <NodeType id="ID"

136             name="string"?

137             abstract="yes|no"?

138             final="yes|no"?>+

139 

140   <NodeTypeProperties element="QName"?

141                        type="QName"?/>?

142 

143    <DerivedFrom nodeTypeRef="QName"/>?

144 

145    <InstanceStates>?

146      <InstanceState state="anyURI">+

147    </InstanceStates>

148 

149    <Interfaces>?

150 

151      <Interface name="NCName | anyURI">+

152 

153        <Operation name="NCName">*

154 

155          (

156            <WSDL portType="QName"

157                  operation="NCName"/>

158           |

159            <REST method="GET | PUT | POST | DELETE"

160                  abs_path="anyURI"?

161                  absoluteURI="anyURI"?

162                  requestBody="QName"?

163                  responseBody="QName"?>

164 

165              <Parameters>?

166                <Parameter name="string" required="yes|no"/>+

167              </Parameters>

168 

169              <Headers>?

170                <Header name="string" required="yes|no"/>+

171              </Headers>

172 

173            </REST>

174           |

175            <ScriptOperation>

176 

177              <InputParameters>?

178 

179                <InputParamter name="string"

180                               type="string"

181                               required="yes|no"/>+

182 

183              </InputParameters>

184 

185              <OutputParameters>?

186 

187                <OutputParamter name="string"

188                                type="string"

189                                required="yes|no"/>+

190 

191              </OutputParameters>

192 

193            </ScriptOperation>

194          )

195 

196        </Operation>

197 

198        <ImplementationArtifacts>?

199              

200          <ImplementationArtifact operationName="string"?

201                                  type="anyURI">+

202 

203            <RequiredContainerCapabilities>?

204              <RequiredContainerCapability capability="anyURI"/>+

205            </RequiredContainerCapabilities>

206 

207                   artifact specific content

208 

209          <ImplementationArtifact>

210 

211        </ImplementationArtifacts>

212 

213      </Interface>

214 

215   </Interfaces>

216 

217    <DeploymentArtifacts>?

218      <DeploymentArtifact name="string" type="anyURI">+

219             artifact specific content

220      </DeploymentArtifact>

221    </DeploymentArtifacts>

222 

223 

224    <Policies>?

225 

226     <Policy name="string" type="anyURI">+

227         policy specific content

228      </Policy>

229 

230    </Policies>

231 

232   </NodeType>

233 

234  </NodeTypes>

235 

236  <RelationshipTypes>?

237 

238    <RelationshipType id="ID"

239                      name="string"?

240                      abstract="yes|no"?

241                      final="yes|no"?

242                      cascadingDeletion="yes|no"?>+

243 

244      <RelationshipTypeProperties element="QName"?

245                                  type="QName"?/>?

246 

247      <InstanceStates>?

248        <InstanceState state="anyURI">+

249      </InstanceStates>

250 

251      <SourceInterfaces>?

252        <Interface name="NCName | anyURI">+

253          ...

254        </Interface>

255      </SourceInterfaces>

256 

257      <TargetInterfaces>?

258        <Interface name="NCName | anyURI">+

259          ...

260        </Interface>

261      </TargetInterfaces>

262 

263      <ValidSource typeRef="QName"/>?

264 

265      <ValidTarget typeRef="QName"/>?

266 

267    </RelationshipType>

268 

269  </RelationshipTypes>

270 

271  <Plans>?

272 

273   <Plan id="ID"

274         name="string"?

275         planType="anyURI"

276         languageUsed="anyURI">+

277 

278     <PreCondition expressionLanguage="anyURI">?

279         condition

280     </PreCondition>

281 

282     ( <PlanModel>

283          actual plan

284       </PlanModel>

285      |

286       <PlanModelReference reference="anyURI"/>

287     )

288 

289   </Plan>

290 

291  </Plans>

292 

293</ServiceTemplate>

Appendix D. TOSCA Schema

TOSCA-v1.0.xsd:

1    <?xml version="1.0" encoding="UTF-8"?>

2    <xs:schema targetNamespace="http://docs.oasis-open.org/tosca/ns/2011/12"

3     elementFormDefault="qualified" attributeFormDefault="unqualified"

4     xmlns="http://docs.oasis-open.org/tosca/ns/2011/12"

5     xmlns:xs="http://www.w3.org/2001/XMLSchema">

6     

7     <xs:import namespace="http://www.w3.org/XML/1998/namespace"

8      schemaLocation="http://www.w3.org/2001/xml.xsd"/>

9     

10   <xs:element name="documentation" type="tDocumentation"/>

11   <xs:complexType name="tDocumentation" mixed="true">

12    <xs:sequence>

13     <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>

14    </xs:sequence>

15    <xs:attribute name="source" type="xs:anyURI"/>

16    <xs:attribute ref="xml:lang"/>

17   </xs:complexType>

18   

19   <xs:complexType name="tExtensibleElements">

20    <xs:sequence>

21     <xs:element ref="documentation" minOccurs="0" maxOccurs="unbounded"/>

22     <xs:any namespace="##other" processContents="lax" minOccurs="0"

23      maxOccurs="unbounded"/>

24    </xs:sequence>

25    <xs:anyAttribute namespace="##other" processContents="lax"/>

26   </xs:complexType>

27   

28   <xs:complexType name="tImport">

29    <xs:complexContent>

30     <xs:extension base="tExtensibleElements">

31      <xs:attribute name="namespace" type="xs:anyURI"/>

32      <xs:attribute name="location" type="xs:anyURI"/>

33      <xs:attribute name="importType" type="importedURI" use="required"/>

34     </xs:extension>

35    </xs:complexContent>

36   </xs:complexType>

37   

38   <xs:element name="ServiceTemplate">

39    <xs:complexType>

40     <xs:complexContent>

41      <xs:extension base="tServiceTemplate"/>

42     </xs:complexContent>

43    </xs:complexType>

44   </xs:element>

45   

46   <xs:complexType name="tServiceTemplate">

47    <xs:complexContent>

48     <xs:extension base="tExtensibleElements">

49      <xs:sequence>

50       <xs:element name="Import" type="tImport" minOccurs="0"

51        maxOccurs="unbounded"/>

52       <xs:element name="Types" minOccurs="0">

53        <xs:complexType>

54         <xs:sequence>

55          <xs:any namespace="##other" processContents="lax" minOccurs="0"

56           maxOccurs="unbounded"/>

57         </xs:sequence>

58        </xs:complexType>

59       </xs:element>

60       <xs:element name="Extensions" minOccurs="0">

61        <xs:complexType>

62         <xs:sequence>

63          <xs:element name="Extension" type="tExtension"

64           maxOccurs="unbounded"/>

65         </xs:sequence>

66        </xs:complexType>

67       </xs:element>

68       <xs:choice minOccurs="0">

69        <xs:element name="TopologyTemplateReference">

70         <xs:complexType>

71          <xs:attribute name="reference" type="xs:QName"/>

72         </xs:complexType>

73        </xs:element>

74        <xs:element name="TopologyTemplate" type="tTopologyTemplate"/>

75       </xs:choice>

76       <xs:element name="NodeTypes" type="tNodeTypes" minOccurs="0"/>

77       <xs:element name="RelationshipTypes" type="tRelationshipTypes"

78        minOccurs="0"/>

79       <xs:element name="Plans" type="tPlans" minOccurs="0"/>

80      </xs:sequence>

81      <xs:attribute name="id" type="xs:ID" use="required"/>

82      <xs:attribute name="name" type="xs:string" use="optional"/>

83      <xs:attribute name="targetNamespace" type="xs:anyURI"/>

84     </xs:extension>

85    </xs:complexContent>

86   </xs:complexType>

87   

88   <xs:complexType name="tDeploymentArtifact">

89    <xs:complexContent>

90     <xs:extension base="tExtensibleElements">

91      <xs:attribute name="name" type="xs:string" use="required"/>

92      <xs:attribute name="type" type="xs:anyURI" use="required"/>

93     </xs:extension>

94    </xs:complexContent>

95   </xs:complexType>

96   

97   <xs:element name="NodeTemplate" type="tNodeTemplate"/>

98   <xs:complexType name="tNodeTemplate">

99    <xs:complexContent>

100   <xs:extension base="tExtensibleElements">

101    <xs:sequence>

102     <xs:element name="PropertyDefaults" minOccurs="0">

103      <xs:complexType>

104       <xs:sequence>

105        <xs:any namespace="##other" processContents="lax"/>

106       </xs:sequence>

107      </xs:complexType>

108     </xs:element>

109     <xs:element name="PropertyConstraints" minOccurs="0">

110      <xs:complexType>

111       <xs:sequence>

112        <xs:element name="PropertyConstraint"

113         type="tPropertyConstraint" maxOccurs="unbounded"/>

114       </xs:sequence>

115      </xs:complexType>

116     </xs:element>

117     <xs:element name="Policies" minOccurs="0">

118      <xs:complexType>

119       <xs:sequence>

120        <xs:element name="Policy" type="tPolicy"

121         maxOccurs="unbounded"/>

122       </xs:sequence>

123      </xs:complexType>

124     </xs:element>

125     <xs:element name="EnvironmentConstraints" minOccurs="0">

126      <xs:complexType>

127       <xs:sequence>

128        <xs:element name="EnvironmentConstraint"

129         type="tEnvironmentConstraint" maxOccurs="unbounded"/>

130       </xs:sequence>

131      </xs:complexType>

132     </xs:element>

133     <xs:element name="DeploymentArtifacts" minOccurs="0">

134      <xs:complexType>

135       <xs:sequence>

136        <xs:element name="DeploymentArtifact"

137         type="tDeploymentArtifact" maxOccurs="unbounded"/>

138       </xs:sequence>

139      </xs:complexType>

140     </xs:element>

141     <xs:element name="ImplementationArtifacts" minOccurs="0">

142      <xs:complexType>

143       <xs:sequence>

144        <xs:element name="ImplementationArtifact"

145         type="tImplementationArtifact" maxOccurs="unbounded"/>

146       </xs:sequence>

147      </xs:complexType>

148     </xs:element>

149    </xs:sequence>

150    <xs:attribute name="id" type="xs:ID" use="required"/>

151    <xs:attribute name="name" type="xs:string" use="optional"/>

152    <xs:attribute name="nodeType" type="xs:QName" use="required"/>

153    <xs:attribute name="minInstances" type="xs:int" use="optional"

154     default="1"/>

155    <xs:attribute name="maxInstances" use="optional" default="1">

156     <xs:simpleType>

157      <xs:union>

158       <xs:simpleType>

159        <xs:restriction base="xs:nonNegativeInteger">

160         <xs:pattern value="([1-9]+[0-9]*)"/>

161        </xs:restriction>

162       </xs:simpleType>

163       <xs:simpleType>

164        <xs:restriction base="xs:string">

165         <xs:enumeration value="unbounded"/>

166        </xs:restriction>

167       </xs:simpleType>

168      </xs:union>

169     </xs:simpleType>

170    </xs:attribute>

171   </xs:extension>

172  </xs:complexContent>

173</xs:complexType>

174 

175<xs:complexType name="tPropertyConstraint">

176  <xs:sequence>

177   <xs:any namespace="##other" processContents="lax" minOccurs="0"/>

178  </xs:sequence>

179  <xs:attribute name="property" type="xs:string" use="required"/>

180  <xs:attribute name="constraintType" type="xs:anyURI" use="required"/>

181</xs:complexType>

182 

183<xs:element name="TopologyTemplate" type="tTopologyTemplate"/>

184<xs:complexType name="tTopologyTemplate">

185  <xs:complexContent>

186   <xs:extension base="tTopologyElementCollection"/>

187  </xs:complexContent>

188</xs:complexType>

189 

190<xs:element name="GroupTemplate" type="tGroupTemplate"/>

191<xs:complexType name="tGroupTemplate">

192  <xs:complexContent>

193   <xs:extension base="tTopologyElementCollection">

194    <xs:sequence>

195     <xs:element name="Policies" minOccurs="0">

196      <xs:complexType>

197       <xs:sequence>

198        <xs:element name="Policy" type="tPolicy"

199         maxOccurs="unbounded"/>

200       </xs:sequence>

201      </xs:complexType>

202     </xs:element>

203    </xs:sequence>

204    <xs:attribute name="minInstances" type="xs:int" use="optional"

205     default="1"/>

206    <xs:attribute name="maxInstances" use="optional" default="1">

207     <xs:simpleType>

208      <xs:union>

209       <xs:simpleType>

210        <xs:restriction base="xs:nonNegativeInteger">

211         <xs:pattern value="([1-9]+[0-9]*)"/>

212        </xs:restriction>

213       </xs:simpleType>

214       <xs:simpleType>

215        <xs:restriction base="xs:string">

216         <xs:enumeration value="unbounded"/>

217        </xs:restriction>

218       </xs:simpleType>

219      </xs:union>

220     </xs:simpleType>

221    </xs:attribute>

222   </xs:extension>

223  </xs:complexContent>

224</xs:complexType>

225 

226<xs:complexType name="tTopologyElementCollection">

227  <xs:complexContent>

228   <xs:extension base="tExtensibleElements">

229    <xs:choice maxOccurs="unbounded">

230     <xs:element name="NodeTemplate" type="tNodeTemplate"/>

231     <xs:element name="RelationshipTemplate"

232      type="tRelationshipTemplate"/>

233     <xs:element name="GroupTemplate" type="tGroupTemplate"/>

234    </xs:choice>

235    <xs:attribute name="id" type="xs:ID" use="required"/>

236    <xs:attribute name="name" type="xs:string" use="optional"/>

237    <xs:attribute name="targetNamespace" type="xs:anyURI"/>

238   </xs:extension>

239  </xs:complexContent>

240</xs:complexType>

241 

242<xs:element name="RelationshipTypes" type="tRelationshipTypes"/>

243<xs:complexType name="tRelationshipTypes">

244  <xs:sequence>

245   <xs:element name="RelationshipType" type="tRelationshipType"

246    maxOccurs="unbounded"/>

247  </xs:sequence>

248  <xs:attribute name="targetNamespace" type="xs:anyURI"/>

249</xs:complexType>

250 

251<xs:element name="RelationshipType" type="tRelationshipType"/>

252<xs:complexType name="tRelationshipType">

253  <xs:complexContent>

254   <xs:extension base="tExtensibleElements">

255    <xs:sequence>

256     <xs:element name="RelationshipTypeProperties" minOccurs="0">

257      <xs:complexType>

258       <xs:attribute name="element" type="xs:QName"/>

259       <xs:attribute name="type" type="xs:QName"/>

260      </xs:complexType>

261     </xs:element>

262     <xs:element name="DerivedFrom" minOccurs="0">

263      <xs:complexType>

264       <xs:attribute name="relationshipTypeRef" type="xs:QName"

265        use="required"/>

266      </xs:complexType>

267     </xs:element>

268     <xs:element name="InstanceStates"

269      type="tTopologyElementInstanceStates" minOccurs="0"/>

270     <xs:element name="SourceInterfaces" minOccurs="0">

271      <xs:complexType>

272       <xs:sequence>

273        <xs:element name="Interface" type="tInterface"

274         maxOccurs="unbounded"/>

275       </xs:sequence>

276      </xs:complexType>

277     </xs:element>

278     <xs:element name="TargetInterfaces" minOccurs="0">

279     <xs:complexType>

280       <xs:sequence>

281        <xs:element name="Interface" type="tInterface"

282         maxOccurs="unbounded"/>

283       </xs:sequence>

284      </xs:complexType>

285     </xs:element>

286     <xs:element name="ValidSource" minOccurs="0">

287      <xs:complexType>

288       <xs:attribute name="typeRef" type="xs:QName" use="required"/>

289      </xs:complexType>

290     </xs:element>

291     <xs:element name="ValidTarget" minOccurs="0">

292      <xs:complexType>

293       <xs:attribute name="typeRef" type="xs:QName" use="required"/>

294      </xs:complexType>

295     </xs:element>

296    </xs:sequence>

297    <xs:attribute name="id" type="xs:ID" use="required"/>

298    <xs:attribute name="name" type="xs:string" use="optional"/>

299    <xs:attribute name="cascadingDeletion" type="tBoolean"

300     use="optional" default="no"/>

301    <xs:attribute name="targetNamespace" type="xs:anyURI"/>

302    <xs:attribute name="abstract" type="tBoolean" default="no"/>

303    <xs:attribute name="final" type="tBoolean" default="no"/>

304   </xs:extension>

305  </xs:complexContent>

306</xs:complexType>

307 

308<xs:element name="RelationshipTemplate" type="tRelationshipTemplate"/>

309<xs:complexType name="tRelationshipTemplate">

310  <xs:complexContent>

311   <xs:extension base="tExtensibleElements">

312    <xs:sequence>

313     <xs:element name="SourceElement">

314      <xs:complexType>

315       <xs:attribute name="id" type="xs:IDREF" use="required"/>

316      </xs:complexType>

317     </xs:element>

318     <xs:choice>

319      <xs:element name="TargetElement">

320       <xs:complexType>

321        <xs:attribute name="id" type="xs:IDREF" use="required"/>

322       </xs:complexType>

323      </xs:element>

324      <xs:element name="TargetElementReference">

325       <xs:complexType>

326        <xs:attribute name="id" type="xs:QName" use="required"/>

327       </xs:complexType>

328      </xs:element>

329     </xs:choice>

330     <xs:element name="PropertyDefaults" minOccurs="0">

331      <xs:complexType>

332       <xs:sequence>

333        <xs:any namespace="##other" processContents="lax"/>

334       </xs:sequence>

335      </xs:complexType>

336     </xs:element>

337     <xs:element name="PropertyConstraints" minOccurs="0">

338      <xs:complexType>

339       <xs:sequence>

340        <xs:element name="PropertyConstraint"

341         type="tPropertyConstraint" maxOccurs="unbounded"/>

342       </xs:sequence>

343      </xs:complexType>

344     </xs:element>

345     <xs:element name="RelationshipConstraints" minOccurs="0">

346      <xs:complexType>

347       <xs:sequence>

348        <xs:element name="RelationshipConstraint"

349         maxOccurs="unbounded">

350         <xs:complexType>

351          <xs:sequence>

352           <xs:any namespace="##other" processContents="lax"

353            minOccurs="0"/>

354          </xs:sequence>

355          <xs:attribute name="constraintType" type="xs:anyURI"

356           use="required"/>

357         </xs:complexType>

358        </xs:element>

359       </xs:sequence>

360      </xs:complexType>

361     </xs:element>

362    </xs:sequence>

363    <xs:attribute name="id" type="xs:ID" use="required"/>

364    <xs:attribute name="name" type="xs:string" use="optional"/>

365    <xs:attribute name="relationshipType" type="xs:QName"

366     use="required"/>

367   </xs:extension>

368  </xs:complexContent>

369</xs:complexType>

370 

371<xs:element name="NodeTypes" type="tNodeTypes"/>

372<xs:complexType name="tNodeTypes">

373  <xs:sequence>

374   <xs:element name="NodeType" type="tNodeType" maxOccurs="unbounded"/>

375  </xs:sequence>

376  <xs:attribute name="targetNamespace" type="xs:anyURI"/>

377</xs:complexType>

378 

379<xs:element name="NodeType" type="tNodeType"/>

380<xs:complexType name="tNodeType">

381  <xs:complexContent>

382   <xs:extension base="tExtensibleElements">

383    <xs:sequence>

384     <xs:element name="NodeTypeProperties" minOccurs="0">

385      <xs:complexType>

386       <xs:attribute name="element" type="xs:QName"/>

387       <xs:attribute name="type" type="xs:QName"/>

388      </xs:complexType>

389     </xs:element>

390     <xs:element name="DerivedFrom" minOccurs="0">

391      <xs:complexType>

392       <xs:attribute name="nodeTypeRef" type="xs:QName"

393        use="required"/>

394      </xs:complexType>

395     </xs:element>

396     <xs:element name="InstanceStates"

397      type="tTopologyElementInstanceStates" minOccurs="0"/>

398     <xs:element name="Interfaces" minOccurs="0">

399      <xs:complexType>

400       <xs:sequence>

401        <xs:element name="Interface" type="tInterface"

402         maxOccurs="unbounded"/>

403       </xs:sequence>

404      </xs:complexType>

405     </xs:element>

406     <xs:element name="Policies" minOccurs="0">

407      <xs:complexType>

408       <xs:sequence>

409        <xs:element name="Policy" type="tPolicy"

410         maxOccurs="unbounded"/>

411       </xs:sequence>

412      </xs:complexType>

413     </xs:element>

414     <xs:element name="DeploymentArtifacts" minOccurs="0">

415      <xs:complexType>

416       <xs:sequence>

417        <xs:element name="DeploymentArtifact"

418         type="tDeploymentArtifact" maxOccurs="unbounded"/>

419       </xs:sequence>

420      </xs:complexType>

421     </xs:element>

422    </xs:sequence>

423    <xs:attribute name="id" type="xs:ID" use="required"/>

424    <xs:attribute name="name" type="xs:string" use="optional"/>

425    <xs:attribute name="targetNamespace" type="xs:anyURI"/>

426    <xs:attribute name="abstract" type="tBoolean" default="no"/>

427    <xs:attribute name="final" type="tBoolean" default="no"/>

428   </xs:extension>

429  </xs:complexContent>

430</xs:complexType>

431 

432<xs:element name="Plans" type="tPlans"/>

433<xs:complexType name="tPlans">

434  <xs:sequence>

435   <xs:element name="Plan" type="tPlan" maxOccurs="unbounded"/>

436  </xs:sequence>

437  <xs:attribute name="targetNamespace" type="xs:anyURI"/>

438</xs:complexType>

439 

440<xs:element name="Plan" type="tPlan"/>

441<xs:complexType name="tPlan">

442  <xs:complexContent>

443   <xs:extension base="tExtensibleElements">

444    <xs:sequence>

445     <xs:element name="Precondition" type="tCondition" minOccurs="0"/>

446     <xs:choice>

447      <xs:element name="PlanModel">

448       <xs:complexType>

449        <xs:sequence>

450         <xs:any namespace="##other" processContents="lax"/>

451        </xs:sequence>

452       </xs:complexType>

453      </xs:element>

454      <xs:element name="PlanModelReference">

455       <xs:complexType>

456        <xs:attribute name="reference" type="xs:anyURI"

457         use="required"/>

458       </xs:complexType>

459      </xs:element>

460     </xs:choice>

461    </xs:sequence>

462    <xs:attribute name="id" type="xs:ID" use="required"/>

463    <xs:attribute name="name" type="xs:string" use="optional"/>

464    <xs:attribute name="planType" type="xs:anyURI" use="required"/>

465    <xs:attribute name="languageUsed" type="xs:anyURI" use="required"/>

466   </xs:extension>

467  </xs:complexContent>

468</xs:complexType>

469 

470<xs:complexType name="tPolicy">

471  <xs:complexContent>

472   <xs:extension base="tExtensibleElements">

473    <xs:attribute name="name" type="xs:string" use="required"/>

474    <xs:attribute name="type" type="xs:anyURI" use="required"/>

475   </xs:extension>

476  </xs:complexContent>

477</xs:complexType>

478 

479<xs:complexType name="tEnvironmentConstraint">

480  <xs:sequence>

481   <xs:any namespace="##other" processContents="lax"/>

482  </xs:sequence>

483  <xs:attribute name="constraintType" type="xs:anyURI" use="required"/>

484</xs:complexType>

485 

486<xs:complexType name="tExtensions">

487  <xs:complexContent>

488   <xs:extension base="tExtensibleElements">

489    <xs:sequence>

490     <xs:element name="Extension" type="tExtension"

491      maxOccurs="unbounded"/>

492    </xs:sequence>

493   </xs:extension>

494  </xs:complexContent>

495</xs:complexType>

496 

497<xs:complexType name="tExtension">

498  <xs:complexContent>

499   <xs:extension base="tExtensibleElements">

500    <xs:attribute name="namespace" type="xs:anyURI" use="required"/>

501    <xs:attribute name="mustUnderstand" type="tBoolean" use="optional"

502     default="yes"/>

503   </xs:extension>

504  </xs:complexContent>

505</xs:complexType>

506 

507<xs:complexType name="tParameter">

508  <xs:attribute name="name" type="xs:string" use="required"/>

509  <xs:attribute name="type" type="xs:string" use="required"/>

510  <xs:attribute name="required" type="tBoolean" use="optional"

511   default="yes"/>

512</xs:complexType>

513 

514<xs:complexType name="tInterface">

515  <xs:sequence>

516   <xs:element name="Operation" type="tOperation" minOccurs="0"

517    maxOccurs="unbounded"/>

518   <xs:element name="ImplementationArtifacts" minOccurs="0">

519    <xs:complexType>

520     <xs:sequence>

521      <xs:element name="ImplementationArtifact"

522       type="tImplementationArtifact" maxOccurs="unbounded"/>

523     </xs:sequence>

524    </xs:complexType>

525   </xs:element>

526  </xs:sequence>

527  <xs:attribute name="name" type="xs:anyURI" use="required"/>

528</xs:complexType>

529 

530<xs:complexType name="tWSDL">

531  <xs:attribute name="portType" type="xs:QName" use="required"/>

532  <xs:attribute name="operation" type="xs:NCName" use="required"/>

533</xs:complexType>

534 

535<xs:complexType name="tOperation">

536  <xs:complexContent>

537   <xs:extension base="tExtensibleElements">

538    <xs:choice>

539     <xs:element name="WSDL" type="tWSDL"/>

540     <xs:element name="REST" type="tREST"/>

541     <xs:element name="ScriptOperation" type="tScriptOperation"/>

542    </xs:choice>

543    <xs:attribute name="name" type="xs:NCName" use="required"/>

544   </xs:extension>

545  </xs:complexContent>

546</xs:complexType>

547 

548<xs:complexType name="tREST">

549  <xs:sequence>

550   <xs:element name="Parameters" minOccurs="0">

551    <xs:complexType>

552     <xs:sequence>

553      <xs:element name="Parameter" maxOccurs="unbounded">

554       <xs:complexType>

555        <xs:attribute name="name" type="xs:string" use="required"/>

556        <xs:attribute name="required" type="tBoolean" use="optional"

557         default="yes"/>

558       </xs:complexType>

559      </xs:element>

560     </xs:sequence>

561    </xs:complexType>

562   </xs:element>

563   <xs:element name="Headers" minOccurs="0">

564    <xs:complexType>

565     <xs:sequence>

566      <xs:element name="Header" maxOccurs="unbounded">

567       <xs:complexType>

568        <xs:attribute name="name" type="xs:string" use="required"/>

569        <xs:attribute name="required" type="tBoolean" use="optional"

570         default="yes"/>

571       </xs:complexType>

572      </xs:element>

573     </xs:sequence>

574    </xs:complexType>

575   </xs:element>

576  </xs:sequence>

577  <xs:attribute name="method" default="GET">

578   <xs:simpleType>

579    <xs:restriction base="xs:string">

580     <xs:enumeration value="GET"/>

581     <xs:enumeration value="PUT"/>

582     <xs:enumeration value="POST"/>

583     <xs:enumeration value="DELETE"/>

584    </xs:restriction>

585   </xs:simpleType>

586  </xs:attribute>

587  <xs:attribute name="abs_path" type="xs:anyURI" use="optional"/>

588  <xs:attribute name="absoluteURI" type="xs:anyURI" use="optional"/>

589  <xs:attribute name="requestBody" type="xs:QName" use="optional"/>

590  <xs:attribute name="responseBody" type="xs:QName" use="optional"/>

591</xs:complexType>

592 

593<xs:complexType name="tScriptOperation">

594  <xs:sequence>

595   <xs:element name="InputParameters" minOccurs="0">

596    <xs:complexType>

597     <xs:sequence>

598      <xs:element name="InputParameter" type="tParameter"

599       maxOccurs="unbounded"/>

600     </xs:sequence>

601    </xs:complexType>

602   </xs:element>

603   <xs:element name="OutputParameters" minOccurs="0">

604    <xs:complexType>

605     <xs:sequence>

606      <xs:element name="OutputParameter" type="tParameter"

607       maxOccurs="unbounded"/>

608     </xs:sequence>

609    </xs:complexType>

610   </xs:element>

611  </xs:sequence>

612</xs:complexType>

613<xs:complexType name="tImplementationArtifact">

614  <xs:complexContent>

615   <xs:extension base="tExtensibleElements">

616    <xs:sequence>

617     <xs:element name="RequiredContainerCapabilities" minOccurs="0">

618      <xs:complexType>

619       <xs:sequence>

620        <xs:element name="RequiredContainerCapability"

621         maxOccurs="unbounded">

622         <xs:complexType>

623          <xs:attribute name="capability" type="xs:anyURI"

624           use="required"/>

625         </xs:complexType>

626        </xs:element>

627       </xs:sequence>

628      </xs:complexType>

629     </xs:element>

630    </xs:sequence>

631    <xs:attribute name="operationName" type="xs:string"

632     use="optional"/>

633    <xs:attribute name="type" type="xs:anyURI" use="required"/>

634   </xs:extension>

635  </xs:complexContent>

636</xs:complexType>

637 

638<xs:complexType name="tCondition">

639  <xs:sequence>

640   <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>

641  </xs:sequence>

642  <xs:attribute name="expressionLanguage" type="xs:anyURI"

643   use="required"/>

644</xs:complexType>

645 

646<xs:complexType name="tTopologyElementInstanceStates">

647  <xs:sequence>

648   <xs:element name="InstanceState" maxOccurs="unbounded">

649    <xs:complexType>

650     <xs:attribute name="state" type="xs:anyURI" use="required"/>

651    </xs:complexType>

652   </xs:element>

653  </xs:sequence>

654</xs:complexType>

655 

656<xs:simpleType name="tBoolean">

657  <xs:restriction base="xs:string">

658   <xs:enumeration value="yes"/>

659   <xs:enumeration value="no"/>

660  </xs:restriction>

661</xs:simpleType>

662 

663<xs:simpleType name="importedURI">

664  <xs:restriction base="xs:anyURI"/>

665</xs:simpleType>

666 

667</xs:schema>

Appendix E.  Sample

This appendix contains the full sample used in this specification.

E.1 Sample Service Topology Definition

<ServiceTemplate name="myService"

                 targetNamespace="http://www.ibm.com/sample">

 

  <Types>      

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

               elementFormDefault="qualified"

               attributeFormDefault="unqualified">

      <xs:element name="ApplicationProperties">

        <xs:complexType>

          <xs:sequence>

            <xs:element name="Owner" type="xs:string"/>

            <xs:element name="InstanceName" type="xs:string"/>

            <xs:element name="AccountID" type="xs:string"/>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element name="AppServerProperties">

        <xs:complexType>

          <xs:sequence>

            <element name="HostName" type="string"/>

            <element name="IPAddress" type="string"/>

            <element name="HeapSize" type="positiveInteger"/>

            <element name="SoapPort" type="positiveInteger"/>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

    </xs:schema>

  </Types>

 

  <TopologyTemplate id="SampleApplication">

 

    <NodeTemplate id="MyApplication"

                  name="My Application"

                  nodeType="abc:Application">

      <PropertyDefaults>

        <ApplicationProperties> 

          <Owner>Frank</Owner>

          <InstanceName>Thomas’ favorite application</InstanceName>

        </ApplicationProperties>

      </PropertyDefaults>

    <NodeTemplate/>

 

    <NodeTemplate id="MyAppServer"

                  name="My Application Server"

                  nodeType="abc:ApplicationServer"

                  minInstances="0"

                  maxInstances="unbounded"/>

 

    <RelationshipTemplate id="MyDeploymentRelationship"

                          relationshipType="deployedOn">

      <SourceElement id="MyApplication"/>

      <TargetElement id="MyAppServer"/>

    </RelationshipTemplate>

 

  </TopologyTemplate>

 

  <NodeTypes>

    <NodeType name="Application">

      <documentation xml:lang="EN">

        A reusable definition of a node type representing an

        application that can be deployed on application servers.

      </documentation>

      <NodeTypeProperties element="ApplicationProperties"/>

      <InstanceStates>

        <InstanceState state="http://www.example.com/started"/>

        <InstanceState state="http://www.example.com/stopped"/>

      </InstanceStates>

      <Interfaces>

        <Interface name="DeploymentInterface">

          <Operation name="DeployApplication">

            <ScriptOperation>

              <InputParameters>

                <InputParamter name="InstanceName"

                               type="string"/>

                <InputParamter name="AppServerHostname"

                               type="string"/>

                <InputParamter name="ContextRoot"

                               type="string"/>

              </InputParameters>

            </ScriptOperation>

          </Operation>

          <ImplementationArtifacts>

            <ImplementationArtifact operationName="DeployApplication"

             type="http://www.example.com/ScriptArtifact/PhythonReference">

              scripts/phython/deployApplication.py

            </ImplementationArtifact>

          </ImplementationArtifacts>

        </Interface>

      </Interfaces

    </NodeType>

    <NodeType name="ApplicationServer"

              targetNamespace="http://www.ibm.com/sample">

      <NodeTypeProperties element="AppServerProperties"/>

      <Interfaces>

        <Interface name="MyAppServerInterface">

          <Operation name="AcquireNetworkAddress">

            <WSDL portType="my:NetworkPT"

                  operation="AcquireNetworkAddress"/>

          </Operation>

          <Operation name="DeployApplicationServer">

            <WSDL portType="my:AppServerPT"

                  operation="DeployApplicationServer"/>

          </Operation>

          <ImplementationArtifacts>

            <ImplementationArtifact operationName="AcquireNetworkAddress"

             type="http://www.example.com/MyJeeArtifact/EarRef">

              artifacts/jee/MyEAR.ear

            </ImplementationArtifact>

            <ImplementationArtifact operationName="DeployApplicationServer"

             type="http://www.example.com/MyJeeArtifact/EarRef">

              artifacts/jee/AppServerManagement.ear

            </ImplementationArtifact>

          </ImplementationArtifacts>

        </Interface>

      </Interfaces>

    </NodeType>

  </NodeTypes>

 

  <RelationshipTypes>

    <documentation xml:lang="EN">

      A reusable definition of relation that expresses deployment of

      an artifact on a hosting environment.

    </documentation>

    <RelationshipType name="deployedOn">

    </RelationshipType>

  </RelationshipTypes>

 

  <Plans>

    <Plan id="DeployApplication"

          name="Sample Application Build Plan"

          planType="http://docs.oasis-

           open.org/tosca/ns/2011/12/PlanTypes/BuildPlan"

          languageUsed="http://www.omg.org/spec/BPMN/2.0/">

 

       <PreCondition expressionLanguage="www.example.com/text">?

         Run only if funding is available

       </PreCondition>

 

      <PlanModel>

        <process name="DeployNewApplication" id="p1">

          <documentation>This process deploys a new instance of the

            sample application.

          </documentation>

 

          <task id="t1" name="CreateAccount"/>

 

          <task id="t2" name="AcquireNetworkAddresses"

                isSequential="false"

                loopDataInput="t2Input.LoopCounter"/>

            <documentation>Assumption: t2 gets data of type “input”

              as input and this data has a field names “LoopCounter”

              that contains the actual multiplicity of the task.

            </documentation>

 

          <task id="t3" name="DeployApplicationServer"

                isSequential="false"

                loopDataInput="t3Input.LoopCounter"/>

 

          <task id="t4" name="DeployApplication"

                isSequential="false"

                loopDataInput="t4Input.LoopCounter"/>

 

          <sequenceFlow id="s1" targetRef="t2" sourceRef="t1"/>

          <sequenceFlow id="s2" targetRef="t3" sourceRef="t2"/>

          <sequenceFlow id="s3" targetRef="t4" sourceRef="t3"/>

        </process>

      </PlanModel>

    </Plan>

 

    <Plan id="RemoveApplication"

      planType="http://docs.oasis-

       open.org/tosca/ns/2011/12/PlanTypes/TerminationPlan"

      languageUsed="http://docs.oasis-

        open.org/wsbpel/2.0/process/executable">

      <PlanModelReference reference="prj:RemoveApp"/>

  </Plan>

</Plans>

 

</ServiceTemplate>

Appendix F.  Revision History

Revision

Date

Editor

Changes Made

wd-01

2012-01-26

Thomas Spatzier

Changes for JIRA Issue TOSCA-1:

Initial working draft based on input spec delivered to TOSCA TC. Copied all content from input spec and just changed namespace. Added line numbers to whole document.

wd-02

2012-02-23

Mike Edwards, Thomas Spatzier

Changes for JIRA Issue TOSCA-6:

Reviewed and adapted normative statement keywords according to RFC2119.

wd-03

2012-03-06

Arvind Srinivasan, Mike Edwards, Thomas Spatzier

Changes for JIRA Issue TOSCA-10:

Marked all occurrences of keywords from the TOSCA language (element and attribute names) in Courier New font.

wd-04

2012-03-22

Thomas Spatzier,
Frank Leymann

Changes for JIRA Issue TOSCA-4:

Changed definition of NodeType Interfaces element; adapted text and examples

wd-05

2012-03-30

Thomas Spatzier,

Frank Leymann

Changes for JIRA Issue TOSCA-5:

Changed definition of NodeTemplate to include ImplementationArtifact element; adapted text

Added Acknowledgements section in Appendix

wd-06

2012-05-03

Thomas Spatzier,

Derek Palma

Changes for JIRA Issue TOSCA-15:

Added clarifying section about artifacts (see section 3.2);

Implemented editorial changes according to OASIS staff recommendations;

updated Acknowledgements section

wd-07

2012-06-15

Thomas Spatzier,

Frank Leymann

Changes for JIRA Issue TOSCA-20:

Added abstract attribute to NodeType for sub-issue 2;

Added final attribute to NodeType for sub-issue 4;

Added explanatory text on Node Type properties for sub-issue 8

wd-08

2012-06-29

Thomas Spatzier, Derek Palma

Changes for JIRA Issue TOSCA-23:

Added interfaces and introduced inheritance for RelationshipType; based on wd-07

Added reference to XML element and attribute naming scheme used in this spec

wd-09

2012-07-16

Frank Leyman, Thomas Spatzier, Tobias Kunze

Changes for JIRA Issue TOSCA-17:

Specifies the format of a CSAR file;
Explained CSAR concept in the corresponding section.