From d62d3236a73417581da14c87166898e1765b042b Mon Sep 17 00:00:00 2001 From: Sirapop Theeranantachai Date: Wed, 14 Jan 2026 14:57:53 -0800 Subject: [PATCH 1/2] Add IPv6 support to testbed-nodes.json generation Include optional host_ipv6 field from host_vars in the ip_addresses array when generating routers.json (served as testbed-nodes.json). This enables ndn-fch to recognize IPv6-capable nodes and return them to IPv6 clients. To add IPv6 to a node, add 'host_ipv6:
' to its host_vars file. --- templates/file-server/routers.json.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/file-server/routers.json.j2 b/templates/file-server/routers.json.j2 index 764ee37..e2b0e25 100644 --- a/templates/file-server/routers.json.j2 +++ b/templates/file-server/routers.json.j2 @@ -3,7 +3,7 @@ {{ name | tojson }}: {{{ 'shortname': name, 'name': data['site_name'], - 'ip_addresses': [data['host_ip']], + 'ip_addresses': [data['host_ip']] + ([data['host_ipv6']] if data.get('host_ipv6') else []), 'prefix': data['default_prefix'], 'host': data['ansible_host'], From 146a67581b2ce5d900ac63063e36c9404784230d Mon Sep 17 00:00:00 2001 From: Sirapop Theeranantachai Date: Fri, 16 Jan 2026 12:00:28 -0800 Subject: [PATCH 2/2] Fix routers.json.j2: future-proof ip_addresses and use ~ for string concatenation --- templates/file-server/routers.json.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/file-server/routers.json.j2 b/templates/file-server/routers.json.j2 index e2b0e25..14831c8 100644 --- a/templates/file-server/routers.json.j2 +++ b/templates/file-server/routers.json.j2 @@ -3,12 +3,12 @@ {{ name | tojson }}: {{{ 'shortname': name, 'name': data['site_name'], - 'ip_addresses': [data['host_ip']] + ([data['host_ipv6']] if data.get('host_ipv6') else []), + 'ip_addresses': ([data['host_ip']] if 'host_ip' in data else []) + ([data['host_ipv6']] if 'host_ipv6' in data else []), 'prefix': data['default_prefix'], 'host': data['ansible_host'], - 'site': 'http://' + data['ansible_host'] + ':80/', - 'https': 'https://' + data['ansible_host'] + ':443/', + 'site': 'http://' ~ data['ansible_host'] ~ ':80/', + 'https': 'https://' ~ data['ansible_host'] ~ ':443/', 'neighbors': list(data['neighbors'].keys()), 'position': data['position'],