From 219c68ab3590d369f9367fd8182986ea09062444 Mon Sep 17 00:00:00 2001 From: Anton Beloglazov Date: Tue, 2 Oct 2012 11:49:10 +1000 Subject: [PATCH] Added initialization of empty algorithm states --- neat/globals/manager.py | 1 + neat/locals/manager.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/neat/globals/manager.py b/neat/globals/manager.py index 02f5738..cb54feb 100644 --- a/neat/globals/manager.py +++ b/neat/globals/manager.py @@ -295,6 +295,7 @@ def execute_underload(config, state, host): migration_time, vm_placement_params) state['vm_placement'] = vm_placement + state['vm_placement_state'] = {} else: vm_placement = state['vm_placement'] vm_placement_state = state['vm_placement_state'] diff --git a/neat/locals/manager.py b/neat/locals/manager.py index 6482634..a80eca4 100644 --- a/neat/locals/manager.py +++ b/neat/locals/manager.py @@ -227,6 +227,7 @@ def execute(config, state): migration_time, underload_detection_params]) state['underload_detection'] = underload_detection + state['underload_detection_state'] = {} overload_detection_params = common.parse_parameters( config['algorithm_overload_detection_parameters']) @@ -237,6 +238,7 @@ def execute(config, state): migration_time, overload_detection_params]) state['overload_detection'] = overload_detection + state['overload_detection_state'] = {} vm_selection_params = common.parse_parameters( config['algorithm_vm_selection_parameters']) @@ -247,6 +249,7 @@ def execute(config, state): migration_time, vm_selection_params]) state['vm_selection'] = vm_selection + state['vm_selection_state'] = {} else: underload_detection = state['underload_detection'] underload_detection_state = state['underload_detection_state']