Revision 84a0469b snf-cyclades-app/synnefo/logic/reconciliation.py
b/snf-cyclades-app/synnefo/logic/reconciliation.py | ||
---|---|---|
515 | 515 |
for bend in self.backends: |
516 | 516 |
bnet = get_backend_network(network, bend) |
517 | 517 |
gnet = self.ganeti_networks[bend].get(network.id) |
518 |
if not bnet: |
|
519 |
if network.floating_ip_pool: |
|
520 |
# Network is a floating IP pool and does not exist in |
|
521 |
# backend. We need to create it |
|
522 |
bnet = self.reconcile_parted_network(network, bend) |
|
523 |
elif not gnet: |
|
524 |
# Network does not exist either in Ganeti nor in BD. |
|
525 |
continue |
|
526 |
else: |
|
527 |
# Network exists in Ganeti and not in DB. |
|
528 |
if network.action != "DESTROY" and not network.public: |
|
529 |
bnet = self.reconcile_parted_network(network, bend) |
|
530 |
else: |
|
531 |
continue |
|
518 |
if bnet is None and gnet is not None: |
|
519 |
# Network exists in backend but not in DB for this backend |
|
520 |
bnet = self.reconcile_parted_network(network, bend) |
|
521 |
|
|
522 |
if bnet is None: |
|
523 |
continue |
|
532 | 524 |
|
533 |
if not gnet:
|
|
525 |
if gnet is None:
|
|
534 | 526 |
# Network does not exist in Ganeti. If the network action |
535 | 527 |
# is DESTROY, we have to mark as deleted in DB, else we |
536 | 528 |
# have to create it in Ganeti. |
Also available in: Unified diff