- # a description of the topology template
- description:>
- <xsl:value-of select="ns:description/node()/text()"/>
- inputs:
- storage_size:
- type:scalar-unit.size<xsl:for-each select="ns:list"><xsl:if test="@name = 'ellis'">
- <xsl:for-each select="ns:container"><xsl:if test="@name = 'resource'"><xsl:for-each select="ns:container"><xsl:if test="@name = 'disk'">
- default:<xsl:value-of select="ns:leaf/ns:type/ns:range/@value"/>
- description:<xsl:value-of select="ns:description/node()/text()"/>
- </xsl:if></xsl:for-each></xsl:if></xsl:for-each>
- </xsl:if></xsl:for-each>
- storage_location:
- type:string
- description:>
- Block storage mount point (filesystem path).
- node_templates:<xsl:for-each select="ns:list">
- <xsl:text>
		</xsl:text>
- <xsl:value-of select="@name"/>:
- type:tosca.nodes.Compute
- capabilities:
- os:
- properties:
- architecture:
- type:
- distribution:
- version:
- host:
- properties:*compute_props_host_<xsl:value-of select="@name"/>
- scalable:
- properties:
- min_instances:<xsl:for-each select="ns:leaf"><xsl:if test="@name = 'instance-num'">
- <xsl:value-of select="ns:default/@value"/>
- </xsl:if></xsl:for-each>
- default_instances:<xsl:for-each select="ns:leaf"><xsl:if test="@name = 'instance-num'">
- <xsl:value-of select="ns:default/@value"/>
- </xsl:if></xsl:for-each>
- requirements:
- - local_storage:
- node:<xsl:value-of select="@name"/>_BlockStorage
- relationship:
- type:AttachesTo
- properties:
- location:{ get_input:storage_location }
- interfaces:
- Standard:<xsl:for-each select="ns:container">
- <xsl:if test="@name = 'workflow-script'">
- <xsl:for-each select="ns:leaf">
- <xsl:choose>
- <xsl:when test="@name = 'init'">
- start:
- implementation:<xsl:value-of select="ns:default/@value"/>
- </xsl:when>
- <xsl:when test="@name='terminate'">
- delete:
- implementaion:<xsl:value-of select="ns:default/@value"/>
- </xsl:when>
- <xsl:when test="@name='graceful-shutdown'">
- stop:
- implementaion:<xsl:value-of select="ns:default/@value"/>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>
		</xsl:text>
- <xsl:variable name="vdu" select = "@name"/>
- <xsl:value-of select="$vdu"/>_BlockStorage:
- type:tosca.nodes.BlockStorage
- properties:
- size:{ get_input:storage_size }</xsl:for-each><xsl:for-each select="ns:list"><xsl:for-each select="ns:container"><xsl:if test="@name = 'resource'"><xsl:for-each select="ns:container">
- <xsl:if test="@name='vnic'">
- <xsl:variable name="vnic" select="ns:leaf/ns:type/ns:range/@value"/>
- <xsl:call-template name="nic.loop">
- <xsl:with-param name="from" select="1"/>
- <xsl:with-param name="to" select="$vnic"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </xsl:if>
- </xsl:for-each>
- </xsl:for-each>
+ # A description of the topology template
+ description: >
+ <xsl:value-of select="ns:description/node()/text()"/>
+ inputs:
+ storage_size:
+ type: scalar-unit.size<xsl:for-each select="ns:list"><xsl:if test="(@name != 'connection-points') and (@name != 'internal-virtual-link')">
+ <xsl:for-each select="ns:container"><xsl:if test="@name = 'resource'"><xsl:for-each select="ns:container"><xsl:if test="@name = 'disk'">
+ default: <xsl:value-of select="ns:leaf/ns:type/ns:range/@value"/>
+ description: <xsl:value-of select="ns:description/node()/text()"/>
+ </xsl:if></xsl:for-each></xsl:if></xsl:for-each>
+ </xsl:if></xsl:for-each>
+ storage_location:
+ type: string
+ description: >
+ Block storage mount point (filesystem path).
+ node_templates:<xsl:for-each select="ns:list"><xsl:if test="(@name != 'connection-points') and (@name != 'internal-virtual-link')">
+ <xsl:text>
		</xsl:text>
+ <xsl:value-of select="@name"/>:
+ type: tosca.nodes.Compute
+ capabilities:
+ os:
+ properties:
+ architecture:
+ type:
+ distribution:
+ version:
+ host:
+ properties: *compute_props_host_<xsl:value-of select="@name"/>
+ scalable:
+ properties:
+ min_instances: <xsl:for-each select="ns:leaf"><xsl:if test="@name = 'instance-num'">
+ <xsl:value-of select="ns:default/@value"/>
+ </xsl:if></xsl:for-each>
+ default_instances: <xsl:for-each select="ns:leaf"><xsl:if test="@name = 'instance-num'">
+ <xsl:value-of select="ns:default/@value"/>
+ </xsl:if></xsl:for-each>
+ requirements:
+ - local_storage:
+ node: <xsl:value-of select="@name"/>_BlockStorage
+ relationship:
+ type: AttachesTo
+ properties:
+ location: { get_input:storage_location }
+ interfaces:
+ Standard:<xsl:for-each select="ns:container">
+ <xsl:if test="@name = 'workflow-script'">
+ <xsl:for-each select="ns:leaf">
+ <xsl:choose>
+ <xsl:when test="@name = 'init'">
+ start:
+ implementation: <xsl:value-of select="ns:default/@value"/>
+ </xsl:when>
+ <xsl:when test="@name='terminate'">
+ delete:
+ implementaion: <xsl:value-of select="ns:default/@value"/>
+ </xsl:when>
+ <xsl:when test="@name='graceful-shutdown'">
+ stop:
+ implementaion: <xsl:value-of select="ns:default/@value"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="ns:container">
+ <xsl:if test="@name = 'auto-scale-policies'">
+ monitoring_policy:<xsl:for-each select="ns:list">
+ name: <xsl:value-of select="ns:key/@value"/>
+ parameters:<xsl:for-each select="../../ns:container"> <xsl:if test="@name = 'monitor-paras'">
+ <xsl:text>
				</xsl:text>
+ <xsl:for-each select="ns:leaf-list">
+ <xsl:for-each select="ns:type">
+ <xsl:for-each select="ns:enum">
+ <xsl:value-of select="@name"/>:
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:for-each>
+ </xsl:if></xsl:for-each>
+ actions:<xsl:for-each select="ns:container"> <xsl:if test="@name = 'actions'">
+ <xsl:text>
				</xsl:text>
+ <xsl:for-each select="ns:list"> <xsl:value-of select="ns:key/@value"/>: <xsl:value-of select="ns:leaf/ns:type/ns:enum/@name"/> </xsl:for-each>
+ </xsl:if> </xsl:for-each>
+ </xsl:for-each></xsl:if></xsl:for-each>
+ <xsl:text>
		</xsl:text>
+ <xsl:variable name="vdu" select = "@name"/>
+ <xsl:value-of select="$vdu"/>_BlockStorage:
+ type: tosca.nodes.BlockStorage
+ properties:
+ size: { get_input:storage_size }</xsl:if></xsl:for-each><xsl:for-each select="ns:list"><xsl:for-each select="ns:container"><xsl:if test="@name = 'resource'"><xsl:for-each select="ns:container">
+ <xsl:if test="@name='vnic'">
+ <xsl:variable name="vnic" select="ns:leaf/ns:type/ns:range/@value"/>
+ <xsl:call-template name="nic.loop">
+ <xsl:with-param name="from" select="1"/>
+ <xsl:with-param name="to" select="$vnic"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select="ns:list">
+ <xsl:if test="@name='connection-points'">
+ <xsl:variable name="vnic" select="count(ns:leaf)"/>
+ <xsl:call-template name="cp.loop">
+ <xsl:with-param name="from" select="1"/>
+ <xsl:with-param name="to" select="$vnic"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="ns:list">
+ <xsl:for-each select="ns:container"><xsl:if test="@name = 'resource'"><xsl:for-each select="ns:list"><xsl:if test="@name = 'network-interfaces'">
+
+ <xsl:variable name="vnic" select="count(ns:choice/ns:case)"/>
+ <xsl:call-template name="internalCP.loop">
+ <xsl:with-param name="from" select="1"/>
+ <xsl:with-param name="to" select="$vnic"/>
+ </xsl:call-template>
+ </xsl:if></xsl:for-each></xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select="ns:list">
+ <xsl:if test="@name='internal-virtual-link'">
+ <xsl:variable name="vnic" select="count(ns:leaf-list)"/>
+ <xsl:call-template name="VL.loop">
+ <xsl:with-param name="from" select="1"/>
+ <xsl:with-param name="to" select="$vnic"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>