Remove unused code in prepare_ports_for_replace()

At the beginning, when we prepare ports for
server replacement, we store 'fixed_ips' of
server ports before update them to []. But
update 'fixed_ips' is incorrect, we just have to
detach the ports from server. we fixed it already,
but seems the code was not cleaned.

Change-Id: If925e5bf03385922ec1784ae56ec7faff7c68b21
This commit is contained in:
huangtianhua 2017-02-24 15:39:03 +08:00
parent 990f484962
commit e26f094853
1 changed files with 0 additions and 9 deletions

View File

@ -463,15 +463,6 @@ class ServerNetworkMixin(object):
if not self.is_using_neutron():
return
data = {'external_ports': [],
'internal_ports': []}
port_data = list(itertools.chain(
[('internal_ports', port) for port in self._data_get_ports()],
[('external_ports', port)
for port in self._data_get_ports('external_ports')]))
for port_type, port in port_data:
data[port_type].append({'id': port['id']})
self.detach_ports(self)
def restore_ports_after_rollback(self, convergence):