- learn_int = 1 if learn else 0
-
- cmd1 = 'bridge_domain_add_del'
- args1 = dict(bd_id=int(bd_id),
- flood=1,
- uu_flood=1,
- forward=1,
- learn=learn_int,
- arp_term=0,
- is_add=1)
-
- cmd2 = 'sw_interface_set_l2_bridge'
- args2 = dict(rx_sw_if_index=sw_if_index1,
- bd_id=int(bd_id),
- shg=0,
- port_type=0,
- enable=1)
-
- args3 = dict(rx_sw_if_index=sw_if_index2,
- bd_id=int(bd_id),
- shg=0,
- port_type=0,
- enable=1)
-
- err_msg = 'Failed to add L2 bridge domain with 2 interfaces on host' \
- ' {host}'.format(host=node['host'])
+
+ cmd1 = u"bridge_domain_add_del"
+ args1 = dict(
+ bd_id=int(bd_id),
+ flood=True,
+ uu_flood=True,
+ forward=True,
+ learn=learn,
+ arp_term=False,
+ is_add=True
+ )
+
+ cmd2 = u"sw_interface_set_l2_bridge"
+ args2 = dict(
+ rx_sw_if_index=sw_if_index1,
+ bd_id=int(bd_id),
+ shg=0,
+ port_type=0,
+ enable=True
+ )
+
+ args3 = dict(
+ rx_sw_if_index=sw_if_index2,
+ bd_id=int(bd_id),
+ shg=0,
+ port_type=0,
+ enable=True
+ )
+
+ err_msg = f"Failed to add L2 bridge domain with 2 interfaces " \
+ f"on host {node[u'host']}"