etsi-nfv-ns.yang 48.9 KB
Newer Older
1
submodule etsi-nfv-ns {
2
  yang-version 1.1;
3 4 5 6
  belongs-to etsi-nfv {
    prefix nfv;
  }

7 8 9
  import etsi-nfv-common {
    prefix common;
  }
10

11 12 13
  include etsi-nfv-vnf;
  include etsi-nfv-pnf;

14 15 16 17 18 19
  description
    "Models for NS according to ETSI GS NFV-IFA 014.";

  revision 2017-01-20 {
    description
      "Initial revision
20 21
       Common data structure to support NSD according to:
       ETSI GS NFV-IFA 011 Ed251v243";
22

23
    reference
24
      "ETSI GS NFV-IFA 011 Ed251v243";
25 26 27 28 29 30
  }

  grouping resource-handle {
    leaf vim-id {
      type string;
    }
31
    leaf resource-provider-id {
32 33 34 35 36 37 38
      type string;
    }
    leaf resource-id {
      type string;
    }
  }

39

40 41 42
  grouping nsd {
    list nsd {
      key "id";
43

44 45 46
      leaf id {
        type string;
        description
47 48 49 50 51
          "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";
52 53 54 55
      }
      leaf designer {
        type string;
        description
56 57 58 59
          "Identifies the designer of the NSD.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
60 61 62 63
      }
      leaf version {
        type string;
        description
64 65 66 67
          "Identifies the version of the NSD.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
68 69 70 71
      }
      leaf name {
        type string;
        description
72 73 74 75
          "Provides the human readable name of the NSD.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
76 77 78
      }
      leaf invariant-id {
        type string;
79 80 81 82 83 84 85
        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";
86 87
      }

88 89
      leaf-list nested-nsd-id {
        must ". != ../id";
90
        type leafref {
91
          path "../../nsd/id";
92
        }
93 94 95 96 97
        description
          "References the NSD of a constituent nested NS.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
98 99
      }

100 101 102
      leaf-list vnfd-id {
        type leafref {
          path "../../vnfd/id";
103
        }
104 105 106 107 108
        description
          "References the VNFD of a constituent VNF.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
109
      }
110 111 112 113 114 115 116 117 118 119 120 121 122

      leaf-list pnfd-id {
	type leafref {
	  path "../../pnfd/id";
	}
        description
          "References the PNFD of a constituent PNF.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
      }

      list sapd {
123 124
        key "id";
        description
125 126 127 128 129 130
          "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";

131 132
        leaf id {
          type string;
133 134 135
          description
            "Identifier of this Cpd information element.";
          reference
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
136
            "GS NFV IFA014: Section 6.6.3.1 Cpd information element";
137 138 139
        }

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

152 153
        leaf virtual-link-desc {
          type leafref {
154
            path "../../virtual-link-desc/id";
155 156
          }
          description
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
            "References the descriptor of the NS VL instance to
             which the SAP instantiated from this SAPD connects to.";
          reference
            "GS NFV IFA014: Section 6.2.3.2 Sapd information element";
        }

        choice associated-cpd-id {
          container vnf {
            leaf vnfd-id {
              mandatory true;
              type leafref {
                path "../../../../nfv:vnfd/nfv:id";
              }
              must "boolean(../../../vnfd-id[.=current()])";
            }

            leaf ext-cpd-id {
              mandatory true;
              type leafref {
                path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
              }
            }
          }
          container pnf {
            leaf pnfd-id {
              mandatory true;
                type leafref {
                path "../../../../nfv:pnfd/nfv:id";
              }
              must "boolean(../pnfd-id[.=current()])";
            }

            leaf ext-cpd-id {
              mandatory true;
              type leafref {
                path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
              }
            }
          }
          container ns {
            leaf nsd-id {
            mandatory true;
              type leafref {
                path "../../../../nfv:nsd/nfv:id";
              }
              must "boolean(../nsd-id[.=current()])";
	    }

            leaf ext-cpd-id {
              mandatory true;
              type leafref {
                path "deref(../nsd-id)/../nfv:sapd/nfv:id";
              }
            }
          }
        }
213
      }
214

215 216 217
      list virtual-link-desc {
        key "id";
        description
218 219 220 221
          "Provides the constituent VLDs.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
222 223
        leaf id {
          type string;
224 225 226 227 228 229
          description
            "Identifier of the NsVirtualLinkDesc information element.
             It uniquely identifies a VLD.";
          reference
            "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
             information element";
230
        }
231

232 233
        leaf provider {
          type string;
234 235 236 237 238
          description
            "Defines the organization generating the VLD.";
          reference
            "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
             information element";
239
        }
240

241 242 243
        leaf version {
          mandatory true;
          type string;
244 245 246 247 248
          description
            "Specifies the version of the VLD.";
          reference
            "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
             information element";
249
        }
250

251
        uses common:connectivity-type;
252

253
        list df {
254
          key "id";
255 256 257 258 259 260 261 262 263

          description
            "The VirtualLinkDf information element specifies
             properties for instantiating a VL according to a
             specific flavour.";
          reference
            "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
             information element";

264 265
          leaf id {
            type string;
266 267 268 269 270 271
            description
              "Identifies this VirtualLinkDf information element
               within a VLD.";
            reference
              "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
               information element";
272 273 274
          }

          container qos {
275 276 277 278 279 280 281
            description
              "The QoS information element specifies quality of
               service parameters applicable to a VL.";
            reference
              "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
               information element";

282 283 284 285
            leaf latency {
              mandatory true;
              type uint32;
              units "ms";
286 287 288 289 290
              description
                "Specifies the maximum latency in ms.";
              reference
                "GS NFV IFA014: Section 6.5.6.2 QoS information
                 element";
291 292 293 294 295 296
            }

            leaf packet-delay-variation {
              mandatory true;
              type uint32;
              units "ms";
297 298 299 300 301
              description
                "Specifies the maximum jitter in ms.";
              reference
                "GS NFV IFA014: Section 6.5.6.2 QoS information
                 element";
302 303 304 305 306 307 308
            }

            leaf packet-loss-ratio {
              type decimal64 {
                fraction-digits "2";
                range "0..1.00";
              }
309 310 311 312 313
              description
                "Specifies the maximum packet loss ratio.";
              reference
                "GS NFV IFA014: Section 6.5.6.2 QoS information
                 element";
314
            }
315

316
            leaf priority {
317
              type uint32;
318 319 320
              description
                "Specifies the priority level in case of
                 congestion on the underlying physical links.";
321 322 323
              reference
                "GS NFV IFA014: Section 6.5.6.2 QoS information
                 element";
324 325
            }
          }
326

327 328 329 330 331 332
          leaf service-availability-level {
            type enumeration {
              enum "level-1";
              enum "level-2";
              enum "level-3";
            }
333 334 335 336 337 338 339 340 341
            description
              "Specifies one of the three levels defined in ETSI
               ETSI GS NFV-REL 001 [i.5]
                 * Level 1.
                 * Level 2.
                 * Level 3.";
            reference
              "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf
               information element";
342 343 344 345 346 347 348 349 350
          }
        }

        leaf test-access {
          type enumeration {
            enum none;
            enum passive-monitoring;
            enum active;
          }
351 352 353 354 355
          description
            "Specifies test access facilities expected on the VL.";
          reference
            "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
             information element";
356 357 358 359
        }

        leaf description {
          type string;
360 361 362 363 364 365
          description
            "Provides human-readable information on the purpose of
             the virtual link (e.g. VL for control plane traffic).";
          reference
            "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc
             information element";
366
        }
367
        uses common:security-parameters;
368
      }
369 370

      list vnffgd {
371
        key "id";
372 373 374 375 376 377 378 379

        description
          "Provides the descriptors of the applicable forwarding
           graphs.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";

380 381
        leaf id {
          type string;
382 383 384 385 386 387
          description
            "Identifier of this Vnffgd information element. It
             uniquely identifies a VNFFGD.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";
388 389
        }

390 391 392
        leaf-list vnf-profile-id {
          type leafref {
            path "../../df/vnf-profile/id";
393
          }
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
          description
            "References the VnfProfile of a constituent VNF.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";
        }

        leaf-list pnf-profile-id {
          type leafref {
            path "../../df/pnf-profile/id";
          }
          description
            "References the PnfProfile of a constituent PNF.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";
        }

        leaf-list nested-ns-profile-id {
          type leafref {
            path "../../df/ns-profile/id";
          }
          description
            "References the NsProfile of a nestedNS.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";
        }

        leaf virtual-link-profile-id {
          type leafref {
            path "../../df/virtual-link-profile/id";
          }
          description
            "References the Virtual Link Profile of a constituent
             VL.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";
        }

        list cpd-pool {
          key "id";

          description
            "A pool of descriptors of connection points attached to
             one of the constituent VNFs and PNFs and/or one of the
             SAPs of the parent NS or of a nested NS.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";

          leaf id {
            type string;
            description
              "Identifier of this CpdPool information element. It
               identifies a pool of descriptors of connection points
               and NS SAPs.";
            reference
              "GS NFV IFA014: Section 6.4.4.2 CpdPool information
               element";
          }

          choice cpd-id {
            container vnf {
              leaf vnfd-id {
                must ". = deref(../../vnfd-profile-id)/../vnfd-id" {
                }
                type leafref {
                  path "/nfv/vnfd/id";
                }
              }
              leaf cpd-id {
                type leafref {
                  path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
                }
470 471
              }
            }
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622
            container pnf {
              leaf pnfd-id {
                must ". = deref(../../pnfd-profile-id)/../pnfd-id" {
                }
                type leafref {
                  path "/nfv/pnfd/id";
                }
              }
              leaf pnf-cpd-id {
                type leafref {
                  path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
                }
              }
            }
            container ns {
              leaf nsd-id {
                must ". = deref(../../ns-profile-id)/../nsd-id" {
                }

                type leafref {
                  path "/nfv/nsd/id";
                }
              }
              leaf sap-cpd-id {
                type leafref {
                  path "deref(../nsd-id)/../nfv:sapd/nfv:id";
                }
              }
            }
            description
              "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.";
            reference
              "GS NFV IFA014: Section 6.4.4.2 CpdPool information
               element";
          }
        }

        list nfpd {
          key "id";

          description
            "The network forwarding path associated to the VNFFG.";
          reference
            "GS NFV IFA014: Section 6.4.2.2 Vnffgd information
             element";

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

          list position-desc-id {
            key "id";

            description
              "Describes a position in the NFP in terms of one or
               more CP profiles and rules for distributing the
               traffic among CP and SAP instances created from the
               CPD or SAPD associated to these profiles. This shall
               be connection point profile, which is either a CPD
               associated with the VnfProfile of a constituent VNF,
               or a CPD associated with the PnfProfile of a
               constituent PNF, or a SAPD associated with the
               NsProfile of a nested NS. The related VnfProfile,
               PnfProfile and NsProfile shall be included in the
               parent VNFFGD.";
            reference
              "GS NFV IFA014: Section 6.4.3.2 Nfpd information
               element";

            leaf id {
              type string;
              description
                "Identifier of this NfpPositionDesc element.";
              reference
                "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
                 information element";
            }

            list cp-profile-id {
              key "id";

              description
                "References the profile of a connection point to be
                 traversed by the traffic flows matching the criteria.
                 This shall be a connection point attached to one of
                 the constituent VNFs and PNFs of the parent VNFFG,
                 or a SAP of one of the constituent nested NSs of the
                 parent VNFFG.";
              reference
                "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
                 information element";

              leaf id {
                type string;
                description
                  "Identifier of this CpProfile information element.
                   It uniquely identifies a CpProfile.";
                reference
                  "GS NFV IFA014: Section 6.4.6.2 CpProfile
                   information element";
              }

              list constituent-profile-elements {
                key "id";

                description
                  "Specifies the constituents of the CpProfile.";
                reference
                  "GS NFV IFA014: Section 6.4.6.2 CpProfile
                   information element";

                leaf id {
                  type string;
                  description
                    "Specifies the constituents of the CpProfile.";
                  reference
                    "GS NFV IFA014: Section 6.4.7.2
                     ConstituentProfileElements information element";
                }

                leaf cpd-id {
                  type string;
                  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 give NsProfile
                     identified by the constituentBasedElementId.";
                  reference
                    "GS NFV IFA014: Section 6.4.7.2
                     ConstituentProfileElements information element";
                }
623 624 625 626 627
              }
            }
          }
        }
      }
628

629 630 631 632 633 634 635 636 637 638 639 640
      leaf-list autoscale-rule {
        type string;
      }
      list lifecycle-management-script {
        key "event";
        leaf event {
          type string;
        }
        leaf script {
          type string;
        }
      }
641 642

      list df {
643
        min-elements 1;
644 645 646 647 648 649 650 651 652
        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";
        }

653 654
        key "id";
        description
655 656 657 658
          "Identifies a DF within the scope of an NSD.";
        reference
          "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor
           information element";
659 660 661

        leaf id {
          type string;
662 663 664 665 666
          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";
667 668 669 670
        }

        leaf flavor-key {
          type leafref {
671
            path "../monitored-info/id";
672
          }
673 674 675 676 677 678 679 680 681 682
          description
            "Assurance parameter against which this flavour is being
             described.

             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";
683 684 685
        }

        list vnf-profile {
686 687 688 689 690
          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.";
691 692
          }
          key "id";
693 694 695 696
          description
            "VNF profile to be used for the NS flavour.";
          reference
            "GS NFV IFA014: Section 6.3.2.2 NsDf information element";
697 698 699

          leaf id {
            type string;
700 701 702 703 704 705
            description
              "Identifier of this vnfProfile information element. It
               uniquely identifies a VnfProfile.";
            reference
              "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
               element";
706 707
          }

708
          leaf vnfd-id {
709 710
            mandatory true;
            type leafref {
711
              path "/nfv/vnfd/id";
712
            }
713 714 715 716 717
            description
              "References a VNFD.";
            reference
              "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
               element";
718 719
          }

720
          leaf flavor-id {
721 722
            mandatory true;
            type leafref {
723
              path "deref(../vnfd-id)/../df/id";
724
            }
725 726 727 728 729
            description
              "Identifies a flavour within the VNFD.";
            reference
              "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
               element";
730 731 732 733 734
          }

          leaf instantiation-level {
            mandatory true;
            type leafref {
735
              path "deref(../flavor-id)/../instantiation-level/id";
736
            }
737 738 739 740 741 742 743 744
            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";
745 746 747 748
          }

          leaf min-number-of-instances {
            mandatory true;
749 750 751 752 753 754 755
            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";
756
          }
757

758 759
          leaf max-number-of-instances {
            mandatory true;
760 761 762 763 764 765 766
            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";
767 768
          }

769
          uses common:local-affinity-or-anti-affinity-rule;
770

771 772 773
          list affinity-or-anti-affinity-group {
            key "id";

774 775 776 777 778 779 780
            description
              "Identifier(s) of the affinity or anti-affinity
               group(s) the VnfProfile belongs to.";
            reference
              "GS NFV IFA014: Section 6.3.3.2 VnfProfile information
               element";

781 782
            leaf id {
              type leafref {
783
                path "../../../affinity-or-anti-affinity-group/id";
784 785 786 787 788
              }
            }
          }

          list virtual-link-connectivity {
789 790 791 792 793 794 795 796 797
            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
               element";
798

799
            leaf virtual-link-profile-id {
800
              type leafref {
801
                path "../../../virtual-link-profile/id";
802
              }
803 804 805 806 807
              description
                "Reference an NS VL profile.";
              reference
                "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
                 information element.";
808 809
            }

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
810 811 812
            list constituent-cpd-id {
              key "constituent-base-element-id";

813
              description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
814 815 816 817
                "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.";
818
              reference
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844
                "GS NFV IFA014: Section 6.3.7
                 NsVirtualLinkConnectivity information element";

              leaf constituent-base-element-id {
                type leafref {
                  path "../../../id";
                }
                description
                  "Reference to the profile of an NS constituent.";
                reference
                  "GS NFV IFA014: Section 6.4.8
                   CpdInConstituentElement information element";
              }

              leaf constituent-cpd-id {
                type leafref {
                  path "deref(../../../vnfd-id)/../nfv:ext-cpd/nfv:id";
                }
                description
                  "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.";
                reference
                  "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                   element";
              }
845 846
            }
          }
847
        }
848

849 850 851 852 853 854 855
        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.";
          }
856

857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889
          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";
          }

          leaf pnfd-id {
            type leafref {
              path "/nfv/pnfd/id";
            }
            description
              "References a PNFD.";
            reference
              "GS NFV IFA014: Section 6.3.6.2 PnfProfile information
               element";
          }

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

            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";

            leaf virtual-link-profile-id {
890
              type leafref {
891
                path "../../../virtual-link-profile/id";
892
              }
893 894 895 896 897
              description
                "Reference an NS VL profile.";
              reference
                "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
                 information element.";
898 899
            }

Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
900 901 902
            list constituent-cpd-id {
              key "constituent-base-element-id";

903
              description
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
904 905 906 907
                "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.";
908
              reference
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934
                "GS NFV IFA014: Section 6.3.7
                 NsVirtualLinkConnectivity information element";

              leaf constituent-base-element-id {
                type leafref {
                  path "../../../id";
                }
                description
                  "Reference to the profile of an NS constituent.";
                reference
                  "GS NFV IFA014: Section 6.4.8
                   CpdInConstituentElement information element";
              }

              leaf constituent-cpd-id {
                type leafref {
                  path "deref(../../../pnfd-id)/../nfv:ext-cpd/nfv:id";
                }
                description
                  "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.";
                reference
                  "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                   element";
              }
935 936 937 938
            }
          }
        }

939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954
        list virtual-link-profile {
          key "id";

          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;
            description
              "Uniquely identifies this VirtualLinkProfile
               information element.";
            reference
              "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
               information element";
955 956
          }

957
          leaf virtual-link-desc-id {
958 959
            mandatory true;
            type leafref {
960
              path "../../../virtual-link-desc/id";
961
            }
962 963 964 965 966
            description
              "Uniquely references a VLD.";
            reference
              "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
               information element";
967 968
          }

969
          leaf flavor-id {
970 971
            mandatory true;
            type leafref {
972
              path "deref(../virtual-link-desc-id)/../df/id";
973
            }
974 975 976 977 978
            description
              "Identifies a flavour within the VLD.";
            reference
              "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile
               information element";
979 980
          }

981
          uses common:local-affinity-or-anti-affinity-rule;
982

983 984 985
          list affinity-or-anti-affinity-group {
            key "id";

986 987 988 989 990 991 992 993
            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";

994 995
            leaf id {
              type leafref {
996
                path "../../../affinity-or-anti-affinity-group/id";
997 998 999 1000 1001
              }
            }
          }

          container max-bitrate-requirements {
1002 1003 1004 1005 1006 1007
            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";
1008
            uses common:link-bitrate-requirements;
1009 1010
          }
          container min-bitrate-requirements {
1011 1012 1013 1014 1015 1016
            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";
1017
            uses common:link-bitrate-requirements;
1018 1019 1020 1021
          }
        }

        list scaling-aspect {
1022 1023 1024 1025 1026 1027 1028 1029
          key "id";

          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 {
1030
            type string;
1031 1032 1033 1034 1035 1036 1037
            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";
1038
          }
1039

1040 1041
          leaf name {
            type string;
1042 1043 1044 1045 1046 1047
            description
              "Provides a human readable name of the NS scaling
               aspect.";
            reference
              "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
               information element";
1048
          }
1049

1050 1051
          leaf description {
            type string;
1052 1053 1054 1055 1056 1057
            description
              "Provides a human readable description of the NS
               scaling aspect.";
            reference
              "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
               information element";
1058
          }
1059

1060 1061
          leaf scaling-level {
            type leafref {
1062
              path "../../ns-instantiation-level/id";
1063
            }
1064 1065 1066 1067 1068
            description
              "Describes the details of an NS level.";
            reference
              "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect
               information element";
1069 1070 1071 1072 1073 1074
          }
        }

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

1075 1076 1077 1078 1079 1080 1081 1082 1083 1084
          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";

1085 1086
          leaf id {
            type string;
1087 1088 1089 1090 1091 1092
            description
              "Identifier of Identifier of this 
               AffinityOrAntiAffinityGroup information element.";
            reference
              "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity
               information element";
1093 1094 1095 1096
          }

          leaf affinity-type {
            mandatory true;
1097
            type common:affinity-type;
1098 1099 1100 1101 1102 1103
            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";
1104 1105 1106 1107
          }

          leaf affinity-scope {
            mandatory true;
1108
            type common:affinity-scope;
1109 1110 1111 1112 1113 1114
            description
              "Specifies the scope of the affinity or anti-affinity
               relationship e.g. a NFVI node, an NFVI PoP, etc.";
            reference
              "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity
               information element";
1115 1116 1117
          }
        }

1118
        list ns-instantiation-level {
1119 1120
          min-elements 1;
          key "id";
1121 1122 1123 1124 1125 1126 1127 1128

          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";

1129 1130
          leaf id {
            type string;
1131 1132 1133 1134 1135 1136
            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";
1137 1138 1139 1140
          }

          leaf description {
            type string;
1141 1142 1143 1144 1145
            description
              "Human readable description of the NS level.";
            reference
              "GS NFV IFA014: Section 6.3.9.2 NsLevel information
               element";
1146 1147 1148
          }

          list vnf-to-level-mapping {
1149 1150 1151 1152 1153 1154 1155 1156 1157
            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";
1158

1159
            leaf vnf-profile-id {
1160
              type leafref {
1161
                path "../../../vnf-profile/id";
1162
              }
1163 1164 1165 1166 1167 1168
              description
                "Identifies the profile to be used for a VNF
                 involved in an NS level.";
              reference
                "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping
                 information element";
1169 1170 1171 1172 1173
            }

            leaf number-of-instances {
              mandatory true;
              type uint32;
1174 1175 1176 1177 1178 1179
              description
                "Specifies the number of VNF instances required for
                 an NS level.";
              reference
                "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping
                 information element";
1180 1181 1182
            }
          }

1183 1184 1185 1186 1187 1188 1189 1190 1191
          list virtual-link-to-level-mapping {
            key "virtual-link-profile-id";

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

1193
            leaf virtual-link-profile-id {
1194
              type leafref {
1195
                path "../../../virtual-link-profile/id";
1196
              }
1197 1198 1199 1200 1201 1202
              description
                "Identifies the profile to be used for a VL involved
                 in an NS level.";
              reference
                "GS NFV IFA014: Section 6.7.5.2
                 VirtualLinkToLevelMapping information element";
1203 1204
            }

1205
            uses common:link-bitrate-requirements;
1206 1207 1208
          }

          list ns-to-level-mapping {
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
            key "ns-profile-id";

            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";

            leaf ns-profile-id {
1220
              type leafref {
1221
                path "../../../ns-profile/id";
1222
              }
1223 1224 1225 1226 1227 1228
              description
                "Identifies the profile to be used for a nested NS
                 involved in the NS level.";
              reference
                "GS NFV IFA014: Section 6.7.6.2 NsToLevel information
                 element";
1229 1230 1231 1232 1233
            }

            leaf number-of-instances {
              mandatory true;
              type uint32;
1234 1235 1236 1237 1238 1239
              description
                "Specifies the number of nested NS instances required
                 for the NS scale level.";
              reference
                "GS NFV IFA014: Section 6.7.6.2 NsToLevel information
                 element";
1240 1241
            }
          }
1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257

          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";
          }
1258 1259 1260 1261
        }

        leaf default-instantiation-level {
          type leafref {
1262
            path "../ns-instantiation-level/id";
1263
          }
1264 1265 1266 1267 1268 1269
          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";
1270 1271 1272
        }

        list ns-profile {
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299
          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";

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

          leaf id {
            type string;
            description
              "Identifies an NS profile.";
            reference
              "GS NFV IFA014: Section 6.3.11.2 NsProfile information
               element";
          }
          leaf nsd-id {
            mandatory true;
1300
            type leafref {
1301
              path "/nfv/nsd/id";
1302
            }
1303 1304 1305 1306 1307 1308
            description
              "Identifies the NSD applicable to NS instantiated
               according to this profile.";
            reference
              "GS NFV IFA014: Section 6.3.11.2 NsProfile information
               element";
1309
          }
1310 1311
          leaf ns-df-id {
            mandatory true;
1312
            type leafref {
1313
              path "deref(../nsd-id)/../df/id";
1314
            }
1315 1316 1317 1318 1319 1320
            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";
1321
          }
1322 1323
          leaf instantiation-level-id {
            mandatory true;
1324
            type leafref {
1325
              path "deref(../ns-df-id)/../ns-instantiation-level/id";
1326
            }
1327 1328 1329 1330 1331 1332 1333 1334
            description
              "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.";
            reference
              "GS NFV IFA014: Section 6.3.11.2 NsProfile information
               element";
1335 1336 1337 1338
          }
          leaf min-number-of-instances {
            type uint16;
            mandatory true;
1339 1340 1341 1342 1343 1344 1345
            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";
1346 1347 1348 1349
          }
          leaf max-number-of-instances {
            type uint16;
            mandatory true;
1350 1351 1352 1353 1354 1355 1356
            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";
1357
          }
1358 1359

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

1362 1363 1364 1365 1366 1367 1368
            description
              "Identifies an affinity or anti-affinity group the NSs
               created according to this NsProfile belongs to.";
            reference
              "GS NFV IFA014: Section 6.3.11.2 NsProfile information
               element";

1369 1370
            leaf id {
              type leafref {
1371
                path "../../../affinity-or-anti-affinity-group/id";
1372 1373 1374
              }
            }
          }
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388

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

            leaf virtual-link-profile-id {
              type leafref {
                path "../../../virtual-link-profile/id";
              }
              description
                "Reference an NS VL profile.";
              reference
                "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity
                 information element.";
            }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1389 1390 1391 1392 1393 1394 1395 1396 1397

            list constituent-cpd-id {
              key "constituent-base-element-id";

              description
                "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.";
1398
              reference
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427
                "GS NFV IFA014: Section 6.3.7
                 NsVirtualLinkConnectivity information element";

              leaf constituent-base-element-id {
                type leafref {
                  path "../../../id";
                }
                description
                  "Reference to the profile of an NS constituent.";
                reference
                  "GS NFV IFA014: Section 6.4.8
                   CpdInConstituentElement information element";
              }

              leaf constituent-cpd-id {
                type leafref {
                  path "deref(../../../nsd-id)/../nfv:sapd/nfv:id";
                }
                description
                  "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.";
                reference
                  "GS NFV IFA014: Section 6.4.4.2 CpdPool information
                   element";
              }
            }
	  }
	}
1428

1429
        list dependencies {
1430
          key "id";
1431 1432 1433 1434 1435 1436 1437

          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";

1438 1439 1440
          leaf id {
            type string;
          }
1441
          choice primary-id {
1442 1443
            leaf primary-vnf-profile {
              type leafref {
1444
                path "../../vnf-profile/vnfd-id";
1445 1446 1447 1448
              }
            }
            leaf primary-ns-profile {
              type leafref {
1449
                path "../../ns-profile/nsd-id";
1450 1451
              }
            }
1452 1453 1454 1455 1456
            description
              "References a VnfProfile or NsProfile.";
            reference
              "GS NFV IFA014: Section 6.3.12.2 Dependencies
               information element";
1457
          }
1458
          choice secondary-id {
1459 1460
            leaf secondary-vnf-profile {
              type leafref {
1461
                path "../../vnf-profile/vnfd-id";
1462 1463 1464 1465
              }
            }
            leaf secondary-ns-profile {
              type leafref {
1466
                path "../../ns-profile/nsd-id";
1467 1468
              }
            }
1469 1470 1471 1472 1473
            description
              "References a VnfProfile or NsProfile.";
            reference
              "GS NFV IFA014: Section 6.3.12.2 Dependencies
               information element";
1474 1475
          }
        }
1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546

        list monitored-info {
          key "id";

          leaf id {
            type string;
          }

          container vnf-indicator-info {
            leaf vnfd-id {
              type leafref {
                path "/nfv/vnfd/id";
              }
              description
                "Identifies a VNFD.";
              reference
                "GS NFV IFA014: Section 6.2.7.2 VnfIndicatorData
                 information element";
            }
            leaf vnf-indicator {
              mandatory true;
              type leafref {
                path "deref(../vnfd-id)/../indicator/id";
              }
              description
                "Identifies a VNF indicator within the VNFD.";
              reference
                "GS NFV IFA014: Section 6.2.7.2 VnfIndicatorData
                 information element";
            }
            description
              "Uniquely identifies this VNF Indicator information
               element.";
            reference
              "GS NFV IFA014: Section 6.2.6.2 MonitoredData
               information element";
          }

          // monitoringParameter in IFA014 is defined by MonitoredData
          // whereas monitoringParameter in IFA011 is defined by
          // MonitoringParameter.
          container monitoring-parameter {
            leaf id {
              type string;
              description
                "Unique identifier of this monitoring parameter
                 information element.";
              reference
                "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter
                 information element";
            }

            leaf name {
              type string;
              description
                "Human readable name of the monitoring parameter.";
              reference
                "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter
                 information element";
            }

            leaf performance-metric {
              mandatory true;
              type string;
              description
                "Defines the virtualised resource-related performance
                 metric.";
              reference
                "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter
                 information element";
            }
Mahesh Jethanandani's avatar
Mahesh Jethanandani committed
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556

            leaf collection-period {
              type string;
              description
                "An attribute that describes the periodicity at which
                 to collect the performance information.";
              reference
                "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter
                 information element";
            }
1557 1558
          }
	}
1559
      }
1560
      uses common:security-parameters;
1561 1562 1563
    }
  }
}