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