Revision d0545590 snf-cyclades-gtools/synnefo/ganeti/eventd.py
b/snf-cyclades-gtools/synnefo/ganeti/eventd.py | ||
---|---|---|
138 | 138 |
if len(t) != 4: |
139 | 139 |
logger.error("Malformed synefo tag %s", tag) |
140 | 140 |
continue |
141 |
try: |
|
142 |
index = int(t[2]) |
|
143 |
nics[index]['firewall'] = t[3] |
|
144 |
except ValueError: |
|
145 |
logger.error("Malformed synnefo tag %s", tag) |
|
146 |
except IndexError: |
|
147 |
logger.error("Found tag %s for non-existent NIC %d", |
|
148 |
tag, index) |
|
141 |
nic_name = t[2] |
|
142 |
firewall = t[3] |
|
143 |
[nic.setdefault("firewall", firewall) |
|
144 |
for nic in nics if nic["name"] == nic_name] |
|
149 | 145 |
return nics |
150 | 146 |
|
151 | 147 |
|
Also available in: Unified diff