@@ -190,7 +190,7 @@ def get_supported_vif_types(self):
190190 vif_types = set ()
191191 for ch in self .sb_ovn .chassis_list ().execute (check_error = True ):
192192 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 , '' )
194194 if dp_type == ovn_const .CHASSIS_DATAPATH_NETDEV :
195195 vif_types .add (portbindings .VIF_TYPE_VHOST_USER )
196196 else :
@@ -989,7 +989,7 @@ def bind_port(self, context):
989989 return
990990 chassis = agent .chassis
991991 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 , '' )
993993 iface_types = other_config .get ('iface-types' , '' )
994994 iface_types = iface_types .split (',' ) if iface_types else []
995995 chassis_physnets = self .sb_ovn ._get_chassis_physnets (chassis )
@@ -1036,13 +1036,25 @@ def bind_port(self, context):
10361036 vif_type = portbindings .VIF_TYPE_VHOST_USER
10371037 port [portbindings .VIF_DETAILS ].update ({
10381038 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 ])
10401040 vif_details [portbindings .VHOST_USER_SOCKET ] = (
10411041 vhost_user_socket )
10421042 else :
10431043 vif_type = portbindings .VIF_TYPE_OVS
1044- vif_details = self .vif_details [vif_type ]
1044+ vif_details = copy . deepcopy ( self .vif_details [vif_type ])
10451045
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+ })
10461058 context .set_binding (segment_to_bind [api .ID ], vif_type ,
10471059 vif_details )
10481060 break
0 commit comments