Merge "Use "replace" to remove a section of a string" into stable/ussuri

This commit is contained in:
Zuul 2020-08-06 17:30:33 +00:00 committed by Gerrit Code Review
commit f3b9a882e4
2 changed files with 2 additions and 2 deletions

View File

@ -615,7 +615,7 @@ class DBInconsistenciesPeriodics(SchemaAwarePeriodicsBase):
admin_context = n_context.get_admin_context()
cmds = []
for ls in self._nb_idl.ls_list().execute(check_error=True):
network_id = ls.name.strip('neutron-')
network_id = ls.name.replace('neutron-', '')
legacy_name = utils.ovn_provnet_port_name(network_id)
legacy_port = None
segment_id = None

View File

@ -566,7 +566,7 @@ class OVNClient(object):
ovn_network_name = ovn_port.external_ids.get(
ovn_const.OVN_NETWORK_NAME_EXT_ID_KEY)
network_id = ovn_network_name.strip('neutron-')
network_id = ovn_network_name.replace('neutron-', '')
with self._nb_idl.transaction(check_error=True) as txn:
txn.add(self._nb_idl.delete_lswitch_port(