Commit 80512ca6 by Őry Máté

vm: fix coding error

parent 5c42499f
...@@ -364,11 +364,11 @@ class Node(OperatedMixin, TimeStampedModel): ...@@ -364,11 +364,11 @@ class Node(OperatedMixin, TimeStampedModel):
self.instance_set.get(id=i['id']).vm_state_changed(d) self.instance_set.get(id=i['id']).vm_state_changed(d)
del domains[i['id']] del domains[i['id']]
for i in domains.values(): for id, state in domains.iteritems():
from .instance import Instance from .instance import Instance
logger.info('Node %s update: domain %s in libvirt but not in db.', logger.error('Node %s update: domain %s in libvirt but not in db.',
self, i['id']) self, id)
Instance.objects.get(id=i['id']).vm_state_changed(i['state'], self) Instance.objects.get(id=id).vm_state_changed(state, self)
@classmethod @classmethod
def get_state_count(cls, online, enabled): def get_state_count(cls, online, enabled):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment