From 66ec278393dbabe71f320c543816f27797d51140 Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Wed, 3 Jul 2024 09:53:56 -0300 Subject: T6536: change wildcard character from + to * - extend fix to interfaces defined in zone policy. --- src/migration-scripts/firewall/7-to-8 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/migration-scripts/firewall/7-to-8') diff --git a/src/migration-scripts/firewall/7-to-8 b/src/migration-scripts/firewall/7-to-8 index f46994ce2..b8bcc52cc 100644 --- a/src/migration-scripts/firewall/7-to-8 +++ b/src/migration-scripts/firewall/7-to-8 @@ -71,5 +71,11 @@ def migrate(config: ConfigTree) -> None: config.set_tag(['firewall', 'zone']) for zone in config.list_nodes(zone_base + ['zone']): + if 'interface' in config.list_nodes(zone_base + ['zone', zone]): + for iface in config.return_values(zone_base + ['zone', zone, 'interface']): + if '+' in iface: + config.delete_value(zone_base + ['zone', zone, 'interface'], value=iface) + iface = iface.replace('+', '*') + config.set(zone_base + ['zone', zone, 'interface'], value=iface, replace=False) config.copy(zone_base + ['zone', zone], ['firewall', 'zone', zone]) - config.delete(zone_base) + config.delete(zone_base) \ No newline at end of file -- cgit v1.2.3