From d93f6ca5bf0d4f22ec0fd90eac1bf8b9c09db820 Mon Sep 17 00:00:00 2001 From: kubi Date: Tue, 29 Dec 2015 11:04:20 +0800 Subject: running Parser Yang-to-Tosca module as a tool with jnon and fatih's help, new docker image has been uploaded so this part is about parser verify validating output against expected outcome. Change-Id: If50d241a5338888f14fd11a752dc72678e0c569b JIRA:YARDSTICK-224 Signed-off-by: kubi --- samples/yang.yaml | 687 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 687 insertions(+) create mode 100644 samples/yang.yaml (limited to 'samples/yang.yaml') diff --git a/samples/yang.yaml b/samples/yang.yaml new file mode 100644 index 000000000..86b7b2f31 --- /dev/null +++ b/samples/yang.yaml @@ -0,0 +1,687 @@ + module clearwater { + + namespace "http://localhost/ietf-inet-types.yang"; + + prefix "yang"; + + organization "HP"; + + contact "TBD"; + + description "This module defines a VNF Deployment Unit."; + revision "2014-05-18" { + + description + + "Initial version"; + + reference + + "RFC XXXX"; + + } + container clearwater { + + description + + "Vdus used in a vnfd"; + + list ellis { + key id; + leaf id{ + type string; + description "key ID for vdu1"; + } + description + + "Vdu key"; + + + + leaf instance-num { + + type uint16{ + range 1..6;} + default 1; + + + description + + "Number of instances of the said VDU which shall be + instantiated"; + + } + + leaf vm-image { + + type string; + reference "uri"; + + + description + + "Reference to a VM image"; + + } + container resource { + description + + "The required resource"; + + container cpu { + + description + + "The required computation resource"; + + + + leaf vCPU_num { + + type uint32{ + range 4; + } + + description + + "The number of virtual CPU units"; + + } + + + + list vCPU-spec { + + key "name"; + + + + description + + "Processor characteristics for the VDU"; + + + + leaf name { + + type string; + + description + + "Name of vCPU-spec"; + + } + leaf description { + + type string; + + description + + "Description of vCPU-spec"; + + } + + leaf value { + + type uint32; + + description + + "Value of vCPU-spec"; + + } + + } + + } + + container memory { + + description + + "The required memory resource"; + + leaf memory_size { + + type uint32{ + range 4096; + } + + description + + "Memory size, unit:MBytes"; + + } + + list memory-spec { + + key name; + + + + description + + "Memory characteristics for the VDU"; + + + + leaf name { + + type string; + + description + + "Name of memory-spec"; + + } + + + + leaf description { + + type string; + + description + + "Description of memory-spec"; + + } + + + + leaf value { + + type uint32; + + description + + "Value of memory-spec"; + + } + + } + + } + + + + container disk { + + description + + "The required storage resource"; + + + + leaf disk-size { + + type uint32{ + range 2048; + } + description + + "Virtual storage size, unit:MBytes"; + } + + + + list disk-KQI { + + key name; + + + + description + + "Storage characteristics in the VDU"; + + + + leaf name { + + type string; + + description + + "Name of disk-KQI"; + + } + leaf description { + + type string; + + description + + "Description of disk-KQI"; + + } + + + + leaf value { + + type uint32; + + description + + "Value of disk-KQI"; + + } + + } + + } + + + + container vnic { + + description + + "Virtual network interface card (vnic) resource"; + + + + leaf vnic-num { + + type uint32{ + range 2; + } + + description + + "The total number of virtual vnic"; + + } + } + + } + + + + container workflow-script { + + description + + "VDU workflow script"; + + + + leaf init { + + type string; + default "start.sh"; + + + description + + "VDU initialization script"; + } + + + + leaf terminate { + + type string; + default "stop.sh"; + + + description + + "VDU termination script"; + } + + leaf graceful-shutdown { + + type string; + default "shutdown.sh"; + + + description + + "VDU graceful shutdown script"; + + } + + } + + } + list bono { + key id; + leaf id{ + type string; + description "key ID for vdu2"; + } + description + + "Vdu key"; + + + + leaf instance-num { + + type uint16; + default 3; + + + description + + "Number of instances of the said VDU which shall be + instantiated"; + + } + + + + leaf vm-image { + + type string; + reference "URI"; + + + description + + "Reference to a VM image"; + + } + + + + container resource { + description + + "The required resource"; + + + + container cpu { + + description + + "The required computation resource"; + + + + leaf vCPU_num { + + type uint32{ + range 3; + } + + description + + "The number of virtual CPU units"; + + } + + + + list vCPU-spec { + + key "name"; + + + + description + + "Processor characteristics for the VDU"; + + + + leaf name { + + type string; + + description + + "Name of vCPU-spec"; + + } + leaf description { + + type string; + + description + + "Description of vCPU-spec"; + + } + + + + leaf value { + + type uint32; + + description + + "Value of vCPU-spec"; + + } + + } + + } + + + + container memory { + + description + + "The required memory resource"; + + + + leaf memory_size { + + type uint32{ + range 2048; + } + + description + + "Memory size, unit:MBytes"; + + } + + list memory-spec { + + key name; + + description + + "Memory characteristics for the VDU"; + + + + leaf name { + + type string; + + description + + "Name of memory-spec"; + + } + + + + leaf description { + + type string; + + description + + "Description of memory-spec"; + + } + + + + leaf value { + + type uint32; + + description + + "Value of memory-spec"; + + } + + } + + } + + + + container disk { + + description + + "The required storage resource"; + + + + leaf disk-size { + + type uint32{ + range 3000; + } + + description + + "Virtual storage size, unit:MBytes"; + + } + + + + list disk-KQI { + + key name; + + + + description + + "Storage characteristics in the VDU"; + + + + leaf name { + + type string; + + description + + "Name of disk-KQI"; + + } + leaf description { + + type string; + + description + + "Description of disk-KQI"; + + } + + + + leaf value { + + type uint32; + + description + + "Value of disk-KQI"; + + } + + } + + } + + + + container vnic { + + description + + "Virtual network interface card (vnic) resource"; + + + + leaf vnic-num { + + type uint32{ + range 2; + } + + description + + "The total number of virtual vnic"; + + } + } + + } + + + + container workflow-script { + + description + + "VDU workflow script"; + + + + leaf init { + + type string; + default "start.sh"; + + + description + + "VDU initialization script"; + + } + + + + leaf terminate { + + type string; + default "stop.sh"; + + + description + + "VDU termination script"; + + } + + leaf graceful-shutdown { + + type string; + default "shutdown.sh"; + + + description + + "VDU graceful shutdown script"; + + } + + } + + } + + } + + } + -- cgit 1.2.3-korg