etsi-nfv-ns.yang 50.7 KB
Newer Older
1
submodule etsi-nfv-ns {
2
  yang-version 1.1;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
3
  belongs-to etsi-nfv-descriptors {
4
5
6
    prefix nfv;
  }

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
7
  include etsi-nfv-common;
8
9
10
  include etsi-nfv-vnf;
  include etsi-nfv-pnf;

11
12
13
  description
    "Models for NS according to ETSI GS NFV-IFA 014.";

Mahesh Jethanandani's avatar
Bug#251  
Mahesh Jethanandani committed
14
15
16
17
18
19
20
21
  revision 2019-10-01 {
    description
      "Version 2.7.1.

       Common data structures to support VNFD and NSD according to:
       ETSI GS NFV-IFA 014 Ed271v264
       ETSI GS NFV-IFA 011 Ed271v264";
  }
22
  revision 2019-04-25 {
23
24
    description
      "Initial revision
25
       Common data structure to support NSD according to:
26
       ETSI GS NFV-IFA 014 Ed261v252";
27

28
    reference
29
      "ETSI GS NFV-IFA 014 Ed261v252";
30
31
32
33
34
35
  }

  grouping resource-handle {
    leaf vim-id {
      type string;
    }
36
    leaf resource-provider-id {
37
38
39
40
41
42
43
      type string;
    }
    leaf resource-id {
      type string;
    }
  }

44

45
  grouping nsd {
46
47
48
49
50
51
52
53
54
    leaf id {
      type string;
      description
        "Identifier of this NSD information element. It Globally
         uniquely identifies an instance of the NSD.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }
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
    leaf designer {
      type string;
      description
        "Identifies the designer of the NSD.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }

    leaf version {
      type string;
      description
        "Identifies the version of the NSD.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }

    leaf name {
      type string;
      description
        "Provides the human readable name of the NSD.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }

    leaf invariant-id {
      type string;
      description
        "Identifies an NSD in a version independent manner. This
         attribute is invariant across versions of the network
         service descriptor.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }

    leaf-list nested-nsd-id {
      must ". != ../id";
      type leafref {
97
        path "../../nsd/id";
98
      }
99
100
101
102
103
104
      description
        "References the NSD of a constituent nested NS.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }
105

106
107
    leaf-list vnfd-id {
      type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
108
        path "/nfv:nfv/nfv:vnfd/nfv:id";
109
      }
110
111
112
113
114
115
      description
        "References the VNFD of a constituent VNF.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }
116

117
118
    leaf-list pnfd-id {
      type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
119
        path "/nfv:nfv/nfv:pnfd/nfv:id";
120
      }
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
      description
        "References the PNFD of a constituent PNF.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
    }

    list sapd {
      key "id";
      description
        "Provides the descriptor of a service access point of the
         network service.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
136

137
138
      leaf id {
        type string;
139
        description
140
          "Identifier of this Cpd information element.";
141
        reference
142
          "GS NFV IFA014: Section 6.6.3.1 Cpd information element";
143
144
      }

145
146
      leaf address-assignment {
        type boolean;
147
        description
148
149
150
151
152
153
          "Specify whether the SAP address assignment is under the
           responsibility of management and orchestration functions
           or not. If it is set to True, management and
           orchestration functions are responsible for assigning
           addresses to the access points instantiated from this
           SAPD.";
154
        reference
155
156
          "GS NFV IFA014: Section 6.2.3.2 Sapd information element";
      }
157

158
159
160
161
162
      choice cpd-or-virtual-link {
        leaf virtual-link-desc {
          type leafref {
            path "../../virtual-link-desc/id";
          }
163
          description
164
165
            "References the descriptor of the NS VL instance to
             which the SAP instantiated from this SAPD connects to.";
166
167
          reference
            "GS NFV IFA014: Section 6.2.3.2 Sapd information element";
168
        }
169

170
171
172
173
174
        choice associated-cpd-id {
          container vnf {
            leaf vnfd-id {
              mandatory true;
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
175
                path "/nfv:nfv/nfv:vnfd/nfv:id";
176
              }
177
178
              must "boolean(../../../vnfd-id[.=current()])";
            }
179

180
181
182
            leaf ext-cpd-id {
              mandatory true;
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
183
                path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
184
185
              }
            }
186
          }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
187

188
189
190
191
          container pnf {
            leaf pnfd-id {
              mandatory true;
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
192
                path "/nfv:nfv/nfv:pnfd/nfv:id";
193
              }
194
195
              must "boolean(../pnfd-id[.=current()])";
            }
196

197
198
199
            leaf ext-cpd-id {
              mandatory true;
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
200
                path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
201
202
              }
            }
203
204
205
206
207
          }
          container ns {
            leaf nsd-id {
              mandatory true;
              type leafref {
208
                path "../../../../nsd/id";
209
              }
210
211
              must "boolean(../nsd-id[.=current()])";
            }
212

213
214
215
            leaf ext-cpd-id {
              mandatory true;
              type leafref {
216
                path "deref(../nsd-id)/../sapd/id";
217
218
219
220
              }
            }
          }
        }
221
      }
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    }

    list virtual-link-desc {
      key "id";
      description
        "Provides the constituent VLDs.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";
      leaf id {
        type string;
        description
          "Identifier of the NsVirtualLinkDesc information element.
           It uniquely identifies a VLD.";
        reference
          "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
           information element";
      }
240

241
242
243
      uses connectivity-type;

      list df {
244
        key "id";
245

246
        description
247
248
249
          "The VirtualLinkDf information element specifies
           properties for instantiating a VL according to a
           specific flavour.";
250
        reference
251
          "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
252
           information element";
253

254
255
        leaf id {
          type string;
256
          description
257
258
            "Identifies this VirtualLinkDf information element
             within a VLD.";
259
          reference
260
            "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
261
             information element";
262
        }
263

264
265
        container qos {
          presence "VL QoS parameters";
266
          description
267
268
            "The QoS information element specifies quality of
             service parameters applicable to a VL.";
269
          reference
270
            "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
271
272
             information element";

273
274
275
276
          leaf latency {
            mandatory true;
            type uint32;
            units "ms";
277
            description
278
              "Specifies the maximum latency in ms.";
279
            reference
280
281
              "GS NFV IFA014: Section 6.5.6.2 QoS information
               element";
282
283
          }

284
285
286
287
          leaf packet-delay-variation {
            mandatory true;
            type uint32;
            units "ms";
288
            description
289
              "Specifies the maximum jitter in ms.";
290
            reference
291
292
293
              "GS NFV IFA014: Section 6.5.6.2 QoS information
               element";
          }
294

295
296
297
298
          leaf packet-loss-ratio {
            type decimal64 {
              fraction-digits "2";
              range "0..1.00";
299
            }
300
301
302
303
304
            description
              "Specifies the maximum packet loss ratio.";
            reference
              "GS NFV IFA014: Section 6.5.6.2 QoS information
               element";
305
          }
306

307
308
          leaf priority {
            type uint32;
309
            description
310
311
              "Specifies the priority level in case of
               congestion on the underlying physical links.";
312
            reference
313
314
              "GS NFV IFA014: Section 6.5.6.2 QoS information
               element";
315
316
317
          }
        }

318
        leaf service-availability-level {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
319
          type uint32;
320
          description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
321
322
323
324
325
326
327
328
            "If present, specifies the service availability level
             for the VL instance created from this DF.

             THE FOLLOWING STATEMENT IS SUBJECT TO CHANGE:

             Either the serviceAvailabilityLevel attribute of NS DF
             or the serviceAvailabilityLevel attribute of the VL DF
             may be provided, but not both.";
329
          reference
330
            "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
331
             information element";
332
        }
333
      }
334

335
336
337
338
339
      leaf test-access {
        type enumeration {
          enum none;
          enum passive-monitoring;
          enum active;
340
        }
341
342
343
344
345
        description
          "Specifies test access facilities expected on the VL.";
        reference
          "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
           information element";
346
      }
347

348
349
      leaf description {
        type string;
350
        description
351
352
          "Provides human-readable information on the purpose of
           the virtual link (e.g. VL for control plane traffic).";
353
        reference
354
          "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
355
           information element";
356
357
358
      }
      uses security-parameters;
    }
359

360
361
    list vnffgd {
      key "id";
362

363
364
365
366
367
368
369
370
371
372
373
374
375
376
      description
        "Provides the descriptors of the applicable forwarding
         graphs.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";

      leaf id {
        type string;
        description
          "Identifier of this Vnffgd information element. It
           uniquely identifies a VNFFGD.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
377
             element";
378
379
380
381
382
      }

      leaf-list vnf-profile-id {
        type leafref {
          path "../../df/vnf-profile/id";
383
        }
384
385
386
387
388
389
        description
          "References the VnfProfile of a constituent VNF.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
           element";
      }
390

391
392
393
      leaf-list pnf-profile-id {
        type leafref {
          path "../../df/pnf-profile/id";
394
        }
395
396
397
398
399
400
        description
          "References the PnfProfile of a constituent PNF.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
           element";
      }
401

402
403
404
      leaf-list nested-ns-profile-id {
        type leafref {
          path "../../df/ns-profile/id";
405
        }
406
407
408
409
410
411
        description
          "References the NsProfile of a nestedNS.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
           element";
      }
412

413
414
415
      leaf virtual-link-profile-id {
        type leafref {
          path "../../df/virtual-link-profile/id";
416
        }
417
418
419
420
421
422
423
        description
          "References the Virtual Link Profile of a constituent
             VL.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
           element";
      }
424

425
      list nfp-position-element {
426
        key "id";
427

Mahesh Jethanandani's avatar
Bug#253  
Mahesh Jethanandani committed
428
        min-elements 1;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
429

430
431
        leaf id {
          type string;
432
433
434
435
436
437
438
          description
            "Identifier of this NfpPositionElemen information
             element. It uniquely identifies an
             NfpPositionElemen.";
          reference
            "GS NFV IFA014: Section 6.4.6.2 NfpPositionElement
                 information element";
439
        }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
440

441
442
443
444
445
446
447
448
449
450
        container desc {
          choice constituent-base-element-id {
            mandatory "true";
            container vnf-profile {
              leaf vnf-profile-id {
                must ". = deref(../../vnfd-profile-id)" {
                }
                type leafref {
                  path "../../../../../../nsd/df/vnf-profile/id";
                }
451
452
              }
            }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
453

454
455
456
457
458
459
460
            container pnf-profile {
              leaf pnf-profile-id {
                must ". = deref(../../pnfd-profile-id)" {
                }
                type leafref {
                  path "../../../../../../nsd/df/pnf-profile/id";
                }
461
462
              }
            }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
463

464
465
466
467
468
469
470
            container ns-profile {
              leaf ns-profile-id {
                must ". = deref(../../ns-profile-id)" {
                }
                type leafref {
                  path "../../../../../../nsd/df/ns-profile/id";
                }
471
472
              }
            }
473
474
475
476
477
            description
              "Reference to the profile of an NS constituent.";
            reference
              "GS NFV IFA014: Section 6.4.8
               CpdInConstituentElement information element";
478
479
          }

Mahesh Jethanandani's avatar
Bug#253  
Mahesh Jethanandani committed
480
481
482
483
484
485
486
487
          choice constituent-cpd-id {
            container vnf {
              leaf vnfd-id {
                must ". = deref(../../vnfd-profile-id)/../vnfd-id" {
                }
                type leafref {
                  path "/nfv:nfv/nfv:vnfd/nfv:id";
                }
488
              }
Mahesh Jethanandani's avatar
Bug#253  
Mahesh Jethanandani committed
489
490
491
492
              leaf cpd-id {
                type leafref {
                  path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
                }
493
494
              }
            }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
495

496
497
498
499
500
            container pnf {
              leaf pnfd-id {
                must ". = deref(../../pnfd-profile-id)/../pnfd-id" {
                }
                type leafref {
Mahesh Jethanandani's avatar
Bug#253  
Mahesh Jethanandani committed
501
                  path "/nfv:nfv/nfv:pnfd/nfv:id";
502
                }
503
              }
Mahesh Jethanandani's avatar
Bug#253  
Mahesh Jethanandani committed
504
505
506
507
              leaf pnf-cpd-id {
                type leafref {
                  path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
                }
508
509
              }
            }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
510

511
512
513
            container ns {
              leaf nsd-id {
                must ". = deref(../../nested-ns-profile-id)/" +
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
514
                     "../nsd-id" {
515
516
517
518
519
                }

                type leafref {
                  path "../../../../../../nsd/id";
                }
520
              }
521
522
523
524
              leaf sap-cpd-id {
                type leafref {
                  path "deref(../nsd-id)/../sapd/id";
                }
525
526
              }
            }
527
528
529
530
531
532
533
534
            description
              "References the VNF external CPD for a given
               VnfProfile, or the PNF external CPD for a given
               PnfProfile, or a NS SAPD for a given NsProfile
               identified by the constituentBaseElementId.";
            reference
              "GS NFV IFA014: Section 6.4.8.2
               CpdInConstituentElement information element";
535
536
          }
          description
Mahesh Jethanandani's avatar
Bug#253  
Mahesh Jethanandani committed
537
            "Specifies a CPD or SAPD in the context of a profile
538
             of an NS constituent element.";
539
          reference
540
541
            "GS NFV IFA014: Section 6.4.6.2 NfpPositionElement
             information element";
542
543
        }
        description
544
545
546
          "One or a pair of CPDs or SAPDs. These descriptors
           shall be members of the CpdPool associated to the
           parent VNFFG.";
547
        reference
548
549
          "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
           information element";
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
      }

      list nfpd {
        key "id";

        leaf id {
          type string;
          description
            "Identifies this nfpd information element within a
             VNFFGD.";
          reference
            "GS NFV IFA014: Section 6.4.3.2 Nfpd information
             element";
        }

        leaf rule {
          type string;
          description
            "Provides an NFP classification and selection rule.
569
570
571
             The rule may be expressed as a criteria constructed out
             of atomic assertions linked by Boolean operators AND,
             OR and NOT.";
572
573
574
575
576
          reference
            "GS NFV IFA014: Section 6.4.3.2 Nfpd information
             element";
        }

577
        list position-desc {
578
579
          key "id";

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
580
          min-elements 1;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
581

582
583
584
          leaf id {
            type string;
            description
585
              "Identifier of this NfpPositionDesc element.";
586
            reference
587
588
              "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
               information element";
589
590
          }

591
592
593
          leaf-list nfp-position-element-id {
            type leafref {
              path "../../../nfp-position-element/id";
594
            }
595
            description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
596
              "Reference to one or a pair of CPDs or SAPDs.";
597
            reference
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
598
599
              "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
               information element";
600
          }
601

602
603
604
605
          leaf forwarding-behaviour {
            type identityref {
              base forwarding-behaviour;
            }
606
            description
607
608
609
610
611
612
613
614
615
616
              "Identifies a rule to apply to forward traffic to CP or
               SAP instances corresponding to the referenced CPD(s)
               and SAPD(s). The minimum list of rules to be supported
               shall include:
               • ALL = Traffic flows shall be forwarded simultaneously
                 to all CP or SAP instances created from the
                 referenced CP profile(s).
               • LB = Traffic flows shall be forwarded to one CP or SAP
                 instance created from the referenced CP profile(s)
                 selected based on a load-balancing algorithm.";
617
            reference
618
619
              "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
               information element";
620
          }
621

622
623
624
625
626
627
628
629
630
          leaf forwarding-behavior-input-parameters {
            type string;
            description
              "Provides input parameters to configure the forwarding
               behaviour (e.g. identifies a load balancing
               algorithm).";
            reference
              "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
               information element";
631
          }
632
633
634
635
636
637
638
639
640

          description
            "Describes a position in the NFP in terms of one or more
             CPDs and SAPDs and rules for distributing the traffic
             among CP and SAP instances created from these CPDs
             and SAPDs.";
          reference
            "GS NFV IFA014: Section 6.4.3.2 Nfpd information
             element";
641
        }
642
643
644
645
646
        description
          "The network forwarding path associated to the VNFFG.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
           element";
647
      }
648
    }
649

650
651
652
    leaf-list autoscale-rule {
      type string;
    }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
653

654
655
656
    list lifecycle-management-script {
      key "event";
      leaf event {
657
658
        type string;
      }
659
660
      leaf script {
        type string;
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
    list df {
      min-elements 1;
      must "default-instantiation-level or " +
           "count(ns-instantiation-level) = 1" {
        error-message
          "default-instantiation-level must be present if there " +
          "multiple instantion-level";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
      }

      key "id";
      description
        "Identifies a DF within the scope of an NSD.";
      reference
        "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
         information element";

      leaf id {
        type string;
        description
          "Identifies this NsDf information element. It identifies
           a NS DF within the NSD.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
      }

      leaf flavour-key {
        type leafref {
          path "../monitored-info/id";
694
        }
695
696
697
        description
          "Assurance parameter against which this flavour is being
           described.
698

699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
           The key can be a combination of multiple assurance
           parameters with a logical relationship between them.
           The parameters should be present as a monitoredInfo
           attribute in the NSD.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
      }

      list vnf-profile {
        must "min-number-of-instances <= max-number-of-instances";
        must "boolean(../../vnfd-id[.=current()/vnfd-id])" {
          error-message "VNFDs in the profile has to be listed as a " +
                        "dependency of the network service " +
                        "descriptor.";
        }
714
715
        key "id";
        description
716
          "VNF profile to be used for the NS flavour.";
717
        reference
718
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
719
720
721

        leaf id {
          type string;
722
          description
723
724
            "Identifier of this vnfProfile information element. It
             uniquely identifies a VnfProfile.";
725
          reference
726
727
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
728
729
        }

730
731
        leaf vnfd-id {
          mandatory true;
732
          type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
733
            path "/nfv:nfv/nfv:vnfd/nfv:id";
734
          }
735
          description
736
737
738
739
740
            "References a VNFD.";
          reference
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
        }
741

742
743
744
        leaf flavour-id {
          mandatory true;
          type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
745
            path "deref(../vnfd-id)/../nfv:df/nfv:id";
746
747
748
          }
          description
            "Identifies a flavour within the VNFD.";
749
          reference
750
751
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
752
753
        }

754
755
756
        leaf instantiation-level {
          mandatory true;
          type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
757
            path "deref(../flavour-id)/../nfv:instantiation-level/" +
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
758
                 "nfv:id";
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
          description
            "Identifier of the instantiation level of the VNF DF
             to be used for instantiation. If not present, the
             default instantiation level as declared in the VNFD
             shall be used.";
          reference
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
        }

        leaf min-number-of-instances {
          default 1;
          type uint16;
          description
            "Minimum number of instances of the VNF based on this
             VNFD that is permitted to exist for this VnfProfile.";
          reference
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
        }

        leaf max-number-of-instances {
          default 1;
          type uint16;
          description
            "Maximum number of instances of the VNF based on this
             VNFD that is permitted to exist for this VnfProfile.";
          reference
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
        }

        uses local-affinity-or-anti-affinity-rule;

        list affinity-or-anti-affinity-group {
795
          key "id";
796

797
          description
798
799
            "Identifier(s) of the affinity or anti-affinity
             group(s) the VnfProfile belongs to.";
800
          reference
801
802
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
             element";
803
804
805

          leaf id {
            type leafref {
806
              path "../../../affinity-or-anti-affinity-group/id";
807
808
            }
          }
809
        }
810

811
812
813
814
815
816
817
818
819
        list virtual-link-connectivity {
          key "virtual-link-profile-id";

          description
            "Defines the connection information of the VNF, it
             contains connection relationship between a VNF
             connection point and a NS Virtual Link.";
          reference
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
820
               element";
821

822
          leaf virtual-link-profile-id {
823
            type leafref {
824
              path "../../../virtual-link-profile/id";
825
            }
826
            description
827
              "Reference an NS VL profile.";
828
            reference
829
830
              "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
               information element.";
831
832
          }

833
834
          list constituent-cpd-id {
            key "constituent-base-element-id";
835

836
            description
837
838
839
840
              "Describes a connection point on a VNF/PNF or a SAP
               which connects to virtual links instantiated from
               the profile identified in the virtualLinkProfileId
               attribute.";
841
            reference
842
843
              "GS NFV IFA014: Section 6.3.7
               NsVirtualLinkConnectivity information element";
844

845
            leaf constituent-base-element-id {
846
              type leafref {
847
                path "../../../id";
848
              }
849
850
851
852
853
              description
                "Reference to the profile of an NS constituent.";
              reference
                "GS NFV IFA014: Section 6.4.8
                 CpdInConstituentElement information element";
854
855
            }

856
            leaf constituent-cpd-id {
857
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
858
                path "deref(../../../vnfd-id)/../nfv:ext-cpd/nfv:id";
859
              }
860
              description
861
862
863
                "A reference to the descriptor of a connection point
                 attached to one of the constituent VNFs and PNFs or to
                 the descriptor of a NS SAP.";
864
              reference
865
866
                "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                 element";
867
            }
868
869
          }
        }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884

        leaf service-availability-level {
          must "not(../../service-availability-level)";
          type uint32;
          description
            "If present, specifies the service availability level for
             the VNF instance created from this profile.

             Either the serviceAvailabilityLevel attribute of NS DF
             or the serviceAvailabilityLevel attribute of the
             VnfProfile may be provided, but not both.";
          reference
            "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
               element";
        }
885
      }
886

887
888
889
890
891
892
893
      list pnf-profile {
        key "id";
        must "boolean(../../pnfd-id[.=current()/pnfd-id])" {
          error-message "PNFDs in the profile has to be listed as a " +
                        "dependency of the network service " +
                        "descriptor.";
        }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
894

895
896
897
898
899
900
901
902
903
        leaf id {
          type string;
          description
            "Identifier of this PnfProfile information element.
             It uniquely identifies a PnfProfile.";
          reference
            "GS NFV IFA014: Section 6.3.6.2 PnfProfile information
             element";
        }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
904

905
906
        leaf pnfd-id {
          type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
907
            path "/nfv:nfv/nfv:pnfd/nfv:id";
908
          }
909
910
911
912
913
          description
            "References a PNFD.";
          reference
            "GS NFV IFA014: Section 6.3.6.2 PnfProfile information
             element";
914
        }
915

916
917
        list virtual-link-connectivity {
          key "virtual-link-profile-id";
918

919
920
921
922
923
924
925
          description
            "Defines the connection information of the PNF, it
             contains connection relationship between a PNF
             connection point and a NS Virtual Link.";
          reference
            "GS NFV IFA014: Section 6.3.6.2 PnfProfile information
             element";
926

927
          leaf virtual-link-profile-id {
928
            type leafref {
929
              path "../../../virtual-link-profile/id";
930
931
            }
            description
932
              "Reference an NS VL profile.";
933
            reference
934
935
              "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
               information element.";
936
937
          }

938
939
          list constituent-cpd-id {
            key "constituent-base-element-id";
940
941

            description
942
943
944
945
              "Describes a connection point on a VNF/PNF or a SAP
               which connects to virtual links instantiated from
               the profile identified in the virtualLinkProfileId
               attribute.";
946
            reference
947
948
              "GS NFV IFA014: Section 6.3.7
               NsVirtualLinkConnectivity information element";
949

950
            leaf constituent-base-element-id {
951
              type leafref {
952
                path "../../../id";
953
              }
954
              description
955
                "Reference to the profile of an NS constituent.";
956
              reference
957
958
                "GS NFV IFA014: Section 6.4.8
                 CpdInConstituentElement information element";
959
960
            }

961
962
            leaf constituent-cpd-id {
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
963
                path "deref(../../../pnfd-id)/../nfv:ext-cpd/nfv:id";
964
              }
965
              description
966
967
968
                "A reference to the descriptor of a connection point
                 attached to one of the constituent VNFs and PNFs or to
                 the descriptor of a NS SAP.";
969
              reference
970
971
                "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                 element";
972
973
974
            }
          }
        }
975
      }
976

977
978
      list virtual-link-profile {
        key "id";
979

980
981
982
983
984
985
986
        description
          "VL profile to be used for the NS flavour.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";

        leaf id {
          type string;
987
          description
988
989
            "Uniquely identifies this VirtualLinkProfile
             information element.";
990
          reference
991
992
993
            "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
             information element";
        }
994

995
996
997
998
        leaf virtual-link-desc-id {
          mandatory true;
          type leafref {
            path "../../../virtual-link-desc/id";
999
          }
1000
1001
1002
1003
1004
1005
          description
            "Uniquely references a VLD.";
          reference
            "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
             information element";
        }
1006

1007
1008
1009
1010
        leaf flavour-id {
          mandatory true;
          type leafref {
            path "deref(../virtual-link-desc-id)/../df/id";
1011
          }
1012
1013
1014
1015
1016
1017
          description
            "Identifies a flavour within the VLD.";
          reference
            "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
             information element";
        }
1018

1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
        uses local-affinity-or-anti-affinity-rule;

        list affinity-or-anti-affinity-group {
          key "id";

          description
            "Identifies an affinity or anti-affinity group the
             VLs instantiated according to the VlProfile belong
             to.";
          reference
            "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile
             information element";

          leaf id {
1033
            type leafref {
1034
              path "../../../affinity-or-anti-affinity-group/id";
1035
1036
            }
          }
1037
        }
1038

1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057