Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-trace@2022-08-15.yang
1 module o-ran-trace {
2   yang-version 1.1;
3   namespace "urn:o-ran:trace:1.0";
4   prefix "o-ran-trace";
5
6   organization "O-RAN Alliance";
7
8   contact
9     "www.o-ran.org";
10
11   description
12     "This module defines the operations for the trace logs.
13
14     Copyright 2019 the O-RAN Alliance.
15
16     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
17     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26     POSSIBILITY OF SUCH DAMAGE.
27
28     Redistribution and use in source and binary forms, with or without
29     modification, are permitted provided that the following conditions are met:
30
31     * Redistributions of source code must retain the above copyright notice,
32     this list of conditions and the above disclaimer.
33     * Redistributions in binary form must reproduce the above copyright notice,
34     this list of conditions and the above disclaimer in the documentation
35     and/or other materials provided with the distribution.
36     * Neither the Members of the O-RAN Alliance nor the names of its
37     contributors may be used to endorse or promote products derived from
38     this software without specific prior written permission.";
39
40   revision "2022-08-15" {
41     description
42       "version 1.2.0
43
44       1) clarified path/folder description.";
45
46     reference "ORAN-WG4.M.0-v01.00";
47   }
48
49   revision "2021-12-01" {
50     description
51       "version 1.1.0
52
53       1) Typographical corrections.";
54
55     reference "ORAN-WG4.M.0-v01.00";
56   }
57
58   revision "2019-07-03" {
59     description
60       "version 1.0.0
61
62       1) Initial module definition.";
63
64     reference "ORAN-WG4.M.0-v01.00";
65   }
66
67
68   grouping trace-status-grouping {
69     description "grouping used for trace RPCs";
70     leaf status {
71       type enumeration {
72         enum SUCCESS {
73           description "RPC completed correctly";
74         }
75         enum FAILURE {
76           description "RPC failed";
77         }
78       }
79       description "result of RPC operation";
80     }
81     leaf failure-reason {
82       when "../status = 'FAILURE'";
83       type string;
84       description "free-form text description why error occurred";
85     }
86   }
87
88   rpc start-trace-logs {
89     description
90       "Management plane triggered to start collecting the trace logs files of O-RU.";
91       output {
92         uses trace-status-grouping;
93       }
94   }
95
96   rpc stop-trace-logs {
97     description
98       "Management plane triggered to stop collecting the trace logs files of O-RU.";
99       output {
100         uses trace-status-grouping;
101       }
102   }
103
104   notification trace-log-generated {
105     description
106       "When new log file generated, send this notification.";
107     leaf-list log-file-name {
108       type string;
109       description
110         "The list of trace log file names on the O-RU. Each record in this list is expected to contain
111         location of the file (e.g. 'o-ran/log/') and the name of file (e.g.'my_trace_log_file.zip', where
112         'my_trace_log_file' is example file name and 'zip' is expected file name extension).
113         Example complete expected content of this node is 'o-ran/log/my_trace_log_file.zip'.";
114     }
115
116     leaf is-notification-last {
117       type boolean;
118       default false;
119       description
120         "Informs if notification is last - the one after receiving stop-trace-logs RPC.";
121     }
122   }
123 }