Revision 7c37ab19 snf-tools/synnefo_tools/burnin/cyclades_common.py

b/snf-tools/synnefo_tools/burnin/cyclades_common.py
150 150
    def _delete_servers(self, servers, error=False):
151 151
        """Deleting a number of servers in parallel"""
152 152
        # Disconnect floating IPs
153
        for srv in servers:
154
            self.info("Disconnecting all floating IPs from server with id %s",
155
                      srv['id'])
156
            self._disconnect_from_network(srv)
153
        if not error:
154
            # If there is the possibility for the machine to be in
155
            # ERROR state we cannot delete its ports.
156
            for srv in servers:
157
                self.info(
158
                    "Disconnecting all floating IPs from server with id %s",
159
                    srv['id'])
160
                self._disconnect_from_network(srv)
157 161

  
158 162
        # Delete servers
159 163
        for srv in servers:

Also available in: Unified diff