diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-01-11 15:00:44 +0000 |
|---|---|---|
| committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-01-11 15:09:53 +0000 |
| commit | 26936a2f23a6187efb26a3adcf0f11bec6a4ddba (patch) | |
| tree | 81964e1c93ce916c468502702e7e6004e855c850 /src | |
| parent | 10de7ce46af1d38edfc449800ce730ad9bb4fbaa (diff) | |
| download | vyos-1x-26936a2f23a6187efb26a3adcf0f11bec6a4ddba.tar.gz vyos-1x-26936a2f23a6187efb26a3adcf0f11bec6a4ddba.zip | |
Remove recursive_defaults from the get_config arg
Do not use 'recursive_defaults' as argument of the funciton get_config()
It cause vyos-1x/src/tests/test_configd_inspect.py signature checks fail
AssertionError: 2 != 1 : 'vpp_interfaces_bonding.py': 'get_config' incorrect signature
Diffstat (limited to 'src')
| -rw-r--r-- | src/conf_mode/vpp_interfaces_bonding.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_bridge.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_ethernet.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_geneve.py | 6 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_gre.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_ipip.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_loopback.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_vxlan.py | 7 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_xconnect.py | 7 |
9 files changed, 27 insertions, 35 deletions
diff --git a/src/conf_mode/vpp_interfaces_bonding.py b/src/conf_mode/vpp_interfaces_bonding.py index 9b057f992..135be5c04 100644 --- a/src/conf_mode/vpp_interfaces_bonding.py +++ b/src/conf_mode/vpp_interfaces_bonding.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -58,12 +58,11 @@ def _get_bond_lb(lb_name: str) -> int: return lb_mapping.get(lb_name, 5) -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get Bonding interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: Bonding interface configuration """ @@ -84,7 +83,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_bridge.py b/src/conf_mode/vpp_interfaces_bridge.py index c76d88480..e7a2427f9 100644 --- a/src/conf_mode/vpp_interfaces_bridge.py +++ b/src/conf_mode/vpp_interfaces_bridge.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023-2024 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,12 +25,11 @@ from vyos.vpp.interface import BridgeInterface from vyos.vpp.utils import iftunnel_transform -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get Bridge interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: Bridge interface configuration """ @@ -51,7 +50,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_ethernet.py b/src/conf_mode/vpp_interfaces_ethernet.py index d82acb891..f56cadc3e 100644 --- a/src/conf_mode/vpp_interfaces_ethernet.py +++ b/src/conf_mode/vpp_interfaces_ethernet.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,12 +24,11 @@ from vyos import ConfigError from vyos.vpp.config_verify import verify_vpp_remove_xconnect_interface -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get Ethernet interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: Ethernet interface configuration """ @@ -68,7 +67,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get global 'vpp interfaces xconnect' diff --git a/src/conf_mode/vpp_interfaces_geneve.py b/src/conf_mode/vpp_interfaces_geneve.py index a40cc9c84..a7e7ae8e5 100644 --- a/src/conf_mode/vpp_interfaces_geneve.py +++ b/src/conf_mode/vpp_interfaces_geneve.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ from vyos.vpp.config_verify import ( from vyos.vpp.utils import cli_ifaces_lcp_kernel_list -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get Geneve interface configuration Args: @@ -62,7 +62,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_gre.py b/src/conf_mode/vpp_interfaces_gre.py index b27234d18..f86d59087 100644 --- a/src/conf_mode/vpp_interfaces_gre.py +++ b/src/conf_mode/vpp_interfaces_gre.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,12 +36,11 @@ from vyos.vpp.config_verify import ( from vyos.vpp.utils import cli_ifaces_lcp_kernel_list -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get GRE interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: GRE interface configuration """ @@ -62,7 +61,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_ipip.py b/src/conf_mode/vpp_interfaces_ipip.py index e0f1258d0..6de34e794 100644 --- a/src/conf_mode/vpp_interfaces_ipip.py +++ b/src/conf_mode/vpp_interfaces_ipip.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,12 +35,11 @@ from vyos.vpp.config_verify import ( from vyos.vpp.utils import cli_ifaces_lcp_kernel_list -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get IPIP interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: IPIP interface configuration """ @@ -61,7 +60,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_loopback.py b/src/conf_mode/vpp_interfaces_loopback.py index 67fd049f0..56a825ae6 100644 --- a/src/conf_mode/vpp_interfaces_loopback.py +++ b/src/conf_mode/vpp_interfaces_loopback.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -34,12 +34,11 @@ from vyos.vpp.config_verify import ( from vyos.vpp.utils import cli_ifaces_lcp_kernel_list -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get Loopback interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: Loopback interface configuration """ @@ -60,7 +59,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_vxlan.py b/src/conf_mode/vpp_interfaces_vxlan.py index 5c957c7fa..a8a918805 100644 --- a/src/conf_mode/vpp_interfaces_vxlan.py +++ b/src/conf_mode/vpp_interfaces_vxlan.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,12 +37,11 @@ from vyos.vpp.config_verify import ( from vyos.vpp.utils import cli_ifaces_lcp_kernel_list -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get VXLAN interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: VXLAN interface configuration """ @@ -63,7 +62,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete diff --git a/src/conf_mode/vpp_interfaces_xconnect.py b/src/conf_mode/vpp_interfaces_xconnect.py index dd1348b7c..3659c6479 100644 --- a/src/conf_mode/vpp_interfaces_xconnect.py +++ b/src/conf_mode/vpp_interfaces_xconnect.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2023 VyOS Inc. +# Copyright (C) 2023-2025 VyOS Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,12 +25,11 @@ from vyos.vpp.interface import XconnectInterface from vyos.vpp.utils import cli_ifaces_list -def get_config(config=None, recursive_defaults=True) -> dict: +def get_config(config=None) -> dict: """Get Xconnect interface configuration Args: config (vyos.config.Config, optional): The VyOS configuration dictionary - recursive_defaults (bool, optional): Include recursive defaults Returns: dict: Bridge interface configuration """ @@ -51,7 +50,7 @@ def get_config(config=None, recursive_defaults=True) -> dict: get_first_key=True, no_tag_node_value_mangle=True, with_defaults=True, - with_recursive_defaults=recursive_defaults, + with_recursive_defaults=True, ) # Get effective config as we need full dicitonary per interface delete |
