From dd33b89941e447ea3dc9738c10aeb95a81c26dea Mon Sep 17 00:00:00 2001 From: llnu Date: Sun, 8 Dec 2019 13:31:56 +0100 Subject: [PATCH] [scheduler] helper.py refactored from env_vars to config --- ucloud/scheduler/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucloud/scheduler/helper.py b/ucloud/scheduler/helper.py index ba577d6..1754045 100755 --- a/ucloud/scheduler/helper.py +++ b/ucloud/scheduler/helper.py @@ -6,7 +6,7 @@ import bitmath from ucloud.common.host import HostStatus from ucloud.common.request import RequestEntry, RequestType from ucloud.common.vm import VMStatus -from ucloud.config import vm_pool, host_pool, request_pool, env_vars +from ucloud.config import vm_pool, host_pool, request_pool, config def accumulated_specs(vms_specs): @@ -106,7 +106,7 @@ def assign_host(vm): r = RequestEntry.from_scratch(type=RequestType.StartVM, uuid=vm.uuid, hostname=vm.hostname, - request_prefix=env_vars.get("REQUEST_PREFIX")) + request_prefix=config['etcd']['REQUEST_PREFIX']) request_pool.put(r) vm.log.append("VM scheduled for starting")