blob: c26dac6719a22e6f8fe6ac79af59d7ce86f10496 (
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
|
message Request {
enum ConfigFormat {
CURLY = 0;
JSON = 1;
}
enum OutputFormat {
OutPlain = 0;
OutJSON = 1;
}
message Prompt {
}
message SetupSession {
required int32 client_pid = 1;
optional string client_application = 2;
optional int32 on_behalf_of = 3;
optional string client_user = 4;
optional string client_sudo_user = 5;
}
message SessionOfPid {
required int32 client_pid = 1;
}
message SessionExists {
optional int32 dummy = 1;
}
message GetConfig {
optional int32 dummy = 1;
}
message Teardown {
optional int32 on_behalf_of = 1;
}
message Validate {
repeated string Path = 1;
optional OutputFormat output_format = 2;
}
message Set {
repeated string path = 1;
}
message Delete {
repeated string path = 1;
}
message AuxSet {
repeated string path = 1;
required string script_name = 2;
optional string tag_value = 3;
}
message AuxDelete {
repeated string path = 1;
required string script_name = 2;
optional string tag_value = 3;
}
message Discard {
optional int32 dummy = 1;
}
message SessionChanged {
optional int32 dummy = 1;
}
message Copy {
repeated string source = 1;
repeated string destination = 2;
}
message Rename {
repeated string source = 1;
repeated string destination = 2;
}
message Comment {
repeated string path = 1;
required string comment = 2;
}
message Commit {
optional bool confirm = 1;
optional int32 confirm_timeout = 2;
optional string comment = 3;
optional bool dry_run = 4;
}
message Rollback {
required int32 revision = 1;
}
message Load {
required string location = 1;
required bool cached = 2;
optional ConfigFormat format = 3;
}
message Merge {
required string location = 1;
required bool destructive = 2;
optional ConfigFormat format = 3;
}
message Save {
required string location = 1;
optional ConfigFormat format = 2;
}
message ShowConfig {
repeated string path = 1;
optional ConfigFormat format = 2;
}
message Exists {
repeated string path = 1;
}
message GetValue {
repeated string path = 1;
optional OutputFormat output_format = 2;
}
message GetValues {
repeated string path = 1;
optional OutputFormat output_format = 2;
}
message ListChildren {
repeated string path = 1;
optional OutputFormat output_format = 2;
}
message RunOpMode {
repeated string path = 1;
optional OutputFormat output_format = 2;
}
message Confirm {
}
message EnterConfigurationMode {
required bool exclusive = 1;
required bool override_exclusive = 2;
}
message ExitConfigurationMode {
}
message ReloadReftree {
// this is a temporary workaround for a bug with empty messages, and
// will be removed when the issue is resolved
optional int32 on_behalf_of = 1;
}
message ShowSessions {
required bool exclude_self = 1;
required bool exclude_other = 2;
}
message SetEditLevel {
repeated string path = 1;
}
message SetEditLevelUp {
optional int32 dummy = 1;
}
message ResetEditLevel {
optional int32 dummy = 1;
}
message GetEditLevel {
optional int32 dummy = 1;
}
message EditLevelRoot {
optional int32 dummy = 1;
}
message ConfigUnsaved {
optional string file = 1;
}
message ReferencePathExists {
repeated string path = 1;
}
message GetPathType {
repeated string path = 1;
required bool legacy_format = 2;
}
message GetCompletionEnv {
repeated string path = 1;
required bool legacy_format = 2;
}
oneof msg {
Prompt prompt = 1;
SetupSession setup_session = 2;
Set set = 3;
Delete delete = 4;
Rename rename = 5;
Copy copy = 6;
Comment comment = 7;
Commit commit = 8;
Rollback rollback = 9;
Merge merge = 10;
Save save = 11;
ShowConfig show_config = 12;
Exists exists = 13;
GetValue get_value = 14;
GetValues get_values = 15;
ListChildren list_children = 16;
RunOpMode run_op_mode = 17;
Confirm confirm = 18;
EnterConfigurationMode enter_configuration_mode = 19;
ExitConfigurationMode exit_configuration_mode = 20;
Validate validate = 21;
Teardown teardown = 22;
ReloadReftree reload_reftree = 23;
Load load = 24;
Discard discard = 25;
SessionChanged session_changed = 26;
SessionOfPid session_of_pid = 27;
SessionExists session_exists = 28;
GetConfig get_config = 29;
AuxSet aux_set = 30;
AuxDelete aux_delete = 31;
ShowSessions show_sessions = 32;
SetEditLevel set_edit_level = 33;
SetEditLevelUp set_edit_level_up = 34;
ResetEditLevel reset_edit_level = 35;
GetEditLevel get_edit_level = 36;
EditLevelRoot edit_level_root = 37;
ConfigUnsaved config_unsaved = 38;
ReferencePathExists reference_path_exists = 39;
GetPathType get_path_type = 40;
GetCompletionEnv get_completion_env = 41;
}
}
message RequestEnvelope {
optional string token = 1;
required Request request = 2;
}
enum Errnum {
SUCCESS = 0;
FAIL = 1;
INVALID_PATH = 2;
INVALID_VALUE = 3;
COMMIT_IN_PROGRESS = 4;
CONFIGURATION_LOCKED = 5;
INTERNAL_ERROR = 6;
PERMISSION_DENIED = 7;
PATH_ALREADY_EXISTS = 8;
UNCOMMITED_CHANGES = 9;
}
message Response {
required Errnum status = 1;
optional string output = 2;
optional string error = 3;
optional string warning = 4;
}
|