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