patch_src = port_name
patch_dst = self._cu.get_port_peer(port_meta)
patch_peers[patch_src + ":" + patch_dst] = self.PEER_FOUND
-
+
if patch_dst + ":" + patch_src in patch_peers:
continue
if self._cu.get_port_vlan_master_if(port_meta) != self._cu.PORT_VLAN_UNSPECIFIED:
master_if = self._cu.get_port_vlan_master_if(
port_meta)
- if self._u.d_push(re.match(r'^eth\d+$', master_if)) \
+ if self._cu._port_to_br.has_key(master_if):
+ self._cu._port_to_br[port_name] = br_src
+ port_src = port_name
+ port_src_meta = port_meta
+ port_dst = master_if
+ port_dst_obj = self._cu.get_port(master_if)
+ br_dst = self._cu._port_to_br[master_if]
+ br_dst_obj = self._cu.get_device(br_dst)
+ self._cu.add_linkpair(
+ Device(br_src, Device.BR_TYPE, br_src_meta),
+ br_dst_obj,
+ Port(port_src, Port.DEFAULT_TYPE, port_src_meta),
+ port_dst_obj,
+ self._formatter.VLAN_DIST_FORMAT)
+
+ elif self._u.d_push(re.match(r'^eth\d+$', master_if)) \
or self._u.d_push(re.match(r'^em\d+$', master_if)) \
or self._u.d_push(re.match(r'^igb\d+$', master_if)) \
or self._u.d_push(re.match(r'^bond\d+$', master_if)):