Analyse 3GPP Network Resource Model
[oam.git] / model / yang / 3gpp / ts-28.541 / v16.1.0 / nrm-types-3gpp.yang
1 module nrm-types-3gpp {
2
3   namespace "urn:3gpp:tsg:sa5:nrm:types";
4   prefix "nrm-type";
5     import ietf-inet-types { prefix inet; revision-date "2010-09-24"; }
6     import ietf-yang-types { prefix yang; revision-date "2010-09-24"; }
7
8   revision 2018-07-31 {
9     description
10      "Initial revision.";
11     
12   }
13
14   typedef t_dn {
15     type string;
16     description
17      "The dn type represents a Distinguish Name of the object.";
18   }
19
20   typedef t_mcc {
21           description "The mobile country code consists of three decimal digits, The first digit of the mobile country code identifies the geographic region (the digits 1 and 8 are not used):";
22           type string {
23                   pattern '[02-79][0-9][0-9]';
24           }
25   }
26
27   typedef t_mnc {
28           description "the mobile network code consists of two or three decimal digits (for example: MNC of 001 is not the same as MNC of 01)";
29           type string {
30                   pattern '[0-9][0-9][0-9]|[0-9][0-9]';
31           }
32   }
33
34   grouping pLMNId {
35           leaf MCC {
36                   type t_mcc;
37           }
38           leaf MNC {
39                   type t_mnc;
40           }
41   }
42   
43   typedef t_NCI {
44           description "The NCI shall be of fixed length of 36 bits and shall be coded using full hexadecimal representation. The exact coding of the NCI is the responsibility of each PLMN operator";
45           reference "23.003";
46           type union {
47                   type string {
48                           length 36;
49                           pattern '[01]*';
50                   }
51                   type string {
52                           length 9;
53                           pattern '[a-fA-F0-9]*';
54                   }
55           }
56   }
57   
58   
59   typedef t_operationalState {
60       type enumeration {
61         enum "Enabled";
62         enum "Disabled";                
63       }
64   }
65   
66   typedef t_administrativeState {
67       type enumeration {
68         enum "Locked";
69         enum "Shutdown";                
70         enum "Unlocked";                
71      }
72   }
73   
74   typedef t_availabilityStatus {
75       type enumeration {
76                 enum "IN TEST";
77                 enum "FAILED";                                  
78                 enum "POWER OFF";                               
79                 enum "OFF LINE";                                
80                 enum "OFF DUTY";                                
81                 enum "DEPENDENCY";                              
82                 enum "DEGRADED";                                
83                 enum "NOT INSTALLED";                                   
84                 enum "LOG FULL";                                
85        }
86   }
87   
88   typedef t_cellState {
89       type enumeration {
90         enum "Idle";
91         enum "Inactive";                
92         enum "Active";                  
93      }
94   }
95
96   typedef t_s-NSSAI {
97           type union {
98                   type uint8;
99                   type uint32;
100           }
101   }
102   
103   typedef t_SST {
104           type uint8;
105   }
106   
107   typedef t_nRPCI {
108           type uint32;
109   }
110
111   typedef t_tAC {
112         type union {
113           type string {
114                   length 4;
115                   pattern '[a-fA-F0-9]*';
116           }
117           type string {
118                   length 6;
119                   pattern '[a-fA-F0-9]*';
120           }
121         }
122   }
123   
124   typedef t_subcarrierSpacing {
125           type enumeration {
126                   enum 15;
127                   enum 30;
128                   enum 60;
129                   enum 120;
130           }
131   }
132
133   typedef t_cyclicPrefix {
134           type enumeration {
135                   enum "Normal";
136                   enum "Extended";
137           }
138   }
139                           
140   typedef t_aMF-Region-id {
141           type string {
142                   length 8;
143                   pattern '[01]*';
144           }
145   }
146
147   typedef t_aMF-Set-id {
148       type string {
149                   length 10;
150                   pattern '[01]*';
151           }
152   }
153
154   typedef t_aMF-Pointer {
155           type string {
156                   length 6;
157                   pattern '[01]*';
158           }
159   }
160
161                           
162   grouping aMFI {
163                           
164           leaf AMF-Region-id {
165                   type t_aMF-Region-id;
166           }
167           leaf AMF-Set-id {
168                   type t_aMF-Set-id;
169           }
170           leaf AMF-Pointer {
171                   type t_aMF-Pointer;
172           } 
173                           
174   }             
175
176   typedef t_TransportProtocol {
177                 type enumeration {
178                           enum "TCP";
179                           enum "STCP";
180                           enum "UDP";
181                 }                 
182   }
183
184 // type definition especially for core NF
185
186   typedef NFType {
187         type enumeration {
188                 enum "NRF";
189                 enum "UDM";
190                 enum "AMF";
191                 enum "SMF";
192                 enum "AUSF";
193                 enum "NEF";
194                 enum "PCF";
195                 enum "SMSF";
196                 enum "NSSF";
197                 enum "UDR";
198                 enum "LMF";
199                 enum "GMLC";
200                 enum "5G_EIR";
201                 enum "SEPP";
202                 enum "UPF";
203                 enum "N3IWF";
204                 enum "AF";
205                 enum "UDSF";
206                 enum "BSF";
207                 enum "CHF";
208         }               
209   }
210   
211   typedef NFStatus {
212         type enumeration {
213                 enum "REGISTERED";
214                 enum "SUSPENDED";
215         }
216   }
217   
218   typedef NotificationType {
219                 type enumeration {
220                         enum "N1_MESSAGES";
221                         enum "N2_INFORMATION";
222                         enum "LOCATION_NOTIFICATION";
223                 }       
224   }
225   
226   typedef NotificationEventType {
227                 type enumeration {
228                         enum "NF_REGISTERED";
229                         enum "NF_DEREGISTERED";
230                         enum "NF_PROFILE_CHANGED";
231                 }
232   }
233   
234   typedef DataSetId {
235                 type enumeration {
236                         enum "SUBSCRIPTION";
237                         enum "POLICY";
238                         enum "EXPOSURE";
239                         enum "APPLICATION";
240                 }       
241   }
242   
243   typedef UPInterfaceType {
244                 type enumeration {
245                         enum "N3";
246                         enum "N6";
247                         enum "N9";
248                 }
249   }
250   
251   typedef N1MessageClass {
252                 type enumeration {
253                         enum "5GMM";
254                         enum "SM";
255                         enum "LPP";
256                         enum "SMS"; 
257                 }       
258   }
259   
260   typedef N2InformationClass {
261                 type enumeration {
262                         enum "SM";
263                         enum "NRPPa";
264                         enum "PWS";
265                         enum "PWS-BCAL";
266                         enum "PWS-RF";
267                 }                       
268   }
269   
270   typedef t_Load {
271         description "Latest known load information of the NF ranged from 0 to 100 in percentage ";
272         type uint8 {
273                 range 0..100;
274         }
275   }
276  
277   typedef SupportedFeatures {
278         type string {
279                 pattern '[A-Fa-f0-9]*';
280         }
281   }
282   
283   grouping SupiRange {
284         leaf start {
285                 type string;
286         }
287         
288         leaf end {
289                 type string;
290         }
291         
292         leaf pattern {
293                 type string;
294         }       
295   }
296   
297   grouping IdentityRange {
298         leaf start {
299                 type string;
300         }
301         
302         leaf end {
303                 type string;
304         }
305         
306         leaf pattern {
307                 type string;
308         }       
309   }
310   
311   grouping Guami {
312         container plmnId { uses pLMNId; }
313         container amfId { uses aMFI; }
314   }
315         
316   grouping Tai {
317                 container plmnId { uses pLMNId; }
318                 leaf tac { type t_tAC; }
319   }
320                 
321   typedef t_Dnn {
322          type string;
323   }
324         
325   grouping DnnUpfInfoItem {
326         leaf dnn {
327                 type t_Dnn;
328         }
329   }
330         
331   grouping SnssaiUpfInfoItem {
332     leaf sNssai {
333         type t_s-NSSAI;
334     }
335
336         list dnnUpfInfo {
337                 key dnn;
338                 uses DnnUpfInfoItem;
339         } 
340         
341   }
342
343   grouping NFServiceVersion {
344       description "";
345         leaf apiVersionInUri {
346           description "";
347                 type string;
348         }
349         
350         leaf apiFullVersion {
351                 type string;  
352           description "";       
353       }
354         
355         leaf expiry {
356           description "";
357                 type yang:date-and-time;
358         }
359
360   }
361   
362   grouping ipEndPoint {
363         choice address {
364                 leaf ipv4Address {
365                         type inet:ipv4-address;
366                 }
367                 leaf ipv6Address {
368                         type inet:ipv6-address;                 
369                 }
370                 leaf ipv6Prefix {
371                         type inet:ipv6-prefix;  
372                 }
373         }
374         
375         leaf transport {
376                 type t_TransportProtocol;
377         }
378         
379         leaf port {
380                 type uint16;
381         }
382   }
383   
384   grouping defaultNotificationSubscription {
385         
386         leaf notificationType {
387                 type NotificationType;
388         }
389         
390         leaf callbackUri {
391                 type inet:uri;
392         }
393         
394         leaf n1MessageClass {
395                 type N1MessageClass;
396         }
397         
398         leaf n2InformationClass {
399                 type N2InformationClass;
400         }       
401   }  
402         
403   grouping InterfaceUpfInfoItem {
404
405         leaf interfaceType {
406                 type UPInterfaceType;
407         }
408         
409         choice address {
410                 leaf ipv4Address {
411                         type inet:ipv4-address;
412                 }
413                 leaf ipv6Address {
414                         type inet:ipv6-address;                 
415                 }
416                 leaf ipv6Prefix {
417                         type inet:ipv6-prefix;  
418                 }
419                 leaf endpointFqdn {
420                         type inet:domain-name;
421                 }
422         }
423         
424         leaf networkInstance {
425                 type string;
426         }
427
428   }
429         
430   grouping Ipv4AddressRange {
431         leaf start {
432                 type inet:ipv4-address;
433         }
434         leaf end {
435                 type inet:ipv4-address;
436         }       
437   }
438         
439   grouping Ipv6PrefixRange {
440         leaf start {
441                 type inet:ipv6-prefix;
442         }
443         leaf end {
444                 type inet:ipv6-prefix;
445         }       
446   }
447          
448   typedef t_NsiId {
449         type string;
450   }
451         
452   typedef t_uEMobilityLevel {
453         type enumeration {
454                 enum "stationary";
455                 enum "nomadic";
456                 enum "restricted mobility";
457                 enum "fully mobility";
458         }
459   }
460                 
461   typedef t_resourceSharingLevel {
462                 type enumeration {
463                         enum "shared";
464                         enum "not-shared";
465                 }
466   }
467                 
468   typedef TxDirection {
469                 type enumeration {
470                         enum "DL";
471                         enum "UL";
472                         enum "DL and UL";
473                 }
474   }
475                 
476   typedef BwpContext {
477                 type enumeration {
478                         enum "DL";
479                         enum "UL";
480                         enum "SUL";
481                 }
482   }
483                 
484   typedef IsInitialBwp {
485                 type enumeration {
486                         enum "INITIAL";
487                         enum "OTHER";
488                 }
489   }
490
491   typedef t_quotaType {
492                 type enumeration {
493                         enum "strict";
494                         enum "float";
495                 }
496   }
497
498   grouping RRMPolicyRatio2{
499         leaf groupId {
500                 type uint16;
501         }
502         leaf-list sNSSAI {
503         type t_s-NSSAI; 
504         }
505         leaf quotaType {
506                 type t_quotaType;
507         }
508         leaf rRMPolicyMaxRation {
509                 type uint8;
510         }
511         leaf rRMPolicyMarginMaxRation {
512                 type uint8;
513         }
514         leaf rRMPolicyMinRation {
515                 type uint8;
516         }
517         leaf rRMPolicyMarginMinRation {
518                 type uint8;
519         }
520   }
521 }