Merge branch 'v1.0'
[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
986       uses connection-point-type;
987     }
988
989     leaf mgmt-network {
990       description 
991           "Explicit mgmt-network name, otherwise the mgmt-network from
992            Cloud account is used";
993       type string;
994     }
995
996     leaf allocate-public-address {
997       description "If this VDU needs public IP address";
998       type boolean;
999       default false;
1000     }
1001
1002     container vdu-init {
1003       leaf userdata {
1004         description
1005             "The userdata field for vdu-init should contain
1006              the contents of the script that cloud-init should
1007              invoke when configuring the system. Note that this
1008              script is expected to be in the cloud-config format";
1009         type string;
1010       }
1011     }
1012  
1013     uses manotypes:custom-boot-data;
1014
1015     list volumes {
1016       key "name";
1017
1018       leaf name {
1019         description "Name of the disk-volumes, e.g. vda, vdb etc";
1020         type string;
1021       }
1022       uses manotypes:volume-info;
1023     } 
1024   }
1025
1026   container vdu-init-params {
1027     description "This object defines the parameters required to create a VDU";
1028     rwpb:msg-new VDUInitParams;
1029     uses vdu-create-params;
1030   }
1031
1032   container vdu-modify-params {
1033     description "This object defines the parameters required to modify VDU";
1034     rwpb:msg-new VDUModifyParams;
1035
1036     leaf vdu-id {
1037       description "CAL assigned id for VDU to which this connection point belongs";
1038       rwpb:field-inline "true";
1039       rwpb:field-string-max 64;
1040       type string;
1041     }
1042
1043     leaf image-id {
1044       description "CAL assigned image-id for the VDU image";
1045       rwpb:field-inline "true";
1046       rwpb:field-string-max 64;
1047       type string;
1048     }
1049
1050     list connection-points-add {
1051       key "name";
1052       leaf name {
1053         description "Name of the connection point";
1054         type string;
1055       }
1056       leaf virtual-link-id {
1057         description "CAL assigned resource Id for the Virtual Link";
1058         type string;
1059       }
1060       leaf associate-public-ip {
1061         type boolean;
1062         default false;
1063       }
1064
1065       uses connection-point-type;
1066     }
1067
1068     list connection-points-remove {
1069       key "connection-point-id";
1070       leaf connection-point-id {
1071         rwpb:field-inline "true";
1072         rwpb:field-string-max 64;
1073         type string;
1074       }
1075     }
1076   }
1077
1078   grouping connection-point-info-params {
1079     leaf connection-point-id {
1080       rwpb:field-inline "true";
1081       rwpb:field-string-max 64;
1082       type string;
1083     }
1084
1085     leaf name {
1086       description "Name of the connection point";
1087       type string;
1088     }
1089
1090     leaf virtual-link-id {
1091       description "CAL assigned resource ID of the Virtual-Link";
1092       rwpb:field-inline "true";
1093       rwpb:field-string-max 64;
1094       type string;
1095     }
1096
1097     leaf vdu-id {
1098       description "CAL assigned id for VDU to which this connection point belongs";
1099       rwpb:field-inline "true";
1100       rwpb:field-string-max 64;
1101       type string;
1102     }
1103
1104     leaf state {
1105       description "CMP agnostic generic state of the connection point";
1106       type enumeration {
1107         enum active;
1108         enum inactive;
1109         enum failed;
1110         enum unknown;
1111       }
1112     }
1113
1114     leaf ip-address {
1115       rwpb:field-inline "true";
1116       rwpb:field-string-max 64;
1117       type string;
1118     }
1119
1120     leaf public-ip {
1121       rwpb:field-inline "true";
1122       rwpb:field-string-max 64;
1123       type string;
1124     }
1125
1126     leaf mac-addr {
1127       rwpb:field-inline "true";
1128       rwpb:field-string-max 48;
1129       type string;
1130     }
1131   }
1132
1133   grouping virtual-link-info-params {
1134     leaf name {
1135       description "Name of the Virtual-Link";
1136       rwpb:field-inline "true";
1137       rwpb:field-string-max 255;
1138       type string;
1139     }
1140
1141     leaf state {
1142       description "State of the Virtual Link";
1143       type enumeration {
1144         enum active;
1145         enum inactive;
1146         enum failed;
1147         enum unknown;
1148       }
1149       default "unknown";
1150     }
1151
1152     leaf virtual-link-id {
1153       description "CAL assigned resource ID of the Virtual-Link";
1154       rwpb:field-inline "true";
1155       rwpb:field-string-max 64;
1156       type string;
1157     }
1158
1159     list connection-points {
1160       key connection-point-id;
1161       uses connection-point-info-params;
1162     }
1163
1164     leaf subnet {
1165       rwpb:field-inline "true";
1166       rwpb:field-string-max 64;
1167       type string;
1168     }
1169
1170     uses manotypes:provider-network;
1171
1172   }
1173
1174   grouping vdu-info-params {
1175     leaf vdu-id {
1176       description "CAL assigned id for VDU";
1177       rwpb:field-inline "true";
1178       rwpb:field-string-max 64;
1179       type string;
1180     }
1181     leaf name {
1182       description "Name of the VDU";
1183       rwpb:field-inline "true";
1184       rwpb:field-string-max 255;
1185       type string;
1186     }
1187
1188     leaf flavor-id {
1189       description "CAL assigned flavor-id for the VDU image";
1190       rwpb:field-inline "true";
1191       rwpb:field-string-max 64;
1192       type string;
1193     }
1194
1195     leaf image-id {
1196       description "CAL assigned image-id for the VDU image";
1197       rwpb:field-inline "true";
1198       rwpb:field-string-max 64;
1199       type string;
1200     }
1201
1202     leaf node-id {
1203       rwpb:field-inline "true";
1204       rwpb:field-string-max 64;
1205       type string;
1206     }
1207
1208     leaf state {
1209       description "State of the VDU";
1210       type enumeration {
1211         enum active;
1212         enum inactive;
1213         enum failed;
1214         enum unknown;
1215       }
1216       default "unknown";
1217     }
1218
1219     leaf management-ip {
1220       rwpb:field-inline "true";
1221       rwpb:field-string-max 64;
1222       type string;
1223     }
1224
1225     leaf public-ip {
1226       rwpb:field-inline "true";
1227       rwpb:field-string-max 64;
1228       type string;
1229     }
1230
1231     uses manotypes:vm-flavor;
1232     uses manotypes:guest-epa;
1233     uses manotypes:vswitch-epa;
1234     uses manotypes:hypervisor-epa;
1235     uses manotypes:host-epa;
1236     uses manotypes:placement-group-input;
1237     
1238     list connection-points {
1239       key connection-point-id;
1240       uses connection-point-info-params;
1241     }
1242     leaf console-url {
1243       type string;
1244       description "Console URL from the VIM, if available";
1245     }
1246
1247     uses manotypes:custom-boot-data;
1248
1249     list volumes {
1250       key "name";
1251
1252       leaf name {
1253         description "Name of the disk-volumes, e.g. vda, vdb etc";
1254         type string;
1255       }
1256
1257       leaf volume-id {
1258         description "CAL assigned volume-id ";
1259         rwpb:field-inline "true";
1260         rwpb:field-string-max 64;
1261         type string;
1262       }
1263       uses manotypes:custom-meta-data;
1264     } 
1265   }
1266
1267
1268   container vnf-resources {
1269     rwpb:msg-new VNFResources;
1270     config false;
1271
1272     list virtual-link-info-list {
1273       rwpb:msg-new VirtualLinkInfoParams;
1274       config false;
1275       key virtual-link-id;
1276       uses virtual-link-info-params;
1277     }
1278
1279     list vdu-info-list {
1280       rwpb:msg-new VDUInfoParams;
1281       config false;
1282       key vdu-id;
1283       uses vdu-info-params;
1284     }
1285   }
1286 }
1287
1288 /* vim: set ts=2:sw=2: */