Be consistent on state/status

Turns out libcloud needs it to be state, instead of status of the server
slice.  Should be set now
This commit is contained in:
Daniel Wallace 2014-05-17 18:08:22 -05:00
parent e02cc1da04
commit 0463781a71
2 changed files with 5 additions and 5 deletions

View File

@ -583,7 +583,7 @@ def create(vm_):
# Trigger a failure in the wait for IP function
return False
running = node['status'] == 'ACTIVE'
running = node['state'] == 'ACTIVE'
if not running:
# Still not running, trigger another iteration
return
@ -749,7 +749,7 @@ def list_nodes(call=None, **kwargs):
'id': server_tmp['id'],
'image': server_tmp['image']['id'],
'size': server_tmp['flavor']['id'],
'status': server_tmp['status'],
'state': server_tmp['state'],
'private_ips': [addrs['addr'] for addrs in server_tmp['addresses']['private']],
'public_ips': [server_tmp['accessIPv4'], server_tmp['accessIPv6']],
}

View File

@ -40,7 +40,7 @@ class NovaServer(object):
self.id = server['id']
self.image = server['image']['id']
self.size = server['flavor']['id']
self.status = server['status']
self.state = server['state']
self._uuid = None
self.extra = {
'metadata': server['metadata'],
@ -616,7 +616,7 @@ class SaltNova(object):
ret[item.name] = {
'id': item.id,
'name': item.name,
'status': item.status,
'state': item.status,
'accessIPv4': item.accessIPv4,
'accessIPv6': item.accessIPv6,
'flavor': {'id': item.flavor['id'],
@ -650,7 +650,7 @@ class SaltNova(object):
'links': item.links,
'metadata': item.metadata,
'name': item.name,
'status': item.status,
'state': item.status,
'tenant_id': item.tenant_id,
'updated': item.updated,
'user_id': item.user_id,