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