aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/adapter-manager/provider/src/main/yang/nts-common@2021-06-08.yang
blob: 24b3a1725941e32fbde7f1934d68e8b60b29395a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
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
111
112
113
114
115
116
117
118
119
120
121
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
151
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
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
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
module nts-common {
  yang-version 1.1;
  namespace "urn:o-ran-sc:params:xml:ns:yang:nts:common";
  prefix ntsc;

  import ietf-inet-types {
    prefix inet;
  }

  organization
    "O-RAN-SC";
  contact
    " Web: <https://wiki.o-ran-sc.org/display/SIM/SIM>
        Editors:
        Alex Stancu <mailto:alexandru.stancu@highstreet-technologies.com>
        Adrian Lita <mailto:adrian.lita@highstreet-technologies.com>
        Martin Skorupski <mailto:martin.skorupski@highstreet-technologies.com>";
  description
    "This module contains common yang definitions YANG definitions for the Network Topology Simulator.";

  revision 2021-06-08 {
    description
      "Moved NTS_PROTOCOL_TYPE_BASE identities from nts-manager.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2021-03-26 {
    description
      "Added controller-protocol.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2021-02-15 {
    description
      "Added presence to configuration containers.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2020-11-20 {
    description
      "Add feature-type for the Web cut through feature.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2020-10-22 {
    description
      "Add feature-type for the NETCONF Call Home feature.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2020-10-13 {
    description
      "Add feature-type typedef containing the features that can be activated in the Network Function.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2020-09-07 {
    description
      "Initial revision for the Network Topology Simulator - Next Generation common types.";
    reference
      "O-RAN-SC SIM project";
  }

  feature faults-status {
    description
      "This means that the server supports reporting back the number of faults that were generated";
  }

  identity NTS_PROTOCOL_TYPE_BASE {
    description
      "Base identity for protocol.";
  }

  identity NTS_PROTOCOL_TYPE_NETCONF_SSH {
    base NTS_PROTOCOL_TYPE_BASE;
    description
      "Identity for NETCONF SSH protocol.";
  }

  identity NTS_PROTOCOL_TYPE_NETCONF_TLS {
    base NTS_PROTOCOL_TYPE_BASE;
    description
      "Identity for NETCONF TLS protocol.";
  }

  identity NTS_PROTOCOL_TYPE_FTP {
    base NTS_PROTOCOL_TYPE_BASE;
    description
      "Identity for FTP protocol.";
  }

  identity NTS_PROTOCOL_TYPE_SFTP {
    base NTS_PROTOCOL_TYPE_BASE;
    description
      "Identity for SFTP protocol.";
  }

  identity NTS_PROTOCOL_TYPE_HTTP {
    base NTS_PROTOCOL_TYPE_BASE;
    description
      "Identity for HTTP protocol.";
  }

  identity NTS_PROTOCOL_TYPE_HTTPS {
    base NTS_PROTOCOL_TYPE_BASE;
    description
      "Identity for HTTPS protocol.";
  }

  identity NTS_FUNCTION_TYPE_BASE {
    description
      "The reference of each identity represents the name of the associated docker image.";
  }

  typedef authentication-method-type {
    type enumeration {
      enum "no-auth" {
        description
          "no security (http)";
      }
      enum "cert-only" {
        description
          "auth by certificate (https)";
      }
      enum "basic-auth" {
        description
          "auth by basic auth username and password (https)";
      }
      enum "cert-basic-auth" {
        description
          "auth by certificate and basic auth username / password (https)";
      }
    }
    description
      "The authentication method for VES messaging.";
  }

  typedef feature-type {
    type bits {
      bit ves-file-ready {
        position 0;
        description
          "Controls the ves-file-ready feature.";
      }
      bit ves-heartbeat {
        position 1;
        description
          "Controls the ves-heartbeat feature.";
      }
      bit ves-pnf-registration {
        position 2;
        description
          "Controls the ves-pnf-registration feature.";
      }
      bit manual-notification-generation {
        position 3;
        description
          "Controls the manual notification generation feature.";
      }
      bit netconf-call-home {
        position 4;
        description
          "Controls the NETCONF Call Home feature.";
      }
      bit web-cut-through {
        position 5;
        description
          "Controls the Web Cut Through feature.";
      }
    }
    description
      "Describes the features that can be enabled/disabled in the Network Function.";
  }

  grouping mount-point-details-g {
    description
      "Groups details about mount point";
    leaf mount-point-addressing-method {
      type enumeration {
        enum "host-mapping" {
          description
            "Uses IP and port mapped to the host machine to address the nework function.";
        }
        enum "docker-mapping" {
          description
            "Uses Docker IP and port to address the nework function.";
        }
      }
      default "docker-mapping";
      description
        "Specifies how to address the simulated network function: via the host machine or via docker.";
    }
  }

  grouping fault-delay-period-g {
    description
      "For reusing the same fault-delay-period.";
    list fault-delay-list {
      key "index";
      ordered-by user;
      description
        "The list defining the pattern for generating events.";
      leaf index {
        type uint16;
        description
          "The index of the list.";
      }

      leaf delay-period {
        type uint16;
        units "s";
        description
          "The amount of seconds before the next event.";
      }
    }
  }

  grouping fault-count-g {
    description
      "Grouping for counting the fault events, grouped by severity.";
    container fault-count {
      if-feature "faults-status";
      config false;
      description
        "Container which groups the number of fault events, by severity.";
      leaf normal {
        type uint32;
        description
          "Number of normal (non-alarmed) events.";
      }

      leaf warning {
        type uint32;
        description
          "Number of warning events.";
      }

      leaf minor {
        type uint32;
        description
          "Number of minor events.";
      }

      leaf major {
        type uint32;
        description
          "Number of major events.";
      }

      leaf critical {
        type uint32;
        description
          "Number of critical events.";
      }
    }
  }

  grouping faults-g {
    description
      "Grouping for fault generation";
    container fault-generation {
      presence "Enables fault generation configuration.";
      description
        "Groups the fault generation configuration and status.";
      uses fault-delay-period-g;

      uses fault-count-g;
    }
  }

  grouping faults-enabled-g {
    description
      "Groups the enabling of faults.";
    leaf faults-enabled {
      type boolean;
      description
        "For enabling the fault generation.";
    }
  }

  grouping netconf-config-g {
    description
      "Groups the configuration and status of NETCONF Fault notifications.";
    container netconf {
      presence "Enables NETCONF configuration.";
      description
        "Container for describing the NETCONF details.";
      uses faults-enabled-g;

      leaf call-home {
        type boolean;
        description
          "For enabling the NETCONF Call Home feature. If set to 'true', each simulated device, when booting up, will try to Call Home to the SDN Controller.";
      }
    }
  }

  grouping ves-config-g {
    description
      "Groups the configuration and status of VES Fault notifications.";
    container ves {
      presence "Enables VES configuration.";
      description
        "Container for describing the VES details.";
      uses faults-enabled-g;

      leaf pnf-registration {
        type boolean;
        description
          "For enabling the PNF Registration messages. If set to 'true', each simulated device, when booting up, will send a PNF Registration message to the VES Collector.";
      }

      leaf heartbeat-period {
        type uint16;
        description
          "The number of seconds between VES heartbeat messages.";
      }
    }
  }

  grouping controller-g {
    description
      "Groups information about the SDN Controller.";
    leaf controller-protocol {
      type enumeration {
        enum "http" {
          description
            "HTTP protocol will be used to connect to the VES Collector.";
        }
        enum "https" {
          description
            "HTTPS protocol will be used to connect to the VES Collector.";
        }
      }
      default "https";
      description
        "The protocol used for communication with the SDN Controller.";
    }

    leaf controller-ip {
      type inet:host;
      description
        "The IP address of the SDN Controller.";
    }

    leaf controller-port {
      type inet:port-number;
      description
        "The port exposed by the SDN Controller.";
    }

    leaf controller-netconf-call-home-port {
      type inet:port-number;
      description
        "The port exposed by the SDN Controller for NETCONF Call Home.";
    }

    leaf controller-username {
      type string;
      description
        "The username for accessing the SDN Controller.";
    }

    leaf controller-password {
      type string;
      description
        "The password for accessing the SDN Controller.";
    }
  }

  grouping ves-endpoint-g {
    description
      "Groups information about the VES Collector.";
    leaf ves-endpoint-protocol {
      type enumeration {
        enum "http" {
          description
            "HTTP protocol will be used to connect to the VES Collector.";
        }
        enum "https" {
          description
            "HTTPS protocol will be used to connect to the VES Collector.";
        }
      }
      default "https";
      description
        "The protocol (HTTP / HTTPS) to be used to address the VES Collector.";
    }

    leaf ves-endpoint-ip {
      type inet:host;
      description
        "The IP address of the VES Collector.";
    }

    leaf ves-endpoint-port {
      type inet:port-number;
      description
        "The port exposed by the VES Collector.";
    }

    leaf ves-endpoint-auth-method {
      type authentication-method-type;
      default "no-auth";
      description
        "The type of the authentication to be used with the VES Collector.";
    }

    leaf ves-endpoint-username {
      type string;
      description
        "The username for accessing the VES Collector.";
    }

    leaf ves-endpoint-password {
      type string;
      description
        "The password for accessing the VES Collector.";
    }

    leaf ves-endpoint-certificate {
      type string;
      description
        "The Certificate to be used to authenticate to the VES Collector.";
    }
  }

  grouping rpc-status-g {
    description
      "RPC output grouping.";
    leaf status {
      type enumeration {
        enum "SUCCESS" {
          description
            "The RPC was successfully invoked.";
        }
        enum "ERROR" {
          description
            "An error was encountered when invoking the RPC.";
        }
      }
      mandatory true;
      description
        "The status of the RPC.";
    }
  }
}