Revision cc92b70f snf-cyclades-app/synnefo/logic/reconciliation.py
b/snf-cyclades-app/synnefo/logic/reconciliation.py | ||
---|---|---|
178 | 178 |
id = utils.id_from_instance_name(i['name']) |
179 | 179 |
except Exception: |
180 | 180 |
log.error("Ignoring instance with malformed name %s", |
181 |
i['name'])
|
|
181 |
i['name']) |
|
182 | 182 |
continue |
183 | 183 |
|
184 | 184 |
if id in snf_instances: |
185 | 185 |
log.error("Ignoring instance with duplicate Synnefo id %s", |
186 |
i['name']) |
|
186 |
i['name'])
|
|
187 | 187 |
continue |
188 | 188 |
|
189 | 189 |
snf_instances[id] = i['oper_state'] |
... | ... | |
191 | 191 |
|
192 | 192 |
return snf_instances, snf_nics |
193 | 193 |
|
194 |
|
|
194 | 195 |
# |
195 | 196 |
# Nics |
196 | 197 |
# |
... | ... | |
208 | 209 |
id = utils.id_from_instance_name(i['name']) |
209 | 210 |
except Exception: |
210 | 211 |
log.error("Ignoring instance with malformed name %s", |
211 |
i['name'])
|
|
212 |
i['name']) |
|
212 | 213 |
continue |
213 | 214 |
if id in snf_instances_nics: |
214 | 215 |
log.error("Ignoring instance with duplicate Synnefo id %s", |
215 |
i['name']) |
|
216 |
i['name'])
|
|
216 | 217 |
continue |
217 | 218 |
|
218 | 219 |
snf_instances_nics[id] = get_nics_from_instance(i) |
... | ... | |
275 | 276 |
for index in nicsG.keys(): |
276 | 277 |
nicD = nicsD[index] |
277 | 278 |
nicG = nicsG[index] |
278 |
if nicD['ipv4'] != nicG['ipv4'] or \
|
|
279 |
nicD['mac'] != nicG['mac'] or \
|
|
280 |
nicD['network'] != nicG['network']:
|
|
281 |
unsynced[i] = (nicsD, nicsG) |
|
282 |
break |
|
279 |
if (nicD['ipv4'] != nicG['ipv4'] or
|
|
280 |
nicD['mac'] != nicG['mac'] or
|
|
281 |
nicD['network'] != nicG['network']):
|
|
282 |
unsynced[i] = (nicsD, nicsG)
|
|
283 |
break
|
|
283 | 284 |
|
284 | 285 |
return unsynced |
285 | 286 |
|
Also available in: Unified diff