Allow multiple NTS Manager instances to run on the same machine.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-trace.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 "2019-02-21" {
41     description
42       "version 1.0.0
43       Initial module definition.";
44
45     reference "ORAN-WG4.M.0-v01.00";
46   }
47
48
49   grouping trace-status-grouping {
50     description "grouping used for trace RPCs";
51     leaf status {
52       type enumeration {
53         enum SUCCESS {
54           description "rpc completed correctly";
55         }
56         enum FAILURE {
57           description "rpc failed";
58         }
59       }
60       description "result of rpc operation";
61     }
62     leaf failure-reason {
63       when "../status = 'FAILURE'";
64       type string;
65       description "free form text description why error occurred";
66     }
67   }
68
69   rpc start-trace-logs {
70     description
71       "Management plane triggered to start collecting the trace logs files of O-RU.";
72       output {
73         uses trace-status-grouping;
74       }
75   }
76
77   rpc stop-trace-logs {
78     description
79       "Management plane triggered to stop collecting the trace logs files of O-RU.";
80       output {
81         uses trace-status-grouping;
82       }
83   }
84
85   notification trace-log-generated {
86     description
87       "When new log file generated, send this notification.";
88     leaf-list log-file-name {
89       type string;
90       description
91         "The list of trace log file names on the O-RU.";
92     }
93     
94     leaf is-notification-last {
95       type boolean;
96       default false;
97       description
98         "Informs if notification is last - the one after receiving stop-trace-logs rpc.";
99     }
100   }
101 }