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