-
Notifications
You must be signed in to change notification settings - Fork 4
/
netgate-conf-rollback.yang
192 lines (160 loc) · 3.58 KB
/
netgate-conf-rollback.yang
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
module netgate-conf-rollback {
yang-version 1.1;
namespace "urn:netgate:xml:yang:netgate-conf-rollback";
prefix "ngconfrollback";
organization "Netgate";
contact "Web: <http://www.netgate.com>";
description
"This YANG module provides Configuration Rollback operations.
Copyright 2021 Rubicon Communications, LLC.";
revision 2022-06-15 {
description
"TNSR Release 22.06.";
}
revision 2021-11-15 {
description
"TNSR Release 21.11.";
}
rpc conf-rollback-start-timer {
description
"Start a timer after which expiration the configuration running
at the expiration time is replaced with the configuration saved
before start of the timer unless the rollback is cancelled.";
input {
container time {
description
"Time within which the rollback can be cancelled.";
leaf minutes {
type uint8 {
range "1..120";
}
mandatory true;
description
"Number of minutes.";
}
}
container config-source {
description
"Configuration a copy of which is saved before start of
the rollback timer.";
choice config-source-file {
mandatory true;
description
"Particular configuration file to copy from.";
case running-db {
leaf running {
type empty;
description
"Copy of the running configuration file.";
}
}
case startup-db {
leaf startup {
type empty;
description
"Copy of the startup configuration file.";
}
}
case file {
leaf filename {
type string {
length "1..4096";
pattern "[a-zA-Z0-9_./-]*";
}
description
"Copy of a file on disk.";
}
}
}
}
}
}
rpc conf-rollback-restart-timer {
description
"Reset the timer previously started and start it over.";
input {
container time {
description
"Time within which the rollback can be cancelled.";
leaf minutes {
type uint8 {
range "1..120";
}
mandatory true;
description
"Number of minutes.";
}
}
}
}
rpc conf-rollback-show-timer {
description
"Show information about the timer previously started (or
restarted).";
output {
container timer-info {
leaf is-started {
type boolean;
mandatory true;
description
"Indicates whether the rollback timer is started or
not.";
}
container time {
description
"Time within which the rollback can be cancelled.";
leaf minutes {
type uint8;
description
"Number of minutes.";
}
leaf seconds {
type uint8;
description
"Number of seconds.";
}
}
container config-source {
description
"Configuration a copy of which is saved before start of
the rollback timer.";
choice config-source-file {
description
"Particular configuration file a copy of which is
held.";
leaf running {
type empty;
description
"Copy of the running configuration file.";
}
leaf startup {
type empty;
description
"Copy of the startup configuration file.";
}
leaf filename {
type string;
description
"Copy of a file on disk.";
}
}
}
leaf username {
type string;
description
"Name of the user who started (or restarted) the
rollback timer.";
}
}
}
}
rpc conf-rollback-trigger {
description
"Trigger the rollback immediately without waiting for the timer
to expire.";
}
rpc conf-rollback-cancel {
description
"Cancel the timed rollback.";
}
}