-
Notifications
You must be signed in to change notification settings - Fork 7
NodeType Cron
Xavier Cases Camats edited this page Jul 7, 2016
·
4 revisions
Here you can see the content of the file cron.xml explained:
<NodeType name="Cron" shape="ellipse" color="#ffffff" image="cron.png">
<DerivedFrom typeRef="root" />
<PropertiesDefinition element="CronProperties"
type="tCronProperties" />
<Interfaces>
<Interface name="Install">
<Operation name="compilePuppetTemplateHierarchy"></Operation>
</Interface>
</Interfaces>
</NodeType>
<NodeTypeImplementation nodeType="Cron"
name="CronImpl">
<DeploymentArtifacts>
<DeploymentArtifact name="CronPT.ftl"
artifactType="PuppetTemplate" artifactRef="CronPT">
</DeploymentArtifact>
<DeploymentArtifact artifactType="PuppetModule"
artifactRef="CronPM">
</DeploymentArtifact>
</DeploymentArtifacts>
</NodeTypeImplementation>
<ArtifactTemplate type="PuppetTemplate" id="CronPT">
<ArtifactReferences>
<ArtifactReference reference="Templates/CronPT.ftl"></ArtifactReference>
</ArtifactReferences>
</ArtifactTemplate>
<ArtifactTemplate type="PuppetModule" id="CronPM">
<Properties
xmlns:co="http://docs.oasis-open.org/tosca/ns/2011/12/CloudOptingTypes">
<co:PuppetModuleProperties>
<co:module>rmueller-cron</co:module>
<co:git>https://github.com/roman-mueller/rmueller-cron</co:git>
</co:PuppetModuleProperties>
</Properties>
</ArtifactTemplate>In the file CloudOptingTypes.xsd we can find the types tCronProperties and CronProperties defined:
<xs:complexType name="tCronProperties">
<xs:sequence>
<xs:element name="installed">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:boolean">
<xs:attribute name="title" fixed="Have to install?"></xs:attribute>
<xs:attribute name="formtype" fixed="boolean"></xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="CronProperties" type="tCronProperties" />The defined params have to match with the puppetfile CronPT.ftl
class{'cron':
<#if installed?has_content>package_ensure => 'installed',</#if>
}With this nodetype what we can see on the TOSCA IDE is the following:

- Home
- Creating templates for sending mails
- DevInstallation
- Installation
- Relation processes
- Tools used
- TOSCA Documentation