From 11290a6dcf85db01f80171c18b608c97ac210302 Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Fri, 20 Jun 2025 13:32:03 +0300 Subject: [PATCH] [#3907] fixed some UTs --- .../tests/translator_control_socket_unittests.cc | 2 +- src/lib/yang/translator_control_socket.h | 12 ++++++------ .../yang/modules/hashes/kea-types@2025-06-25.hash | 2 +- src/share/yang/modules/kea-types@2025-06-25.yang | 4 ++++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lib/yang/tests/translator_control_socket_unittests.cc b/src/lib/yang/tests/translator_control_socket_unittests.cc index f9174db4a4..526bfbf896 100644 --- a/src/lib/yang/tests/translator_control_socket_unittests.cc +++ b/src/lib/yang/tests/translator_control_socket_unittests.cc @@ -109,7 +109,7 @@ TEST_F(TranslatorControlSocketTestv6, get) { TEST_F(TranslatorControlSocketTestCtrlAgent, set) { // Set a value. const string& xpath = - "/kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/control-socket"; + "/kea-ctrl-agent:config/control-sockets/control-sockets[server-type='dhcp4']/control-socket"; ElementPtr sock = Element::createMap(); sock->set("socket-name", Element::create("/tmp/kea.sock")); sock->set("socket-type", Element::create("unix")); diff --git a/src/lib/yang/translator_control_socket.h b/src/lib/yang/translator_control_socket.h index c1f58645b1..4ee8b17ec4 100644 --- a/src/lib/yang/translator_control_socket.h +++ b/src/lib/yang/translator_control_socket.h @@ -45,16 +45,16 @@ namespace yang { /// /kea-ctrl-agent:config (container) /// /kea-ctrl-agent:config/control-sockets (container) /// /kea-ctrl-agent:config/control-sockets/ -/// socket[server-type='dhcp4'] (list instance) -/// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +/// control-sockets[server-type='dhcp4'] (list instance) +/// /kea-ctrl-agent:config/control-sockets/control-sockets[server-type='dhcp4']/ /// server-type = dhcp4 -/// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +/// /kea-ctrl-agent:config/control-sockets/control-sockets[server-type='dhcp4']/ /// control-socket (container) -/// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +/// /kea-ctrl-agent:config/control-sockets/control-sockets[server-type='dhcp4']/ /// control-socket/socket-name = kea.sock -/// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +/// /kea-ctrl-agent:config/control-sockets/control-sockets[server-type='dhcp4']/ /// control-socket/socket-type = unix -/// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +/// /kea-ctrl-agent:config/control-sockets/control-sockets[server-type='dhcp4']/ /// control-socket/user-context = { \"foo\": 1 } /// @endcode diff --git a/src/share/yang/modules/hashes/kea-types@2025-06-25.hash b/src/share/yang/modules/hashes/kea-types@2025-06-25.hash index cec6f2a91f..d9aa537f50 100644 --- a/src/share/yang/modules/hashes/kea-types@2025-06-25.hash +++ b/src/share/yang/modules/hashes/kea-types@2025-06-25.hash @@ -1 +1 @@ -2d1041f570386a4b4c81f42c72c3e93ef27729de8224e3522ddf6e98b148e9ca +68739faa231a48c837adb3b306858b5656a1439b39b675f601d21515278d8747 diff --git a/src/share/yang/modules/kea-types@2025-06-25.yang b/src/share/yang/modules/kea-types@2025-06-25.yang index b4e3193622..ccfff985e9 100644 --- a/src/share/yang/modules/kea-types@2025-06-25.yang +++ b/src/share/yang/modules/kea-types@2025-06-25.yang @@ -109,6 +109,10 @@ module kea-types { uses control-socket-tls; uses http-headers; uses authentication; + leaf user-context { + type user-context; + description "Control socket user context."; + } } grouping http-headers { -- 2.47.2