etsi-nfv-ns.yang 48.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
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 {
319
          type enumeration {
320 321 322
            enum "level-1";
            enum "level-2";
            enum "level-3";
323
          }
324
          description
325 326 327 328 329
            "Specifies one of the three levels defined in ETSI
             ETSI GS NFV-REL 001 [i.5]
               * Level 1.
               * Level 2.
               * Level 3.";
330
          reference
331
            "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
332
             information element";
333
        }
334
      }
335

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

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

361 362
    list vnffgd {
      key "id";
363

364 365 366 367 368 369 370 371 372 373 374 375 376 377
      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
378
             element";
379 380 381 382 383
      }

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

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

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

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

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

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
429
        min-elements 1;
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
430

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

442 443 444 445 446 447 448 449 450 451
        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";
                }
452 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
              }
            }
463 464 465 466 467 468 469
            container ns-profile {
              leaf ns-profile-id {
                must ". = deref(../../ns-profile-id)" {
                }
                type leafref {
                  path "../../../../../../nsd/df/ns-profile/id";
                }
470 471
              }
            }
472 473 474 475 476
            description
              "Reference to the profile of an NS constituent.";
            reference
              "GS NFV IFA014: Section 6.4.8
               CpdInConstituentElement information element";
477 478
          }

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
479 480 481 482 483 484 485 486
          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";
                }
487
              }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
488 489 490 491
              leaf cpd-id {
                type leafref {
                  path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
                }
492 493
              }
            }
494 495 496 497 498
            container pnf {
              leaf pnfd-id {
                must ". = deref(../../pnfd-profile-id)/../pnfd-id" {
                }
                type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
499
                  path "/nfv:nfv/nfv:pnfd/nfv:id";
500
                }
501
              }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
502 503 504 505
              leaf pnf-cpd-id {
                type leafref {
                  path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
                }
506 507
              }
            }
508 509 510 511 512 513 514 515 516
            container ns {
              leaf nsd-id {
                must ". = deref(../../nested-ns-profile-id)/" +
                  "../nsd-id" {
                }

                type leafref {
                  path "../../../../../../nsd/id";
                }
517
              }
518 519 520 521
              leaf sap-cpd-id {
                type leafref {
                  path "deref(../nsd-id)/../sapd/id";
                }
522 523
              }
            }
524 525 526 527 528 529 530 531
            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";
532 533
          }
          description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
534
            "Specifies a CPD or SAPD in the context of a profile
535
             of an NS constituent element.";
536
          reference
537 538
            "GS NFV IFA014: Section 6.4.6.2 NfpPositionElement
             information element";
539 540
        }
        description
541 542 543
          "One or a pair of CPDs or SAPDs. These descriptors
           shall be members of the CpdPool associated to the
           parent VNFFG.";
544
        reference
545 546
          "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
           information element";
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565
      }

      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.
566 567 568
             The rule may be expressed as a criteria constructed out
             of atomic assertions linked by Boolean operators AND,
             OR and NOT.";
569 570 571 572 573
          reference
            "GS NFV IFA014: Section 6.4.3.2 Nfpd information
             element";
        }

574
        list position-desc {
575 576
          key "id";

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
577 578
	  min-elements 1;

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

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

599 600 601 602
          leaf forwarding-behaviour {
            type identityref {
              base forwarding-behaviour;
            }
603
            description
604 605 606 607 608 609 610 611 612 613
              "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.";
614
            reference
615 616
              "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
               information element";
617
          }
618

619 620 621 622 623 624 625 626 627
          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";
628
          }
629 630 631 632 633 634 635 636 637

          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";
638
        }
639 640 641 642 643
        description
          "The network forwarding path associated to the VNFFG.";
        reference
          "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
           element";
644
      }
645
    }
646

647 648 649
    leaf-list autoscale-rule {
      type string;
    }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
650

651 652 653
    list lifecycle-management-script {
      key "event";
      leaf event {
654 655
        type string;
      }
656 657
      leaf script {
        type string;
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
    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";
691
        }
692 693 694
        description
          "Assurance parameter against which this flavour is being
           described.
695

696 697 698 699 700 701 702 703 704 705 706 707 708 709 710
           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.";
        }
711 712
        key "id";
        description
713
          "VNF profile to be used for the NS flavour.";
714
        reference
715
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
716 717 718

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

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

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

751 752 753
        leaf instantiation-level {
          mandatory true;
          type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
754 755
            path "deref(../flavour-id)/../nfv:instantiation-level/" +
	         "nfv:id";
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
          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 {
792
          key "id";
793

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

          leaf id {
            type leafref {
803
              path "../../../affinity-or-anti-affinity-group/id";
804 805
            }
          }
806
        }
807

808 809 810 811 812 813 814 815 816
        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
817
               element";
818

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

830 831
          list constituent-cpd-id {
            key "constituent-base-element-id";
832

833
            description
834 835 836 837
              "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.";
838
            reference
839 840
              "GS NFV IFA014: Section 6.3.7
               NsVirtualLinkConnectivity information element";
841

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

853
            leaf constituent-cpd-id {
854
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
855
                path "deref(../../../vnfd-id)/../nfv:ext-cpd/nfv:id";
856
              }
857
              description
858 859 860
                "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.";
861
              reference
862 863
                "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                 element";
864
            }
865 866 867
          }
        }
      }
868

869 870 871 872 873 874 875
      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
876

877 878 879 880 881 882 883 884 885
        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
886

887 888
        leaf pnfd-id {
          type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
889
            path "/nfv:nfv/nfv:pnfd/nfv:id";
890
          }
891 892 893 894 895
          description
            "References a PNFD.";
          reference
            "GS NFV IFA014: Section 6.3.6.2 PnfProfile information
             element";
896
        }
897

898 899
        list virtual-link-connectivity {
          key "virtual-link-profile-id";
900

901 902 903 904 905 906 907
          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";
908

909
          leaf virtual-link-profile-id {
910
            type leafref {
911
              path "../../../virtual-link-profile/id";
912 913
            }
            description
914
              "Reference an NS VL profile.";
915
            reference
916 917
              "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
               information element.";
918 919
          }

920 921
          list constituent-cpd-id {
            key "constituent-base-element-id";
922 923

            description
924 925 926 927
              "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.";
928
            reference
929 930
              "GS NFV IFA014: Section 6.3.7
               NsVirtualLinkConnectivity information element";
931

932
            leaf constituent-base-element-id {
933
              type leafref {
934
                path "../../../id";
935
              }
936
              description
937
                "Reference to the profile of an NS constituent.";
938
              reference
939 940
                "GS NFV IFA014: Section 6.4.8
                 CpdInConstituentElement information element";
941 942
            }

943 944
            leaf constituent-cpd-id {
              type leafref {
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
945
                path "deref(../../../pnfd-id)/../nfv:ext-cpd/nfv:id";
946
              }
947
              description
948 949 950
                "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.";
951
              reference
952 953
                "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                 element";
954 955 956
            }
          }
        }
957
      }
958

959 960
      list virtual-link-profile {
        key "id";
961

962 963 964 965 966 967 968
        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;
969
          description
970 971
            "Uniquely identifies this VirtualLinkProfile
             information element.";
972
          reference
973 974 975
            "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
             information element";
        }
976

977 978 979 980
        leaf virtual-link-desc-id {
          mandatory true;
          type leafref {
            path "../../../virtual-link-desc/id";
981
          }
982 983 984 985 986 987
          description
            "Uniquely references a VLD.";
          reference
            "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
             information element";
        }
988

989 990 991 992
        leaf flavour-id {
          mandatory true;
          type leafref {
            path "deref(../virtual-link-desc-id)/../df/id";
993
          }
994 995 996 997 998 999
          description
            "Identifies a flavour within the VLD.";
          reference
            "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
             information element";
        }
1000

1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
        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 {
1015
            type leafref {
1016
              path "../../../affinity-or-anti-affinity-group/id";
1017 1018
            }
          }
1019
        }
1020

1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039
        container max-bitrate-requirements {
          description
            "Specifies the maximum bitrate requirements for a VL
             instantiated according to this profile.";
          reference
            "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile
             information element";
          uses link-bitrate-requirements;
        }
        container min-bitrate-requirements {
          description
            "Specifies the minimum bitrate requirements for a VL
             instantiated according to this profile.";
          reference
            "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile
             information element";
          uses link-bitrate-requirements;
        }
      }
1040

1041 1042
      list scaling-aspect {
        key "id";
1043

1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057
        description
          "The scaling aspects supported by this DF of the NS.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";

        leaf id {
          type string;
          description
            "Identifier of this NsScalingAspect information element.
             It uniquely identifies the NS scaling aspect in an
             NSD.";
          reference
            "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
             information element";
1058 1059
        }

1060 1061 1062 1063 1064 1065 1066 1067 1068
        leaf name {
          type string;
          description
            "Provides a human readable name of the NS scaling
             aspect.";
          reference
            "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
             information element";
        }
1069

1070 1071
        leaf description {
          type string;
1072
          description
1073 1074
            "Provides a human readable description of the NS
             scaling aspect.";
1075
          reference
1076 1077 1078
            "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
             information element";
        }
1079

1080 1081 1082
        leaf scaling-level {
          type leafref {
            path "../../ns-instantiation-level/id";
1083
          }
1084 1085 1086 1087 1088 1089 1090
          description
            "Describes the details of an NS level.";
          reference
            "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
             information element";
        }
      }
1091

1092 1093
      list affinity-or-anti-affinity-group {
        key "id";
1094

1095 1096 1097 1098 1099 1100 1101 1102 1103
        description
          "Specifies affinity or anti-affinity relationship
           applicable between the VNF instances created using
           different VNFDs, the Virtual Link instances created
           using different NsVirtualLinkDescs or the nested NS
           instances created using different NSDs in the same
           affinity or anti-affinity group.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
1104

1105 1106 1107 1108 1109 1110 1111 1112
        leaf id {
          type string;
          description
            "Identifier of Identifier of this
             AffinityOrAntiAffinityGroup information element.";
          reference
            "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity
             information element";
1113 1114
        }

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1115
        leaf type {
1116 1117 1118 1119 1120 1121 1122 1123 1124
          mandatory true;
          type affinity-type;
          description
            "Specifies the type of relationship that the members of
             the group have: 'affinity' or 'anti-affinity.'";
          reference
            "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity
             information element";
        }
1125

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1126
        leaf scope {
1127 1128
          mandatory true;
          type affinity-scope;
1129
          description
1130 1131
            "Specifies the scope of the affinity or anti-affinity
             relationship e.g. a NFVI node, an NFVI PoP, etc.";
1132
          reference
1133 1134 1135 1136
            "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity
             information element";
        }
      }
1137

1138 1139 1140
      list ns-instantiation-level {
        min-elements 1;
        key "id";
1141

1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182
        description
          "Describes the details of an NS level.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element
           GS NFV IFA014: Section 6.7.2.2 NsScaling information
           element";

        leaf id {
          type string;
          description
            "Identifier of this NsLevel information element. It
             uniquely identifies an NS level within the DF.";
          reference
            "GS NFV IFA014: Section 6.3.9.2 NsLevel information
             element";
        }

        leaf description {
          type string;
          description
            "Human readable description of the NS level.";
          reference
            "GS NFV IFA014: Section 6.3.9.2 NsLevel information
             element";
        }

        list vnf-to-level-mapping {
          key "vnf-profile-id";

          description
            "Specifies the profile of the VNFs involved in this NS
             level and, for each of them, the required number of
             instances.";
          reference
            "GS NFV IFA014: Section 6.3.9.2 NsLevel information
             element";

          leaf vnf-profile-id {
            type leafref {
              path "../../../vnf-profile/id";
            }
1183
            description
1184 1185
              "Identifies the profile to be used for a VNF
               involved in an NS level.";
1186
            reference
1187
              "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping
1188
               information element";
1189 1190
          }

1191 1192 1193
          leaf number-of-instances {
            default 1;
            type uint32;
1194
            description
1195 1196
              "Specifies the number of VNF instances required for
               an NS level.";
1197
            reference
1198
              "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping
1199
               information element";
1200 1201 1202
          }
        }

1203 1204
        list virtual-link-to-level-mapping {
          key "virtual-link-profile-id";
1205 1206

          description
1207 1208
            "Specifies the profile of the VLs involved in this NS
             level and, for each of them, the needed bandwidth.";
1209
          reference
1210
            "GS NFV IFA014: Section 6.3.9.2 NsLevel information
1211 1212
             element";

1213 1214 1215 1216
          leaf virtual-link-profile-id {
            type leafref {
              path "../../../virtual-link-profile/id";
            }
1217
            description
1218 1219
              "Identifies the profile to be used for a VL involved
               in an NS level.";
1220
            reference
1221 1222
              "GS NFV IFA014: Section 6.7.5.2
               VirtualLinkToLevelMapping information element";
1223 1224
          }

1225 1226 1227 1228 1229
          uses link-bitrate-requirements;
        }

        list ns-to-level-mapping {
          key "ns-profile-id";
1230

1231 1232 1233 1234 1235 1236 1237
          description
            "Specifies the profile of the nested NSs involved in
             this NS level and, for each of them, the required
             number of instances.";
          reference
            "GS NFV IFA014: Section 6.3.9.2 NsLevel information
             element";
1238

1239 1240 1241 1242
          leaf ns-profile-id {
            type leafref {
              path "../../../ns-profile/id";
            }
1243
            description
1244 1245
              "Identifies the profile to be used for a nested NS
               involved in the NS level.";
1246
            reference
1247
              "GS NFV IFA014: Section 6.7.6.2 NsToLevel information
1248
               element";
1249 1250
          }

1251 1252 1253
          leaf number-of-instances {
            default 1;
            type uint32;
1254
            description
1255 1256
              "Specifies the number of nested NS instances required
               for the NS scale level.";
1257
            reference
1258
              "GS NFV IFA014: Section 6.7.6.2 NsToLevel information
1259
               element";
1260 1261
          }
        }
1262

1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279
        must "(count(vnf-to-level-mapping) + " +
             "count(virtual-link-to-level-mapping) + " +
             "count(ns-to-level-mapping)) > 0" {
          error-message
	    "At least one attribute between " +
            "vnf-to-level-mapping, " +
            "virtual-link-to-level-mapping and " +
            "ns-to-level-mapping shall be present.";
          description
            "At least one attribute between vnfToLevelMapping,
             vlirtualLinkToLevelMapping and nsToLevelMapping shall
             be present.";
          reference
            "GS NFV IFA014: Section 6.3.9.2 NsLevel information
             element";
        }
      }
1280

1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291
      leaf default-instantiation-level {
        type leafref {
          path "../ns-instantiation-level/id";
        }
        description
          "Identifies the NS level which represents the default NS
           instantiation level for this DF. It shall be present if
           there are multiple 'nsIinstantiationLevel' entries.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
      }
1292

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357
      container ns-lcm-additional-params {
        container instantiate {
          list params {
            key "key";

            leaf key {
              type string;
            }

            leaf value {
              type string;
            }
	    description
              "Array of KVP requirements for additional parameters
               of NS to be passed when invoking the Instantiate Ns
               operation.";
            reference
              "GS NFV IFA014: Section 6.2.10.3
               InstantiateNsAdditionalParams information element";
          }
        }

        container scale {
          list params {
            key "key";

            leaf key {
              type string;
            }

            leaf value {
              type string;
            }
	    description
              "Array of KVP requirements for additional parameters
               of NS to be passed when invoking the Scale Ns
               operation.";
            reference
              "GS NFV IFA014: Section 6.2.10.4
               ScaleNsAdditionalParams information element";
          }
        }

        container heal {
          list params {
            key "key";

            leaf key {
              type string;
            }

            leaf value {
              type string;
            }
	    description
              "Array of KVP requirements for additional parameters
               of NS to be passed when invoking the Heal Ns
               operation.";
            reference
              "GS NFV IFA014: Section 6.2.10.5
               HealNsAdditionalParams information element";
          }
        }
      }

1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370
      list ns-profile {
        must "min-number-of-instances <= max-number-of-instances" {
          error-message
            "min-number-of-instances has to be less than or equal" +
            "max-number-of-instances.";
        }
        must "boolean(../../nested-nsd-id[.=current()/nsd-id])" {
          error-message
	    "PNFDs in the profile has to be listed as a " +
            "dependency of the network service " +
            "descriptor.";
        }
        key "id";
1371

1372 1373 1374 1375
        description
          "Specifies a NS Profile supported by this NS DF.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
1376

1377 1378 1379 1380 1381 1382 1383 1384
        leaf id {
          type string;
          description
            "Identifies an NS profile.";
          reference
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
        }
1385

1386 1387 1388
        leaf nsd-id {
          mandatory true;
          type leafref {
1389
            path "../../../../nsd/id";
1390
          }
1391 1392 1393 1394 1395 1396 1397
          description
            "Identifies the NSD applicable to NS instantiated
             according to this profile.";
          reference
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
        }
1398

1399 1400 1401 1402
	leaf ns-df-id {
          mandatory true;
          type leafref {
            path "deref(../nsd-id)/../df/id";
1403
          }
1404 1405 1406 1407 1408 1409
          description
            "Identifies the applicable network service DF within
             the scope of the NSD.";
          reference
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
1410 1411
        }

1412 1413
	leaf instantiation-level-id {
          mandatory true;
1414
          type leafref {
1415
            path "deref(../ns-df-id)/../ns-instantiation-level/id";
1416
          }
1417
          description
1418 1419 1420 1421
            "Identifies the NS level within the referenced NS DF to
             be used in the context of the parent NS instantiation.
             If not present, the default NS instantiation level as
             declared in the referenced NSD shall be used.";
1422
          reference
1423 1424
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
1425 1426
        }

1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451
	leaf min-number-of-instances {
          type uint16;
          default 1;
          description
            "Minimum number of nested NS instances based on the
             referenced NSD that is permitted to exist for this
             NsProfile.";
          reference
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
        }

	leaf max-number-of-instances {
          type uint16;
          default 1;
          description
            "Maximum number of nested NS instances based on the
             referenced NSD that is permitted to exist for this
             NsProfile.";
          reference
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
        }

        list affinity-or-anti-affinity-group-id {
1452 1453 1454
          key "id";

          description
1455 1456
            "Identifies an affinity or anti-affinity group the NSs
             created according to this NsProfile belongs to.";
1457
          reference
1458 1459
            "GS NFV IFA014: Section 6.3.11.2 NsProfile information
             element";
1460 1461

          leaf id {
1462
            type leafref {
1463
              path "../../../affinity-or-anti-affinity-group/id";
1464 1465
            }
          }
1466 1467 1468 1469 1470 1471
        }

        list virtual-link-connectivity {
          key "virtual-link-profile-id";

          leaf virtual-link-profile-id {
1472
            type leafref {
1473
              path "../../../virtual-link-profile/id";
1474
            }
1475
            description
1476
              "Reference an NS VL profile.";
1477
            reference
1478 1479
              "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
               information element.";
1480
          }
1481

1482 1483
          list constituent-cpd-id {
            key "constituent-base-element-id";
1484

1485
            description
1486 1487 1488 1489
              "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.";
1490
            reference
1491 1492
              "GS NFV IFA014: Section 6.3.7
               NsVirtualLinkConnectivity information element";
1493

1494
            leaf constituent-base-element-id {
1495
              type leafref {
1496
                path "../../../id";
1497
              }
1498 1499 1500 1501 1502
              description
                "Reference to the profile of an NS constituent.";
              reference
                "GS NFV IFA014: Section 6.4.8
                 CpdInConstituentElement information element";
1503
            }
1504

1505
            leaf constituent-cpd-id {
1506
              type leafref {
1507
                path "deref(../../../nsd-id)/../sapd/id";
1508 1509
              }
              description
1510 1511 1512
                "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.";
1513
              reference
1514 1515
                "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                 element";
1516
            }
1517 1518 1519
          }
        }
      }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1520

1521 1522
      list dependencies {
        key "id";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1523

1524 1525 1526 1527 1528
        description
          "Specifies the order in which instances of the VNFs and/or
           nested NSs have to be created.";
        reference
          "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1529

1530 1531 1532
        leaf id {
          type string;
        }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1533

1534 1535 1536 1537
        choice primary-id {
          leaf primary-vnf-profile {
            type leafref {
              path "../../vnf-profile/vnfd-id";
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1538
            }
1539 1540 1541 1542 1543 1544
          }
          leaf primary-ns-profile {
            type leafref {
              path "../../ns-profile/nsd-id";
            }
          }
1545
          description
1546
            "References a VnfProfile or NsProfile.";
1547
          reference
1548 1549 1550
            "GS NFV IFA014: Section 6.3.12.2 Dependencies
             information element";
        }
1551

1552 1553 1554 1555 1556
	choice secondary-id {
          leaf secondary-vnf-profile {
            type leafref {
              path "../../vnf-profile/vnfd-id";
            }