From 8b557618460de1d264c6e26681a08aae9229fe08 Mon Sep 17 00:00:00 2001 From: Vinayak Ram Date: Mon, 28 Sep 2015 12:56:20 -0500 Subject: JIRA:PARSER-1 -XSLT script for YANG to TOSCA patch set-7 Signed-off-by: Shiva Charan --- yang2tosca/tosca_transformer.xslt | 165 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 yang2tosca/tosca_transformer.xslt diff --git a/yang2tosca/tosca_transformer.xslt b/yang2tosca/tosca_transformer.xslt new file mode 100644 index 0000000..c8953ac --- /dev/null +++ b/yang2tosca/tosca_transformer.xslt @@ -0,0 +1,165 @@ + + + + + + tosca_definitions_version:tosca_simple_yaml_1_0_0 + tosca_default_namespace:tosca_simple_yaml_1_0_0 + template_name: + description: + template_author: + template_version: + derived_from:tosca.nodes.Root + import: + + + type:tosca.nodes.general.vdus + type:tosca.nodes.compute + type:tosca.nodes.block.Storage + type:tosca.nodes.network + type:tosca.nodes.security + type:tosca.nodes.policy + + + + + + +metadata: + ID: + Vendor: + + +dsl_definitions: + compute_props_host_:compute_props_host_ + + num_cpu: + + + + mem_size: + + + + + +node_types: + tosca.nodes.compute.: + derived_from:tosca.nodes.compute + +topology_template: + # a description of the topology template + description:> + + inputs: + storage_size: + type:scalar-unit.size + + default: + description: + + + storage_location: + type:string + description:> + Block storage mount point (filesystem path). + node_templates: + + : + type:tosca.nodes.Compute + capabilities: + os: + properties: + architecture: + type: + distribution: + version: + host: + properties:*compute_props_host_ + scalable: + properties: + min_instances: + + + default_instances: + + + requirements: + - local_storage: + node:_BlockStorage + relationship: + type:AttachesTo + properties: + location:{ get_input:storage_location } + interfaces: + Standard: + + + + + start: + implementation: + + + delete: + implementaion: + + + stop: + implementaion: + + + + + + + + _BlockStorage: + type:tosca.nodes.BlockStorage + properties: + size:{ get_input:storage_size } + + + + + + + + + + + + + + + + + + + _network: + type:tosca.nodes.network.Network + properties: + ip_version:4 + _port: + type:tosca.nodes.network.Port + requirements: + - binding: + node: + - link: + node:_network + + + + + + + -- cgit 1.2.3-korg