etsi-nfv-ns.yang 14.4 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
  }

  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 {
68
          path "../../nsd/id";
69
        }
70
        must ". != ../id";
71
72
73
74
75
76
77
78
79
80
      }

      list vnfd {
        key "vnfd";
        min-elements 1;
        description
          "This lists the VNFDs this network service
           descriptor consists of.";
        leaf vnfd {
          type leafref {
81
            path "../../../vnfd/id";
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
          }
        }
      }
      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 {
111
            base common:layer-protocol;
112
113
114
          }
        }
        leaf role {
115
116
117
          type identityref {
            base common:cp-role;
          }
118
119
120
        }
        leaf virtual-link-desc {
          type leafref {
121
            path "../../virtual-link-desc/id";
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
          }
          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;
        }
151
        uses common:connectivity-type;
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

        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;
        }
212
        uses common:security-parameters;
213
214
215
216
217
218
219
220
221
222
223
      }
      // 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 {
224
            uses common:monitoring-parameter;
225
226
227
228
          }
          container vnf-indicator {
            leaf vnfd {
              type leafref {
229
                path "/nfv/vnfd/id";
230
231
232
233
              }
            }
            leaf indicator {
              type leafref {
234
                path "deref(../vnfd)/../indicator/id";
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
              }
            }
          }
        }
      }
      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;
254
        must "default-instantiation-level or count(instantiation-level) = 1";
255
256
257
258
259
260
261
262
263
264
        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 {
265
            path "../../monitored-info/id";
266
267
268
269
          }
        }

        list vnf-profile {
270
271
          must "min-number-of-instances<=max-number-of-instances";
          must "count(../../vnfd[vnfd=current()/vnfd])=1" {
272
273
274
275
276
277
278
279
280
281
282
            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 {
283
              path "/nfv/vnfd/id";
284
285
286
287
288
289
            }
          }

          leaf flavor {
            mandatory true;
            type leafref {
290
              path "deref(../vnfd)/../deployment-flavor/id";
291
292
293
294
295
296
            }
          }

          leaf instantiation-level {
            mandatory true;
            type leafref {
297
              path "deref(../flavor)/../instantiation-level/id";
298
299
300
301
302
303
304
305
306
307
308
309
            }
          }

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

310
          uses common:local-affinity-or-anti-affinity-rule;
311
312
313
314
315
          list affinity-or-anti-affinity-group {
            key "id";

            leaf id {
              type leafref {
316
                path "../../../affinity-or-anti-affinity-group/id";
317
318
319
320
321
322
323
324
325
              }
            }
          }

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

            leaf virtual-link-profile {
              type leafref {
326
                path "../../../virtual-link-profile/virtual-link-desc";
327
328
329
330
331
              }
            }

            leaf cp {
              type leafref {
332
                path "deref(../../vnfd)/../ext-cpd/id";
333
334
335
336
337
338
339
340
341
342
              }
            }
          }

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

            leaf sapd {
              type leafref {
343
                path "../../../../service-access-point-descriptor/id";
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
              }
            }
          }
        }

        list pnf-profile {
          key "pnfd";
          leaf pnfd {
            type leafref {
359
              path "../../../../pnfd/id";
360
361
362
363
364
365
366
367
368
369
            }
          }
          // 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 {
370
              path "../../../virtual-link-desc/id";
371
372
373
374
375
376
            }
          }

          leaf flavor {
            mandatory true;
            type leafref {
377
              path "deref(../virtual-link-desc)/../deployment-flavor/id";
378
379
380
            }
          }

381
          uses common:local-affinity-or-anti-affinity-rule;
382
383
384
385
386
          list affinity-or-anti-affinity-group {
            key "id";

            leaf id {
              type leafref {
387
                path "../../../affinity-or-anti-affinity-group/id";
388
389
390
391
392
              }
            }
          }

          container max-bitrate-requirements {
393
            uses common:link-bitrate-requirements;
394
395
          }
          container min-bitrate-requirements {
396
            uses common:link-bitrate-requirements;
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
          }
        }

        list scaling-aspect {
          key "aspect";
          leaf aspect {
            type string;
          }
          leaf name {
            type string;
          }
          leaf description {
            type string;
          }
          leaf scaling-level {
            type leafref {
413
              path "../../instantiation-level/id";
414
415
416
417
418
419
420
421
422
423
424
425
426
            }
          }
        }

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

          leaf id {
            type string;
          }

          leaf affinity-type {
            mandatory true;
427
            type common:affinity-type;
428
429
430
431
          }

          leaf affinity-scope {
            mandatory true;
432
            type common:affinity-scope;
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
          }
        }

        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 {
453
                path "../../../vnf-profile/id";
454
455
456
457
458
459
460
461
462
463
464
465
466
467
              }
            }

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

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

            leaf virtual-link-profile {
              type leafref {
468
469
                path "../../../virtual-link-profile/" +
                     "virtual-link-desc";
470
471
472
              }
            }

473
            uses common:link-bitrate-requirements;
474
475
          }

476
477
          must "(count(vnf-to-level-mapping) + " +
               "count(vl-to-level-mapping)) > 0";
478
479
480
481
482

          list ns-to-level-mapping {
            key "ns-profile";
            leaf ns-profile {
              type leafref {
483
                path "../../../ns-profile/nsd";
484
485
486
487
488
489
490
491
492
493
494
495
              }
            }

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

        leaf default-instantiation-level {
          type leafref {
496
            path "../instantiation-level/id";
497
498
499
500
          }
        }

        list ns-profile {
501
          must "min-number-of-instances<=max-number-of-instances";
502
503
504
          key "nsd";
          leaf nsd {
            type leafref {
505
              path "../../../nested-nsd";
506
507
508
509
            }
          }
          leaf deployment-flavor {
            type leafref {
510
              path "/nfv/nsd[id=current()/../nsd]/deployment-flavor/id";
511
512
513
514
            }
          }
          leaf instantiation-level {
            type leafref {
515
              path "deref(../deployment-flavor)/../instantiation-level/id";
516
517
518
519
520
521
522
523
524
525
            }
          }
          leaf min-number-of-instances {
            type uint16;
            mandatory true;
          }
          leaf max-number-of-instances {
            type uint16;
            mandatory true;
          }
526
          uses common:local-affinity-or-anti-affinity-rule;
527
528
529
530
531
          list affinity-or-anti-affinity-group {
            key "id";

            leaf id {
              type leafref {
532
                path "../../../affinity-or-anti-affinity-group/id";
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
              }
            }
          }
        }

        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 {
552
                path "../../vnf-profile/vnfd";
553
554
555
556
              }
            }
            leaf primary-ns-profile {
              type leafref {
557
                path "../../ns-profile/nsd";
558
559
560
561
562
563
              }
            }
          }
          choice secondary {
            leaf secondary-vnf-profile {
              type leafref {
564
                path "../../vnf-profile/vnfd";
565
566
567
568
              }
            }
            leaf secondary-ns-profile {
              type leafref {
569
                path "../../ns-profile/nsd";
570
571
572
573
574
              }
            }
          }
        }
      }
575
      uses common:security-parameters;
576
577
578
    }
  }
}