Cleaned up the code
This commit is contained in:
parent
2de83b80d9
commit
6cbc0dc0d0
@ -394,4 +394,3 @@ class Database(object):
|
||||
self.vm_migrations.insert().execute(
|
||||
vm_id=self.select_vm_id(vm),
|
||||
host_id=self.select_host_id(hostname))
|
||||
|
||||
|
@ -71,7 +71,6 @@ from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import bottle
|
||||
import json
|
||||
from hashlib import sha1
|
||||
import novaclient
|
||||
from novaclient.v1_1 import client
|
||||
|
@ -103,7 +103,6 @@ local manager performs the following steps:
|
||||
from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import itertools
|
||||
import requests
|
||||
from hashlib import sha1
|
||||
import time
|
||||
@ -244,7 +243,6 @@ def execute(config, state):
|
||||
if 'underload_detection' not in state:
|
||||
underload_detection_params = common.parse_parameters(
|
||||
config['algorithm_underload_detection_parameters'])
|
||||
underload_detection_state = None
|
||||
underload_detection = common.call_function_by_name(
|
||||
config['algorithm_underload_detection_factory'],
|
||||
[time_step,
|
||||
@ -255,7 +253,6 @@ def execute(config, state):
|
||||
|
||||
overload_detection_params = common.parse_parameters(
|
||||
config['algorithm_overload_detection_parameters'])
|
||||
overload_detection_state = None
|
||||
overload_detection = common.call_function_by_name(
|
||||
config['algorithm_overload_detection_factory'],
|
||||
[time_step,
|
||||
@ -266,7 +263,6 @@ def execute(config, state):
|
||||
|
||||
vm_selection_params = common.parse_parameters(
|
||||
config['algorithm_vm_selection_parameters'])
|
||||
vm_selection_state = None
|
||||
vm_selection = common.call_function_by_name(
|
||||
config['algorithm_vm_selection_factory'],
|
||||
[time_step,
|
||||
@ -446,7 +442,7 @@ def vm_mhz_to_percentage(vm_mhz_history, host_mhz_history, physical_cpu_mhz):
|
||||
:type host_mhz_history: list(int)
|
||||
|
||||
:param physical_cpu_mhz: The total frequency of the physical CPU in MHz.
|
||||
:type physical_cpu_mhz: int
|
||||
:type physical_cpu_mhz: int,>0
|
||||
|
||||
:return: The history of the host's CPU utilization in percentages.
|
||||
:rtype: list(float)
|
||||
|
Loading…
x
Reference in New Issue
Block a user