aboutsummaryrefslogtreecommitdiffstats
path: root/samples/yang.yaml
diff options
context:
space:
mode:
authorkubi <jean.gaoliang@huawei.com>2015-12-29 11:04:20 +0800
committerkubi <jean.gaoliang@huawei.com>2016-01-09 13:10:02 +0800
commitd93f6ca5bf0d4f22ec0fd90eac1bf8b9c09db820 (patch)
tree840ebf964154f0c2925097a16a43ce07d60050d4 /samples/yang.yaml
parent45b1cc64209dec07475e5263469328231c524aa7 (diff)
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 <jean.gaoliang@huawei.com>
Diffstat (limited to 'samples/yang.yaml')
-rw-r--r--samples/yang.yaml687
1 files changed, 687 insertions, 0 deletions
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";
+
+ }
+
+ }
+
+ }
+
+ }
+
+ }
+