diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-30 13:43:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 13:43:59 +0200 |
commit | 138be55a8e85bcaee8adfb298363c8afd16075ca (patch) | |
tree | 0a34ffa260fae5c0975d128507ba4fa7a745a945 | |
parent | 1d49c9a1e1b89aa921b1ea79e43fe06ae3dfe6a0 (diff) | |
parent | 8439f8a43e93c0560f1abfc2aa60990f521b4d4d (diff) | |
download | vyos-1x-138be55a8e85bcaee8adfb298363c8afd16075ca.tar.gz vyos-1x-138be55a8e85bcaee8adfb298363c8afd16075ca.zip |
Merge pull request #3547 from c-po/container-fixes
container: T6406: fix NameError: name 'vyos' is not defined
-rwxr-xr-x | src/conf_mode/container.py | 3 |
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}"!') |