summaryrefslogtreecommitdiffstats
path: root/tests/lib/northbound/test_oper_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/northbound/test_oper_data.c')
-rw-r--r--tests/lib/northbound/test_oper_data.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c
index f82eddd..8f7e7c5 100644
--- a/tests/lib/northbound/test_oper_data.c
+++ b/tests/lib/northbound/test_oper_data.c
@@ -5,6 +5,7 @@
*/
#include <zebra.h>
+#include <sys/stat.h>
#include "frrevent.h"
#include "vty.h"
@@ -199,6 +200,25 @@ static struct yang_data *frr_test_module_vrfs_vrf_routes_route_active_get_elem(
return NULL;
}
+
+/*
+ * XPath: /frr-test-module:frr-test-module/c1value
+ */
+static struct yang_data *
+frr_test_module_c1value_get_elem(struct nb_cb_get_elem_args *args)
+{
+ return yang_data_new_uint8(args->xpath, 21);
+}
+
+/*
+ * XPath: /frr-test-module:frr-test-module/c2cont/c2value
+ */
+static struct yang_data *
+frr_test_module_c2cont_c2value_get_elem(struct nb_cb_get_elem_args *args)
+{
+ return yang_data_new_uint32(args->xpath, 0xAB010203);
+}
+
/* clang-format off */
const struct frr_yang_module_info frr_test_module_info = {
.name = "frr-test-module",
@@ -243,6 +263,14 @@ const struct frr_yang_module_info frr_test_module_info = {
.cbs.get_elem = frr_test_module_vrfs_vrf_routes_route_active_get_elem,
},
{
+ .xpath = "/frr-test-module:frr-test-module/c1value",
+ .cbs.get_elem = frr_test_module_c1value_get_elem,
+ },
+ {
+ .xpath = "/frr-test-module:frr-test-module/c2cont/c2value",
+ .cbs.get_elem = frr_test_module_c2cont_c2value_get_elem,
+ },
+ {
.xpath = NULL,
},
}