blob: 334470ca15f8a87fa7ad4515eb5a10d95a7b1393 [file] [log] [blame]
Stephane Barbarie14088962017-06-01 16:56:55 -04001/*
2 * This is automatically generated callbacks file
3 * It contains 3 parts: Configuration callbacks, RPC callbacks and state data callbacks.
4 * Do NOT alter function signatures or any structures unless you know exactly what you are doing.
5 */
6
7#include <stdlib.h>
8#include <sys/inotify.h>
9#include <libxml/tree.h>
10#include <libxml/xmlsave.h>
11#include <libxml/xmlwriter.h>
12#include <libnetconf_xml.h>
13#include <voltha-netconf-model.h>
14#include <voltha.h>
15#include <string.h>
16
17
18/* transAPI version which must be compatible with libnetconf */
19int transapi_version = 6;
20
21/* Signal to libnetconf that configuration data were modified by any callback.
22 * 0 - data not modified
23 * 1 - data have been modified
24 */
25int config_modified = 0;
26
27/*
28 * Determines the callbacks order.
29 * Set this variable before compilation and DO NOT modify it in runtime.
30 * TRANSAPI_CLBCKS_LEAF_TO_ROOT (default)
31 * TRANSAPI_CLBCKS_ROOT_TO_LEAF
32 */
33const TRANSAPI_CLBCKS_ORDER_TYPE callbacks_order = TRANSAPI_CLBCKS_ORDER_DEFAULT;
34
35/* Do not modify or set! This variable is set by libnetconf to announce edit-config's error-option
36Feel free to use it to distinguish module behavior for different error-option values.
37 * Possible values:
38 * NC_EDIT_ERROPT_STOP - Following callback after failure are not executed, all successful callbacks executed till
39 failure point must be applied to the device.
40 * NC_EDIT_ERROPT_CONT - Failed callbacks are skipped, but all callbacks needed to apply configuration changes are executed
41 * NC_EDIT_ERROPT_ROLLBACK - After failure, following callbacks are not executed, but previous successful callbacks are
42 executed again with previous configuration data to roll it back.
43 */
44NC_EDIT_ERROPT_TYPE erropt = NC_EDIT_ERROPT_NOTSET;
45
46/**
47 * @brief Initialize plugin after loaded and before any other functions are called.
48
49 * This function should not apply any configuration data to the controlled device. If no
50 * running is returned (it stays *NULL), complete startup configuration is consequently
51 * applied via module callbacks. When a running configuration is returned, libnetconf
52 * then applies (via module's callbacks) only the startup configuration data that
53 * differ from the returned running configuration data.
54
55 * Please note, that copying startup data to the running is performed only after the
56 * libnetconf's system-wide close - see nc_close() function documentation for more
57 * information.
58
59 * @param[out] running Current configuration of managed device.
60
61 * @return EXIT_SUCCESS or EXIT_FAILURE
62 */
63int transapi_init(xmlDocPtr *running) {
64 return EXIT_SUCCESS;
65}
66
67/**
68 * @brief Free all resources allocated on plugin runtime and prepare plugin for removal.
69 */
70void transapi_close(void) {
71 return;
72}
73
74/**
75 * @brief Retrieve state data from device and return them as XML document
76 *
77 * @param model Device data model. libxml2 xmlDocPtr.
78 * @param running Running datastore content. libxml2 xmlDocPtr.
79 * @param[out] err Double pointer to error structure. Fill error when some occurs.
80 * @return State data as libxml2 xmlDocPtr or NULL in case of error.
81 */
82xmlDocPtr get_state_data(xmlDocPtr model, xmlDocPtr running, struct nc_err **err) {
83 return(NULL);
84}
85/*
86 * Mapping prefixes with namespaces.
87 * Do NOT modify this structure!
88 */
89struct ns_pair namespace_mapping[] = {{NULL, NULL}};
90
91/*
92 * CONFIGURATION callbacks
93 * Here follows set of callback functions run every time some change in associated part of running datastore occurs.
94 * You can safely modify the bodies of all function as well as add new functions for better lucidity of code.
95 */
96
97/*
98 * Structure transapi_config_callbacks provide mapping between callback and path in configuration datastore.
99 * It is used by libnetconf library to decide which callbacks will be run.
100 * DO NOT alter this structure
101 */
102struct transapi_data_callbacks clbks = {
103 .callbacks_count = 0,
104 .data = NULL,
105 .callbacks = {
106 }
107};
108
109/**
110 * @brief Get a node from the RPC input. The first found node is returned, so if traversing lists,
111 * call repeatedly with result->next as the node argument.
112 *
113 * @param name Name of the node to be retrieved.
114 * @param node List of nodes that will be searched.
115 * @return Pointer to the matching node or NULL
116 */
117xmlNodePtr get_rpc_node(const char *name, const xmlNodePtr node) {
118 xmlNodePtr ret = NULL;
119
120 for (ret = node; ret != NULL; ret = ret->next) {
121 if (xmlStrEqual(BAD_CAST name, ret->name)) {
122 break;
123 }
124 }
125
126 return ret;
127}
128
129void walk_nodes(const xmlNodePtr node) {
130 xmlNodePtr ret = NULL;
131
132 /*
133 walk through the document
134 what to do with nodes ... pass to a channel?
135 to construct a map at the other end?
136
137 */
138 for (ret = node; ret != NULL; ret = ret->next) {
139 if (xmlNodeIsText(ret)) {
140 nc_verb_verbose("content : %s", (char*)xmlNodeGetContent(ret));
141 } else {
142 nc_verb_verbose("name : %s", ret->name);
143 }
144 if (ret->children != NULL) {
145 walk_nodes(ret->children);
146 }
147 }
148}
149
150/*
151 * RPC callbacks
152 * Here follows set of callback functions run every time RPC specific for this device arrives.
153 * You can safely modify the bodies of all function as well as add new functions for better lucidity of code.
154 * Every function takes an libxml2 list of inputs as an argument.
155 * If input was not set in RPC message argument is set to NULL. To retrieve each argument, preferably use get_rpc_node().
156 */
157
158/*
159 * Local service functions
160 */
161
162nc_reply *rpc_VolthaLocalService_GetVolthaInstance(xmlNodePtr input) {
163 return NULL;
164}
165nc_reply *rpc_VolthaLocalService_GetHealth(xmlNodePtr input) {
166 HealthStatus health;
167 health = (HealthStatus) GetHealthStatus();
168
169 char* data;
170 data = (char*) TranslateHealthStatus(health);
171
172 return nc_reply_data(data);
173}
174nc_reply *rpc_VolthaLocalService_ListAdapters(xmlNodePtr input) {
175 return NULL;
176}
177nc_reply *rpc_VolthaLocalService_ListLogicalDevices(xmlNodePtr input) {
178 return NULL;
179}
180nc_reply *rpc_VolthaLocalService_GetLogicalDevice(xmlNodePtr input) {
181 return NULL;
182}
183nc_reply *rpc_VolthaLocalService_ListLogicalDevicePorts(xmlNodePtr input) {
184 return NULL;
185}
186nc_reply *rpc_VolthaLocalService_ListLogicalDeviceFlows(xmlNodePtr input) {
187 return NULL;
188}
189nc_reply *rpc_VolthaLocalService_UpdateLogicalDeviceFlowTable(xmlNodePtr input) {
190 return NULL;
191}
192nc_reply *rpc_VolthaLocalService_ListLogicalDeviceFlowGroups(xmlNodePtr input) {
193 return NULL;
194}
195nc_reply *rpc_VolthaLocalService_UpdateLogicalDeviceFlowGroupTable(xmlNodePtr input) {
196 return NULL;
197}
198nc_reply *rpc_VolthaLocalService_ListDevices(xmlNodePtr input) {
199 DeviceArray devices;
200 devices = (DeviceArray) ListDevices();
201
202 char* data;
203 data = (char*) TranslateDevices(devices);
204
205 return nc_reply_data(data);
206}
207nc_reply *rpc_VolthaLocalService_GetDevice(xmlNodePtr input) {
208 return NULL;
209}
210nc_reply *rpc_VolthaLocalService_CreateDevice(xmlNodePtr input) {
211 Device d;
212 xmlNodePtr ret = NULL;
213
214 if ((ret = get_rpc_node("type", input)) != NULL) {
215 d.Type = (char*)xmlNodeGetContent(ret);
216 }
217
218 if ((ret = get_rpc_node("host_and_port", input)) != NULL) {
219 d.Address.Type = (int)HOST_AND_PORT;
220 d.Address.Value = (char*)xmlNodeGetContent(ret);
221 } else if ((ret = get_rpc_node("mac_address", input)) != NULL) {
222 d.Address.Type = (int)MAC;
223 d.Address.Value = (char*)xmlNodeGetContent(ret);
224 } else if ((ret = get_rpc_node("ipv4_address", input)) != NULL) {
225 d.Address.Type = (int)IPV4;
226 d.Address.Value = (char*)xmlNodeGetContent(ret);
227 } else if ((ret = get_rpc_node("ipv6_address", input)) != NULL) {
228 d.Address.Type = (int)IPV6;
229 d.Address.Value = (char*)xmlNodeGetContent(ret);
230 }
231
232 Device d_created;
233 nc_verb_verbose("Issuing call to create");
234 d_created = (Device) CreateDevice(d);
235 nc_verb_verbose("Created device");
236
237 char* data;
238 data = (char*) TranslateDevice(d_created);
239
240 return nc_reply_data((char*)data);
241}
242nc_reply *rpc_VolthaLocalService_EnableDevice(xmlNodePtr input) {
243 return NULL;
244}
245nc_reply *rpc_VolthaLocalService_DisableDevice(xmlNodePtr input) {
246 return NULL;
247}
248nc_reply *rpc_VolthaLocalService_RebootDevice(xmlNodePtr input) {
249 return NULL;
250}
251nc_reply *rpc_VolthaLocalService_DeleteDevice(xmlNodePtr input) {
252 return NULL;
253}
254nc_reply *rpc_VolthaLocalService_ListDevicePorts(xmlNodePtr input) {
255 return NULL;
256}
257nc_reply *rpc_VolthaLocalService_ListDevicePmConfigs(xmlNodePtr input) {
258 return NULL;
259}
260nc_reply *rpc_VolthaLocalService_UpdateDevicePmConfigs(xmlNodePtr input) {
261 return NULL;
262}
263nc_reply *rpc_VolthaLocalService_ListDeviceFlows(xmlNodePtr input) {
264 return NULL;
265}
266nc_reply *rpc_VolthaLocalService_ListDeviceFlowGroups(xmlNodePtr input) {
267 return NULL;
268}
269nc_reply *rpc_VolthaLocalService_ListDeviceTypes(xmlNodePtr input) {
270 return NULL;
271}
272nc_reply *rpc_VolthaLocalService_GetDeviceType(xmlNodePtr input) {
273 return NULL;
274}
275nc_reply *rpc_VolthaLocalService_ListDeviceGroups(xmlNodePtr input) {
276 return NULL;
277}
278nc_reply *rpc_VolthaLocalService_GetDeviceGroup(xmlNodePtr input) {
279 return NULL;
280}
281nc_reply *rpc_VolthaLocalService_StreamPacketsOut(xmlNodePtr input) {
282 return NULL;
283}
284nc_reply *rpc_VolthaLocalService_ReceivePacketsIn(xmlNodePtr input) {
285 return NULL;
286}
287nc_reply *rpc_VolthaLocalService_ReceiveChangeEvents(xmlNodePtr input) {
288 return NULL;
289}
290nc_reply *rpc_VolthaLocalService_CreateAlarmFilter(xmlNodePtr input) {
291 return NULL;
292}
293nc_reply *rpc_VolthaLocalService_GetAlarmFilter(xmlNodePtr input) {
294 return NULL;
295}
296nc_reply *rpc_VolthaLocalService_UpdateAlarmFilter(xmlNodePtr input) {
297 return NULL;
298}
299nc_reply *rpc_VolthaLocalService_DeleteAlarmFilter(xmlNodePtr input) {
300 return NULL;
301}
302nc_reply *rpc_VolthaLocalService_ListAlarmFilters(xmlNodePtr input) {
303 return NULL;
304}
305
306/*
307 * Global service functions
308 *
309 */
310nc_reply *rpc_HealthService_GetHealthStatus(xmlNodePtr input) {
311 return rpc_VolthaLocalService_GetHealth(input);
312}
313nc_reply *rpc_VolthaGlobalService_GetVoltha(xmlNodePtr input) {
314 Voltha voltha;
315 voltha = (Voltha) GetVoltha();
316
317 nc_verb_verbose("version : %s", (char*)voltha.Version);
318 nc_verb_verbose("log_level : %s", (char*)voltha.LogLevel);
319
320 char* data;
321 data = (char*) TranslateVoltha(voltha);
322
323 return nc_reply_data(data);
324}
325nc_reply *rpc_VolthaGlobalService_ListVolthaInstances(xmlNodePtr input) {
326 return NULL;
327}
328nc_reply *rpc_VolthaGlobalService_GetVolthaInstance(xmlNodePtr input) {
329 return rpc_VolthaLocalService_GetVolthaInstance(input);
330}
331nc_reply *rpc_VolthaGlobalService_ListLogicalDevices(xmlNodePtr input) {
332 return rpc_VolthaLocalService_ListLogicalDevices(input);
333}
334nc_reply *rpc_VolthaGlobalService_GetLogicalDevice(xmlNodePtr input) {
335 return rpc_VolthaLocalService_GetLogicalDevice(input);
336}
337nc_reply *rpc_VolthaGlobalService_ListLogicalDevicePorts(xmlNodePtr input) {
338 return rpc_VolthaLocalService_ListLogicalDevicePorts(input);
339}
340nc_reply *rpc_VolthaGlobalService_ListLogicalDeviceFlows(xmlNodePtr input) {
341 return rpc_VolthaLocalService_ListLogicalDeviceFlows(input);
342}
343nc_reply *rpc_VolthaGlobalService_UpdateLogicalDeviceFlowTable(xmlNodePtr input) {
344 return rpc_VolthaLocalService_UpdateLogicalDeviceFlowTable(input);
345}
346nc_reply *rpc_VolthaGlobalService_ListLogicalDeviceFlowGroups(xmlNodePtr input) {
347 return rpc_VolthaLocalService_ListLogicalDeviceFlowGroups(input);
348}
349nc_reply *rpc_VolthaGlobalService_UpdateLogicalDeviceFlowGroupTable(xmlNodePtr input) {
350 return rpc_VolthaLocalService_UpdateLogicalDeviceFlowGroupTable(input);
351}
352nc_reply *rpc_VolthaGlobalService_ListDevices(xmlNodePtr input) {
353 return rpc_VolthaLocalService_ListDevices(input);
354}
355nc_reply *rpc_VolthaGlobalService_GetDevice(xmlNodePtr input) {
356 return rpc_VolthaLocalService_GetDevice(input);
357}
358nc_reply *rpc_VolthaGlobalService_CreateDevice(xmlNodePtr input) {
359 return rpc_VolthaLocalService_CreateDevice(input);
360}
361nc_reply *rpc_VolthaGlobalService_EnableDevice(xmlNodePtr input) {
362 return rpc_VolthaLocalService_EnableDevice(input);
363}
364nc_reply *rpc_VolthaGlobalService_DisableDevice(xmlNodePtr input) {
365 return rpc_VolthaLocalService_DisableDevice(input);
366}
367nc_reply *rpc_VolthaGlobalService_RebootDevice(xmlNodePtr input) {
368 return rpc_VolthaLocalService_RebootDevice(input);
369}
370nc_reply *rpc_VolthaGlobalService_DeleteDevice(xmlNodePtr input) {
371 return rpc_VolthaLocalService_DeleteDevice(input);
372}
373nc_reply *rpc_VolthaGlobalService_ListDevicePorts(xmlNodePtr input) {
374 return rpc_VolthaLocalService_ListDevicePorts(input);
375}
376nc_reply *rpc_VolthaGlobalService_ListDevicePmConfigs(xmlNodePtr input) {
377 return rpc_VolthaLocalService_ListDevicePmConfigs(input);
378}
379nc_reply *rpc_VolthaGlobalService_UpdateDevicePmConfigs(xmlNodePtr input) {
380 return rpc_VolthaLocalService_UpdateDevicePmConfigs(input);
381}
382nc_reply *rpc_VolthaGlobalService_ListDeviceFlows(xmlNodePtr input) {
383 return rpc_VolthaLocalService_ListDeviceFlows(input);
384}
385nc_reply *rpc_VolthaGlobalService_ListDeviceFlowGroups(xmlNodePtr input) {
386 return rpc_VolthaLocalService_ListDeviceFlowGroups(input);
387}
388nc_reply *rpc_VolthaGlobalService_ListDeviceTypes(xmlNodePtr input) {
389 return rpc_VolthaLocalService_ListDeviceTypes(input);
390}
391nc_reply *rpc_VolthaGlobalService_GetDeviceType(xmlNodePtr input) {
392 return rpc_VolthaLocalService_GetDeviceType(input);
393}
394nc_reply *rpc_VolthaGlobalService_ListDeviceGroups(xmlNodePtr input) {
395 return rpc_VolthaLocalService_ListDeviceGroups(input);
396}
397nc_reply *rpc_VolthaGlobalService_GetDeviceGroup(xmlNodePtr input) {
398 return rpc_VolthaLocalService_GetDeviceGroup(input);
399}
400nc_reply *rpc_VolthaGlobalService_CreateAlarmFilter(xmlNodePtr input) {
401 return rpc_VolthaLocalService_CreateAlarmFilter(input);
402}
403nc_reply *rpc_VolthaGlobalService_GetAlarmFilter(xmlNodePtr input) {
404 return rpc_VolthaLocalService_GetAlarmFilter(input);
405}
406nc_reply *rpc_VolthaGlobalService_UpdateAlarmFilter(xmlNodePtr input) {
407 return rpc_VolthaLocalService_UpdateAlarmFilter(input);
408}
409nc_reply *rpc_VolthaGlobalService_DeleteAlarmFilter(xmlNodePtr input) {
410 return rpc_VolthaLocalService_DeleteAlarmFilter(input);
411}
412nc_reply *rpc_VolthaGlobalService_ListAlarmFilters(xmlNodePtr input) {
413 return rpc_VolthaLocalService_ListAlarmFilters(input);
414}
415
416/*
417 * Structure transapi_rpc_callbacks provides mapping between callbacks and RPC messages.
418 * It is used by libnetconf library to decide which callbacks will be run when RPC arrives.
419 * DO NOT alter this structure
420 */
421struct transapi_rpc_callbacks rpc_clbks = {
422 .callbacks_count = 66,
423 .callbacks = {
424 {.name="HealthService-GetHealthStatus", .func=rpc_HealthService_GetHealthStatus},
425 {.name="VolthaGlobalService-GetVoltha", .func=rpc_VolthaGlobalService_GetVoltha},
426 {.name="VolthaGlobalService-ListVolthaInstances", .func=rpc_VolthaGlobalService_ListVolthaInstances},
427 {.name="VolthaGlobalService-GetVolthaInstance", .func=rpc_VolthaGlobalService_GetVolthaInstance},
428 {.name="VolthaGlobalService-ListLogicalDevices", .func=rpc_VolthaGlobalService_ListLogicalDevices},
429 {.name="VolthaGlobalService-GetLogicalDevice", .func=rpc_VolthaGlobalService_GetLogicalDevice},
430 {.name="VolthaGlobalService-ListLogicalDevicePorts", .func=rpc_VolthaGlobalService_ListLogicalDevicePorts},
431 {.name="VolthaGlobalService-ListLogicalDeviceFlows", .func=rpc_VolthaGlobalService_ListLogicalDeviceFlows},
432 {.name="VolthaGlobalService-UpdateLogicalDeviceFlowTable", .func=rpc_VolthaGlobalService_UpdateLogicalDeviceFlowTable},
433 {.name="VolthaGlobalService-ListLogicalDeviceFlowGroups", .func=rpc_VolthaGlobalService_ListLogicalDeviceFlowGroups},
434 {.name="VolthaGlobalService-UpdateLogicalDeviceFlowGroupTable", .func=rpc_VolthaGlobalService_UpdateLogicalDeviceFlowGroupTable},
435 {.name="VolthaGlobalService-ListDevices", .func=rpc_VolthaGlobalService_ListDevices},
436 {.name="VolthaGlobalService-GetDevice", .func=rpc_VolthaGlobalService_GetDevice},
437 {.name="VolthaGlobalService-CreateDevice", .func=rpc_VolthaGlobalService_CreateDevice},
438 {.name="VolthaGlobalService-EnableDevice", .func=rpc_VolthaGlobalService_EnableDevice},
439 {.name="VolthaGlobalService-DisableDevice", .func=rpc_VolthaGlobalService_DisableDevice},
440 {.name="VolthaGlobalService-RebootDevice", .func=rpc_VolthaGlobalService_RebootDevice},
441 {.name="VolthaGlobalService-DeleteDevice", .func=rpc_VolthaGlobalService_DeleteDevice},
442 {.name="VolthaGlobalService-ListDevicePorts", .func=rpc_VolthaGlobalService_ListDevicePorts},
443 {.name="VolthaGlobalService-ListDevicePmConfigs", .func=rpc_VolthaGlobalService_ListDevicePmConfigs},
444 {.name="VolthaGlobalService-UpdateDevicePmConfigs", .func=rpc_VolthaGlobalService_UpdateDevicePmConfigs},
445 {.name="VolthaGlobalService-ListDeviceFlows", .func=rpc_VolthaGlobalService_ListDeviceFlows},
446 {.name="VolthaGlobalService-ListDeviceFlowGroups", .func=rpc_VolthaGlobalService_ListDeviceFlowGroups},
447 {.name="VolthaGlobalService-ListDeviceTypes", .func=rpc_VolthaGlobalService_ListDeviceTypes},
448 {.name="VolthaGlobalService-GetDeviceType", .func=rpc_VolthaGlobalService_GetDeviceType},
449 {.name="VolthaGlobalService-ListDeviceGroups", .func=rpc_VolthaGlobalService_ListDeviceGroups},
450 {.name="VolthaGlobalService-GetDeviceGroup", .func=rpc_VolthaGlobalService_GetDeviceGroup},
451 {.name="VolthaGlobalService-CreateAlarmFilter", .func=rpc_VolthaGlobalService_CreateAlarmFilter},
452 {.name="VolthaGlobalService-GetAlarmFilter", .func=rpc_VolthaGlobalService_GetAlarmFilter},
453 {.name="VolthaGlobalService-UpdateAlarmFilter", .func=rpc_VolthaGlobalService_UpdateAlarmFilter},
454 {.name="VolthaGlobalService-DeleteAlarmFilter", .func=rpc_VolthaGlobalService_DeleteAlarmFilter},
455 {.name="VolthaGlobalService-ListAlarmFilters", .func=rpc_VolthaGlobalService_ListAlarmFilters},
456 {.name="VolthaLocalService-GetVolthaInstance", .func=rpc_VolthaLocalService_GetVolthaInstance},
457 {.name="VolthaLocalService-GetHealth", .func=rpc_VolthaLocalService_GetHealth},
458 {.name="VolthaLocalService-ListAdapters", .func=rpc_VolthaLocalService_ListAdapters},
459 {.name="VolthaLocalService-ListLogicalDevices", .func=rpc_VolthaLocalService_ListLogicalDevices},
460 {.name="VolthaLocalService-GetLogicalDevice", .func=rpc_VolthaLocalService_GetLogicalDevice},
461 {.name="VolthaLocalService-ListLogicalDevicePorts", .func=rpc_VolthaLocalService_ListLogicalDevicePorts},
462 {.name="VolthaLocalService-ListLogicalDeviceFlows", .func=rpc_VolthaLocalService_ListLogicalDeviceFlows},
463 {.name="VolthaLocalService-UpdateLogicalDeviceFlowTable", .func=rpc_VolthaLocalService_UpdateLogicalDeviceFlowTable},
464 {.name="VolthaLocalService-ListLogicalDeviceFlowGroups", .func=rpc_VolthaLocalService_ListLogicalDeviceFlowGroups},
465 {.name="VolthaLocalService-UpdateLogicalDeviceFlowGroupTable", .func=rpc_VolthaLocalService_UpdateLogicalDeviceFlowGroupTable},
466 {.name="VolthaLocalService-ListDevices", .func=rpc_VolthaLocalService_ListDevices},
467 {.name="VolthaLocalService-GetDevice", .func=rpc_VolthaLocalService_GetDevice},
468 {.name="VolthaLocalService-CreateDevice", .func=rpc_VolthaLocalService_CreateDevice},
469 {.name="VolthaLocalService-EnableDevice", .func=rpc_VolthaLocalService_EnableDevice},
470 {.name="VolthaLocalService-DisableDevice", .func=rpc_VolthaLocalService_DisableDevice},
471 {.name="VolthaLocalService-RebootDevice", .func=rpc_VolthaLocalService_RebootDevice},
472 {.name="VolthaLocalService-DeleteDevice", .func=rpc_VolthaLocalService_DeleteDevice},
473 {.name="VolthaLocalService-ListDevicePorts", .func=rpc_VolthaLocalService_ListDevicePorts},
474 {.name="VolthaLocalService-ListDevicePmConfigs", .func=rpc_VolthaLocalService_ListDevicePmConfigs},
475 {.name="VolthaLocalService-UpdateDevicePmConfigs", .func=rpc_VolthaLocalService_UpdateDevicePmConfigs},
476 {.name="VolthaLocalService-ListDeviceFlows", .func=rpc_VolthaLocalService_ListDeviceFlows},
477 {.name="VolthaLocalService-ListDeviceFlowGroups", .func=rpc_VolthaLocalService_ListDeviceFlowGroups},
478 {.name="VolthaLocalService-ListDeviceTypes", .func=rpc_VolthaLocalService_ListDeviceTypes},
479 {.name="VolthaLocalService-GetDeviceType", .func=rpc_VolthaLocalService_GetDeviceType},
480 {.name="VolthaLocalService-ListDeviceGroups", .func=rpc_VolthaLocalService_ListDeviceGroups},
481 {.name="VolthaLocalService-GetDeviceGroup", .func=rpc_VolthaLocalService_GetDeviceGroup},
482 {.name="VolthaLocalService-StreamPacketsOut", .func=rpc_VolthaLocalService_StreamPacketsOut},
483 {.name="VolthaLocalService-ReceivePacketsIn", .func=rpc_VolthaLocalService_ReceivePacketsIn},
484 {.name="VolthaLocalService-ReceiveChangeEvents", .func=rpc_VolthaLocalService_ReceiveChangeEvents},
485 {.name="VolthaLocalService-CreateAlarmFilter", .func=rpc_VolthaLocalService_CreateAlarmFilter},
486 {.name="VolthaLocalService-GetAlarmFilter", .func=rpc_VolthaLocalService_GetAlarmFilter},
487 {.name="VolthaLocalService-UpdateAlarmFilter", .func=rpc_VolthaLocalService_UpdateAlarmFilter},
488 {.name="VolthaLocalService-DeleteAlarmFilter", .func=rpc_VolthaLocalService_DeleteAlarmFilter},
489 {.name="VolthaLocalService-ListAlarmFilters", .func=rpc_VolthaLocalService_ListAlarmFilters}
490 }
491};
492
493/*
494 * Structure transapi_file_callbacks provides mapping between specific files
495 * (e.g. configuration file in /etc/) and the callback function executed when
496 * the file is modified.
497 * The structure is empty by default. Add items, as in example, as you need.
498 *
499 * Example:
500 * int example_callback(const char *filepath, xmlDocPtr *edit_config, int *exec) {
501 * // do the job with changed file content
502 * // if needed, set edit_config parameter to the edit-config data to be applied
503 * // if needed, set exec to 1 to perform consequent transapi callbacks
504 * return 0;
505 * }
506 *
507 * struct transapi_file_callbacks file_clbks = {
508 * .callbacks_count = 1,
509 * .callbacks = {
510 * {.path = "/etc/my_cfg_file", .func = example_callback}
511 * }
512 * }
513 */
514struct transapi_file_callbacks file_clbks = {
515 .callbacks_count = 0,
516 .callbacks = {{NULL}}
517};
518