Revision 220e3cc0 snf-cyclades-gtools/synnefo/ganeti/eventd.py
b/snf-cyclades-gtools/synnefo/ganeti/eventd.py | ||
---|---|---|
111 | 111 |
""" |
112 | 112 |
try: |
113 | 113 |
client = cli.GetClient() |
114 |
fields = ["nic.networks.names", "nic.ips", "nic.macs", "nic.modes",
|
|
115 |
"nic.links", "tags"] |
|
114 |
fields = ["nic.names", "nic.networks.names", "nic.ips", "nic.macs",
|
|
115 |
"nic.modes", "nic.links", "tags"]
|
|
116 | 116 |
info = client.QueryInstances([instance], fields, use_locking=False) |
117 |
networks, ips, macs, modes, links, tags = info[0] |
|
118 |
nic_keys = ["network", "ip", "mac", "mode", "link"] |
|
119 |
nics = zip(networks, ips, macs, modes, links) |
|
117 |
names, networks, ips, macs, modes, links, tags = info[0]
|
|
118 |
nic_keys = ["name", "network", "ip", "mac", "mode", "link"]
|
|
119 |
nics = zip(names, networks, ips, macs, modes, links)
|
|
120 | 120 |
nics = map(lambda x: dict(zip(nic_keys, x)), nics) |
121 | 121 |
except ganeti_errors.OpPrereqError: |
122 | 122 |
# Not running on master! Load the conf file |
Also available in: Unified diff