V2T migration: fix FWaaS migration
The source firewall groups should be read before the policies, as reading the groups may create all default fwaas rules & policies & groups. Change-Id: I3a6da42013c68aede0b8b664af8e4cd6b3445d82
This commit is contained in:
parent
04fdc69b55
commit
a33cbc269a
|
@ -839,24 +839,26 @@ class ApiReplayClient(utils.PrepareObjectForMigration):
|
||||||
def migrate_fwaas(self):
|
def migrate_fwaas(self):
|
||||||
"""Migrates FWaaS V2 objects from source to dest neutron."""
|
"""Migrates FWaaS V2 objects from source to dest neutron."""
|
||||||
try:
|
try:
|
||||||
source_rules = self.source_neutron.\
|
# Reading existing source resources. Note that the firewall groups
|
||||||
list_fwaas_firewall_rules()['firewall_rules']
|
# should be read first, to make sure default objects were created.
|
||||||
source_polices = self.source_neutron.\
|
|
||||||
list_fwaas_firewall_policies()['firewall_policies']
|
|
||||||
source_groups = self.source_neutron.\
|
source_groups = self.source_neutron.\
|
||||||
list_fwaas_firewall_groups()['firewall_groups']
|
list_fwaas_firewall_groups()['firewall_groups']
|
||||||
|
source_polices = self.source_neutron.\
|
||||||
|
list_fwaas_firewall_policies()['firewall_policies']
|
||||||
|
source_rules = self.source_neutron.\
|
||||||
|
list_fwaas_firewall_rules()['firewall_rules']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# FWaaS might be disabled in the source
|
# FWaaS might be disabled in the source
|
||||||
LOG.info("FWaaS V2 was not found on the source server: %s", e)
|
LOG.info("FWaaS V2 was not found on the source server: %s", e)
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
dest_rules = self.dest_neutron.\
|
|
||||||
list_fwaas_firewall_rules()['firewall_rules']
|
|
||||||
dest_polices = self.dest_neutron.\
|
|
||||||
list_fwaas_firewall_policies()['firewall_policies']
|
|
||||||
dest_groups = self.dest_neutron.\
|
dest_groups = self.dest_neutron.\
|
||||||
list_fwaas_firewall_groups()['firewall_groups']
|
list_fwaas_firewall_groups()['firewall_groups']
|
||||||
|
dest_polices = self.dest_neutron.\
|
||||||
|
list_fwaas_firewall_policies()['firewall_policies']
|
||||||
|
dest_rules = self.dest_neutron.\
|
||||||
|
list_fwaas_firewall_rules()['firewall_rules']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# FWaaS might be disabled in the destination
|
# FWaaS might be disabled in the destination
|
||||||
LOG.warning("Skipping FWaaS V2 migration. FWaaS V2 was not found "
|
LOG.warning("Skipping FWaaS V2 migration. FWaaS V2 was not found "
|
||||||
|
|
Loading…
Reference in New Issue