Refactor userguide "Yardstick Installation"
[yardstick.git] / samples / yang.yaml
1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9  module clearwater {
10
11        namespace "http://localhost/ietf-inet-types.yang";
12
13        prefix "yang";
14
15        organization "HP";
16
17        contact "TBD";
18
19        description "This module defines a VNF Deployment Unit.";
20      revision "2014-05-18" {
21
22          description
23
24            "Initial version";
25
26          reference
27
28            "RFC XXXX";
29
30        }
31       container clearwater {
32
33          description
34
35            "Vdus used in a vnfd";
36
37        list ellis {
38       key id;
39       leaf id{
40       type string;
41       description "key ID for vdu1";
42       }
43          description
44
45          "Vdu key";
46
47
48
49          leaf instance-num {
50
51          type uint16{
52          range 1..6;}
53                                  default 1;
54
55
56          description
57
58            "Number of instances of the said VDU which shall be
59      instantiated";
60
61          }
62
63          leaf vm-image {
64
65          type string;
66          reference  "uri";
67
68
69          description
70
71            "Reference to a VM image";
72
73          }
74          container resource {
75          description
76
77                "The required resource";
78
79              container cpu {
80
81                description
82
83                  "The required computation resource";
84
85
86
87                leaf vCPU_num {
88
89                  type uint32{
90          range 4;
91          }
92
93                  description
94
95                    "The number of virtual CPU units";
96
97                }
98
99
100
101                list vCPU-spec {
102
103                  key "name";
104
105
106
107                  description
108
109                    "Processor characteristics for the VDU";
110
111
112
113                  leaf name {
114
115                    type string;
116
117                    description
118
119                      "Name of vCPU-spec";
120
121                  }
122          leaf description {
123
124                    type string;
125
126                    description
127
128                      "Description of vCPU-spec";
129
130                  }
131
132                  leaf value {
133
134                    type uint32;
135
136                    description
137
138                      "Value of vCPU-spec";
139
140                  }
141
142                }
143
144              }
145
146              container memory {
147
148                description
149
150                  "The required memory resource";
151
152                leaf memory_size {
153
154                  type uint32{
155          range 4096;
156          }
157
158                  description
159
160                    "Memory size, unit:MBytes";
161
162                }
163
164                list memory-spec {
165
166                  key name;
167
168
169
170                  description
171
172                    "Memory characteristics for the VDU";
173
174
175
176                  leaf name {
177
178                    type string;
179
180                    description
181
182                      "Name of memory-spec";
183
184                  }
185
186
187
188                  leaf description {
189
190                    type string;
191
192                    description
193
194                      "Description of memory-spec";
195
196                  }
197
198
199
200                  leaf value {
201
202                    type uint32;
203
204                    description
205
206                      "Value of memory-spec";
207
208                  }
209
210           }
211
212              }
213
214
215
216              container disk {
217
218                description
219
220                  "The required storage resource";
221
222
223
224                leaf disk-size {
225
226                  type uint32{
227      range 2048;
228     }
229                  description
230
231                    "Virtual storage size, unit:MBytes";
232                }
233
234
235
236                list disk-KQI {
237
238                  key name;
239
240
241
242                  description
243
244                    "Storage characteristics in the VDU";
245
246
247
248                  leaf name {
249
250                    type string;
251
252                    description
253
254                      "Name of disk-KQI";
255
256                  }
257          leaf description {
258
259                    type string;
260
261                    description
262
263                      "Description of disk-KQI";
264
265                  }
266
267
268
269                  leaf value {
270
271                    type uint32;
272
273                    description
274
275                      "Value of disk-KQI";
276
277                  }
278
279                }
280
281              }
282
283
284
285              container vnic {
286
287                description
288
289                  "Virtual network interface card (vnic) resource";
290
291
292
293                leaf vnic-num {
294
295                  type uint32{
296          range 2;
297          }
298
299                  description
300
301                    "The total number of virtual vnic";
302
303                }
304           }
305
306            }
307
308
309
310            container workflow-script {
311
312              description
313
314                "VDU workflow script";
315
316
317
318              leaf init {
319
320                type string;
321          default "start.sh";
322
323
324                description
325
326                  "VDU initialization script";
327              }
328
329
330
331              leaf terminate {
332
333                type string;
334          default "stop.sh";
335
336
337                description
338
339                  "VDU termination script";
340         }
341
342              leaf graceful-shutdown {
343
344                type string;
345          default "shutdown.sh";
346
347
348                description
349
350                  "VDU graceful shutdown script";
351
352              }
353
354            }
355
356          }
357      list bono {
358       key id;
359       leaf id{
360       type string;
361       description "key ID for vdu2";
362       }
363          description
364
365          "Vdu key";
366
367
368
369          leaf instance-num {
370
371          type uint16;
372          default 3;
373
374
375          description
376
377            "Number of instances of the said VDU which shall be
378      instantiated";
379
380          }
381
382
383
384          leaf vm-image {
385
386          type string;
387          reference "URI";
388
389
390          description
391
392            "Reference to a VM image";
393
394          }
395
396
397
398          container resource {
399          description
400
401                "The required resource";
402
403
404
405              container cpu {
406
407                description
408
409                  "The required computation resource";
410
411
412
413                leaf vCPU_num {
414
415                  type uint32{
416          range 3;
417          }
418
419                  description
420
421                    "The number of virtual CPU units";
422
423                }
424
425
426
427                list vCPU-spec {
428
429                  key "name";
430
431
432
433                  description
434
435                    "Processor characteristics for the VDU";
436
437
438
439                  leaf name {
440
441                    type string;
442
443                    description
444
445                      "Name of vCPU-spec";
446
447                  }
448          leaf description {
449
450                    type string;
451
452                    description
453
454                      "Description of vCPU-spec";
455
456                  }
457
458
459
460                  leaf value {
461
462                    type uint32;
463
464                    description
465
466                      "Value of vCPU-spec";
467
468                  }
469
470                }
471
472              }
473
474
475
476              container memory {
477
478                description
479
480                  "The required memory resource";
481
482
483
484                leaf memory_size {
485
486                  type uint32{
487          range 2048;
488          }
489
490                  description
491
492                    "Memory size, unit:MBytes";
493
494                }
495
496                list memory-spec {
497
498                  key name;
499
500                  description
501
502                    "Memory characteristics for the VDU";
503
504
505
506                  leaf name {
507
508                    type string;
509
510                    description
511
512                      "Name of memory-spec";
513
514                  }
515
516
517
518                  leaf description {
519
520                    type string;
521
522                    description
523
524                      "Description of memory-spec";
525
526                  }
527
528
529
530                  leaf value {
531
532                    type uint32;
533
534                    description
535
536                      "Value of memory-spec";
537
538                  }
539
540           }
541
542              }
543
544
545
546              container disk {
547
548                description
549
550                  "The required storage resource";
551
552
553
554                leaf disk-size {
555
556                  type uint32{
557          range 3000;
558          }
559
560                  description
561
562                    "Virtual storage size, unit:MBytes";
563
564                }
565
566
567
568                list disk-KQI {
569
570                  key name;
571
572
573
574                  description
575
576                    "Storage characteristics in the VDU";
577
578
579
580                  leaf name {
581
582                    type string;
583
584                    description
585
586                      "Name of disk-KQI";
587
588                  }
589          leaf description {
590
591                    type string;
592
593                    description
594
595                      "Description of disk-KQI";
596
597                  }
598
599
600
601                  leaf value {
602
603                    type uint32;
604
605                    description
606
607                      "Value of disk-KQI";
608
609                  }
610
611                }
612
613              }
614
615
616
617              container vnic {
618
619                description
620
621                  "Virtual network interface card (vnic) resource";
622
623
624
625                leaf vnic-num {
626
627                  type uint32{
628          range 2;
629          }
630
631                  description
632
633                    "The total number of virtual vnic";
634
635                }
636           }
637
638            }
639
640
641
642            container workflow-script {
643
644              description
645
646                "VDU workflow script";
647
648
649
650              leaf init {
651
652                type string;
653          default "start.sh";
654
655
656                description
657
658                  "VDU initialization script";
659
660              }
661
662
663
664              leaf terminate {
665
666                type string;
667          default "stop.sh";
668
669
670                description
671
672                  "VDU termination script";
673
674              }
675
676              leaf graceful-shutdown {
677
678                type string;
679          default "shutdown.sh";
680
681
682                description
683
684                  "VDU graceful shutdown script";
685
686              }
687
688            }
689
690          }
691
692        }
693
694    }
695