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

6
7
8
  import etsi-nfv-common {
    prefix common;
  }
9
10
11
12
13
14
15

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

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

19
20
    reference
       "ETSI GS NFV-IFA 011 Ed251v243";
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  }

  grouping security-parameters {
    container security {
      leaf signature {
        type string;
      }
      leaf algorithm {
        type string;
      }
      leaf certificate {
        type string;
      }
    }
  }

  grouping resource-handle {
    leaf vim-id {
      type string;
    }
    leaf resrouce-provider-id {
      type string;
    }
    leaf resource-id {
      type string;
    }
  }

  grouping nsd {
    list nsd {
      key "id";
      leaf id {
        type string;
        description
          "Uniquely identifies an network service descriptor";
      }
      leaf designer {
        type string;
        description
          "Identifies the designer of the network service descriptor";
      }
      leaf version {
        type string;
        description
          "Identifies the version of the network service descriptor";
      }
      leaf name {
        type string;
        description
          "Provides the human readable name of the network service. descriptor";
      }
      leaf invariant-id {
        description
          "Identifies an network service descriptor in a version
          independent manner. This attribute is invariant across
          versions of the network service descriptor.";
        type string;
      }

      leaf-list nested-nsd {
        type leafref {
82
          path "../../nsd/id";
83
        }
84
        must ". != ../id";
85
86
87
88
89
90
91
92
93
94
      }

      list vnfd {
        key "vnfd";
        min-elements 1;
        description
          "This lists the VNFDs this network service
           descriptor consists of.";
        leaf vnfd {
          type leafref {
95
            path "/nfv/vnfd/id";
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
          }
        }
      }
      leaf-list pnfd {
        type string;
      }
      list service-access-point-descriptor {
        key "id";
        min-elements 1;
        description
          "A service access point serves as the network
           service's external connection point";
        leaf id {
          type string;
        }

        leaf address-assignment {
          description
            "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";
          type empty;
        }
        leaf description {
          type string;
        }
        leaf layer-protocol {
          type identityref {
128
            base common:layer-protocol;
129
130
131
          }
        }
        leaf role {
132
133
134
          type identityref {
            base common:cp-role;
          }
135
136
137
        }
        leaf virtual-link-desc {
          type leafref {
138
            path "../../virtual-link-desc/id";
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
          }
          description
            "Can optionally connect this service-access-point to an virtual-link. If not set,
             it's assumed a VNFD's connection-points references this
             service-access-point.";
        }
        /*
          associatedCpdId:
          Deliberatly not according to standard, see
          vnf-profile -> sapd-connectivity
        */
      }
      list virtual-link-desc {
        key "id";
        description
          "The virtual-link-desc information element provides general information
           enabling the instantiation of virtual links.";
        leaf id {
          type string;
        }
        leaf provider {
          description
            "Defines the organization generating the VLD.  ";
          type string;
        }
        leaf version {
          mandatory true;
          type string;
        }
168
        uses common:connectivity-type;
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

        list deployment-flavor {
          key "id";
          leaf id {
            type string;
          }

          container qos {
            leaf latency {
              mandatory true;
              description
                "Specifies the maximum latency in ms.";
              type uint32;
              units "ms";
            }

            leaf packet-delay-variation {
              mandatory true;
              description
                "Specifies the maximum jitter in ms.";
              type uint32;
              units "ms";
            }

            leaf packet-loss-ratio {
              description
                "Specifies the maximum packet loss ratio.";
              type decimal64 {
                fraction-digits "2";
                range "0..1.00";
              }
            }
            leaf priority {
              description
                "Specifies the priority level in case of
                 congestion on the underlying physical links.";
              type uint32;
            }
          }
          leaf service-availability-level {
            reference "ETSI GS NFV-REL 001 [i.5]";
            type enumeration {
              enum "level-1";
              enum "level-2";
              enum "level-3";
            }
          }
        }

        leaf test-access {
          type enumeration {
            enum none;
            enum passive-monitoring;
            enum active;
          }
        }

        leaf description {
          type string;
        }
        uses security-parameters;
      }
      // vnffgd skipped since not fully specified by the spec
      list monitored-info {
        key "id";
        leaf id {
          type string;
        }

        choice source {
          // We have no way of refererencing a VNF MP today
          container ns-monitoring-parameter {
241
            uses common:monitoring-parameter;
242
243
244
245
          }
          container vnf-indicator {
            leaf vnfd {
              type leafref {
246
                path "/nfv/vnfd/id";
247
248
249
250
              }
            }
            leaf indicator {
              type leafref {
251
                path "deref(../vnfd)/../indicator/id";
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
              }
            }
          }
        }
      }
      leaf-list autoscale-rule {
        type string;
      }
      list lifecycle-management-script {
        key "event";
        leaf event {
          type string;
        }
        leaf script {
          type string;
        }
      }
      list deployment-flavor {
        min-elements 1;
271
        must "default-instantiation-level or count(instantiation-level) = 1";
272
273
274
275
276
277
278
279
280
281
        key "id";
        description
          "The NsDf information element specifies the properties of a variant of an NS.";

        leaf id {
          type string;
        }

        leaf flavor-key {
          type leafref {
282
            path "../../monitored-info/id";
283
284
285
286
          }
        }

        list vnf-profile {
287
288
          must "min-number-of-instances<=max-number-of-instances";
          must "count(../../vnfd[vnfd=current()/vnfd])=1" {
289
290
291
292
293
294
295
296
297
298
299
            error-message "VNFDs in the profile has to be listed as a dependency of the network service descriptor.";
          }
          key "id";

          leaf id {
            type string;
          }

          leaf vnfd {
            mandatory true;
            type leafref {
300
              path "/nfv/vnfd/id";
301
302
303
304
305
306
            }
          }

          leaf flavor {
            mandatory true;
            type leafref {
307
              path "deref(../vnfd)/../deployment-flavor/id";
308
309
310
311
312
313
            }
          }

          leaf instantiation-level {
            mandatory true;
            type leafref {
314
              path "deref(../flavor)/../instantiation-level/id";
315
316
317
318
319
320
321
322
323
324
325
326
            }
          }

          leaf min-number-of-instances {
            type uint16;
            mandatory true;
          }
          leaf max-number-of-instances {
            type uint16;
            mandatory true;
          }

327
          uses common:local-affinity-or-anti-affinity-rule;
328
329
330
331
332
          list affinity-or-anti-affinity-group {
            key "id";

            leaf id {
              type leafref {
333
                path "../../../affinity-or-anti-affinity-group/id";
334
335
336
337
338
339
340
341
342
              }
            }
          }

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

            leaf virtual-link-profile {
              type leafref {
343
                path "../../../virtual-link-profile/virtual-link-desc";
344
345
346
347
348
              }
            }

            leaf cp {
              type leafref {
349
                path "deref(../../vnfd)/../ext-cpd/id";
350
351
352
353
354
355
356
357
358
359
              }
            }
          }

          // Not according to standard
          list sapd-connectivity {
            key "sapd cp";

            leaf sapd {
              type leafref {
360
                path "../../../../service-access-point-descriptor/id";
361
362
363
364
365
              }
            }

            leaf cp {
              type leafref {
366
                path "deref(../../vnfd)/../ext-cpd/id";
367
368
369
370
371
372
373
374
375
              }
            }
          }
        }

        list pnf-profile {
          key "pnfd";
          leaf pnfd {
            type leafref {
376
              path "../../../pnfd";
377
378
379
380
381
382
383
384
385
386
            }
          }
          // no virtual-link-connectivity as we don't have PNFD modelled.
        }

        list virtual-link-profile {
          key "virtual-link-desc";
          leaf virtual-link-desc {
            mandatory true;
            type leafref {
387
              path "../../../virtual-link-desc/id";
388
389
390
391
392
393
            }
          }

          leaf flavor {
            mandatory true;
            type leafref {
394
              path "deref(../virtual-link-desc)/../deployment-flavor/id";
395
396
397
            }
          }

398
          uses common:local-affinity-or-anti-affinity-rule;
399
400
401
402
403
          list affinity-or-anti-affinity-group {
            key "id";

            leaf id {
              type leafref {
404
                path "../../../affinity-or-anti-affinity-group/id";
405
406
407
408
409
              }
            }
          }

          container max-bitrate-requirements {
410
            uses common:link-bitrate-requirements;
411
412
          }
          container min-bitrate-requirements {
413
            uses common:link-bitrate-requirements;
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
          }
        }

        list scaling-aspect {
          key "aspect";
          leaf aspect {
            type string;
          }
          leaf name {
            type string;
          }
          leaf description {
            type string;
          }
          leaf scaling-level {
            type leafref {
430
              path "../../instantiation-level/id";
431
432
433
434
435
436
437
438
439
440
441
442
443
            }
          }
        }

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

          leaf id {
            type string;
          }

          leaf affinity-type {
            mandatory true;
444
            type common:affinity-type;
445
446
447
448
          }

          leaf affinity-scope {
            mandatory true;
449
            type common:affinity-scope;
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
          }
        }

        list instantiation-level {
          min-elements 1;
          key "id";
          leaf id {
            type string;
          }

          leaf description {
            mandatory true;
            type string;
          }

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

            leaf vnf-profile {
              type leafref {
470
                path "../../../vnf-profile/id";
471
472
473
474
475
476
477
478
479
480
481
482
483
484
              }
            }

            leaf number-of-instances {
              mandatory true;
              type uint32;
            }
          }

          list vl-to-level-mapping {
            key "virtual-link-profile";

            leaf virtual-link-profile {
              type leafref {
485
486
                path "../../../virtual-link-profile/" +
                     "virtual-link-desc";
487
488
489
              }
            }

490
            uses common:link-bitrate-requirements;
491
492
          }

493
494
          must "(count(vnf-to-level-mapping) + " +
               "count(vl-to-level-mapping)) > 0";
495
496
497
498
499

          list ns-to-level-mapping {
            key "ns-profile";
            leaf ns-profile {
              type leafref {
500
                path "../../../ns-profile/nsd";
501
502
503
504
505
506
507
508
509
510
511
512
              }
            }

            leaf number-of-instances {
              mandatory true;
              type uint32;
            }
          }
        }

        leaf default-instantiation-level {
          type leafref {
513
            path "../instantiation-level/id";
514
515
516
517
          }
        }

        list ns-profile {
518
          must "min-number-of-instances<=max-number-of-instances";
519
520
521
          key "nsd";
          leaf nsd {
            type leafref {
522
              path "../../../nested-nsd";
523
524
525
526
            }
          }
          leaf deployment-flavor {
            type leafref {
527
              path "/nfv/nsd[id=current()/../nsd]/deployment-flavor/id";
528
529
530
531
            }
          }
          leaf instantiation-level {
            type leafref {
532
              path "deref(../deployment-flavor)/../instantiation-level/id";
533
534
535
536
537
538
539
540
541
542
            }
          }
          leaf min-number-of-instances {
            type uint16;
            mandatory true;
          }
          leaf max-number-of-instances {
            type uint16;
            mandatory true;
          }
543
          uses common:local-affinity-or-anti-affinity-rule;
544
545
546
547
548
          list affinity-or-anti-affinity-group {
            key "id";

            leaf id {
              type leafref {
549
                path "../../../affinity-or-anti-affinity-group/id";
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
              }
            }
          }
        }

        list dependency {
          description
            "NFV Management and Orchestration functions shall instantiate
             VNFs from the VnfProfile and/or nested NSs from the NsProfile
             referenced in the primary attribute before instantiating VNFs
             from the VnfProfile and/or nested NSs from the NsProfile
             referenced in the secondary attribute.";
          key "id";
          leaf id {
            type string;
          }
          choice primary {
            leaf primary-vnf-profile {
              type leafref {
569
                path "../../vnf-profile/vnfd";
570
571
572
573
              }
            }
            leaf primary-ns-profile {
              type leafref {
574
                path "../../ns-profile/nsd";
575
576
577
578
579
580
              }
            }
          }
          choice secondary {
            leaf secondary-vnf-profile {
              type leafref {
581
                path "../../vnf-profile/vnfd";
582
583
584
585
              }
            }
            leaf secondary-ns-profile {
              type leafref {
586
                path "../../ns-profile/nsd";
587
588
589
590
591
592
593
594
595
              }
            }
          }
        }
      }
      uses security-parameters;
    }
  }
}