diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-28 12:03:56 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-28 12:03:56 +0000 |
commit | 1e645f7a567178a0af444a08e87987eeaed557c5 (patch) | |
tree | 324b3045e6c43844115cc032b700d201a7784b3b /src/conf_mode/container.py | |
parent | 49d7ba83958a44b92d80da33cef25ff666a55d7b (diff) | |
download | vyos-1x-1e645f7a567178a0af444a08e87987eeaed557c5.tar.gz vyos-1x-1e645f7a567178a0af444a08e87987eeaed557c5.zip |
containers: T4473: Fix create container with not exist network
Fix for setting container without or wrong network decalaration
Diffstat (limited to 'src/conf_mode/container.py')
-rwxr-xr-x | src/conf_mode/container.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index 2110fd9e0..39fb94d93 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -132,7 +132,7 @@ def verify(container): # Check if the specified container network exists network_name = list(container_config['network'])[0] - if network_name not in container['network']: + if network_name not in container.get('network', {}): raise ConfigError(f'Container network "{network_name}" does not exist!') if 'address' in container_config['network'][network_name]: |