From: Andrei Pavel Date: Fri, 20 Jun 2025 09:06:51 +0000 (+0300) Subject: [#3907] Update control sockets in YANG modules X-Git-Tag: Kea-3.0.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ebfc093440eee4b599150e91694a473a759d262;p=thirdparty%2Fkea.git [#3907] Update control sockets in YANG modules --- diff --git a/src/share/yang/modules/hashes/kea-ctrl-agent@2025-06-25.hash b/src/share/yang/modules/hashes/kea-ctrl-agent@2025-06-25.hash index 4092dab27d..e246d34de6 100644 --- a/src/share/yang/modules/hashes/kea-ctrl-agent@2025-06-25.hash +++ b/src/share/yang/modules/hashes/kea-ctrl-agent@2025-06-25.hash @@ -1 +1 @@ -b9fb14697bc1f36d715f7e02088f1c39c81f8bc954e224fbeb42e1f7ab313e07 +1717fec3141aa48abbbe46cf8a5bd5a72b666dddbaaae6f1caf9e8cd11464b8a diff --git a/src/share/yang/modules/hashes/kea-dhcp-ddns@2025-06-25.hash b/src/share/yang/modules/hashes/kea-dhcp-ddns@2025-06-25.hash index 6120b9d0c4..2d609c6b06 100644 --- a/src/share/yang/modules/hashes/kea-dhcp-ddns@2025-06-25.hash +++ b/src/share/yang/modules/hashes/kea-dhcp-ddns@2025-06-25.hash @@ -1 +1 @@ -4f64a63fc3000178b1273079254c50854e0f6d8783736236e535c84fc2540bdf +d58ac7e7c2cb4ce2ab84dac34222d12e64be6950293a45670dd4519a0056b88a diff --git a/src/share/yang/modules/hashes/kea-dhcp-types@2025-06-25.hash b/src/share/yang/modules/hashes/kea-dhcp-types@2025-06-25.hash index d9c5a58a3a..f5f48f8c64 100644 --- a/src/share/yang/modules/hashes/kea-dhcp-types@2025-06-25.hash +++ b/src/share/yang/modules/hashes/kea-dhcp-types@2025-06-25.hash @@ -1 +1 @@ -a42aa4a91f00d6525b268316dba92a70763686183558dd9657f9112cc1c609ca +ec657a2afa392ed8e02c27bca52a0dd56d8fad7bf7a1c713bba087f5149060b2 diff --git a/src/share/yang/modules/hashes/kea-dhcp4-server@2025-06-25.hash b/src/share/yang/modules/hashes/kea-dhcp4-server@2025-06-25.hash index 489f2c02c5..64285ee9cd 100644 --- a/src/share/yang/modules/hashes/kea-dhcp4-server@2025-06-25.hash +++ b/src/share/yang/modules/hashes/kea-dhcp4-server@2025-06-25.hash @@ -1 +1 @@ -c4805486becacef0c3d7ccf7e96d813bee3001cebec6ec53882e1facacf5c1e2 +1276be1c8f1e121d42ae5c1af6f1e38b34e26092fb5ac5fab83b19a6975c4354 diff --git a/src/share/yang/modules/hashes/kea-dhcp6-server@2025-06-25.hash b/src/share/yang/modules/hashes/kea-dhcp6-server@2025-06-25.hash index 89edf3c4ad..8ce5571425 100644 --- a/src/share/yang/modules/hashes/kea-dhcp6-server@2025-06-25.hash +++ b/src/share/yang/modules/hashes/kea-dhcp6-server@2025-06-25.hash @@ -1 +1 @@ -e0703301b9a75cb74ed2922aa1fd7f79a1895859d6aaedaa6bd2c8ad8c1c010b +d2bc1cfc0446c4c75a348842658aec32b69a0eb8bb2a3bb1532fa59b53905efc 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 8e9dcf0e3a..0b5ae735ed 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 @@ -252d56c9442ba3d84b69a878a659f6baaaad69d493dc4c3dbd268298bf067447 +64d66c96f2375efd9481e08bab2da362b8f607974666d787324f7fb730f82ada diff --git a/src/share/yang/modules/kea-ctrl-agent@2025-06-25.yang b/src/share/yang/modules/kea-ctrl-agent@2025-06-25.yang index b62e1bc639..642f6a9f5b 100644 --- a/src/share/yang/modules/kea-ctrl-agent@2025-06-25.yang +++ b/src/share/yang/modules/kea-ctrl-agent@2025-06-25.yang @@ -72,11 +72,7 @@ module kea-ctrl-agent { } } - uses kea:control-socket-data; - - uses kea:http-headers; - - uses kea:authentication; + uses kea:deprecated-control-socket; uses kea:hooks-libraries; diff --git a/src/share/yang/modules/kea-dhcp-ddns@2025-06-25.yang b/src/share/yang/modules/kea-dhcp-ddns@2025-06-25.yang index 0b9114a5d4..ce2cf15794 100644 --- a/src/share/yang/modules/kea-dhcp-ddns@2025-06-25.yang +++ b/src/share/yang/modules/kea-dhcp-ddns@2025-06-25.yang @@ -141,11 +141,8 @@ module kea-dhcp-ddns { description "Packet format to use when sending requests to the server."; } - container control-socket { - description "Control socket."; - uses dhcp:control-socket; - } uses dhcp:control-sockets; + uses dhcp:deprecated-control-socket; container forward-ddns { description "Forward DNS zones."; diff --git a/src/share/yang/modules/kea-dhcp-types@2025-06-25.yang b/src/share/yang/modules/kea-dhcp-types@2025-06-25.yang index 64cc039916..178783e0eb 100644 --- a/src/share/yang/modules/kea-dhcp-types@2025-06-25.yang +++ b/src/share/yang/modules/kea-dhcp-types@2025-06-25.yang @@ -128,55 +128,20 @@ module kea-dhcp-types { /* * Grouping */ - grouping control-socket { - description "Control socket grouping."; - leaf socket-type { - type enumeration { - enum "unix" { - description "Unix socket type."; - } - enum "http" { - description "HTTP socket type."; - } - enum "https" { - description "HTTPS socket type."; - } - } - description "Socket type."; - mandatory true; - } - leaf socket-name { - type string; - description "Path to the UNIX socket."; - } - leaf socket-address { - type string; - description "HTTP/HTTPS socket address."; - } - leaf socket-port { - type string; - description "HTTP/HTTPS socket port."; - } - + grouping deprecated-control-socket { container control-socket { - presence "Have control socket."; - description "Control socket container."; - uses kea:control-socket-data; - uses kea:http-headers; - uses kea:authentication; + presence ""; + uses kea:control-socket-info; } } grouping control-sockets { description "Control sockets grouping."; - container control-sockets { - description "Control sockets."; - list control-socket { + list control-sockets { key "socket-type"; description "List of control sockets."; - uses control-socket; + uses kea:control-socket-data; } - } } grouping valid-lifetime { diff --git a/src/share/yang/modules/kea-dhcp4-server@2025-06-25.yang b/src/share/yang/modules/kea-dhcp4-server@2025-06-25.yang index a17018593f..64d1a4517b 100644 --- a/src/share/yang/modules/kea-dhcp4-server@2025-06-25.yang +++ b/src/share/yang/modules/kea-dhcp4-server@2025-06-25.yang @@ -523,11 +523,8 @@ module kea-dhcp4-server { uses kea:hooks-libraries; uses dhcp:expired-leases-processing; uses dhcp:dhcp4o6-port; - container control-socket { - description "Control socket."; - uses dhcp:control-socket; - } uses dhcp:control-sockets; + uses dhcp:deprecated-control-socket; uses dhcp:hostname-char-set; uses dhcp:hostname-char-replacement; uses dhcp:dhcp-ddns; diff --git a/src/share/yang/modules/kea-dhcp6-server@2025-06-25.yang b/src/share/yang/modules/kea-dhcp6-server@2025-06-25.yang index adbe1da627..6509f2b68e 100644 --- a/src/share/yang/modules/kea-dhcp6-server@2025-06-25.yang +++ b/src/share/yang/modules/kea-dhcp6-server@2025-06-25.yang @@ -631,11 +631,8 @@ module kea-dhcp6-server { } uses dhcp:dhcp4o6-port; - container control-socket { - description "Control socket."; - uses dhcp:control-socket; - } uses dhcp:control-sockets; + uses dhcp:deprecated-control-socket; uses dhcp:hostname-char-set; uses dhcp:hostname-char-replacement; uses dhcp:dhcp-ddns; 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 2a999492d3..a9ef323689 100644 --- a/src/share/yang/modules/kea-types@2025-06-25.yang +++ b/src/share/yang/modules/kea-types@2025-06-25.yang @@ -35,6 +35,22 @@ module kea-types { } } + grouping deprecated-control-socket { + container control-socket { + presence ""; + uses control-socket-info; + } + } + + grouping control-sockets { + description "Control sockets grouping."; + list control-sockets { + key "socket-type"; + description "List of control sockets."; + uses control-socket-data; + } + } + grouping control-socket-info { description "Control socket parameters."; leaf socket-name { @@ -59,6 +75,33 @@ module kea-types { grouping control-socket-data { description "Control socket parameters."; + leaf socket-type { + type enumeration { + enum "unix" { + description "Unix socket type."; + } + enum "http" { + description "HTTP socket type."; + } + enum "https" { + description "HTTPS socket type."; + } + } + description "Socket type."; + mandatory true; + } + leaf socket-name { + type string; + description "Path to the UNIX socket."; + } + leaf socket-address { + type string; + description "HTTP/HTTPS socket address."; + } + leaf socket-port { + type string; + description "HTTP/HTTPS socket port."; + } leaf trust-anchor { type string; description "TLS trust anchor (Certificate Authority)."; @@ -75,6 +118,8 @@ module kea-types { type boolean; description "TLS require client certificates flag."; } + uses http-headers; + uses authentication; } grouping http-headers {