@@ -190,7 +190,7 @@ def get_supported_vif_types(self):
190
190
vif_types = set ()
191
191
for ch in self .sb_ovn .chassis_list ().execute (check_error = True ):
192
192
other_config = ovn_utils .get_ovn_chassis_other_config (ch )
193
- dp_type = other_config .get ('datapath-type' , '' )
193
+ dp_type = other_config .get (ovn_const . OVN_DATAPATH_TYPE , '' )
194
194
if dp_type == ovn_const .CHASSIS_DATAPATH_NETDEV :
195
195
vif_types .add (portbindings .VIF_TYPE_VHOST_USER )
196
196
else :
@@ -989,7 +989,7 @@ def bind_port(self, context):
989
989
return
990
990
chassis = agent .chassis
991
991
other_config = ovn_utils .get_ovn_chassis_other_config (chassis )
992
- datapath_type = other_config .get ('datapath-type' , '' )
992
+ datapath_type = other_config .get (ovn_const . OVN_DATAPATH_TYPE , '' )
993
993
iface_types = other_config .get ('iface-types' , '' )
994
994
iface_types = iface_types .split (',' ) if iface_types else []
995
995
chassis_physnets = self .sb_ovn ._get_chassis_physnets (chassis )
@@ -1036,13 +1036,25 @@ def bind_port(self, context):
1036
1036
vif_type = portbindings .VIF_TYPE_VHOST_USER
1037
1037
port [portbindings .VIF_DETAILS ].update ({
1038
1038
portbindings .VHOST_USER_SOCKET : vhost_user_socket })
1039
- vif_details = dict (self .vif_details [vif_type ])
1039
+ vif_details = copy . deepcopy (self .vif_details [vif_type ])
1040
1040
vif_details [portbindings .VHOST_USER_SOCKET ] = (
1041
1041
vhost_user_socket )
1042
1042
else :
1043
1043
vif_type = portbindings .VIF_TYPE_OVS
1044
- vif_details = self .vif_details [vif_type ]
1044
+ vif_details = copy . deepcopy ( self .vif_details [vif_type ])
1045
1045
1046
+ if self .agent_chassis_table == 'Chassis_Private' :
1047
+ chassis_to_retrieve = agent .chassis_private
1048
+ else :
1049
+ chassis_to_retrieve = agent .chassis
1050
+ ovn_bridge = ovn_utils .get_ovn_bridge_from_chassis (
1051
+ chassis_to_retrieve )
1052
+
1053
+ dp_type = ovn_utils .get_datapath_type (bind_host , self .sb_ovn )
1054
+ vif_details .update ({
1055
+ portbindings .VIF_DETAILS_BRIDGE_NAME : ovn_bridge ,
1056
+ portbindings .OVS_DATAPATH_TYPE : dp_type ,
1057
+ })
1046
1058
context .set_binding (segment_to_bind [api .ID ], vif_type ,
1047
1059
vif_details )
1048
1060
break
0 commit comments