Skip to content

Commit 9a8d131

Browse files
authored
Merge pull request #1269 from kernelkit/rename
2 parents 492fed5 + b9a5692 commit 9a8d131

File tree

508 files changed

+552
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

508 files changed

+552
-375
lines changed

doc/testing.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ Each test case is a separate executable, which can be run without
9393
arguments:
9494

9595
```
96-
11:42:53 infamy0:test # ./case/infix_dhcp/dhcp_basic.py
96+
11:42:53 infamy0:test # ./case/dhcp/dhcp_basic.py
9797
```
9898

9999
To run a suite of tests, e.g., only the DHCP client tests, pass the
100100
suite as an argument to [9PM][]:
101101

102102
```
103-
11:42:53 infamy0:test # ./9pm/9pm.py case/infix_dhcp/infix_dhcp.yaml
103+
11:42:53 infamy0:test # ./9pm/9pm.py case/dhcp/dhcp.yaml
104104
```
105105

106106
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
234234
drop you into the Python debugger:
235235

236236
```
237-
11:42:58 infamy0:test # ./case/infix_dhcp/dhcp_basic.py
237+
11:42:58 infamy0:test # ./case/dhcp/dhcp_basic.py
238238
# Starting (2024-02-10 11:42:59)
239239
# Probing dut1 on port d1a for IPv6LL mgmt address ...
240240
# Connecting to mgmt IP fe80::ff:fe00:0%d1a:830 ...
241241
ok 1 - Initialize
242-
> /home/jocke/src/infix/test/case/infix_dhcp/dhcp_basic.py(44)<module>()
242+
> /home/jocke/src/infix/test/case/dhcp/dhcp_basic.py(44)<module>()
243243
(Pdb)
244244
```
245245

@@ -252,7 +252,7 @@ want to setup breakpoints without modifying the source, or simply step
252252
through the code:
253253

254254
```
255-
11:42:58 infamy0:test # python -m pdb case/infix_dhcp/dhcp_basic.py
255+
11:42:58 infamy0:test # python -m pdb case/dhcp/dhcp_basic.py
256256
```
257257

258258
### Deterministic Topology Mappings
@@ -296,7 +296,7 @@ This is useful because this value can then be used to rerun a test (or
296296
the whole suite) with identical topology mappings:
297297

298298
```
299-
$ make PYTHONHASHSEED=3773822171 TESTS=case/ietf_system/hostname.py test
299+
$ make PYTHONHASHSEED=3773822171 TESTS=case/system/hostname.py test
300300
```
301301

302302
### Deterministic Transport Protocol
@@ -307,14 +307,14 @@ you get the same protocol used for that hash. But if you want to choose
307307
the protocol, add extra arguments to Infamy:
308308

309309
```
310-
$ make INFAMY_EXTRA_ARGS="--transport=restconf" TESTS=case/ietf_system/hostname.py test
310+
$ make INFAMY_EXTRA_ARGS="--transport=restconf" TESTS=case/system/hostname.py test
311311
```
312312

313313
or, when running interactively:
314314

315315
```
316316
$ make test-sh
317-
09:08:17 infamy0:test # ./9pm/9pm.py -o"--transport=restconf" case/ietf_system/hostname.py
317+
09:08:17 infamy0:test # ./9pm/9pm.py -o"--transport=restconf" case/system/hostname.py
318318
```
319319

320320
### Test specification
@@ -360,7 +360,7 @@ to start by reviewing an existing test case.
360360

361361
All tests are located in the `infix/test/case` repository and are
362362
grouped by the features they verify. For example,
363-
`infix/test/case/infix_services` contains tests for various Infix
363+
`infix/test/case/services` contains tests for various Infix
364364
services, such as LLDP and mDNS.
365365

366366
While test grouping is flexible, each test should be placed in a
@@ -372,28 +372,28 @@ suite](#running-subsets-of-tests):
372372

373373
```
374374
- name: infix-services
375-
suite: infix_services/infix_services.yaml
375+
suite: services/services.yaml
376376
```
377377

378378
A new test (e.g., lldp_enable_disable) should be added to the
379379
corresponding test group .yaml file, such as
380-
`infix/test/cases/infix_services.yaml`:
380+
`infix/test/cases/services.yaml`:
381381

382382
```
383383
- name: lldp_enable_disable
384384
case: lldp_enable_disable/test.py
385385
```
386386

387387
It is necessary to include the test in
388-
`infix/test/case/infix_services/Readme.adoc` to ensure proper test
388+
`infix/test/case/services/Readme.adoc` to ensure proper test
389389
specification generation:
390390

391391
```
392392
include::lldp_enable_disable/Readme.adoc[]
393393
```
394394

395395
Each test case should have its own directory under,
396-
`infix/test/case/infix_services`, containing:
396+
`infix/test/case/services`, containing:
397397

398398
- `test.py` - the test script
399399
- `topology.dot` - the logical topology definition.

src/confd/src/Makefile.am

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,36 @@ confd_plugin_la_SOURCES = \
2626
base64.c base64.h \
2727
core.c core.h \
2828
dagger.c dagger.h \
29-
ietf-interfaces.c ietf-interfaces.h \
29+
interfaces.c interfaces.h \
3030
ieee802-ethernet-interface.c \
31-
ietf-ip.c \
32-
infix-if-bridge.c \
33-
infix-if-lag.c \
34-
infix-if-bridge-mcd.c \
35-
infix-if-bridge-port.c \
36-
infix-if-veth.c \
37-
infix-if-vlan.c \
38-
infix-if-gre.c \
39-
infix-if-vxlan.c \
40-
infix-if-wifi.c \
41-
ietf-keystore.c \
42-
ietf-system.c \
43-
ietf-syslog.c \
44-
ietf-factory-default.c \
45-
ietf-routing.c \
46-
infix-dhcp-common.c \
47-
infix-dhcp-client.c \
48-
infix-dhcpv6-client.c \
49-
infix-dhcp-server.c \
50-
infix-factory.c \
51-
infix-firewall.c \
52-
infix-meta.c \
53-
infix-services.c \
54-
infix-system-software.c \
55-
ietf-hardware.c
31+
ip.c \
32+
if-bridge.c \
33+
if-lag.c \
34+
if-bridge-mcd.c \
35+
if-bridge-port.c \
36+
if-veth.c \
37+
if-vlan.c \
38+
if-gre.c \
39+
if-vxlan.c \
40+
if-wifi.c \
41+
keystore.c \
42+
system.c \
43+
syslog.c \
44+
factory-default.c \
45+
routing.c \
46+
dhcp-common.c \
47+
dhcp-client.c \
48+
dhcpv6-client.c \
49+
dhcp-server.c \
50+
factory.c \
51+
firewall.c \
52+
meta.c \
53+
services.c \
54+
system-software.c \
55+
hardware.c
5656

5757
if CONTAINERS
58-
confd_plugin_la_SOURCES += infix-containers.c cni.c cni.h
58+
confd_plugin_la_SOURCES += containers.c cni.c cni.h
5959
endif
6060

6161
rauc_installer_sources = \

src/confd/src/cni.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include "core.h"
88
#include "cni.h"
9-
#include "ietf-interfaces.h"
9+
#include "interfaces.h"
1010

1111
#define CNI_NAME "/etc/cni/net.d/%s.conflist"
1212

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int del(const char *name)
349349
return SR_ERR_OK;
350350
}
351351

352-
int infix_containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
352+
int containers_change(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff, sr_event_t event, struct confd *confd)
353353
{
354354
struct lyd_node *cifs, *difs, *cif, *dif;
355355
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
465465
return SR_ERR_OK;
466466
}
467467

468-
int infix_containers_rpc_init(struct confd *confd)
468+
int containers_rpc_init(struct confd *confd)
469469
{
470470
int rc;
471471

src/confd/src/core.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -191,57 +191,57 @@ static int change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod
191191
}
192192

193193
/* ietf-interfaces */
194-
if ((rc = ietf_interfaces_change(session, config, diff, event, confd)))
194+
if ((rc = interfaces_change(session, config, diff, event, confd)))
195195
goto free_diff;
196196

197197
/* infix-dhcp-client*/
198-
if ((rc = infix_dhcp_client_change(session, config, diff, event, confd)))
198+
if ((rc = dhcp_client_change(session, config, diff, event, confd)))
199199
goto free_diff;
200200

201201
/* infix-dhcpv6-client*/
202-
if ((rc = infix_dhcpv6_client_change(session, config, diff, event, confd)))
202+
if ((rc = dhcpv6_client_change(session, config, diff, event, confd)))
203203
goto free_diff;
204204

205205
/* ietf-keystore */
206-
if ((rc = ietf_keystore_change(session, config, diff, event, confd)))
206+
if ((rc = keystore_change(session, config, diff, event, confd)))
207207
goto free_diff;
208208

209209
/* infix-services */
210-
if ((rc = infix_services_change(session, config, diff, event, confd)))
210+
if ((rc = services_change(session, config, diff, event, confd)))
211211
goto free_diff;
212212

213213
/* ietf-syslog*/
214-
if ((rc = ietf_syslog_change(session, config, diff, event, confd)))
214+
if ((rc = syslog_change(session, config, diff, event, confd)))
215215
goto free_diff;
216216

217217
/* ietf-system */
218-
if ((rc = ietf_system_change(session, config, diff, event, confd)))
218+
if ((rc = system_change(session, config, diff, event, confd)))
219219
goto free_diff;
220220

221221
/* infix-containers */
222222
#ifdef CONTAINERS
223-
if ((rc = infix_containers_change(session, config, diff, event, confd)))
223+
if ((rc = containers_change(session, config, diff, event, confd)))
224224
goto free_diff;
225225
#endif
226226

227227
/* ietf-hardware */
228-
if ((rc = ietf_hardware_change(session, config, diff, event, confd)))
228+
if ((rc = hardware_change(session, config, diff, event, confd)))
229229
goto free_diff;
230230

231231
/* ietf-routing */
232-
if ((rc = ietf_routing_change(session, config, diff, event, confd)))
232+
if ((rc = routing_change(session, config, diff, event, confd)))
233233
goto free_diff;
234234

235235
/* infix-dhcp-server */
236-
if ((rc = infix_dhcp_server_change(session, config, diff, event, confd)))
236+
if ((rc = dhcp_server_change(session, config, diff, event, confd)))
237237
goto free_diff;
238238

239239
/* infix-firewall */
240-
if ((rc = infix_firewall_change(session, config, diff, event, confd)))
240+
if ((rc = firewall_change(session, config, diff, event, confd)))
241241
goto free_diff;
242242

243243
/* infix-meta */
244-
if ((rc = infix_meta_change_cb(session, config, diff, event, confd)))
244+
if ((rc = meta_change_cb(session, config, diff, event, confd)))
245245
goto free_diff;
246246

247247
if (cfg)
@@ -390,48 +390,48 @@ int sr_plugin_init_cb(sr_session_ctx_t *session, void **priv)
390390
goto err;
391391
}
392392

393-
rc = ietf_system_rpc_init(&confd);
393+
rc = system_rpc_init(&confd);
394394
if (rc)
395395
goto err;
396396
#ifdef CONTAINERS
397-
rc = infix_containers_rpc_init(&confd);
397+
rc = containers_rpc_init(&confd);
398398
if (rc)
399399
goto err;
400400
#endif
401-
rc = infix_dhcp_server_rpc_init(&confd);
401+
rc = dhcp_server_rpc_init(&confd);
402402
if (rc)
403403
goto err;
404404

405-
rc = infix_factory_rpc_init(&confd);
405+
rc = factory_rpc_init(&confd);
406406
if (rc)
407407
goto err;
408408

409-
rc = ietf_factory_default_rpc_init(&confd);
409+
rc = factory_default_rpc_init(&confd);
410410
if (rc)
411411
goto err;
412412

413-
rc = infix_firewall_rpc_init(&confd);
413+
rc = firewall_rpc_init(&confd);
414414
if (rc)
415415
goto err;
416416

417-
rc = infix_system_sw_rpc_init(&confd);
417+
rc = system_sw_rpc_init(&confd);
418418
if (rc)
419419
goto err;
420420

421421
/* Candidate infer configurations */
422-
rc = ietf_interfaces_cand_init(&confd);
422+
rc = interfaces_cand_init(&confd);
423423
if (rc)
424424
goto err;
425425

426-
rc = ietf_hardware_candidate_init(&confd);
426+
rc = hardware_candidate_init(&confd);
427427
if (rc)
428428
goto err;
429429

430-
rc = infix_firewall_candidate_init(&confd);
430+
rc = firewall_candidate_init(&confd);
431431
if (rc)
432432
goto err;
433433

434-
rc = infix_dhcp_server_candidate_init(&confd);
434+
rc = dhcp_server_candidate_init(&confd);
435435
if (rc)
436436
goto err;
437437
/* YOUR_INIT GOES HERE */

0 commit comments

Comments
 (0)