state API fix
authorpeusterm <manuel.peuster@uni-paderborn.de>
Fri, 13 May 2016 12:40:02 +0000 (14:40 +0200)
committerpeusterm <manuel.peuster@uni-paderborn.de>
Fri, 13 May 2016 12:40:02 +0000 (14:40 +0200)
src/emuvim/cli/compute.py

index dcb499d..0b3f38d 100755 (executable)
@@ -57,9 +57,9 @@ class ZeroRpcClient(object):
                 eth0ip = None
                 eth0status = "down"
                 if len(status.get("network")) > 0:
-                    eth0ip = status.get("network")[0][1]
+                    eth0ip = status.get("network")[0].get("ip")
                     eth0status = "up" if status.get(
-                        "network")[0][3] else "down"
+                        "network")[0].get("up") else "down"
                 table.append([status.get("datacenter"),
                               name,
                               status.get("image"),