summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-30 14:16:41 +0200
committerGitHub <noreply@github.com>2024-05-30 14:16:41 +0200
commit8facd624f778742426563916ffb362a1271b33c1 (patch)
tree03d564503a2d83ef3f3eea6c7a4aad834ff5ea5d /src/conf_mode
parent8d501631109534b541e20db8ef51a8a3cbd691d4 (diff)
parent11a45cfda5e4d6473a8b6792aaf6eeb5021f2af3 (diff)
downloadvyos-1x-8facd624f778742426563916ffb362a1271b33c1.tar.gz
vyos-1x-8facd624f778742426563916ffb362a1271b33c1.zip
Merge pull request #3554 from vyos/mergify/bp/sagitta/pr-3547
container: T6406: fix NameError: name 'vyos' is not defined (backport #3547)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/container.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index ca09dff9f..3efeb9b40 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -29,6 +29,7 @@ from vyos.configdict import node_changed
from vyos.configdict import is_node_changed
from vyos.configverify import verify_vrf
from vyos.ifconfig import Interface
+from vyos.cpu import get_core_count
from vyos.utils.file import write_file
from vyos.utils.process import call
from vyos.utils.process import cmd
@@ -129,7 +130,7 @@ def verify(container):
f'to the system! Container "{name}" will not be started!')
if 'cpu_quota' in container_config:
- cores = vyos.cpu.get_core_count()
+ cores = get_core_count()
if Decimal(container_config['cpu_quota']) > cores:
raise ConfigError(f'Cannot set limit to more cores than available "{name}"!')