summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-21 13:43:02 +0100
committerGitHub <noreply@github.com>2023-02-21 13:43:02 +0100
commitb16d8769e2cf1bfd565b5ad9e3850b3d30b5fed1 (patch)
tree737ac1032de31e9dec0b799d43f00437587fe4a5 /src
parent75c741d5d4fcd9fd07077601106532c41ad9b118 (diff)
parent679efe8ac7998ba1b8f3c7c4bfc7508d8869907d (diff)
downloadvyos-1x-b16d8769e2cf1bfd565b5ad9e3850b3d30b5fed1.tar.gz
vyos-1x-b16d8769e2cf1bfd565b5ad9e3850b3d30b5fed1.zip
Merge pull request #1837 from sever-sever/T4978
T4978: Default values of port rewrite default container values
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/container.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 08861053d..90e5f84f2 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2021-2022 VyOS maintainers and contributors
+# Copyright (C) 2021-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
@@ -84,16 +84,16 @@ def get_config(config=None):
# tagNodes in place, it is better to blend in the defaults manually.
if 'port' in container['name'][name]:
for port in container['name'][name]['port']:
- default_values = defaults(base + ['name', 'port'])
+ default_values_port = defaults(base + ['name', 'port'])
container['name'][name]['port'][port] = dict_merge(
- default_values, container['name'][name]['port'][port])
+ default_values_port, container['name'][name]['port'][port])
# XXX: T2665: we can not safely rely on the defaults() when there are
# tagNodes in place, it is better to blend in the defaults manually.
if 'volume' in container['name'][name]:
for volume in container['name'][name]['volume']:
- default_values = defaults(base + ['name', 'volume'])
+ default_values_volume = defaults(base + ['name', 'volume'])
container['name'][name]['volume'][volume] = dict_merge(
- default_values, container['name'][name]['volume'][volume])
+ default_values_volume, container['name'][name]['volume'][volume])
# Delete container network, delete containers
tmp = node_changed(conf, base + ['network'])