[OVN] Keep "connectivity" VIF details parameter in migration

During the OVS to OVN migration, the port bindings "vif_details"
dictionary should keep the "connectivity" key ("l2" in both mech
drivers).

Closes-Bug: #1947366
Change-Id: Ia9b02847db5c2e0e3da9386cc6cd68dcca55e439
(cherry picked from commit 569bafbbd5)
This commit is contained in:
Rodolfo Alonso Hernandez 2021-10-15 13:20:52 +00:00 committed by Jakub Libosvar
parent 5195de6f7d
commit a357dfaf11
2 changed files with 4 additions and 3 deletions

View File

@ -31,8 +31,7 @@ LOG = logging.getLogger(__name__)
VIF_DETAILS_TO_REMOVE = (
pb_api.OVS_HYBRID_PLUG,
pb_api.VIF_DETAILS_BRIDGE_NAME,
pb_api.VIF_DETAILS_CONNECTIVITY)
pb_api.VIF_DETAILS_BRIDGE_NAME)
def migrate_neutron_database_to_ovn(plugin):

View File

@ -144,13 +144,15 @@ class TestMigrateNeutronDatabaseToOvn(
{pb.CAP_PORT_FILTER: "true",
pb.OVS_HYBRID_PLUG: "true",
pb.VIF_DETAILS_BRIDGE_NAME: "foo",
pb.VIF_DETAILS_CONNECTIVITY: "l2"},
pb.VIF_DETAILS_CONNECTIVITY: pb.CONNECTIVITY_L2},
{pb.CAP_PORT_FILTER: "true",
pb.VIF_DETAILS_BRIDGE_NAME: "foo"},
{"foo": "bar"},
{},
]
expected_vif_details = [
{pb.CAP_PORT_FILTER: "true",
pb.VIF_DETAILS_CONNECTIVITY: pb.CONNECTIVITY_L2},
{pb.CAP_PORT_FILTER: "true"},
{"foo": "bar"},
{},