Merge pull request #1269 from kernelkit/rename

This commit is contained in:
Joachim Wiberg
2025-11-21 09:17:54 +01:00
committed by GitHub
508 changed files with 550 additions and 373 deletions
+13 -13
View File
@@ -93,14 +93,14 @@ Each test case is a separate executable, which can be run without
arguments: arguments:
``` ```
11:42:53 infamy0:test # ./case/infix_dhcp/dhcp_basic.py 11:42:53 infamy0:test # ./case/dhcp/dhcp_basic.py
``` ```
To run a suite of tests, e.g., only the DHCP client tests, pass the To run a suite of tests, e.g., only the DHCP client tests, pass the
suite as an argument to [9PM][]: suite as an argument to [9PM][]:
``` ```
11:42:53 infamy0:test # ./9pm/9pm.py case/infix_dhcp/infix_dhcp.yaml 11:42:53 infamy0:test # ./9pm/9pm.py case/dhcp/dhcp.yaml
``` ```
To run the suite of all tests: To run the suite of all tests:
@@ -234,12 +234,12 @@ your test and run it as normal. Once Python executes the call, it will
drop you into the Python debugger: drop you into the Python debugger:
``` ```
11:42:58 infamy0:test # ./case/infix_dhcp/dhcp_basic.py 11:42:58 infamy0:test # ./case/dhcp/dhcp_basic.py
# Starting (2024-02-10 11:42:59) # Starting (2024-02-10 11:42:59)
# Probing dut1 on port d1a for IPv6LL mgmt address ... # Probing dut1 on port d1a for IPv6LL mgmt address ...
# Connecting to mgmt IP fe80::ff:fe00:0%d1a:830 ... # Connecting to mgmt IP fe80::ff:fe00:0%d1a:830 ...
ok 1 - Initialize ok 1 - Initialize
> /home/jocke/src/infix/test/case/infix_dhcp/dhcp_basic.py(44)<module>() > /home/jocke/src/infix/test/case/dhcp/dhcp_basic.py(44)<module>()
(Pdb) (Pdb)
``` ```
@@ -252,7 +252,7 @@ want to setup breakpoints without modifying the source, or simply step
through the code: through the code:
``` ```
11:42:58 infamy0:test # python -m pdb case/infix_dhcp/dhcp_basic.py 11:42:58 infamy0:test # python -m pdb case/dhcp/dhcp_basic.py
``` ```
### Deterministic Topology Mappings ### Deterministic Topology Mappings
@@ -296,7 +296,7 @@ This is useful because this value can then be used to rerun a test (or
the whole suite) with identical topology mappings: the whole suite) with identical topology mappings:
``` ```
$ make PYTHONHASHSEED=3773822171 TESTS=case/ietf_system/hostname.py test $ make PYTHONHASHSEED=3773822171 TESTS=case/system/hostname.py test
``` ```
### Deterministic Transport Protocol ### Deterministic Transport Protocol
@@ -307,14 +307,14 @@ you get the same protocol used for that hash. But if you want to choose
the protocol, add extra arguments to Infamy: the protocol, add extra arguments to Infamy:
``` ```
$ make INFAMY_EXTRA_ARGS="--transport=restconf" TESTS=case/ietf_system/hostname.py test $ make INFAMY_EXTRA_ARGS="--transport=restconf" TESTS=case/system/hostname.py test
``` ```
or, when running interactively: or, when running interactively:
``` ```
$ make test-sh $ make test-sh
09:08:17 infamy0:test # ./9pm/9pm.py -o"--transport=restconf" case/ietf_system/hostname.py 09:08:17 infamy0:test # ./9pm/9pm.py -o"--transport=restconf" case/system/hostname.py
``` ```
### Test specification ### Test specification
@@ -360,7 +360,7 @@ to start by reviewing an existing test case.
All tests are located in the `infix/test/case` repository and are All tests are located in the `infix/test/case` repository and are
grouped by the features they verify. For example, grouped by the features they verify. For example,
`infix/test/case/infix_services` contains tests for various Infix `infix/test/case/services` contains tests for various Infix
services, such as LLDP and mDNS. services, such as LLDP and mDNS.
While test grouping is flexible, each test should be placed in a While test grouping is flexible, each test should be placed in a
@@ -372,12 +372,12 @@ suite](#running-subsets-of-tests):
``` ```
- name: infix-services - name: infix-services
suite: infix_services/infix_services.yaml suite: services/services.yaml
``` ```
A new test (e.g., lldp_enable_disable) should be added to the A new test (e.g., lldp_enable_disable) should be added to the
corresponding test group .yaml file, such as corresponding test group .yaml file, such as
`infix/test/cases/infix_services.yaml`: `infix/test/cases/services.yaml`:
``` ```
- name: lldp_enable_disable - name: lldp_enable_disable
@@ -385,7 +385,7 @@ corresponding test group .yaml file, such as
``` ```
It is necessary to include the test in It is necessary to include the test in
`infix/test/case/infix_services/Readme.adoc` to ensure proper test `infix/test/case/services/Readme.adoc` to ensure proper test
specification generation: specification generation:
``` ```
@@ -393,7 +393,7 @@ include::lldp_enable_disable/Readme.adoc[]
``` ```
Each test case should have its own directory under, Each test case should have its own directory under,
`infix/test/case/infix_services`, containing: `infix/test/case/services`, containing:
- `test.py` - the test script - `test.py` - the test script
- `topology.dot` - the logical topology definition. - `topology.dot` - the logical topology definition.
+27 -27
View File
@@ -26,36 +26,36 @@ confd_plugin_la_SOURCES = \
base64.c base64.h \ base64.c base64.h \
core.c core.h \ core.c core.h \
dagger.c dagger.h \ dagger.c dagger.h \
ietf-interfaces.c ietf-interfaces.h \ interfaces.c interfaces.h \
ieee802-ethernet-interface.c \ ieee802-ethernet-interface.c \
ietf-ip.c \ ip.c \
infix-if-bridge.c \ if-bridge.c \
infix-if-lag.c \ if-lag.c \
infix-if-bridge-mcd.c \ if-bridge-mcd.c \
infix-if-bridge-port.c \ if-bridge-port.c \
infix-if-veth.c \ if-veth.c \
infix-if-vlan.c \ if-vlan.c \
infix-if-gre.c \ if-gre.c \
infix-if-vxlan.c \ if-vxlan.c \
infix-if-wifi.c \ if-wifi.c \
ietf-keystore.c \ keystore.c \
ietf-system.c \ system.c \
ietf-syslog.c \ syslog.c \
ietf-factory-default.c \ factory-default.c \
ietf-routing.c \ routing.c \
infix-dhcp-common.c \ dhcp-common.c \
infix-dhcp-client.c \ dhcp-client.c \
infix-dhcpv6-client.c \ dhcpv6-client.c \
infix-dhcp-server.c \ dhcp-server.c \
infix-factory.c \ factory.c \
infix-firewall.c \ firewall.c \
infix-meta.c \ meta.c \
infix-services.c \ services.c \
infix-system-software.c \ system-software.c \
ietf-hardware.c hardware.c
if CONTAINERS if CONTAINERS
confd_plugin_la_SOURCES += infix-containers.c cni.c cni.h confd_plugin_la_SOURCES += containers.c cni.c cni.h
endif endif
rauc_installer_sources = \ rauc_installer_sources = \
+1 -1
View File
@@ -6,7 +6,7 @@
#include "core.h" #include "core.h"
#include "cni.h" #include "cni.h"
#include "ietf-interfaces.h" #include "interfaces.h"
#define CNI_NAME "/etc/cni/net.d/%s.conflist" #define CNI_NAME "/etc/cni/net.d/%s.conflist"
@@ -349,7 +349,7 @@ static int del(const char *name)
return SR_ERR_OK; return SR_ERR_OK;
} }
int infix_containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
struct lyd_node *cifs, *difs, *cif, *dif; struct lyd_node *cifs, *difs, *cif, *dif;
sr_error_t err = 0; sr_error_t err = 0;
@@ -465,7 +465,7 @@ static int oci_load(sr_session_ctx_t *session, uint32_t sub_id, const char *xpat
return SR_ERR_OK; return SR_ERR_OK;
} }
int infix_containers_rpc_init(struct confd *confd) int containers_rpc_init(struct confd *confd)
{ {
int rc; int rc;
+24 -24
View File
@@ -191,57 +191,57 @@ static int change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod
} }
/* ietf-interfaces */ /* ietf-interfaces */
if ((rc = ietf_interfaces_change(session, config, diff, event, confd))) if ((rc = interfaces_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-dhcp-client*/ /* infix-dhcp-client*/
if ((rc = infix_dhcp_client_change(session, config, diff, event, confd))) if ((rc = dhcp_client_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-dhcpv6-client*/ /* infix-dhcpv6-client*/
if ((rc = infix_dhcpv6_client_change(session, config, diff, event, confd))) if ((rc = dhcpv6_client_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* ietf-keystore */ /* ietf-keystore */
if ((rc = ietf_keystore_change(session, config, diff, event, confd))) if ((rc = keystore_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-services */ /* infix-services */
if ((rc = infix_services_change(session, config, diff, event, confd))) if ((rc = services_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* ietf-syslog*/ /* ietf-syslog*/
if ((rc = ietf_syslog_change(session, config, diff, event, confd))) if ((rc = syslog_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* ietf-system */ /* ietf-system */
if ((rc = ietf_system_change(session, config, diff, event, confd))) if ((rc = system_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-containers */ /* infix-containers */
#ifdef CONTAINERS #ifdef CONTAINERS
if ((rc = infix_containers_change(session, config, diff, event, confd))) if ((rc = containers_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
#endif #endif
/* ietf-hardware */ /* ietf-hardware */
if ((rc = ietf_hardware_change(session, config, diff, event, confd))) if ((rc = hardware_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* ietf-routing */ /* ietf-routing */
if ((rc = ietf_routing_change(session, config, diff, event, confd))) if ((rc = routing_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-dhcp-server */ /* infix-dhcp-server */
if ((rc = infix_dhcp_server_change(session, config, diff, event, confd))) if ((rc = dhcp_server_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-firewall */ /* infix-firewall */
if ((rc = infix_firewall_change(session, config, diff, event, confd))) if ((rc = firewall_change(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
/* infix-meta */ /* infix-meta */
if ((rc = infix_meta_change_cb(session, config, diff, event, confd))) if ((rc = meta_change_cb(session, config, diff, event, confd)))
goto free_diff; goto free_diff;
if (cfg) if (cfg)
@@ -390,48 +390,48 @@ int sr_plugin_init_cb(sr_session_ctx_t *session, void **priv)
goto err; goto err;
} }
rc = ietf_system_rpc_init(&confd); rc = system_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
#ifdef CONTAINERS #ifdef CONTAINERS
rc = infix_containers_rpc_init(&confd); rc = containers_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
#endif #endif
rc = infix_dhcp_server_rpc_init(&confd); rc = dhcp_server_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = infix_factory_rpc_init(&confd); rc = factory_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = ietf_factory_default_rpc_init(&confd); rc = factory_default_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = infix_firewall_rpc_init(&confd); rc = firewall_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = infix_system_sw_rpc_init(&confd); rc = system_sw_rpc_init(&confd);
if (rc) if (rc)
goto err; goto err;
/* Candidate infer configurations */ /* Candidate infer configurations */
rc = ietf_interfaces_cand_init(&confd); rc = interfaces_cand_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = ietf_hardware_candidate_init(&confd); rc = hardware_candidate_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = infix_firewall_candidate_init(&confd); rc = firewall_candidate_init(&confd);
if (rc) if (rc)
goto err; goto err;
rc = infix_dhcp_server_candidate_init(&confd); rc = dhcp_server_candidate_init(&confd);
if (rc) if (rc)
goto err; goto err;
/* YOUR_INIT GOES HERE */ /* YOUR_INIT GOES HERE */
+40 -40
View File
@@ -183,68 +183,68 @@ static inline int register_rpc(sr_session_ctx_t *session, const char *xpath,
} }
/* ietf-interfaces.c */ /* interfaces.c */
int ietf_interfaces_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int interfaces_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
int ietf_interfaces_cand_init(struct confd *confd); int interfaces_cand_init(struct confd *confd);
/* ietf-syslog.c */ /* syslog.c */
int ietf_syslog_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int syslog_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* ietf-system.c */ /* system.c */
int ietf_system_rpc_init (struct confd *confd); int system_rpc_init (struct confd *confd);
int hostnamefmt (struct confd *confd, const char *fmt, char *hostnm, size_t hostlen, char *domain, size_t domlen); int hostnamefmt (struct confd *confd, const char *fmt, char *hostnm, size_t hostlen, char *domain, size_t domlen);
int ietf_system_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int system_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* infix-containers.c */ /* containers.c */
#ifdef CONTAINERS #ifdef CONTAINERS
int infix_containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
int infix_containers_rpc_init(struct confd *confd); int containers_rpc_init(struct confd *confd);
#else #else
static inline int infix_containers_rpc_init(struct confd *confd) { return 0; } static inline int containers_rpc_init(struct confd *confd) { return 0; }
static inline int infix_containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) { return 0; } static inline int containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) { return 0; }
#endif #endif
/* infix-dhcp-client.c */ /* dhcp-client.c */
int infix_dhcp_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int dhcp_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* infix-dhcpv6-client.c */ /* dhcpv6-client.c */
int infix_dhcpv6_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int dhcpv6_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* infix-dhcp-server.c */ /* dhcp-server.c */
int infix_dhcp_server_candidate_init(struct confd *confd); int dhcp_server_candidate_init(struct confd *confd);
int infix_dhcp_server_rpc_init(struct confd *confd); int dhcp_server_rpc_init(struct confd *confd);
int infix_dhcp_server_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int dhcp_server_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* ietf-routing */ /* ietf-routing */
int ietf_routing_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int routing_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* infix-factory.c */ /* factory.c */
int infix_factory_rpc_init(struct confd *confd); int factory_rpc_init(struct confd *confd);
/* ietf-factory-default */ /* ietf-factory-default */
int ietf_factory_default_rpc_init(struct confd *confd); int factory_default_rpc_init(struct confd *confd);
/* infix-meta.c */ /* meta.c */
int infix_meta_change_cb(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int meta_change_cb(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* infix-system-software.c */ /* system-software.c */
int infix_system_sw_rpc_init(struct confd *confd); int system_sw_rpc_init(struct confd *confd);
/* infix-services.c */ /* services.c */
int infix_services_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int services_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* ietf-hardware.c */ /* hardware.c */
int ietf_hardware_candidate_init(struct confd *confd); int hardware_candidate_init(struct confd *confd);
int ietf_hardware_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int hardware_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* ietf-keystore.c */ /* keystore.c */
#define SSH_HOSTKEYS "/etc/ssh/hostkeys" #define SSH_HOSTKEYS "/etc/ssh/hostkeys"
#define SSH_HOSTKEYS_NEXT SSH_HOSTKEYS"+" #define SSH_HOSTKEYS_NEXT SSH_HOSTKEYS"+"
int ietf_keystore_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int keystore_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
/* infix-firewall.c */ /* firewall.c */
int infix_firewall_rpc_init(struct confd *confd); int firewall_rpc_init(struct confd *confd);
int infix_firewall_candidate_init(struct confd *confd); int firewall_candidate_init(struct confd *confd);
int infix_firewall_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd); int firewall_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd);
#endif /* CONFD_CORE_H_ */ #endif /* CONFD_CORE_H_ */
@@ -12,7 +12,7 @@
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "core.h" #include "core.h"
#include "infix-dhcp-common.h" #include "dhcp-common.h"
#define ARPING_MSEC 1000 #define ARPING_MSEC 1000
#define MODULE "infix-dhcp-client" #define MODULE "infix-dhcp-client"
@@ -167,7 +167,7 @@ static void del(const char *ifname)
systemf("initctl -bfq delete dhcp-client-%s", ifname); systemf("initctl -bfq delete dhcp-client-%s", ifname);
} }
int infix_dhcp_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, int dhcp_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff,
sr_event_t event, struct confd *confd) sr_event_t event, struct confd *confd)
{ {
struct lyd_node *ifaces, *difaces, *iface, *diface, *ipv4, *dhcp, *ddhcp; struct lyd_node *ifaces, *difaces, *iface, *diface, *ipv4, *dhcp, *ddhcp;
@@ -12,7 +12,7 @@
#include <libyang/libyang.h> #include <libyang/libyang.h>
#include "core.h" #include "core.h"
#include "infix-dhcp-common.h" #include "dhcp-common.h"
int dhcp_option_lookup(const struct lyd_node *id) int dhcp_option_lookup(const struct lyd_node *id)
{ {
@@ -230,7 +230,7 @@ static void infer_options_v6(sr_session_ctx_t *session, const char *xpath)
} }
/* /*
* Called from ietf-interfaces.c ifchange_cand() to infer DHCP options * Called from interfaces.c ifchange_cand() to infer DHCP options
* for both DHCPv4 and DHCPv6 client configurations * for both DHCPv4 and DHCPv6 client configurations
*/ */
int ifchange_cand_infer_dhcp(sr_session_ctx_t *session, const char *xpath) int ifchange_cand_infer_dhcp(sr_session_ctx_t *session, const char *xpath)
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause */ /* SPDX-License-Identifier: BSD-3-Clause */
#ifndef INFIX_DHCP_COMMON_H_ #ifndef DHCP_COMMON_H_
#define INFIX_DHCP_COMMON_H_ #define DHCP_COMMON_H_
#include <libyang/libyang.h> #include <libyang/libyang.h>
@@ -16,4 +16,4 @@ char *dhcp_compose_options(struct lyd_node *cfg, const char *ifname, char **opti
struct lyd_node *id, const char *val, const char *hex, struct lyd_node *id, const char *val, const char *hex,
char *(*ip_cache_cb)(const char *, char *, size_t)); char *(*ip_cache_cb)(const char *, char *, size_t));
#endif /* INFIX_DHCP_COMMON_H_ */ #endif /* DHCP_COMMON_H_ */
@@ -9,7 +9,7 @@
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "core.h" #include "core.h"
#include "infix-dhcp-common.h" #include "dhcp-common.h"
#define MODULE "infix-dhcp-server" #define MODULE "infix-dhcp-server"
#define ROOT_XPATH "/infix-dhcp-server:" #define ROOT_XPATH "/infix-dhcp-server:"
@@ -295,7 +295,7 @@ static void del(const char *subnet, struct lyd_node *cfg)
ERRNO("Failed switching to new %s", DNSMASQ_LEASES); ERRNO("Failed switching to new %s", DNSMASQ_LEASES);
} }
int infix_dhcp_server_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int dhcp_server_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
struct lyd_node *global, *cifs, *difs, *cif, *dif; struct lyd_node *global, *cifs, *difs, *cif, *dif;
int enabled = 0, added = 0, deleted = 0; int enabled = 0, added = 0, deleted = 0;
@@ -450,7 +450,7 @@ static int clear_stats(sr_session_ctx_t *session, uint32_t sub_id, const char *x
return SR_ERR_OK; return SR_ERR_OK;
} }
int infix_dhcp_server_candidate_init(struct confd *confd) int dhcp_server_candidate_init(struct confd *confd)
{ {
int rc; int rc;
@@ -462,7 +462,7 @@ fail:
return rc; return rc;
} }
int infix_dhcp_server_rpc_init(struct confd *confd) int dhcp_server_rpc_init(struct confd *confd)
{ {
int rc; int rc;
@@ -12,7 +12,7 @@
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "core.h" #include "core.h"
#include "infix-dhcp-common.h" #include "dhcp-common.h"
#define MODULE "infix-dhcpv6-client" #define MODULE "infix-dhcpv6-client"
#define XPATH "/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/infix-dhcpv6-client:dhcp" #define XPATH "/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/infix-dhcpv6-client:dhcp"
@@ -112,7 +112,7 @@ static void del_v6(const char *ifname)
systemf("initctl -bfq delete dhcpv6-client-%s", ifname); systemf("initctl -bfq delete dhcpv6-client-%s", ifname);
} }
int infix_dhcpv6_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, int dhcpv6_client_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff,
sr_event_t event, struct confd *confd) sr_event_t event, struct confd *confd)
{ {
struct lyd_node *ifaces, *difaces, *iface, *diface, *ipv6, *dhcp, *ddhcp; struct lyd_node *ifaces, *difaces, *iface, *diface, *ipv6, *dhcp, *ddhcp;
@@ -16,7 +16,7 @@ static int factory_reset(sr_session_ctx_t *session, uint32_t sub_id, const char
return 0; return 0;
} }
int ietf_factory_default_rpc_init(struct confd *confd) int factory_default_rpc_init(struct confd *confd)
{ {
int rc; int rc;
@@ -33,7 +33,7 @@ static int rpc(sr_session_ctx_t *session, uint32_t sub_id, const char *xpath,
return rc; return rc;
} }
int infix_factory_rpc_init(struct confd *confd) int factory_rpc_init(struct confd *confd)
{ {
int rc; int rc;
REGISTER_RPC(confd->session, "/infix-factory-default:factory-default", rpc, NULL, &confd->fsub); REGISTER_RPC(confd->session, "/infix-factory-default:factory-default", rpc, NULL, &confd->fsub);
@@ -13,7 +13,7 @@
#include <libyang/libyang.h> #include <libyang/libyang.h>
#include "core.h" #include "core.h"
#include "ietf-interfaces.h" #include "interfaces.h"
#define MODULE "infix-firewall" #define MODULE "infix-firewall"
#define XPATH "/infix-firewall:firewall" #define XPATH "/infix-firewall:firewall"
@@ -480,7 +480,7 @@ static int infer_policy(sr_session_ctx_t *session, const char *name, const char
} }
#endif #endif
int infix_firewall_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int firewall_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
struct lyd_node *tree, *global; struct lyd_node *tree, *global;
struct lyd_node *clist, *cnode; struct lyd_node *clist, *cnode;
@@ -534,7 +534,7 @@ int infix_firewall_change(sr_session_ctx_t *session, struct lyd_node *config, st
} }
/* Get L3 interfaces for default zone assignment */ /* Get L3 interfaces for default zone assignment */
if (ietf_interfaces_get_all_l3(tree, &ifaces) != 0) { if (interfaces_get_all_l3(tree, &ifaces) != 0) {
ERROR("Failed to get L3 interfaces"); ERROR("Failed to get L3 interfaces");
ifaces = NULL; ifaces = NULL;
} }
@@ -711,7 +711,7 @@ static int lockdown(sr_session_ctx_t *session, uint32_t sub_id, const char *xpat
return SR_ERR_OK; return SR_ERR_OK;
} }
int infix_firewall_rpc_init(struct confd *confd) int firewall_rpc_init(struct confd *confd)
{ {
int rc; int rc;
@@ -724,7 +724,7 @@ fail:
} }
int infix_firewall_candidate_init(struct confd *confd) int firewall_candidate_init(struct confd *confd)
{ {
int rc; int rc;
@@ -185,7 +185,7 @@ static int hardware_cand(sr_session_ctx_t *session, uint32_t sub_id, const char
return err; return err;
} }
int ietf_hardware_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int hardware_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
struct lyd_node *difs = NULL, *dif = NULL, *cifs = NULL, *cif = NULL; struct lyd_node *difs = NULL, *dif = NULL, *cifs = NULL, *cif = NULL;
int rc = SR_ERR_OK; int rc = SR_ERR_OK;
@@ -232,7 +232,7 @@ int ietf_hardware_change(sr_session_ctx_t *session, struct lyd_node *config, str
err: err:
return rc; return rc;
} }
int ietf_hardware_candidate_init(struct confd *confd) int hardware_candidate_init(struct confd *confd)
{ {
int rc = 0; int rc = 0;
+1 -1
View File
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
static bool iface_uses_autoneg(struct lyd_node *cif) static bool iface_uses_autoneg(struct lyd_node *cif)
{ {
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
static int gen_vlan(struct lyd_node *cif, struct lyd_node *vlan, FILE *conf) static int gen_vlan(struct lyd_node *cif, struct lyd_node *vlan, FILE *conf)
{ {
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
static const char *mstpd_cost_str(struct lyd_node *cost) static const char *mstpd_cost_str(struct lyd_node *cost)
{ {
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
struct ixif_br { struct ixif_br {
const char *name; const char *name;
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause */ /* SPDX-License-Identifier: BSD-3-Clause */
#include <srx/lyx.h> #include <srx/lyx.h>
#include "ietf-interfaces.h" #include "interfaces.h"
int gre_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip) int gre_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip)
{ {
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
/* /*
* The lag-port noode is only in the dif at initial creation, or removal. * The lag-port noode is only in the dif at initial creation, or removal.
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
/* /*
* While the kernel atomically creates/destroys the pair, in `running` * While the kernel atomically creates/destroys the pair, in `running`
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
int ifchange_cand_infer_vlan(sr_session_ctx_t *session, const char *path) int ifchange_cand_infer_vlan(sr_session_ctx_t *session, const char *path)
{ {
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause */ /* SPDX-License-Identifier: BSD-3-Clause */
#include <srx/lyx.h> #include <srx/lyx.h>
#include "ietf-interfaces.h" #include "interfaces.h"
int vxlan_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip) int vxlan_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip)
{ {
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause */ /* SPDX-License-Identifier: BSD-3-Clause */
#include <srx/lyx.h> #include <srx/lyx.h>
#include "ietf-interfaces.h" #include "interfaces.h"
#define WPA_SUPPLICANT_FINIT_CONF "/etc/finit.d/available/wpa_supplicant-%s.conf" #define WPA_SUPPLICANT_FINIT_CONF "/etc/finit.d/available/wpa_supplicant-%s.conf"
#define WPA_SUPPLICANT_CONF "/etc/wpa_supplicant-%s.conf" #define WPA_SUPPLICANT_CONF "/etc/wpa_supplicant-%s.conf"
@@ -11,7 +11,7 @@
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include <libyang/libyang.h> #include <libyang/libyang.h>
#include "ietf-interfaces.h" #include "interfaces.h"
#define IFACE_PROBE_TIMEOUT 40 #define IFACE_PROBE_TIMEOUT 40
@@ -791,7 +791,7 @@ static sr_error_t ifchange_post(sr_session_ctx_t *session, struct dagger *net,
return err ? SR_ERR_INTERNAL : SR_ERR_OK; return err ? SR_ERR_INTERNAL : SR_ERR_OK;
} }
int ietf_interfaces_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int interfaces_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
struct lyd_node *cifs, *difs, *cif, *dif; struct lyd_node *cifs, *difs, *cif, *dif;
sr_error_t err; sr_error_t err;
@@ -839,7 +839,7 @@ err_out:
return err; return err;
} }
int ietf_interfaces_get_all_l3(const struct lyd_node *tree, char ***ifaces) int interfaces_get_all_l3(const struct lyd_node *tree, char ***ifaces)
{ {
struct lyd_node *interfaces, *cif; struct lyd_node *interfaces, *cif;
char **names = NULL; char **names = NULL;
@@ -905,7 +905,7 @@ int ietf_interfaces_get_all_l3(const struct lyd_node *tree, char ***ifaces)
return 0; return 0;
} }
int ietf_interfaces_cand_init(struct confd *confd) int interfaces_cand_init(struct confd *confd)
{ {
int rc = SR_ERR_OK; int rc = SR_ERR_OK;
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause */ /* SPDX-License-Identifier: BSD-3-Clause */
#ifndef CONFD_IETF_INTERFACES_H_ #ifndef CONFD_INTERFACES_H_
#define CONFD_IETF_INTERFACES_H_ #define CONFD_INTERFACES_H_
#include "core.h" #include "core.h"
#include "cni.h" #include "cni.h"
@@ -99,12 +99,12 @@ bool iface_has_quirk(const char *ifname, const char *quirkname);
/* ieee802-ethernet-interface.c */ /* ieee802-ethernet-interface.c */
int netdag_gen_ethtool(struct dagger *net, struct lyd_node *cif, struct lyd_node *dif); int netdag_gen_ethtool(struct dagger *net, struct lyd_node *cif, struct lyd_node *dif);
/* ietf-interfaces.c */ /* interfaces.c */
const char *get_chassis_addr(void); const char *get_chassis_addr(void);
int link_gen_address(struct lyd_node *cif, FILE *ip); int link_gen_address(struct lyd_node *cif, FILE *ip);
int ietf_interfaces_get_all_l3(const struct lyd_node *tree, char ***ifaces); int interfaces_get_all_l3(const struct lyd_node *tree, char ***ifaces);
/* ietf-ip.c */ /* ip.c */
int netdag_gen_ipv6_autoconf(struct dagger *net, struct lyd_node *cif, int netdag_gen_ipv6_autoconf(struct dagger *net, struct lyd_node *cif,
struct lyd_node *dif, FILE *ip); struct lyd_node *dif, FILE *ip);
int netdag_gen_ipv4_autoconf(struct dagger *net, struct lyd_node *cif, int netdag_gen_ipv4_autoconf(struct dagger *net, struct lyd_node *cif,
@@ -112,42 +112,42 @@ int netdag_gen_ipv4_autoconf(struct dagger *net, struct lyd_node *cif,
int netdag_gen_ip_addrs(struct dagger *net, FILE *ip, const char *proto, int netdag_gen_ip_addrs(struct dagger *net, FILE *ip, const char *proto,
struct lyd_node *cif, struct lyd_node *dif); struct lyd_node *cif, struct lyd_node *dif);
/* infix-if-bridge.c */ /* if-bridge.c */
int bridge_mstpd_gen(struct lyd_node *cifs); int bridge_mstpd_gen(struct lyd_node *cifs);
int bridge_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip, int add); int bridge_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip, int add);
int bridge_add_deps(struct lyd_node *cif); int bridge_add_deps(struct lyd_node *cif);
/* infix-if-bridge-mcd.c */ /* if-bridge-mcd.c */
int bridge_mcd_gen(struct lyd_node *cifs); int bridge_mcd_gen(struct lyd_node *cifs);
/* infix-if-bridge-port.c */ /* if-bridge-port.c */
int bridge_port_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip); int bridge_port_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip);
/* infix-if-wifi.c */ /* if-wifi.c */
int wifi_gen(struct lyd_node *dif, struct lyd_node *cif, struct dagger *net); int wifi_gen(struct lyd_node *dif, struct lyd_node *cif, struct dagger *net);
int wifi_gen_del(struct lyd_node *dif, struct dagger *net); int wifi_gen_del(struct lyd_node *dif, struct dagger *net);
/* infix-if-gre.c */ /* if-gre.c */
int gre_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip); int gre_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip);
/* infix-if-lag.c */ /* if-lag.c */
int lag_port_gen(struct lyd_node *dif, struct lyd_node *cif); int lag_port_gen(struct lyd_node *dif, struct lyd_node *cif);
int lag_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip, int add); int lag_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip, int add);
int lag_add_deps(struct lyd_node *cif); int lag_add_deps(struct lyd_node *cif);
/* infix-if-veth.c */ /* if-veth.c */
bool veth_is_primary(struct lyd_node *cif); bool veth_is_primary(struct lyd_node *cif);
int ifchange_cand_infer_veth(sr_session_ctx_t *session, const char *path); int ifchange_cand_infer_veth(sr_session_ctx_t *session, const char *path);
int veth_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip); int veth_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip);
int veth_add_deps(struct lyd_node *cif); int veth_add_deps(struct lyd_node *cif);
/* infix-if-vlan.c */ /* if-vlan.c */
int ifchange_cand_infer_vlan(sr_session_ctx_t *session, const char *path); int ifchange_cand_infer_vlan(sr_session_ctx_t *session, const char *path);
int vlan_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip); int vlan_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip);
int vlan_add_deps(struct lyd_node *cif); int vlan_add_deps(struct lyd_node *cif);
/* infix-dhcp-common.c */ /* dhcp-common.c */
int ifchange_cand_infer_dhcp(sr_session_ctx_t *session, const char *path); int ifchange_cand_infer_dhcp(sr_session_ctx_t *session, const char *path);
/* infix-if-vxlan.c */ /* if-vxlan.c */
int vxlan_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip); int vxlan_gen(struct lyd_node *dif, struct lyd_node *cif, FILE *ip);
#endif /* CONFD_IETF_INTERFACES_H_ */ #endif /* CONFD_INTERFACES_H_ */
@@ -10,7 +10,7 @@
#include <srx/lyx.h> #include <srx/lyx.h>
#include <srx/srx_val.h> #include <srx/srx_val.h>
#include "ietf-interfaces.h" #include "interfaces.h"
int netdag_gen_ipv6_autoconf(struct dagger *net, struct lyd_node *cif, int netdag_gen_ipv6_autoconf(struct dagger *net, struct lyd_node *cif,
struct lyd_node *dif, FILE *ip) struct lyd_node *dif, FILE *ip)
@@ -155,7 +155,7 @@ static int keystore_update(sr_session_ctx_t *session, struct lyd_node *config, s
return 0; return 0;
} }
int ietf_keystore_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, int keystore_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff,
sr_event_t event, struct confd *confd) sr_event_t event, struct confd *confd)
{ {
struct lyd_node *changes, *change; struct lyd_node *changes, *change;
@@ -18,7 +18,7 @@ static int set_version(sr_session_ctx_t *session)
return SR_ERR_OK; return SR_ERR_OK;
} }
int infix_meta_change_cb(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int meta_change_cb(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
if (event == SR_EV_UPDATE) if (event == SR_EV_UPDATE)
return set_version(session); return set_version(session);
+156
View File
@@ -0,0 +1,156 @@
/* SPDX-License-Identifier: BSD-3-Clause */
#include <arpa/inet.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <net/if.h> /* IFNAMSIZ */
#include <sys/socket.h>
#include <linux/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <poll.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define NL_BUFSZ 4096
#define dbg(fmt, args...) if (nl_debug) warnx(fmt, ##args)
#define log(fmt, args...) warnx(fmt, ##args)
static int nl_debug;
static char *nl_buf;
static void scpy(char *dst, const char *src, size_t len)
{
size_t i;
for (i = 0; i < len; i++) {
if (src[i] == 0)
break;
dst[i] = src[i];
}
if (i < len)
dst[i] = 0;
else
dst[len - 1] = 0;
}
static int nlmsg_validate(struct nlmsghdr *nlmsg, ssize_t len)
{
ssize_t la;
if (nlmsg->nlmsg_len < NLMSG_LENGTH(sizeof(struct ifinfomsg)))
return - 1; /* Packet too small or truncated! */
la = NLMSG_PAYLOAD(nlmsg, sizeof(struct ifinfomsg));
if (la >= len)
return -1; /* Packet too large! */
return 0;
}
static int nl_link(struct nlmsghdr *nlmsg, ssize_t len)
{
char ifname[IFNAMSIZ];
struct ifinfomsg *i;
struct rtattr *a;
ssize_t la;
i = NLMSG_DATA(nlmsg);
a = (struct rtattr *)((char *)i + NLMSG_ALIGN(sizeof(struct ifinfomsg)));
la = NLMSG_PAYLOAD(nlmsg, sizeof(struct ifinfomsg));
for (; RTA_OK(a, la); a = RTA_NEXT(a, la)) {
if (a->rta_type != IFLA_IFNAME)
continue;
scpy(ifname, RTA_DATA(a), sizeof(ifname));
switch (nlmsg->nlmsg_type) {
case RTM_NEWLINK:
dbg("%s: new link or IFF change, flags 0x%x, change 0x%x", ifname, i->ifi_flags, i->ifi_change);
return 1;
case RTM_DELLINK:
dbg("%s: delete link", ifname);
return 1;
default:
break;
}
}
return 0;
}
int nl_callback(int sd)
{
while (1) {
struct nlmsghdr *nh;
ssize_t len;
size_t l;
while ((len = recv(sd, nl_buf, NL_BUFSZ, 0)) < 0) {
if (errno == EINTR)
continue;
return 0;
}
l = (size_t)len;
for (nh = (struct nlmsghdr *)nl_buf; NLMSG_OK(nh, l); nh = NLMSG_NEXT(nh, l)) {
switch (nh->nlmsg_type) {
case RTM_NEWLINK:
case RTM_DELLINK:
if (nlmsg_validate(nh, len))
continue;
return nl_link(nh, len);
case NLMSG_DONE:
case NLMSG_ERROR:
return 0;
default:
break;
}
}
}
return 0;
}
int main(void)
{
struct sockaddr_nl sa = { 0 };
struct pollfd pfd;
int sd;
sd = socket(AF_NETLINK, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, NETLINK_ROUTE);
if (sd < 0)
err(1, "socket()");
sa.nl_family = AF_NETLINK;
sa.nl_groups = RTMGRP_IPV4_ROUTE | RTMGRP_LINK;
sa.nl_pid = getpid();
if (bind(sd, (struct sockaddr *)&sa, sizeof(sa)) < 0)
err(1, "bind()");
nl_buf = malloc(NL_BUFSZ);
if (!nl_buf)
err(1, "malloc()");
pfd.fd = sd;
pfd.events = POLLIN;
while (1) {
int rc;
rc = poll(&pfd, 1, -1);
if (rc == -1)
break;
if (nl_callback(sd))
log("link change");
}
return !!close(sd);
}
@@ -247,7 +247,7 @@ static int parse_static_routes(sr_session_ctx_t *session, struct lyd_node *paren
return num_routes; return num_routes;
} }
int ietf_routing_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int routing_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
int staticd_enabled = 0, ospfd_enabled = 0, bfdd_enabled = 0; int staticd_enabled = 0, ospfd_enabled = 0, bfdd_enabled = 0;
struct lyd_node *cplane, *cplanes; struct lyd_node *cplane, *cplanes;
@@ -515,7 +515,7 @@ static int web_change(sr_session_ctx_t *session, struct lyd_node *config, struct
return put(cfg); return put(cfg);
} }
int infix_services_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int services_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
int rc; int rc;
@@ -463,7 +463,7 @@ done:
return SR_ERR_OK; return SR_ERR_OK;
} }
int ietf_syslog_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int syslog_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
int rc = SR_ERR_OK; int rc = SR_ERR_OK;
@@ -89,7 +89,7 @@ static int infix_system_sw_set_boot_order(sr_session_ctx_t *session, uint32_t su
return SR_ERR_OK; return SR_ERR_OK;
} }
int infix_system_sw_rpc_init(struct confd *confd) int system_sw_rpc_init(struct confd *confd)
{ {
int rc = 0; int rc = 0;
@@ -1602,7 +1602,7 @@ static int change_hostname(sr_session_ctx_t *session, struct lyd_node *config, s
} }
int ietf_system_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd) int system_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
{ {
int rc = SR_ERR_OK; int rc = SR_ERR_OK;
@@ -1628,7 +1628,7 @@ int ietf_system_change(sr_session_ctx_t *session, struct lyd_node *config, struc
return SR_ERR_OK; return SR_ERR_OK;
} }
int ietf_system_rpc_init(struct confd *confd) int system_rpc_init(struct confd *confd)
{ {
int rc; int rc;
+18 -18
View File
@@ -18,37 +18,37 @@
suite: misc/all.yaml suite: misc/all.yaml
- name: "IETF System" - name: "System"
suite: ietf_system/all.yaml suite: system/all.yaml
# Upgrade may leave wrong boot order # Upgrade may leave wrong boot order
- case: meta/bootorder.py - case: meta/bootorder.py
infamy: infamy:
specification: False specification: False
- name: "IETF Syslog" - name: "Syslog"
suite: ietf_syslog/all.yaml suite: syslog/all.yaml
- name: "IETF Interfaces" - name: "Interfaces"
suite: ietf_interfaces/all.yaml suite: interfaces/all.yaml
- name: "IETF Routing" - name: "Routing"
suite: ietf_routing/all.yaml suite: routing/all.yaml
- name: "Infix Firewall" - name: "Firewall"
suite: infix_firewall/all.yaml suite: firewall/all.yaml
- name: "Infix Containers" - name: "Containers"
suite: infix_containers/all.yaml suite: containers/all.yaml
- name: "Infix DHCP" - name: "DHCP"
suite: infix_dhcp/all.yaml suite: dhcp/all.yaml
- name: "IETF Hardware" - name: "Hardware"
suite: ietf_hardware/all.yaml suite: hardware/all.yaml
- name: "Infix Services" - name: "Services"
suite: infix_services/all.yaml suite: services/all.yaml
- name: "Use Case Tests" - name: "Use Case Tests"
suite: use_case/all.yaml suite: use_case/all.yaml
@@ -1,7 +1,7 @@
:testgroup: :testgroup:
== infix-containers == Containers
Tests verifying Infix Docker container support: Tests verifying link:https://opencontainers.org/[OCI container] support:
- Basic web server container running in host network mode - Basic web server container running in host network mode
- Container enable/disable functionality via configuration - Container enable/disable functionality via configuration
@@ -1,6 +1,6 @@
=== Container basic === Container basic
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/basic] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/basic]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1,6 +1,6 @@
=== Container with bridge network === Container with bridge network
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/bridge] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/bridge]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,6 +1,6 @@
=== Container enabled/disabled === Container enabled/disabled
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/enabled] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/enabled]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -1,6 +1,6 @@
=== Container environment variables === Container environment variables
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/environment] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/environment]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1,6 +1,6 @@
=== Basic Firewall Container === Basic Firewall Container
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/firewall_basic] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/firewall_basic]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -1,12 +1,13 @@
=== Host Command Execution from Container === Host Command Execution from Container
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/host_commands] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/host_commands]
==== Description ==== Description
This test verifies that a container running on Infix can execute commands This test verifies that a container in privileged mode can break out of
that affect the host system. Specifically, it confirms that the container the container to execute commands that affect the host system.
can change the hostname of the host. Specifically, it confirms that the container can change the hostname of
the host.
==== Topology ==== Topology

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -1,6 +1,6 @@
=== Container with physical interface === Container with physical interface
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/phys] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/phys]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,6 +1,6 @@
=== Container Upgrade === Container Upgrade
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/upgrade] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/upgrade]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

@@ -1,6 +1,6 @@
=== Container with VETH pair === Container with VETH pair
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/veth] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/veth]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,6 +1,6 @@
=== Container Volume Persistence === Container Volume Persistence
ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/volume] ifdef::topdoc[:imagesdir: {topdoc}../../test/case/containers/volume]
==== Description ==== Description

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1,7 +1,7 @@
:testgroup: :testgroup:
== infix-dhcp == DHCP
Tests verifying DHCPv4/DHCPv6 client and server functionality in Infix: Tests verifying DHCPv4/DHCPv6 client and server functionality:
- Basic DHCPv4 client lease acquisition and configuration - Basic DHCPv4 client lease acquisition and configuration
- DHCPv4 client with default gateway assignment - DHCPv4 client with default gateway assignment

Some files were not shown because too many files have changed in this diff Show More