Lots of modifications surrounding the OSAPI to remove any mention of dealing with power states and exclusively using vm_states and task_state modules. Currently there are still a number of tests failing, but this is a stopping place for today.

This commit is contained in:
Brian Lamar
2011-08-19 18:34:34 -04:00
parent 5efd71624d
commit 1d480dcb3f

View File

@@ -23,6 +23,8 @@ import time
from nova import db
from nova import utils
from nova.compute import task_state
from nova.compute import vm_states
def stub_out_db_instance_api(stubs):
@@ -64,7 +66,8 @@ def stub_out_db_instance_api(stubs):
'image_ref': values['image_ref'],
'kernel_id': values['kernel_id'],
'ramdisk_id': values['ramdisk_id'],
'state_description': 'scheduling',
'vm_state': vm_states.BUILD,
'task_state': task_state.SCHEDULE,
'user_id': values['user_id'],
'project_id': values['project_id'],
'launch_time': time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()),