summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rwxr-xr-xpython/vyos/template.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 5b228603c..dbbc4df84 100755
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -908,18 +908,19 @@ def kea_high_availability_json(config):
'max-ack-delay': 5000,
'max-unacked-clients': 10,
'peers': [
- {
- 'name': os.uname()[1],
- 'url': f'http://{source_addr}:647/',
- 'role': peer1_role,
- 'auto-failover': True
- },
- {
- 'name': config['name'],
- 'url': f'http://{remote_addr}:647/',
- 'role': peer2_role,
- 'auto-failover': True
- }]
+ {
+ 'name': os.uname()[1],
+ 'url': f'http://{bracketize_ipv6(source_addr)}:647/',
+ 'role': peer1_role,
+ 'auto-failover': True,
+ },
+ {
+ 'name': config['name'],
+ 'url': f'http://{bracketize_ipv6(remote_addr)}:647/',
+ 'role': peer2_role,
+ 'auto-failover': True,
+ },
+ ],
}
if 'ca_cert_file' in config: