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