Browse Source

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
changes/24/437824/3
huangtianhua 6 years ago
parent
commit
e26f094853
  1. 9
      heat/engine/resources/openstack/nova/server_network_mixin.py

9
heat/engine/resources/openstack/nova/server_network_mixin.py

@ -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):

Loading…
Cancel
Save