aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/adapter-manager/provider/src/main/yang/nts-manager@2021-06-08.yang
blob: 69a92d8e1323ec9e77af572a16785b1710dbb9f1 (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
module nts-manager {
  yang-version 1.1;
  namespace "urn:o-ran-sc:params:xml:ns:yang:nts:manager";
  prefix nts-mng;

  import ietf-inet-types {
    prefix inet;
  }

  import nts-common {
    prefix ntsc;
  }

  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 YANG definitions for the Network Topology Simulator - Manager.";

  revision 2021-06-08 {
    description
      "Moved NTS_PROTOCOL_TYPE_BASE identities to nts-common.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2021-03-26 {
    description
      "Added NTS_PROTOCOL_TYPE_BASE identities and changed instance/networking container; also added multi-base port support.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2021-02-15 {
    description
      "Added notifications for sending feedback.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2021-01-20 {
    description
      "Added available-network-functions.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2020-11-30 {
    description
      "Cleared revision for nts-common import.";
    reference
      "O-RAN-SC SIM project";
  }
  revision 2020-10-06 {
    description
      "Initial revision for the Network Topology Simulator - Next Generation";
    reference
      "O-RAN-SC SIM project";
  }

  typedef percent {
    type decimal64 {
      fraction-digits 2;
      range "0 .. 100";
    }
    description
      "Percentage";
  }

  grouping instance-g {
    description
      "An instance of a network function which is running. The equivalent on the host machine is a docker container.";
    leaf name {
      type string;
      description
        "The name of the running instance. It is the same as the docker container name which exposes this network function.";
    }

    leaf is-mounted {
      type boolean;
      description
        "Whether the instance is mounted or not to a controller.";
    }

    container networking {
      description
        "Groups the details about networking information.";
      leaf docker-ip {
        type inet:ip-address;
        description
          "The IP address of the docker container implementing the network function instance.";
      }

      list docker-ports {
        key "port";
        description
          "The ports which are exposed inside the docker container implementing the network function instance.";
        leaf port {
          type inet:port-number;
          description
            "Port number.";
        }

        leaf protocol {
          type identityref {
            base ntsc:NTS_PROTOCOL_TYPE_BASE;
          }
          description
            "Protocol attached to current port.";
        }
      }

      leaf host-ip {
        type inet:ip-address;
        description
          "The Host machine IP address pointing to the docker container implementing the network function instance.";
      }

      list host-ports {
        key "port";
        description
          "The Host machine ports mapped to the docker container implementing the network function instance.";
        leaf port {
          type inet:port-number;
          description
            "Port number.";
        }

        leaf protocol {
          type identityref {
            base ntsc:NTS_PROTOCOL_TYPE_BASE;
          }
          description
            "Protocol attached to current port.";
        }
      }
    }
  }

  grouping network-function-g {
    description
      "Contains all the details of a simulated device.";
    leaf function-type {
      type identityref {
        base ntsc:NTS_FUNCTION_TYPE_BASE;
      }
      description
        "Type of network function to be simulated.";
    }

    leaf started-instances {
      type uint16;
      mandatory true;
      description
        "How many instances of this type are started.";
    }

    leaf mounted-instances {
      type uint16;
      must ". <= ../started-instances" {
        error-message
          "The number of mounted instances cannot be greater that the number of started instances.";
      }
      mandatory true;
      description
        "How many instances of this type are mounted in the SDN Controller.";
    }

    uses ntsc:mount-point-details-g;

    leaf docker-instance-name {
      type string;
      mandatory true;
      description
        "The prefix of each docker container being started.";
    }

    leaf docker-version-tag {
      type string;
      mandatory true;
      description
        "The version tag of the docker image to be started.";
    }

    leaf docker-repository {
      type string;
      mandatory true;
      description
        "The prefix containing the docker repository information, if needed.";
    }

    uses ntsc:faults-g;

    uses ntsc:netconf-config-g;

    uses ntsc:ves-config-g;

    container instances {
      config false;
      description
        "Groups details about instances which are running.";
      list instance {
        key "name";
        description
          "Describes a running instance.";
        uses ntsc:mount-point-details-g;

        uses instance-g;
      }
    }
  }

  grouping simulation-information-g {
    description
      "Groups information about the simulation status.";
    container ports {
      config false;
      description
        "Contains information on ports used.";
      leaf netconf-ssh-port {
        type inet:port-number;
        description
          "The base Host machine port from where the simulation can allocate ports incrementally for NETCONF SSH protocol.";
      }

      leaf netconf-tls-port {
        type inet:port-number;
        description
          "The base Host machine port from where the simulation can allocate ports incrementally for NETCONF TLS protocol.";
      }

      leaf transport-ftp-port {
        type inet:port-number;
        description
          "The base Host machine port from where the simulation can allocate ports incrementally for FTP protocol.";
      }

      leaf transport-sftp-port {
        type inet:port-number;
        description
          "The base Host machine port from where the simulation can allocate ports incrementally for SFTP protocol.";
      }
    }

    leaf ssh-connections {
      type uint8;
      config false;
      description
        "The number of SSH Endpoints each network function instance exposes.";
    }

    leaf tls-connections {
      type uint8;
      config false;
      description
        "The number of TLS Endpoints each network function instance exposes.";
    }

    leaf cpu-usage {
      type percent;
      config false;
      description
        "Specifies the CPU load generated by the simulation.";
    }

    leaf mem-usage {
      type uint32;
      config false;
      description
        "Specifies the RAM in MB used by the simulation.";
    }

    leaf last-operation-status {
      type string;
      config false;
      description
        "Specifies the status of the most recent operation performed by the Manager.";
    }
  }

  grouping network-function-image-g {
    description
      "Groups details about a NF docker image.";
    leaf function-type {
      type identityref {
        base ntsc:NTS_FUNCTION_TYPE_BASE;
      }
      config false;
      description
        "Type of network function to be simulated.";
    }

    leaf docker-image-name {
      type string;
      config false;
      mandatory true;
      description
        "The prefix of each docker container being started.";
    }

    leaf docker-version-tag {
      type string;
      config false;
      mandatory true;
      description
        "The version tag of the docker image to be started.";
    }

    leaf docker-repository {
      type string;
      config false;
      mandatory true;
      description
        "The prefix containing the docker repository information, if needed.";
    }
  }

  container simulation {
    presence "Enables simulation configuration.";
    description
      "Root level container which controls the NTS.";
    container available-images {
      config false;
      description
        "Container which encompasses all NF docker images available on the host machine.";
      list network-function-image {
        description
          "List containing available network function docker images and their respective details.";
        uses network-function-image-g;
      }
    }

    container network-functions {
      presence "Enables NF configuration.";
      description
        "Container which encompasses all simulated network functions.";
      list network-function {
        key "function-type";
        unique "docker-instance-name";
        description
          "List containing different simulated network function types and their details.";
        uses network-function-g;
      }
    }

    container sdn-controller {
      presence "Enables SDN Controller detail configuration.";
      description
        "Groups details about the SDN Controller.";
      uses ntsc:controller-g;
    }

    container ves-endpoint {
      presence "Enables VES endpoint detail configuration.";
      description
        "Groups details about the VES Collector endpoint.";
      uses ntsc:ves-endpoint-g;
    }

    uses simulation-information-g;
  }

  notification instance-changed {
    description
      "Sent by the Manager every time something occurs in any of the simulated NF instances.";
    leaf change-status {
      type string;
      mandatory true;
      description
        "The status of the change which was executed to the NF instance.";
    }

    leaf function-type {
      type identityref {
        base ntsc:NTS_FUNCTION_TYPE_BASE;
      }
      mandatory true;
      description
        "Type of the NF instance.";
    }

    uses instance-g {
      refine "name" {
        mandatory true;
      }
    }
  }

  notification operation-status-changed {
    description
      "Sent by the Manager every time a user operation is finished.";
    leaf operation-status {
      type string;
      mandatory true;
      description
        "The status of the operation which was executed by the Manager.";
    }

    leaf error-message {
      type string;
      description
        "Detailed error message from the Manager.";
    }
  }
}