From 0e885f1bf01424130b6876e769cc42612b19351b Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Tue, 21 Nov 2023 20:25:59 +0100 Subject: http: T5762: rename "virtual-host listen-port" -> "virtual-host port" This complements commit f5e43b136 ("http: T5762: api: make API socket backend communication the one and only default") so we have a consistent port CLI node across VyOS components. --- src/migration-scripts/https/4-to-5 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/migration-scripts/https') diff --git a/src/migration-scripts/https/4-to-5 b/src/migration-scripts/https/4-to-5 index a503e0cb7..0dfb6ac19 100755 --- a/src/migration-scripts/https/4-to-5 +++ b/src/migration-scripts/https/4-to-5 @@ -48,6 +48,12 @@ if config.exists(base + ['api', 'socket']): if config.exists(base + ['api', 'port']): config.delete(base + ['api', 'port']) +# rename listen-port -> port ver virtual-host +if config.exists(base + ['virtual-host']): + for vhost in config.list_nodes(base + ['virtual-host']): + if config.exists(base + ['virtual-host', vhost, 'listen-port']): + config.rename(base + ['virtual-host', vhost, 'listen-port'], 'port') + try: with open(file_name, 'w') as f: f.write(config.to_string()) -- cgit v1.2.3