From 868af9410ce45b525902f8c8aa5a476a1d6e54db Mon Sep 17 00:00:00 2001 From: Anton Beloglazov Date: Tue, 2 Oct 2012 15:49:50 +1000 Subject: [PATCH] Minor fixes --- neat/globals/manager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/neat/globals/manager.py b/neat/globals/manager.py index a5a85f6..d935799 100644 --- a/neat/globals/manager.py +++ b/neat/globals/manager.py @@ -177,8 +177,9 @@ def get_params(request): params = dict(request.forms) if 'reason' in params: params['reason'] = int(params['reason']) - if 'vms_uuids' in params: - params['vms_uuids'] = str(params['vms_uuids']).split(',') + if 'vm_uuids' in params: + params['vm_uuids'] = params['vm_uuids'].split(',') + print params return params @@ -273,7 +274,7 @@ def execute_underload(config, state, host): :rtype: dict(str: *) """ underloaded_host = host - hosts_cpu_total, hosts_ram_total = db.select_host_characteristics() + hosts_cpu_total, hosts_ram_total = state['db'].select_host_characteristics() hosts_to_vms = vms_by_hosts(state['nova'], config['compute_hosts']) vms_last_cpu = state['db'].select_last_cpu_mhz_for_vms() @@ -458,7 +459,7 @@ def execute_overload(config, state, vm_uuids): :return: The updated state dictionary. :rtype: dict(str: *) """ - hosts_cpu_total, hosts_ram_total = db.select_host_characteristics() + hosts_cpu_total, hosts_ram_total = state['db'].select_host_characteristics() hosts_to_vms = vms_by_hosts(state['nova'], config['compute_hosts']) vms_last_cpu = state['db'].select_last_cpu_mhz_for_vms()