Merge "Scheduler of decision_engine fix"

This commit is contained in:
Jenkins
2016-08-18 15:44:05 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ class NovaClusterDataModelCollector(base.BaseClusterDataModelCollector):
instance = element.Instance() instance = element.Instance()
instance.uuid = v.id instance.uuid = v.id
# nova/nova/compute/instance_states.py # nova/nova/compute/instance_states.py
instance.state = getattr(v, 'OS-EXT-STS:instance_state') instance.state = getattr(v, 'OS-EXT-STS:vm_state')
# set capacity # set capacity
self.wrapper.get_flavor_instance(v, flavor_cache) self.wrapper.get_flavor_instance(v, flavor_cache)

View File

@@ -47,7 +47,7 @@ class TestNovaClusterDataModelCollector(base.TestCase):
) )
fake_instance = mock.Mock( fake_instance = mock.Mock(
id='ef500f7e-dac8-470f-960c-169486fce71b', id='ef500f7e-dac8-470f-960c-169486fce71b',
state=mock.Mock(**{'OS-EXT-STS:instance_state': 'VM_STATE'}), state=mock.Mock(**{'OS-EXT-STS:vm_state': 'VM_STATE'}),
flavor={'ram': 333, 'disk': 222, 'vcpus': 4}, flavor={'ram': 333, 'disk': 222, 'vcpus': 4},
) )
m_nova_helper.get_compute_node_list.return_value = [fake_compute_node] m_nova_helper.get_compute_node_list.return_value = [fake_compute_node]