diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2025-05-27 14:27:50 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2025-05-28 14:48:07 +0300 |
| commit | 31beaf550786502f5b62034c6e4b2e0e52508f8c (patch) | |
| tree | 02a72bd361dfc92d25f15d3e8f8e92d6aa367e5f /src/conf_mode/vpp_interfaces_loopback.py | |
| parent | 151afffe15ce89755f3c3f81a9d2c647e487f647 (diff) | |
| download | vyos-1x-31beaf550786502f5b62034c6e4b2e0e52508f8c.tar.gz vyos-1x-31beaf550786502f5b62034c6e4b2e0e52508f8c.zip | |
T7488: Make VPP restartable
Diffstat (limited to 'src/conf_mode/vpp_interfaces_loopback.py')
| -rw-r--r-- | src/conf_mode/vpp_interfaces_loopback.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conf_mode/vpp_interfaces_loopback.py b/src/conf_mode/vpp_interfaces_loopback.py index 2b37b5e1c..92ba110f1 100644 --- a/src/conf_mode/vpp_interfaces_loopback.py +++ b/src/conf_mode/vpp_interfaces_loopback.py @@ -62,6 +62,10 @@ def get_config(config=None) -> dict: with_recursive_defaults=True, ) + if not conf.exists(['vpp']): + config['remove_vpp'] = True + return config + # Get effective config as we need full dicitonary per interface delete effective_config = conf.get_config_dict( base + [ifname], @@ -114,6 +118,10 @@ def get_config(config=None) -> dict: def verify(config): + # No need to verify anything if vpp is removed + if 'remove_vpp' in config: + return None + verify_vpp_remove_kernel_interface(config) if 'remove' in config: @@ -128,6 +136,9 @@ def generate(config): def apply(config): + if 'remove_vpp' in config: + return None + ifname = config.get('ifname') # Delete interface if 'effective' in config: |
