First set of OSM model changes for multi-disk/config-files/etc.
[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 user-domain {
235           type string;
236           default "Default";
237           description "Domain of the OpenStack user";
238         }
239         leaf project-domain {
240           type string;
241           default "Default";
242           description "Domain of the OpenStack project";
243         }
244
245         leaf tenant {
246           type string;
247           mandatory true;
248         }
249
250         leaf admin {
251           type boolean;
252           default false;
253         }
254
255         leaf mgmt-network {
256           type string;
257           mandatory true;
258         }
259
260         leaf plugin-name {
261           type string;
262           default "rwcal_openstack";
263         }
264
265         leaf-list security-groups {
266           type string;
267           description "Names of the security groups for the VM";
268         }
269         
270         leaf dynamic-flavor-support {
271           type boolean;
272           default true;
273         }
274
275         leaf floating-ip-pool {
276           type string;
277           description "Name of floating IP pool to use for floating IP address assignement";
278         }
279
280         leaf cert-validate {
281           type boolean;
282           default false;
283           description "Certificate validatation policy in case of SSL/TLS connection";
284         }
285         
286       }
287
288       container openmano {
289         leaf host {
290           type string;
291           default "localhost";
292         }
293
294         leaf port {
295           type uint16;
296           default 9090;
297         }
298
299         leaf tenant-id {
300           type string {
301             length "36";
302           }
303           mandatory true;
304         }
305
306         leaf plugin-name {
307           type string;
308           default "rwcal_openmano";
309         }
310       }
311
312       container vsphere {
313         leaf username {
314           type string;
315         }
316
317         leaf password {
318           type string;
319         }
320
321         leaf url {
322           type string;
323         }
324
325         leaf plugin-name {
326           type string;
327           default "rwcal-python";
328         }
329
330         leaf dynamic-flavor-support {
331           type boolean;
332           default false;
333         }
334       }
335
336       container cloudsim {
337         leaf plugin-name {
338           type string;
339           default "rwcal_cloudsim";
340         }
341         leaf dynamic-flavor-support {
342           type boolean;
343           default true;
344         }
345       }
346
347       container cloudsim_proxy {
348         leaf host {
349           type string;
350           default "localhost";
351         }
352         leaf plugin-name {
353           type string;
354           default "rwcal_cloudsimproxy";
355         }
356         leaf dynamic-flavor-support {
357           type boolean;
358           default true;
359         }
360       }
361
362       container openvim {
363         leaf host {
364           type string;
365           mandatory true;
366         }
367         leaf port {
368           type uint16;
369           default 9080;
370         }
371         leaf tenant-name {
372           type string;
373           description "Mandatory parameter to indicate openvim tenant name";
374           mandatory true;
375         }
376         leaf mgmt-network {
377           type string;
378           mandatory true;
379         }
380         leaf plugin-name {
381           type string;
382           default "rwcal_openmano_vimconnector";
383         }
384         leaf dynamic-flavor-support {
385           type boolean;
386           default true;
387         }
388         container image-management {
389           description " Information required for OpenVim image upload operation";
390
391           leaf username {
392             description "Username for host access";
393             type string;
394           }
395           leaf password {
396             description "Password for host access";
397             type string;
398           }
399           leaf image-directory-path {
400             description "Name of the directory on the host where image needs to be copied";
401             type string;
402             default "/opt/VNF/images";
403           }
404         }
405       }
406     }
407   }
408   
409   grouping vm-info-item {
410     leaf vm-name {
411       rwpb:field-inline "true";
412       rwpb:field-string-max 255;
413       type string;
414     }
415
416     leaf vm-size {
417       rwpb:field-inline "true";
418       rwpb:field-string-max 64;
419       type string;
420     }
421
422     leaf vm-id {
423       rwpb:field-inline "true";
424       rwpb:field-string-max 64;
425       type string;
426     }
427
428     leaf flavor-id {
429       rwpb:field-inline "true";
430       rwpb:field-string-max 64;
431       type string;
432     }
433
434     leaf image-id {
435       rwpb:field-inline "true";
436       rwpb:field-string-max 64;
437       type string;
438     }
439
440     leaf state {
441       rwpb:field-inline "true";
442       rwpb:field-string-max 64;
443       type string;
444     }
445
446     leaf availability-zone {
447       rwpb:field-inline "true";
448       rwpb:field-string-max 64;
449       type string;
450     }
451
452     leaf tenant-name {
453       rwpb:field-inline "true";
454       rwpb:field-string-max 64;
455       type string;
456     }
457
458     leaf host-name {
459       rwpb:field-inline "true";
460       rwpb:field-string-max 64;
461       type string;
462     }
463
464     leaf management-ip {
465       rwpb:field-inline "true";
466       rwpb:field-string-max 64;
467       type string;
468     }
469
470     leaf public-ip {
471       rwpb:field-inline "true";
472       rwpb:field-string-max 64;
473       type string;
474     }
475
476     leaf allocate-public-address {
477       rwpb:field-inline "true";
478       description "If this VM should allocate a floating public IP address";
479       type boolean;
480       default false;
481     }
482
483     list private-ip-list {
484       key "ip-address";
485
486       leaf ip-address {
487         rwpb:field-inline "true";
488         rwpb:field-string-max 64;
489         type string;
490       }
491     }
492
493     list public-ip-list {
494       key "ip-address";
495
496       leaf ip-address {
497         rwpb:field-inline "true";
498         rwpb:field-string-max 64;
499         type string;
500       }
501     }
502
503     list port-list {
504       key "port-id";
505       leaf port-id {
506         rwpb:field-inline "true";
507         rwpb:field-string-max 64;
508         type string;
509       }
510     }
511
512     list network-list {
513       key "network-id";
514       leaf network-id {
515         rwpb:field-inline "true";
516         rwpb:field-string-max 64;
517         type string;
518       }
519     }
520
521     container cloud-init {
522       leaf userdata {
523         description
524             "The userdata field for cloud-init should contain
525              the contents of the script that cloud-init should
526              invoke when configuring the system. Note that this
527              script is expected to be in the cloud-config format";
528         type string;
529       }
530     }
531
532     container user_tags {
533
534       leaf node-id {
535         type string;
536       }
537
538       leaf pci_assignement {
539         type string;
540       }
541
542       leaf tag1 {
543         type string;
544       }
545     }
546
547     leaf server-group {
548       type string;
549     }
550   }
551
552   grouping image-info-item {
553     leaf id {
554       type string;
555     }
556
557     leaf name {
558       type string;
559     }
560
561     choice image_file {
562       leaf location {
563         description "Image URL location";
564         type string;
565       }
566
567       leaf fileno {
568         description "Image file descriptor";
569         type uint32;
570       }
571     }
572
573     leaf checksum {
574       type string;
575     }
576
577     leaf virtual_size_mbytes {
578       description "Virtual size of the image";
579       type uint64;
580     }
581
582     leaf disk_format {
583       description "Format of the Disk";
584       type disk-format;
585       default "qcow2";
586     }
587
588     leaf container_format {
589       description "Format of the container";
590       type container-format;
591       default "bare";
592     }
593
594     leaf state {
595       description "State of the Image object in CAL";
596       type enumeration {
597         enum active;
598         enum inactive;
599         enum failed;
600         enum unknown;
601       }
602       default "unknown";
603     }
604
605     container user-tags {
606       description "User tags associated with Image";
607       leaf checksum {
608         rwpb:field-inline "true";
609         rwpb:field-string-max 64;
610         type string;
611       }
612     }
613   }
614
615   grouping network-info-item {
616     leaf network-name {
617       rwpb:field-inline "true";
618       rwpb:field-string-max 64;
619       type string;
620     }
621
622     leaf network-id {
623       rwpb:field-inline "true";
624       rwpb:field-string-max 64;
625       type string;
626     }
627
628     leaf subnet {
629       rwpb:field-inline "true";
630       rwpb:field-string-max 64;
631       type string;
632     }
633
634     uses manotypes:provider-network;
635   }
636
637   grouping port-info-item {
638     leaf port-name {
639       rwpb:field-inline "true";
640       rwpb:field-string-max 255;
641       type string;
642     }
643
644     leaf port-id {
645       rwpb:field-inline "true";
646       rwpb:field-string-max 64;
647       type string;
648     }
649
650     leaf port-state {
651       rwpb:field-inline "true";
652       rwpb:field-string-max 64;
653       type string;
654     }
655
656     leaf network-id {
657       rwpb:field-inline "true";
658       rwpb:field-string-max 64;
659       type string;
660     }
661
662     leaf ip-address {
663       rwpb:field-inline "true";
664       rwpb:field-string-max 64;
665       type string;
666     }
667
668     leaf vm-id {
669       rwpb:field-inline "true";
670       rwpb:field-string-max 64;
671       type string;
672     }
673
674     leaf port-type {
675       description "Type of the port";
676       type enumeration {
677         enum normal;
678         enum macvtap;
679         enum direct;
680       }
681       default "normal";
682     }
683
684     choice provider-specific-info {
685       container lxc {
686         leaf veth-name {
687           type string;
688         }
689       }
690     }
691   }
692
693   container cloud-accounts {
694     list cloud-account-list {
695       rwpb:msg-new CloudAccount;
696       key "name";
697
698       leaf name {
699         type string;
700       }
701       uses provider-auth;
702     }
703   }
704
705   container vim-resources {
706     rwpb:msg-new VimResources;
707     config false;
708
709     list vminfo-list {
710       rwpb:msg-new VMInfoItem;
711       config false;
712       key "vm-id";
713
714       uses vm-info-item;
715     }
716
717     list imageinfo-list {
718       rwpb:msg-new ImageInfoItem;
719       config false;
720       key "id";
721
722       uses image-info-item;
723     }
724
725     list tenantinfo-list {
726       rwpb:msg-new TenantInfoItem;
727       config false;
728       key "tenant-id";
729
730       leaf tenant-name {
731         rwpb:field-inline "true";
732         rwpb:field-string-max 64;
733         type string;
734       }
735
736       leaf tenant-id {
737         rwpb:field-inline "true";
738         rwpb:field-string-max 64;
739         type string;
740       }
741     }
742
743     list userinfo-list {
744       rwpb:msg-new UserInfoItem;
745       config false;
746       key "user-id";
747
748       leaf user-name{
749         rwpb:field-inline "true";
750         rwpb:field-string-max 64;
751         type string;
752       }
753
754       leaf user-id {
755         rwpb:field-inline "true";
756         rwpb:field-string-max 64;
757         type string;
758       }
759     }
760
761     list roleinfo-list {
762       rwpb:msg-new RoleInfoItem;
763       config false;
764       key "role-id";
765
766       leaf role-name {
767         rwpb:field-inline "true";
768         rwpb:field-string-max 64;
769         type string;
770       }
771
772       leaf role-id {
773         rwpb:field-inline "true";
774         rwpb:field-string-max 64;
775         type string;
776       }
777     }
778
779     list hostinfo-list {
780       rwpb:msg-new HostInfoItem;
781       config false;
782       key "host-id";
783
784       leaf host-name {
785         rwpb:field-inline "true";
786         rwpb:field-string-max 64;
787         type string;
788       }
789
790       leaf host-id {
791         rwpb:field-inline "true";
792         rwpb:field-string-max 64;
793         type string;
794       }
795     }
796
797     list networkinfo-list {
798       rwpb:msg-new NetworkInfoItem;
799       config false;
800       key "network-id";
801
802       uses network-info-item;
803     }
804
805     list portinfo-list {
806       rwpb:msg-new PortInfoItem;
807       config false;
808       key "port-id";
809
810       uses port-info-item;
811     }
812
813     list flavorinfo-list {
814       rwpb:msg-new FlavorInfoItem;
815       config false;
816       key "id";
817
818       leaf id {
819         rwpb:field-inline "true";
820         rwpb:field-string-max 64;
821         type string;
822       }
823
824       leaf name {
825         rwpb:field-inline "true";
826         rwpb:field-string-max 255;
827         type string;
828       }
829
830       uses manotypes:vm-flavor;
831       uses manotypes:guest-epa;
832       uses manotypes:vswitch-epa;
833       uses manotypes:hypervisor-epa;
834       uses manotypes:host-epa;
835       uses manotypes:placement-group-input;
836     }
837   }
838
839   grouping virtual-link-create-params {
840     leaf name {
841       description "Name of the Virtual-Link";
842       rwpb:field-inline "true";
843       rwpb:field-string-max 255;
844       type string;
845     }
846
847     leaf subnet {
848       rwpb:field-inline "true";
849       rwpb:field-string-max 64;
850       type string;
851     }
852     leaf associate-public-ip {
853       type boolean;
854       default false;
855     }
856     leaf vim-network-name {
857       description
858           "Name of network in VIM account. This is used to indicate
859           pre-provisioned network name in cloud account.";
860       type string;
861     }
862
863     uses manotypes:provider-network;
864     uses manotypes:ip-profile-info;
865   }
866
867
868   container virtual-link-req-params {
869     description "This object defines the parameters required to create a virtual-link";
870     rwpb:msg-new VirtualLinkReqParams;
871     uses virtual-link-create-params;
872   }
873
874
875   grouping connection-point-type {
876     leaf type {
877       description
878           "Specifies the type of connection point
879              VIRTIO          : Use the traditional VIRTIO interface.
880              PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
881              SR-IOV          : Use SR-IOV interface.
882              E1000           : Emulate E1000 interface.
883              RTL8139         : Emulate RTL8139 interface.
884              PCNET           : Emulate PCNET interface.";
885       type enumeration {
886         enum VIRTIO;
887         enum PCI-PASSTHROUGH;
888         enum SR-IOV;
889         enum E1000;
890         enum RTL8139;
891         enum PCNET;
892       }
893       default "VIRTIO";
894     }
895   }
896
897
898   grouping vdu-create-params {
899     leaf name {
900       description "Name of the VDU";
901       rwpb:field-inline "true";
902       rwpb:field-string-max 255;
903       type string;
904     }
905
906     leaf mgmt-vpci {
907       description
908           "Specifies the virtual PCI address. Expressed in
909            the following format dddd:dd:dd.d. For example
910            0000:00:12.0. This information can be used to
911            pass as metadata during the VM creation.";
912       type string;
913     }
914
915     uses manotypes:vm-flavor;
916     uses manotypes:guest-epa;
917     uses manotypes:vswitch-epa;
918     uses manotypes:hypervisor-epa;
919     uses manotypes:host-epa;
920
921     leaf node-id {
922       rwpb:field-inline "true";
923       rwpb:field-string-max 64;
924       type string;
925     }
926
927     leaf flavor-id {
928       description "CAL assigned flavor-id for the VDU image";
929       rwpb:field-inline "true";
930       rwpb:field-string-max 64;
931       type string;
932     }
933
934     leaf image-id {
935       description "CAL assigned image-id for the VDU image";
936       rwpb:field-inline "true";
937       rwpb:field-string-max 64;
938       type string;
939     }
940
941     leaf image-name {
942       description "Image name which can be used to lookup the image-id";
943       type string;
944       rwpb:field-inline "true";
945       rwpb:field-string-max 256;
946     }
947
948     leaf image-checksum {
949       description "Image md5sum checksum used in combination with image name to lookup image-id ";
950       type string;
951       rwpb:field-inline "true";
952       rwpb:field-string-max 32;
953     }
954
955     uses manotypes:placement-group-input;
956     
957     list connection-points {
958       key "name";
959       leaf name {
960         description "Name of the connection point";
961         type string;
962       }
963       leaf virtual-link-id {
964         description "CAL assigned resource Id for the Virtual Link";
965         type string;
966       }
967       leaf associate-public-ip {
968         type boolean;
969         default false;
970       }
971       
972       leaf vpci {
973         description
974             "Specifies the virtual PCI address. Expressed in
975              the following format dddd:dd:dd.d. For example
976              0000:00:12.0. This information can be used to
977              pass as metadata during the VM creation.";
978         type string;
979       }
980
981       leaf security-group {
982         description "Name of the security group";
983         type string;
984       }
985       leaf port-security-enabled {
986         description "Enables the port security";
987         type boolean;
988       }
989
990       uses connection-point-type;
991     }
992
993     leaf mgmt-network {
994       description 
995           "Explicit mgmt-network name, otherwise the mgmt-network from
996            Cloud account is used";
997       type string;
998     }
999
1000     leaf allocate-public-address {
1001       description "If this VDU needs public IP address";
1002       type boolean;
1003       default false;
1004     }
1005
1006     container vdu-init {
1007       leaf userdata {
1008         description
1009             "The userdata field for vdu-init should contain
1010              the contents of the script that cloud-init should
1011              invoke when configuring the system. Note that this
1012              script is expected to be in the cloud-config format";
1013         type string;
1014       }
1015     }
1016  
1017     uses manotypes:supplemental-boot-data;
1018
1019     list volumes {
1020       key "name";
1021
1022       leaf name {
1023         description "Name of the disk-volumes, e.g. vda, vdb etc";
1024         type string;
1025       }
1026       uses manotypes:volume-info;
1027     } 
1028   }
1029
1030   container vdu-init-params {
1031     description "This object defines the parameters required to create a VDU";
1032     rwpb:msg-new VDUInitParams;
1033     uses vdu-create-params;
1034   }
1035
1036   container vdu-modify-params {
1037     description "This object defines the parameters required to modify VDU";
1038     rwpb:msg-new VDUModifyParams;
1039
1040     leaf vdu-id {
1041       description "CAL assigned id for VDU to which this connection point belongs";
1042       rwpb:field-inline "true";
1043       rwpb:field-string-max 64;
1044       type string;
1045     }
1046
1047     leaf image-id {
1048       description "CAL assigned image-id for the VDU image";
1049       rwpb:field-inline "true";
1050       rwpb:field-string-max 64;
1051       type string;
1052     }
1053
1054     list connection-points-add {
1055       key "name";
1056       leaf name {
1057         description "Name of the connection point";
1058         type string;
1059       }
1060       leaf virtual-link-id {
1061         description "CAL assigned resource Id for the Virtual Link";
1062         type string;
1063       }
1064       leaf associate-public-ip {
1065         type boolean;
1066         default false;
1067       }
1068       leaf port-security-enabled {
1069         description "Enables the port security";
1070         type boolean;
1071       }
1072
1073       uses connection-point-type;
1074     }
1075
1076     list connection-points-remove {
1077       key "connection-point-id";
1078       leaf connection-point-id {
1079         rwpb:field-inline "true";
1080         rwpb:field-string-max 64;
1081         type string;
1082       }
1083     }
1084   }
1085
1086   grouping connection-point-info-params {
1087     leaf connection-point-id {
1088       rwpb:field-inline "true";
1089       rwpb:field-string-max 64;
1090       type string;
1091     }
1092
1093     leaf name {
1094       description "Name of the connection point";
1095       type string;
1096     }
1097
1098     leaf virtual-link-id {
1099       description "CAL assigned resource ID of the Virtual-Link";
1100       rwpb:field-inline "true";
1101       rwpb:field-string-max 64;
1102       type string;
1103     }
1104
1105     leaf vdu-id {
1106       description "CAL assigned id for VDU to which this connection point belongs";
1107       rwpb:field-inline "true";
1108       rwpb:field-string-max 64;
1109       type string;
1110     }
1111
1112     leaf state {
1113       description "CMP agnostic generic state of the connection point";
1114       type enumeration {
1115         enum active;
1116         enum inactive;
1117         enum failed;
1118         enum unknown;
1119       }
1120     }
1121
1122     leaf ip-address {
1123       rwpb:field-inline "true";
1124       rwpb:field-string-max 64;
1125       type string;
1126     }
1127
1128     leaf public-ip {
1129       rwpb:field-inline "true";
1130       rwpb:field-string-max 64;
1131       type string;
1132     }
1133
1134     leaf mac-addr {
1135       rwpb:field-inline "true";
1136       rwpb:field-string-max 48;
1137       type string;
1138     }
1139   }
1140
1141   grouping virtual-link-info-params {
1142     leaf name {
1143       description "Name of the Virtual-Link";
1144       rwpb:field-inline "true";
1145       rwpb:field-string-max 255;
1146       type string;
1147     }
1148
1149     leaf state {
1150       description "State of the Virtual Link";
1151       type enumeration {
1152         enum active;
1153         enum inactive;
1154         enum failed;
1155         enum unknown;
1156       }
1157       default "unknown";
1158     }
1159
1160     leaf virtual-link-id {
1161       description "CAL assigned resource ID of the Virtual-Link";
1162       rwpb:field-inline "true";
1163       rwpb:field-string-max 64;
1164       type string;
1165     }
1166
1167     list connection-points {
1168       key connection-point-id;
1169       uses connection-point-info-params;
1170     }
1171
1172     leaf subnet {
1173       rwpb:field-inline "true";
1174       rwpb:field-string-max 64;
1175       type string;
1176     }
1177
1178     uses manotypes:provider-network;
1179
1180   }
1181
1182   grouping vdu-info-params {
1183     leaf vdu-id {
1184       description "CAL assigned id for VDU";
1185       rwpb:field-inline "true";
1186       rwpb:field-string-max 64;
1187       type string;
1188     }
1189     leaf name {
1190       description "Name of the VDU";
1191       rwpb:field-inline "true";
1192       rwpb:field-string-max 255;
1193       type string;
1194     }
1195
1196     leaf flavor-id {
1197       description "CAL assigned flavor-id for the VDU image";
1198       rwpb:field-inline "true";
1199       rwpb:field-string-max 64;
1200       type string;
1201     }
1202
1203     leaf image-id {
1204       description "CAL assigned image-id for the VDU image";
1205       rwpb:field-inline "true";
1206       rwpb:field-string-max 64;
1207       type string;
1208     }
1209
1210     leaf node-id {
1211       rwpb:field-inline "true";
1212       rwpb:field-string-max 64;
1213       type string;
1214     }
1215
1216     leaf state {
1217       description "State of the VDU";
1218       type enumeration {
1219         enum active;
1220         enum inactive;
1221         enum failed;
1222         enum unknown;
1223       }
1224       default "unknown";
1225     }
1226
1227     leaf management-ip {
1228       rwpb:field-inline "true";
1229       rwpb:field-string-max 64;
1230       type string;
1231     }
1232
1233     leaf public-ip {
1234       rwpb:field-inline "true";
1235       rwpb:field-string-max 64;
1236       type string;
1237     }
1238
1239     uses manotypes:vm-flavor;
1240     uses manotypes:guest-epa;
1241     uses manotypes:vswitch-epa;
1242     uses manotypes:hypervisor-epa;
1243     uses manotypes:host-epa;
1244     uses manotypes:placement-group-input;
1245     
1246     list connection-points {
1247       key connection-point-id;
1248       uses connection-point-info-params;
1249     }
1250     leaf console-url {
1251       type string;
1252       description "Console URL from the VIM, if available";
1253     }
1254
1255     uses manotypes:supplemental-boot-data;
1256
1257     list volumes {
1258       key "name";
1259
1260       leaf name {
1261         description "Name of the disk-volumes, e.g. vda, vdb etc";
1262         type string;
1263       }
1264
1265       leaf volume-id {
1266         description "CAL assigned volume-id ";
1267         rwpb:field-inline "true";
1268         rwpb:field-string-max 64;
1269         type string;
1270       }
1271       uses manotypes:custom-meta-data;
1272     } 
1273   }
1274
1275
1276   container vnf-resources {
1277     rwpb:msg-new VNFResources;
1278     config false;
1279
1280     list virtual-link-info-list {
1281       rwpb:msg-new VirtualLinkInfoParams;
1282       config false;
1283       key virtual-link-id;
1284       uses virtual-link-info-params;
1285     }
1286
1287     list vdu-info-list {
1288       rwpb:msg-new VDUInfoParams;
1289       config false;
1290       key vdu-id;
1291       uses vdu-info-params;
1292     }
1293   }
1294 }
1295
1296 /* vim: set ts=2:sw=2: */