From 6c32e17a75199f9acf9e2c33b3480fc27257622d Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 3 Sep 2023 15:20:45 +0200 Subject: netns: T5241: simplify network namespace handling --- src/conf_mode/interfaces-dummy.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py index a02ddeb51..db768b94d 100755 --- a/src/conf_mode/interfaces-dummy.py +++ b/src/conf_mode/interfaces-dummy.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019-2021 VyOS maintainers and contributors +# Copyright (C) 2019-2023 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,10 +55,7 @@ def generate(dummy): return None def apply(dummy): - if 'netns' in dummy: - d = DummyIf(ifname=dummy['ifname'], netns=dummy['netns']) - else: - d = DummyIf(dummy['ifname']) + d = DummyIf(**dummy) # Remove dummy interface if 'deleted' in dummy: -- cgit v1.2.3