aboutsummaryrefslogtreecommitdiffstats
path: root/vnfapi/model/src/main/yang/VNF-API.yang
blob: 1b44413c6a556a6cadc0b64758792c57765ef026 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
module VNF-API {

    yang-version 1;

    namespace "org:onap:sdnctl:vnf";

    prefix vnfapi;

    import ietf-inet-types { prefix "ietf"; revision-date "2010-09-24"; }

    include "vnfsubmodule";

    organization "ONAP";

    contact
	"Network Controller <onap-sdnc@lists.onap.org>";

    description
        "Defines API interface for VNF Orchestration";

    revision "2015-07-20" {
        description
            "Initial draft";
    }
    // Last updated on 8-17-2016
    grouping sdnc-request-header { 
        container sdnc-request-header { 
            leaf svc-request-id { 
                type string; 
            } 
            leaf svc-action { 
                type enumeration { 
                    enum "reserve";
                    enum "assign";
                    enum "activate";  // equal to commit
                    enum "delete";    // equal to commit
                    enum "changeassign";
                    enum "changedelete";
                    enum "rollback";
                } 
            } 
            leaf svc-notification-url { 
                type string; 
            } 
        } 
    } 

    grouping request-information { 
        container request-information { 
            leaf request-id { 
                type string; 
            } 
            leaf request-action { 
                type enumeration { 
                    enum "PreloadNetworkRequest";
                    enum "DeletePreloadNetworkRequest";
                    enum "NetworkActivateRequest";
                    enum "DisconnectNetworkRequest";
                    enum "PreloadVNFRequest";
                    enum "DeletePreloadVNFRequest";
                    enum "VNFActivateRequest";
                    enum "ChangeVNFActivateRequest";
                    enum "DisconnectVNFRequest";
                    enum "PreloadVnfInstanceRequest";
                    enum "DeletePreloadVnfInstanceRequest";
                    enum "VnfInstanceActivateRequest";
                    enum "ChangeVnfInstanceActivateRequest";
                    enum "DisconnectVnfInstanceRequest";
                    enum "PreloadVfModuleRequest";
                    enum "DeletePreloadVfModuleRequest";
                    enum "VfModuleActivateRequest";
                    enum "ChangeVfModuleActivateRequest";
                    enum "DisconnectVfModuleRequest";
                } 
            } 
            leaf request-sub-action { 
                type enumeration { 
                    enum "SUPP";
                    enum "CANCEL";
                } 
            } 
            leaf source { 
                type string; 
            } 
            leaf notification-url { 
                type string; 
            } 
            leaf order-number { 
                type string; 
            } 
            leaf order-version { 
                type string; 
            } 
        } 
    } 

    grouping service-information { 
        container service-information { 
            // 1610 use for AnAI subscription-service-type
            leaf service-type { 
                type string;
                description "AnAI subscription-service-type";
            } 
            leaf service-id { 
                type string;
            } 
            leaf service-instance-id { 
                type string; 
                description "A service instance that a VNF or a l3-network is associated with";
            } 
            // 1610 use for global-customer-id
            leaf subscriber-name { 
                type string; 
                description "AnAI global-customer-id";
            } 
        } 
    } 


    grouping vnf-request-information { 
        container vnf-request-information { 
            leaf vnf-request-version {
                type string; 
            }
            leaf model-customization-uuid {
                type string; 
                description "customized resource, i.e. vf-module, for use within a given service";
            }
            leaf use-preload {
                type enumeration { 
                    enum "Y";
                    enum "N";
                }
                description "orchestrate vf-module with full preload data or TOSCA lookup plus EIPAM automation";
            }
            leaf vnf-id {
                type string; 
                description "vf-module-id";
            }
            leaf vnf-type { 
                type string; 
                description "vf-module-type";
            } 
            leaf vnf-name { 
                type string; 
                description "vf-module-name";
            } 
            leaf generic-vnf-id {
                type string; 
                description "generic vnf-id";
            }
            leaf generic-vnf-type { 
                type string; 
                description "generic vnf type";
            } 
            leaf generic-vnf-name { 
                type string; 
                description "generic vnf name";
            } 
            leaf tenant { 
                type string; 
            } 
            leaf aic-clli { 
                type string; 
            } 
            leaf aic-cloud-region { 
                type string; 
                description "The AIC cloud region which maps to contrail versions";
            } 
            list vnf-networks {
                key network-role;
                uses vnf-network;
                description "Network List";
            }
        }
    } 

    grouping network-request-information { 
        container network-request-information { 
            leaf network-id {
                type string; 
            }
            leaf network-type { 
                type string; 
            } 
            leaf network-name { 
                type string; 
            } 
            leaf tenant { 
                type string; 
            } 
            leaf aic-clli { 
                type string; 
            } 
            leaf aic-cloud-region { 
                type string; 
                description "The AIC cloud region which maps to contrail versions";
            } 
        }
    } 

    /***********************************************************/
    /*               PRELOAD DATA                                 */
    /***********************************************************/

    container preload-vnfs {
        uses preload-model-information; 
    } 
    grouping preload-model-information { 
        list vnf-preload-list { 
            key "vnf-name vnf-type"; 
            leaf vnf-name { 
                type string; 
                description "vf-module-name";
            } 
            leaf vnf-type { 
                type string; 
                description "vf-module-type";
            } 
            uses preload-data; 
        } 
    } 

    // For preload networks it will have network-topology-information
    // For preload vnfs, it will have vnf-topology-information
    grouping preload-data { 
        container preload-data { 
            uses vnf-topology-information; 
            uses network-topology-information; 
            uses oper-status; 
        }
    } 


    grouping vnf-topology-information { 
        container vnf-topology-information { 
            uses vnf-topology-identifier;
            uses vnf-assignments; 
            uses vnf-parameters; 
        }
    } 

    grouping vnf-topology-identifier { 
        container vnf-topology-identifier { 
            leaf service-type { 
                type string;
            } 
            leaf service-id { 
                type string;
            } 
            leaf vnf-name { 
                type string; 
                description "vf-module-name";
            } 
            leaf vnf-type { 
                type string; 
                description "vf-module-type";
            } 
            leaf generic-vnf-name { 
                type string; 
            } 
            leaf generic-vnf-type { 
                type string; 
            } 
            leaf generic-vnf-id { 
                type string; 
            } 
        } 
    } 

    grouping vnf-assignments {
        container vnf-assignments { 
            leaf vnf-status {
                type string;
                description "Orchestration Status from AAI - to be set by SDNC";
            }
            list availability-zones {
                ordered-by  user;
                leaf availability-zone {
                    type string;
                    description "Openstack availability zone name or UUID";
                }
            }
            list vnf-networks {
                key network-role;
                uses vnf-network;
                // 1610
                uses sriov-vlan-filter-list;
                description "Network List";
            }
            uses vm-topology;
        }
    } 

    grouping vm-topology {
        list vnf-vms {
            key vm-type;
            leaf vm-type { 
                type string; 
            } 
            leaf vm-count { 
                type uint8; 
            } 
            list vm-names {
                ordered-by user;
                leaf vm-name{ 
                    type string; 
                } 
            }
            //leaf-list vm-names {
            //    type string; 
            //    ordered-by user;
            //}
            list vm-networks {
                key network-role;
                uses vm-network;
                description "Network List";
            }
        }
    }

    grouping vnf-network {
        leaf network-role { 
            type string; 
            description "A Network Role to which a VNF must connect";
        } 
        leaf network-name { 
            type string; 
            description "Unique Neutron UUID of an instance of the network role ";
        } 
        leaf neutron-id { 
            type string; 
            description "Unique Neutron UUID of an instance of the network role ";
        } 
        leaf network-id { 
            type string; 
            description "Unique Neutron UUID of an instance of the network role ";
        } 
        leaf subnet-id { 
            type string; 
            description "ipv4 subnet UUID to be passed into the HEAT template for DHCP assignment";
        }
        leaf contrail-network-fqdn {
            type string;
            description "contrail network policy object";
        }
        // 1610
        leaf ipv6-subnet-id { 
            type string; 
            description "ipv6 subnet UUID to be passed into the HEAT template for DHCP assignment";
        }
        leaf ipv6-subnet-name { 
            type string; 
            description "ipv6 subnet-name that corresponds to the ipv6 subnet-id";
        }
        leaf subnet-name { 
            type string; 
            description "ipv4 subnet-name that corresponds to the ipv4 subnet-id";
        }
    }

    // 1610
    grouping sriov-vlan-filter-list {
        list sriov-vlan-filter-list {
            leaf sriov-vlan-filter {
                type string;
            }
        }
    }

    grouping vm-network {
        leaf network-role {
            type string;
            description "network (identified by role) that this VM connects to.  Should also be included in the vnf-networks for the containing VNF";
    
        }
        leaf use-dhcp {
            type enumeration { 
                  enum "Y";
                  enum "N";
            } 
            description "Indicator to use DHCP on this network for this VM";
        }
        leaf ip-count {
            type uint8;
            description "The number of ip addresses to be assigned per vm for this network role";
        }
        list network-ips {
            ordered-by user;
            leaf ip-address {
                //type string;
                type ietf:ip-address;
                description "List of assigned ipv4 addresses on a network";
            }
        }
        list network-ips-v6 {
            ordered-by user;
            leaf ip-address-ipv6 {
                //type string;
                type ietf:ipv6-address;
                description "List of assigned ipv6 addresses on a network";
            }
        }
        list network-macs {
            ordered-by user;
            leaf mac-address {
                type string;
                description "List of network assignments for this VM (one per network)";
            }
        }
        leaf floating-ip {
            //type string;
            type ietf:ip-address;
            description "Floating ipv4 for VMs of a given type on this network";
        }
        leaf floating-ip-v6 {
            //type string;
            type ietf:ipv6-address;
            description "Floating ipv6 for VMs of a given type on this network";
        }
        list interface-route-prefixes {
            ordered-by user;
            leaf interface-route-prefix {
                type ietf:ip-address;
                description "OBSOLETE, route prefixes (CIDRs) to be provided to MSO in vnf-topology as a list of static routes";
            }
            leaf interface-route-prefix-cidr {
                type string;
                description "route prefixes (CIDRs) in ip/cidr format to be provided to MSO in vnf-topology as a list of static routes";
            }
        }
    }

    grouping vnf-parameters {
        list vnf-parameters {
            key vnf-parameter-name;
            leaf vnf-parameter-name { 
                type string; 
                description "The name of an arbitrary instance-specific vnf-parameters";
            } 
            leaf vnf-parameter-value { 
                type string; 
                description "The value of an arbitrary instance-specific vnf-parameters ";
            } 
        }
    }

    grouping network-topology-information { 
        container network-topology-information { 
            uses network-topology-identifier;
            uses subnets; 
            uses vpn-bindings; 
            uses network-policy;
            uses route-table-reference;
            uses provider-network-information;
        }
    } 

    grouping network-topology-identifier { 
        container network-topology-identifier { 
            leaf service-type { 
                type string;
            } 
            leaf network-name { 
                type string; 
            } 
            leaf network-role { 
                type string; 
            } 
            leaf network-type { 
                type string; 
            } 
            leaf network-technology{ 
                type string; 
            } 
        } 
    } 
    grouping subnets {
        list subnets {
            key start-address;
            leaf start-address{
                type ietf:ip-address;
                //type string;
            }
            leaf gateway-address{
                //type string;
                type ietf:ip-address;
            }
            leaf cidr-mask{
                type string;
            }
            leaf ip-version {
                type string;
            }
            leaf dhcp-enabled {
                type enumeration {
                    enum "Y";
                    enum "N";
                }
            }
            leaf dhcp-start-address {
                type string;
            }
            leaf dhcp-end-address {
                type string;
            }
            // 1610
            leaf subnet-name {
                type string;
            }
            
        }
    } 

    grouping vpn-bindings {
        list vpn-bindings {
            key vpn-binding-id;
            leaf vpn-binding-id {
                type string;
            }
            leaf global-route-target {
                type string;
            }
        }
    } 

    grouping network-policy {
        list network-policy {
            key network-policy-fqdn;
            leaf network-policy-fqdn {
                type string;
            }
            leaf network-policy-id {
                type string;
            }
        }
    } 

    //1610
    grouping route-table-reference {
        list route-table-reference {
            leaf route-table-reference-id {
                type string;
            }
            leaf route-table-reference-fqdn {
                type string;
            }
        }
    }

    // 1610
    grouping provider-network-information {
        container provider-network-information {
	        leaf physical-network-name {
	            type string;
	        }
	        leaf is-provider-network {
	            type boolean;
	        }
	        leaf is-shared-network {
	            type boolean;
	        }
	        leaf is-external-network {
                type boolean;
            }
        }
    }

    /***********************************************************/
    /*               SERVICE_DATA                                */
    /***********************************************************/
    container vnfs {
        uses vnf-model-infrastructure; 
    } 
    grouping vnf-model-infrastructure { 
        list vnf-list { 
            key vnf-id; 
            leaf vnf-id { 
                type string; 
                mandatory true; 
                description "vf-module-id";
            } 
            uses service-data; 
            uses service-status; 
        } 
    } 
    grouping service-data { 
        container service-data { 
            uses vnf-configuration-information; 
            uses oper-status; 
        } 
    } 
    grouping service-status { 
        container service-status { 
            leaf response-code { 
                type string; 
            } 
            leaf response-message { 
                type string; 
            } 
            leaf final-indicator { 
                type string; 
            } 
            leaf request-status { 
                type enumeration { 
                    enum "synccomplete";
                    enum "asynccomplete";
                    enum "notifycomplete";
                } 
            } 
            leaf vnfsdn-action { 
                type enumeration { 
                    enum "PreloadNetworkRequest";
                    enum "DeletePreloadNetworkRequest";
                    enum "NetworkActivateRequest";
                    enum "DisconnectNetworkRequest";
                    enum "PreloadVNFRequest";
                    enum "DeletePreloadVNFRequest";
                    enum "VNFActivateRequest";
                    enum "ChangeVNFActivateRequest";
                    enum "DisconnectVNFRequest";
                    enum "PreloadVnfInstanceRequest";
                    enum "DeletePreloadVnfInstanceRequest";
                    enum "VnfInstanceActivateRequest";
                    enum "ChangeVnfInstanceActivateRequest";
                    enum "DisconnectVnfInstanceRequest";
                    enum "PreloadVfModuleRequest";
                    enum "DeletePreloadVfModuleRequest";
                    enum "VfModuleActivateRequest";
                    enum "ChangeVfModuleActivateRequest";
                    enum "DisconnectVfModuleRequest";
                } 
            } 
            leaf vnfsdn-subaction { 
                type enumeration { 
                    enum "SUPP";
                    enum "CANCEL";
                } 
            }
            leaf rpc-name { 
                type enumeration { 
                    enum "vnf-topology-operation";
                    enum "preload-vnf-topology-operation";
                    enum "vnf-instance-topology-operation";
                    enum "preload-vnf-instance-topology-operation";
                    enum "vf-module-topology-operation";
                    enum "preload-vf-module-topology-operation";
                } 
            } 
            leaf rpc-action { 
                type enumeration { 
                    enum "reserve";
                    enum "assign";
                    enum "activate";  // equal to commit
                    enum "delete";      // equal to commit
                    enum "changeassign";
                    enum "changedelete";
                    enum "rollback";
                } 
            } 
            leaf response-timestamp { 
                type string; 
            } 
        } 
    } 
    grouping vnf-configuration-information { 
        uses sdnc-request-header; 
        uses request-information; 
        uses service-information;
        uses vnf-request-information;
        uses vnf-topology; 
    } 
    grouping vnf-topology-response-body { 
        leaf svc-request-id { 
            type string; 
        } 
        leaf response-code { 
            type string; 
        } 
        leaf response-message { 
            type string; 
        } 
        leaf ack-final-indicator { 
            type string; 
        } 
    } 

    grouping vnf-information { 
        container vnf-information { 
            leaf vnf-service-type { 
                type string;
            } 
            leaf vnf-id { 
                type string; 
                description "vf-module-id";
            } 
        } 
    } 

    grouping network-information { 
        container network-information { 
            leaf network-service-type { 
                type string;
            } 
            leaf network-id { 
                type string; 
            } 
        } 
    } 


    // Carried over from l3sdn and potentially not needed
    grouping oper-status { 
        container oper-status { 
            leaf order-status { 
                type enumeration { 
                    enum "Active";
                    enum "PendingAssignment";
                    enum "PendingCreate";
                    enum "PendingUpdate";
                    enum "PendingDelete";
                    enum "Deleted";
                    
                } 
            }
            leaf last-action { 
                type enumeration { 
                    enum "VNFActivateRequest";
                    enum "ChangeVNFActivateRequest";
                    enum "VnfInstanceActivateRequest";
                    enum "ChangeVnfInstanceActivateRequest";
                    enum "VfModuleActivateRequest";
                    enum "ChangeVfModuleActivateRequest";
                    enum "DisconnectVNFRequest";
                    enum "DisconnectVnfInstanceRequest";
                    enum "DisconnectVfModuleRequest";
                    enum "PreloadVNFRequest";
                    enum "DeletePreloadVNFRequest";
                    enum "PreloadVnfInstanceRequest";
                    enum "DeletePreloadVnfInstanceRequest";
                    enum "PreloadVfModuleRequest";
                    enum "DeletePreloadVfModuleRequest";
                } 
            } 
            leaf last-svc-request-id { 
                type string; 
            } 
            leaf last-order-status { 
                type enumeration { 
                    enum "Active";
                    enum "PendingAssignment";
                    enum "PendingCreate";
                    enum "PendingUpdate";
                    enum "PendingDelete";
                    enum "Deleted";
                } 
            } 
            leaf create-timestamp { 
                type string; 
            } 
            leaf modify-timestamp { 
                type string; 
            } 
            leaf maintenance-indicator { 
                type enumeration { 
                    enum "Y";
                    enum "N";
                } 
            } 
        } 
    } 
    grouping vnf-topology { 
        leaf vnf-id {
            type string; 
            description "vf-module-id";
        }
        uses vnf-topology-information; 
    } 
    
    
    rpc vnf-topology-operation {
        input { 
            uses sdnc-request-header; 
            uses request-information; 
            uses service-information;
            uses vnf-request-information; 
        } 
        output { 
            uses vnf-topology-response-body; 
            uses vnf-information;
            uses service-information;
        } 
    } 

    rpc network-topology-operation {
        input { 
            uses sdnc-request-header; 
            uses request-information; 
            uses service-information;
            uses network-request-information; 
        } 
        output { 
            uses vnf-topology-response-body; 
            uses network-information;
            uses service-information;
        } 
    } 

    rpc preload-vnf-topology-operation {
        input { 
            uses sdnc-request-header; 
            uses request-information; 
            uses vnf-topology-information;
        } 
        output { 
            uses vnf-topology-response-body; 
        } 
    }

    rpc preload-network-topology-operation {
        input { 
            uses sdnc-request-header; 
            uses request-information; 
            uses network-topology-information;
        } 
        output { 
            uses vnf-topology-response-body; 
        } 
    }
}