76bd38b37cb5c42b73cb1a198fea11e6ee85b37b
[osm/SO.git] / rwcal / plugins / yang / rwcal.yang
1
2 /*
3  * 
4  *   Copyright 2016 RIFT.IO Inc
5  *
6  *   Licensed under the Apache License, Version 2.0 (the "License");
7  *   you may not use this file except in compliance with the License.
8  *   You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *   Unless required by applicable law or agreed to in writing, software
13  *   distributed under the License is distributed on an "AS IS" BASIS,
14  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *   See the License for the specific language governing permissions and
16  *   limitations under the License.
17  *
18  *
19  */
20
21 module rwcal
22 {
23   namespace "http://riftio.com/ns/riftware-1.0/rwcal";
24   prefix "rwcal";
25
26   import rw-base {
27     prefix rwbase;
28   }
29
30   import rw-pb-ext {
31     prefix "rwpb";
32   }
33
34   import rw-yang-types {
35     prefix "rwt";
36   }
37
38   import rw-log {
39     prefix "rwlog";
40   }
41
42   import mano-types {
43     prefix "manotypes";
44   }
45
46   revision 2014-12-30 {
47     description
48         "Initial revision.";
49     reference
50         "RIFT RWCAL cloud data";
51   }
52
53
54   typedef connection-status {
55     description "Connection status for the cloud account";
56     type enumeration {
57       enum unknown;
58       enum validating;
59       enum success;
60       enum failure;
61     }
62   }
63
64   typedef disk-format {
65     type enumeration {
66       enum ami;
67       enum ari;
68       enum aki;
69       enum vhd;
70       enum vmdk;
71       enum raw;
72       enum qcow2;
73       enum vdi;
74       enum iso;
75     }
76   }
77
78   typedef container-format {
79     type enumeration{
80       enum ami;
81       enum ari;
82       enum aki;
83       enum bare;
84       enum ovf;
85     }
86   }
87
88   grouping connection-status {
89     container connection-status {
90       config false;
91       rwpb:msg-new CloudConnectionStatus;
92       leaf status {
93         type connection-status;
94       }
95       leaf details {
96         type string;
97       }
98     }
99   }
100
101   uses connection-status;
102
103   typedef sdn-account-type {
104     description "SDN account type";
105     type enumeration {
106       enum odl;
107       enum mock;
108       enum sdnsim;
109     }
110   }
111
112   grouping sdn-provider-auth {
113     leaf account-type {
114       type sdn-account-type;
115     }
116
117     choice provider-specific-info {
118       container odl {
119         leaf username {
120           type string {
121             length "1..255";
122           }
123         }
124
125         leaf password {
126           type string {
127             length "1..32";
128           }
129         }
130
131         leaf url {
132           type string {
133             length "1..255";
134           }
135         }
136       }
137       container mock {
138         leaf username {
139           type string;
140         }
141         leaf plugin-name {
142           type string;
143           default "rwsdn_mock";
144         }
145       }
146
147       container sdnsim {
148         leaf username {
149           type string;
150         }
151         leaf plugin-name {
152           type string;
153           default "rwsdn_sim";
154         }
155       }
156     }
157   }
158
159   grouping provider-auth {
160     leaf account-type {
161       type manotypes:cloud-account-type;
162     }
163
164     choice provider-specific-info {
165       container mock {
166         leaf username {
167           type string;
168         }
169         leaf plugin-name {
170           type string;
171           default "rwcal_mock";
172         }
173         leaf dynamic-flavor-support {
174           type boolean;
175           default true;
176         }
177       }
178       container aws {
179         leaf key {
180           type string;
181         }
182
183         leaf secret {
184           type string;
185         }
186
187         leaf region {
188           type string;
189         }
190         leaf vpcid {
191           description "VPC ID to use to instantiate EC2 instances";
192           type string;
193         }
194         leaf ssh-key {
195           description "Key pair name to connect to EC2 instance";
196           type string;
197         }
198         leaf availability-zone {
199           description "Availability zone where EC2 instance should
200               be started";
201           type string;
202         }
203         leaf default-subnet-id {
204           description "Default subnet ID to create network
205               interface at instance creation time";
206           type string;
207         }
208         leaf plugin-name {
209           type string;
210           default "rwcal_aws";
211         }
212         leaf dynamic-flavor-support {
213           type boolean;
214           default true;
215         }
216       }
217
218       container openstack {
219         leaf key {
220           type string;
221           mandatory true;
222         }
223
224         leaf secret {
225           type string;
226           mandatory true;
227         }
228
229         leaf auth_url {
230           type string;
231           mandatory true;
232         }
233
234         leaf tenant {
235           type string;
236           mandatory true;
237         }
238
239         leaf admin {
240           type boolean;
241           default false;
242         }
243
244         leaf mgmt-network {
245           type string;
246           mandatory true;
247         }
248
249         leaf plugin-name {
250           type string;
251           default "rwcal_openstack";
252         }
253
254         leaf-list security-groups {
255           type string;
256           description "Names of the security groups for the VM";
257         }
258         
259         leaf dynamic-flavor-support {
260           type boolean;
261           default true;
262         }
263
264         leaf floating-ip-pool {
265           type string;
266           description "Name of floating IP pool to use for floating IP address assignement";
267         }
268
269         leaf cert-validate {
270           type boolean;
271           default false;
272           description "Certificate validatation policy in case of SSL/TLS connection";
273         }
274         
275       }
276
277       container openmano {
278         leaf host {
279           type string;
280           default "localhost";
281         }
282
283         leaf port {
284           type uint16;
285           default 9090;
286         }
287
288         leaf tenant-id {
289           type string {
290             length "36";
291           }
292           mandatory true;
293         }
294
295         leaf plugin-name {
296           type string;
297           default "rwcal_openmano";
298         }
299       }
300
301       container vsphere {
302         leaf username {
303           type string;
304         }
305
306         leaf password {
307           type string;
308         }
309
310         leaf url {
311           type string;
312         }
313
314         leaf plugin-name {
315           type string;
316           default "rwcal-python";
317         }
318
319         leaf dynamic-flavor-support {
320           type boolean;
321           default false;
322         }
323       }
324
325       container cloudsim {
326         leaf plugin-name {
327           type string;
328           default "rwcal_cloudsim";
329         }
330         leaf dynamic-flavor-support {
331           type boolean;
332           default true;
333         }
334       }
335
336       container cloudsim_proxy {
337         leaf host {
338           type string;
339           default "localhost";
340         }
341         leaf plugin-name {
342           type string;
343           default "rwcal_cloudsimproxy";
344         }
345         leaf dynamic-flavor-support {
346           type boolean;
347           default true;
348         }
349       }
350
351       container openvim {
352         leaf host {
353           type string;
354           mandatory true;
355         }
356         leaf port {
357           type uint16;
358           default 9080;
359         }
360         leaf tenant-name {
361           type string;
362           description "Mandatory parameter to indicate openvim tenant name";
363           mandatory true;
364         }
365         leaf mgmt-network {
366           type string;
367           mandatory true;
368         }
369         leaf plugin-name {
370           type string;
371           default "rwcal_openmano_vimconnector";
372         }
373         leaf dynamic-flavor-support {
374           type boolean;
375           default true;
376         }
377         container image-management {
378           description " Information required for OpenVim image upload operation";
379
380           leaf username {
381             description "Username for host access";
382             type string;
383           }
384           leaf password {
385             description "Password for host access";
386             type string;
387           }
388           leaf image-directory-path {
389             description "Name of the directory on the host where image needs to be copied";
390             type string;
391             default "/opt/VNF/images";
392           }
393         }
394       }
395     }
396   }
397   
398   grouping vm-info-item {
399     leaf vm-name {
400       rwpb:field-inline "true";
401       rwpb:field-string-max 255;
402       type string;
403     }
404
405     leaf vm-size {
406       rwpb:field-inline "true";
407       rwpb:field-string-max 64;
408       type string;
409     }
410
411     leaf vm-id {
412       rwpb:field-inline "true";
413       rwpb:field-string-max 64;
414       type string;
415     }
416
417     leaf flavor-id {
418       rwpb:field-inline "true";
419       rwpb:field-string-max 64;
420       type string;
421     }
422
423     leaf image-id {
424       rwpb:field-inline "true";
425       rwpb:field-string-max 64;
426       type string;
427     }
428
429     leaf state {
430       rwpb:field-inline "true";
431       rwpb:field-string-max 64;
432       type string;
433     }
434
435     leaf availability-zone {
436       rwpb:field-inline "true";
437       rwpb:field-string-max 64;
438       type string;
439     }
440
441     leaf tenant-name {
442       rwpb:field-inline "true";
443       rwpb:field-string-max 64;
444       type string;
445     }
446
447     leaf host-name {
448       rwpb:field-inline "true";
449       rwpb:field-string-max 64;
450       type string;
451     }
452
453     leaf management-ip {
454       rwpb:field-inline "true";
455       rwpb:field-string-max 64;
456       type string;
457     }
458
459     leaf public-ip {
460       rwpb:field-inline "true";
461       rwpb:field-string-max 64;
462       type string;
463     }
464
465     leaf allocate-public-address {
466       rwpb:field-inline "true";
467       description "If this VM should allocate a floating public IP address";
468       type boolean;
469       default false;
470     }
471
472     list private-ip-list {
473       key "ip-address";
474
475       leaf ip-address {
476         rwpb:field-inline "true";
477         rwpb:field-string-max 64;
478         type string;
479       }
480     }
481
482     list public-ip-list {
483       key "ip-address";
484
485       leaf ip-address {
486         rwpb:field-inline "true";
487         rwpb:field-string-max 64;
488         type string;
489       }
490     }
491
492     list port-list {
493       key "port-id";
494       leaf port-id {
495         rwpb:field-inline "true";
496         rwpb:field-string-max 64;
497         type string;
498       }
499     }
500
501     list network-list {
502       key "network-id";
503       leaf network-id {
504         rwpb:field-inline "true";
505         rwpb:field-string-max 64;
506         type string;
507       }
508     }
509
510     container cloud-init {
511       leaf userdata {
512         description
513             "The userdata field for cloud-init should contain
514              the contents of the script that cloud-init should
515              invoke when configuring the system. Note that this
516              script is expected to be in the cloud-config format";
517         type string;
518       }
519     }
520
521     container user_tags {
522
523       leaf node-id {
524         type string;
525       }
526
527       leaf pci_assignement {
528         type string;
529       }
530
531       leaf tag1 {
532         type string;
533       }
534     }
535
536     leaf server-group {
537       type string;
538     }
539   }
540
541   grouping image-info-item {
542     leaf id {
543       type string;
544     }
545
546     leaf name {
547       type string;
548     }
549
550     choice image_file {
551       leaf location {
552         description "Image URL location";
553         type string;
554       }
555
556       leaf fileno {
557         description "Image file descriptor";
558         type uint32;
559       }
560     }
561
562     leaf checksum {
563       type string;
564     }
565
566     leaf virtual_size_mbytes {
567       description "Virtual size of the image";
568       type uint64;
569     }
570
571     leaf disk_format {
572       description "Format of the Disk";
573       type disk-format;
574       default "qcow2";
575     }
576
577     leaf container_format {
578       description "Format of the container";
579       type container-format;
580       default "bare";
581     }
582
583     leaf state {
584       description "State of the Image object in CAL";
585       type enumeration {
586         enum active;
587         enum inactive;
588         enum failed;
589         enum unknown;
590       }
591       default "unknown";
592     }
593
594     container user-tags {
595       description "User tags associated with Image";
596       leaf checksum {
597         rwpb:field-inline "true";
598         rwpb:field-string-max 64;
599         type string;
600       }
601     }
602   }
603
604   grouping network-info-item {
605     leaf network-name {
606       rwpb:field-inline "true";
607       rwpb:field-string-max 64;
608       type string;
609     }
610
611     leaf network-id {
612       rwpb:field-inline "true";
613       rwpb:field-string-max 64;
614       type string;
615     }
616
617     leaf subnet {
618       rwpb:field-inline "true";
619       rwpb:field-string-max 64;
620       type string;
621     }
622
623     uses manotypes:provider-network;
624   }
625
626   grouping port-info-item {
627     leaf port-name {
628       rwpb:field-inline "true";
629       rwpb:field-string-max 255;
630       type string;
631     }
632
633     leaf port-id {
634       rwpb:field-inline "true";
635       rwpb:field-string-max 64;
636       type string;
637     }
638
639     leaf port-state {
640       rwpb:field-inline "true";
641       rwpb:field-string-max 64;
642       type string;
643     }
644
645     leaf network-id {
646       rwpb:field-inline "true";
647       rwpb:field-string-max 64;
648       type string;
649     }
650
651     leaf ip-address {
652       rwpb:field-inline "true";
653       rwpb:field-string-max 64;
654       type string;
655     }
656
657     leaf vm-id {
658       rwpb:field-inline "true";
659       rwpb:field-string-max 64;
660       type string;
661     }
662
663     leaf port-type {
664       description "Type of the port";
665       type enumeration {
666         enum normal;
667         enum macvtap;
668         enum direct;
669       }
670       default "normal";
671     }
672
673     choice provider-specific-info {
674       container lxc {
675         leaf veth-name {
676           type string;
677         }
678       }
679     }
680   }
681
682   container cloud-accounts {
683     list cloud-account-list {
684       rwpb:msg-new CloudAccount;
685       key "name";
686
687       leaf name {
688         type string;
689       }
690       uses provider-auth;
691     }
692   }
693
694   container vim-resources {
695     rwpb:msg-new VimResources;
696     config false;
697
698     list vminfo-list {
699       rwpb:msg-new VMInfoItem;
700       config false;
701       key "vm-id";
702
703       uses vm-info-item;
704     }
705
706     list imageinfo-list {
707       rwpb:msg-new ImageInfoItem;
708       config false;
709       key "id";
710
711       uses image-info-item;
712     }
713
714     list tenantinfo-list {
715       rwpb:msg-new TenantInfoItem;
716       config false;
717       key "tenant-id";
718
719       leaf tenant-name {
720         rwpb:field-inline "true";
721         rwpb:field-string-max 64;
722         type string;
723       }
724
725       leaf tenant-id {
726         rwpb:field-inline "true";
727         rwpb:field-string-max 64;
728         type string;
729       }
730     }
731
732     list userinfo-list {
733       rwpb:msg-new UserInfoItem;
734       config false;
735       key "user-id";
736
737       leaf user-name{
738         rwpb:field-inline "true";
739         rwpb:field-string-max 64;
740         type string;
741       }
742
743       leaf user-id {
744         rwpb:field-inline "true";
745         rwpb:field-string-max 64;
746         type string;
747       }
748     }
749
750     list roleinfo-list {
751       rwpb:msg-new RoleInfoItem;
752       config false;
753       key "role-id";
754
755       leaf role-name {
756         rwpb:field-inline "true";
757         rwpb:field-string-max 64;
758         type string;
759       }
760
761       leaf role-id {
762         rwpb:field-inline "true";
763         rwpb:field-string-max 64;
764         type string;
765       }
766     }
767
768     list hostinfo-list {
769       rwpb:msg-new HostInfoItem;
770       config false;
771       key "host-id";
772
773       leaf host-name {
774         rwpb:field-inline "true";
775         rwpb:field-string-max 64;
776         type string;
777       }
778
779       leaf host-id {
780         rwpb:field-inline "true";
781         rwpb:field-string-max 64;
782         type string;
783       }
784     }
785
786     list networkinfo-list {
787       rwpb:msg-new NetworkInfoItem;
788       config false;
789       key "network-id";
790
791       uses network-info-item;
792     }
793
794     list portinfo-list {
795       rwpb:msg-new PortInfoItem;
796       config false;
797       key "port-id";
798
799       uses port-info-item;
800     }
801
802     list flavorinfo-list {
803       rwpb:msg-new FlavorInfoItem;
804       config false;
805       key "id";
806
807       leaf id {
808         rwpb:field-inline "true";
809         rwpb:field-string-max 64;
810         type string;
811       }
812
813       leaf name {
814         rwpb:field-inline "true";
815         rwpb:field-string-max 255;
816         type string;
817       }
818
819       uses manotypes:vm-flavor;
820       uses manotypes:guest-epa;
821       uses manotypes:vswitch-epa;
822       uses manotypes:hypervisor-epa;
823       uses manotypes:host-epa;
824       uses manotypes:placement-group-input;
825     }
826   }
827
828   grouping virtual-link-create-params {
829     leaf name {
830       description "Name of the Virtual-Link";
831       rwpb:field-inline "true";
832       rwpb:field-string-max 255;
833       type string;
834     }
835
836     leaf subnet {
837       rwpb:field-inline "true";
838       rwpb:field-string-max 64;
839       type string;
840     }
841     leaf associate-public-ip {
842       type boolean;
843       default false;
844     }
845     leaf vim-network-name {
846       description
847           "Name of network in VIM account. This is used to indicate
848           pre-provisioned network name in cloud account.";
849       type string;
850     }
851
852     uses manotypes:provider-network;
853     uses manotypes:ip-profile-info;
854   }
855
856
857   container virtual-link-req-params {
858     description "This object defines the parameters required to create a virtual-link";
859     rwpb:msg-new VirtualLinkReqParams;
860     uses virtual-link-create-params;
861   }
862
863
864   grouping connection-point-type {
865     leaf type {
866       description
867           "Specifies the type of connection point
868              VIRTIO          : Use the traditional VIRTIO interface.
869              PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
870              SR-IOV          : Use SR-IOV interface.
871              E1000           : Emulate E1000 interface.
872              RTL8139         : Emulate RTL8139 interface.
873              PCNET           : Emulate PCNET interface.";
874       type enumeration {
875         enum VIRTIO;
876         enum PCI-PASSTHROUGH;
877         enum SR-IOV;
878         enum E1000;
879         enum RTL8139;
880         enum PCNET;
881       }
882       default "VIRTIO";
883     }
884   }
885
886
887   grouping vdu-create-params {
888     leaf name {
889       description "Name of the VDU";
890       rwpb:field-inline "true";
891       rwpb:field-string-max 255;
892       type string;
893     }
894
895     leaf mgmt-vpci {
896       description
897           "Specifies the virtual PCI address. Expressed in
898            the following format dddd:dd:dd.d. For example
899            0000:00:12.0. This information can be used to
900            pass as metadata during the VM creation.";
901       type string;
902     }
903
904     uses manotypes:vm-flavor;
905     uses manotypes:guest-epa;
906     uses manotypes:vswitch-epa;
907     uses manotypes:hypervisor-epa;
908     uses manotypes:host-epa;
909
910     leaf node-id {
911       rwpb:field-inline "true";
912       rwpb:field-string-max 64;
913       type string;
914     }
915
916     leaf flavor-id {
917       description "CAL assigned flavor-id for the VDU image";
918       rwpb:field-inline "true";
919       rwpb:field-string-max 64;
920       type string;
921     }
922
923     leaf image-id {
924       description "CAL assigned image-id for the VDU image";
925       rwpb:field-inline "true";
926       rwpb:field-string-max 64;
927       type string;
928     }
929
930     leaf image-name {
931       description "Image name which can be used to lookup the image-id";
932       type string;
933       rwpb:field-inline "true";
934       rwpb:field-string-max 256;
935     }
936
937     leaf image-checksum {
938       description "Image md5sum checksum used in combination with image name to lookup image-id ";
939       type string;
940       rwpb:field-inline "true";
941       rwpb:field-string-max 32;
942     }
943
944     uses manotypes:placement-group-input;
945     
946     list connection-points {
947       key "name";
948       leaf name {
949         description "Name of the connection point";
950         type string;
951       }
952       leaf virtual-link-id {
953         description "CAL assigned resource Id for the Virtual Link";
954         type string;
955       }
956       leaf associate-public-ip {
957         type boolean;
958         default false;
959       }
960       
961       leaf vpci {
962         description
963             "Specifies the virtual PCI address. Expressed in
964              the following format dddd:dd:dd.d. For example
965              0000:00:12.0. This information can be used to
966              pass as metadata during the VM creation.";
967         type string;
968       }
969
970       leaf security-group {
971         description "Name of the security group";
972         type string;
973       }
974
975       uses connection-point-type;
976     }
977
978     leaf mgmt-network {
979       description 
980           "Explicit mgmt-network name, otherwise the mgmt-network from
981            Cloud account is used";
982       type string;
983     }
984
985     leaf allocate-public-address {
986       description "If this VDU needs public IP address";
987       type boolean;
988       default false;
989     }
990
991     container vdu-init {
992       leaf userdata {
993         description
994             "The userdata field for vdu-init should contain
995              the contents of the script that cloud-init should
996              invoke when configuring the system. Note that this
997              script is expected to be in the cloud-config format";
998         type string;
999       }
1000     }
1001  
1002     list volumes {
1003       key "name";
1004
1005       leaf name {
1006         description "Name of the disk-volumes, e.g. vda, vdb etc";
1007         type string;
1008       }
1009       uses manotypes:volume-info;
1010     } 
1011   }
1012
1013   container vdu-init-params {
1014     description "This object defines the parameters required to create a VDU";
1015     rwpb:msg-new VDUInitParams;
1016     uses vdu-create-params;
1017   }
1018
1019   container vdu-modify-params {
1020     description "This object defines the parameters required to modify VDU";
1021     rwpb:msg-new VDUModifyParams;
1022
1023     leaf vdu-id {
1024       description "CAL assigned id for VDU to which this connection point belongs";
1025       rwpb:field-inline "true";
1026       rwpb:field-string-max 64;
1027       type string;
1028     }
1029
1030     leaf image-id {
1031       description "CAL assigned image-id for the VDU image";
1032       rwpb:field-inline "true";
1033       rwpb:field-string-max 64;
1034       type string;
1035     }
1036
1037     list connection-points-add {
1038       key "name";
1039       leaf name {
1040         description "Name of the connection point";
1041         type string;
1042       }
1043       leaf virtual-link-id {
1044         description "CAL assigned resource Id for the Virtual Link";
1045         type string;
1046       }
1047       leaf associate-public-ip {
1048         type boolean;
1049         default false;
1050       }
1051
1052       uses connection-point-type;
1053     }
1054
1055     list connection-points-remove {
1056       key "connection-point-id";
1057       leaf connection-point-id {
1058         rwpb:field-inline "true";
1059         rwpb:field-string-max 64;
1060         type string;
1061       }
1062     }
1063   }
1064
1065   grouping connection-point-info-params {
1066     leaf connection-point-id {
1067       rwpb:field-inline "true";
1068       rwpb:field-string-max 64;
1069       type string;
1070     }
1071
1072     leaf name {
1073       description "Name of the connection point";
1074       type string;
1075     }
1076
1077     leaf virtual-link-id {
1078       description "CAL assigned resource ID of the Virtual-Link";
1079       rwpb:field-inline "true";
1080       rwpb:field-string-max 64;
1081       type string;
1082     }
1083
1084     leaf vdu-id {
1085       description "CAL assigned id for VDU to which this connection point belongs";
1086       rwpb:field-inline "true";
1087       rwpb:field-string-max 64;
1088       type string;
1089     }
1090
1091     leaf state {
1092       description "CMP agnostic generic state of the connection point";
1093       type enumeration {
1094         enum active;
1095         enum inactive;
1096         enum failed;
1097         enum unknown;
1098       }
1099     }
1100
1101     leaf ip-address {
1102       rwpb:field-inline "true";
1103       rwpb:field-string-max 64;
1104       type string;
1105     }
1106
1107     leaf public-ip {
1108       rwpb:field-inline "true";
1109       rwpb:field-string-max 64;
1110       type string;
1111     }
1112   }
1113
1114   grouping virtual-link-info-params {
1115     leaf name {
1116       description "Name of the Virtual-Link";
1117       rwpb:field-inline "true";
1118       rwpb:field-string-max 255;
1119       type string;
1120     }
1121
1122     leaf state {
1123       description "State of the Virtual Link";
1124       type enumeration {
1125         enum active;
1126         enum inactive;
1127         enum failed;
1128         enum unknown;
1129       }
1130       default "unknown";
1131     }
1132
1133     leaf virtual-link-id {
1134       description "CAL assigned resource ID of the Virtual-Link";
1135       rwpb:field-inline "true";
1136       rwpb:field-string-max 64;
1137       type string;
1138     }
1139
1140     list connection-points {
1141       key connection-point-id;
1142       uses connection-point-info-params;
1143     }
1144
1145     leaf subnet {
1146       rwpb:field-inline "true";
1147       rwpb:field-string-max 64;
1148       type string;
1149     }
1150
1151     uses manotypes:provider-network;
1152
1153   }
1154
1155   grouping vdu-info-params {
1156     leaf vdu-id {
1157       description "CAL assigned id for VDU";
1158       rwpb:field-inline "true";
1159       rwpb:field-string-max 64;
1160       type string;
1161     }
1162     leaf name {
1163       description "Name of the VDU";
1164       rwpb:field-inline "true";
1165       rwpb:field-string-max 255;
1166       type string;
1167     }
1168
1169     leaf flavor-id {
1170       description "CAL assigned flavor-id for the VDU image";
1171       rwpb:field-inline "true";
1172       rwpb:field-string-max 64;
1173       type string;
1174     }
1175
1176     leaf image-id {
1177       description "CAL assigned image-id for the VDU image";
1178       rwpb:field-inline "true";
1179       rwpb:field-string-max 64;
1180       type string;
1181     }
1182
1183     leaf node-id {
1184       rwpb:field-inline "true";
1185       rwpb:field-string-max 64;
1186       type string;
1187     }
1188
1189     leaf state {
1190       description "State of the VDU";
1191       type enumeration {
1192         enum active;
1193         enum inactive;
1194         enum failed;
1195         enum unknown;
1196       }
1197       default "unknown";
1198     }
1199
1200     leaf management-ip {
1201       rwpb:field-inline "true";
1202       rwpb:field-string-max 64;
1203       type string;
1204     }
1205
1206     leaf public-ip {
1207       rwpb:field-inline "true";
1208       rwpb:field-string-max 64;
1209       type string;
1210     }
1211
1212     uses manotypes:vm-flavor;
1213     uses manotypes:guest-epa;
1214     uses manotypes:vswitch-epa;
1215     uses manotypes:hypervisor-epa;
1216     uses manotypes:host-epa;
1217     uses manotypes:placement-group-input;
1218     
1219     list connection-points {
1220       key connection-point-id;
1221       uses connection-point-info-params;
1222     }
1223     leaf console-url {
1224       type string;
1225       description "Console URL from the VIM, if available";
1226     }
1227
1228     list volumes {
1229       key "name";
1230
1231       leaf name {
1232         description "Name of the disk-volumes, e.g. vda, vdb etc";
1233         type string;
1234       }
1235
1236       leaf volume-id {
1237         description "CAL assigned volume-id ";
1238         rwpb:field-inline "true";
1239         rwpb:field-string-max 64;
1240         type string;
1241       }
1242
1243     } 
1244   }
1245
1246
1247   container vnf-resources {
1248     rwpb:msg-new VNFResources;
1249     config false;
1250
1251     list virtual-link-info-list {
1252       rwpb:msg-new VirtualLinkInfoParams;
1253       config false;
1254       key virtual-link-id;
1255       uses virtual-link-info-params;
1256     }
1257
1258     list vdu-info-list {
1259       rwpb:msg-new VDUInfoParams;
1260       config false;
1261       key vdu-id;
1262       uses vdu-info-params;
1263     }
1264   }
1265 }
1266
1267 /* vim: set ts=2:sw=2: */