From f0020ef10d601c5e8dbcc4ed8fb1dab402170c9e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 24 May 2021 08:33:23 +0200 Subject: router-advert: T3561: fix inconsistent use of tabs and spaces in indentation Commit c17f259d ("router-advert: T3561: add support for specific routes") used tabs over spaces in the Migration script which triggered a TabError (inconsistent use of tabs and spaces in indentation"). (cherry picked from commit acc701bac3483a3242c77a2e00c076890e27eea9) --- src/conf_mode/service_router-advert.py | 6 +++--- src/migration-scripts/interfaces/5-to-6 | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/conf_mode/service_router-advert.py b/src/conf_mode/service_router-advert.py index 1f6d90fb4..9afcdd63e 100755 --- a/src/conf_mode/service_router-advert.py +++ b/src/conf_mode/service_router-advert.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2018-2019 VyOS maintainers and contributors +# Copyright (C) 2018-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -45,7 +45,7 @@ def get_config(config=None): del default_interface_values['prefix'] if 'route' in default_interface_values: del default_interface_values['route'] - + default_prefix_values = defaults(base + ['interface', 'prefix']) default_route_values = defaults(base + ['interface', 'route']) @@ -58,7 +58,7 @@ def get_config(config=None): for prefix in rtradv['interface'][interface]['prefix']: rtradv['interface'][interface]['prefix'][prefix] = dict_merge( default_prefix_values, rtradv['interface'][interface]['prefix'][prefix]) - + if 'route' in rtradv['interface'][interface]: for route in rtradv['interface'][interface]['route']: rtradv['interface'][interface]['route'][route] = dict_merge( diff --git a/src/migration-scripts/interfaces/5-to-6 b/src/migration-scripts/interfaces/5-to-6 index 8ae34c208..ae79c1d1b 100755 --- a/src/migration-scripts/interfaces/5-to-6 +++ b/src/migration-scripts/interfaces/5-to-6 @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020 VyOS maintainers and contributors +# Copyright (C) 2020-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -55,16 +55,16 @@ def copy_rtradv(c, old_base, interface): min_max = interval.split('-')[0] c.set(new_base + ['interval', min_max], value=tmp) - # cleanup boolean nodes in individual route - route_base = new_base + ['route'] - if c.exists(route_base): - for route in config.list_nodes(route_base): - if c.exists(route_base + [route, 'remove-route']): - tmp = c.return_value(route_base + [route, 'remove-route']) - c.delete(route_base + [route, 'remove-route']) - if tmp == 'false': - c.set(route_base + [route, 'no-remove-route']) - + # cleanup boolean nodes in individual route + route_base = new_base + ['route'] + if c.exists(route_base): + for route in config.list_nodes(route_base): + if c.exists(route_base + [route, 'remove-route']): + tmp = c.return_value(route_base + [route, 'remove-route']) + c.delete(route_base + [route, 'remove-route']) + if tmp == 'false': + c.set(route_base + [route, 'no-remove-route']) + # cleanup boolean nodes in individual prefix prefix_base = new_base + ['prefix'] if c.exists(prefix_base): -- cgit v1.2.3