from collections import deque
from six import moves
-
+from vpp_mac import mactobinary
from hook import Hook
from vpp_l2 import L2_PORT_TYPE
"""
self.hook.before_cli(cli)
cli += '\n'
- r = self.papi.cli_inband(length=len(cli), cmd=cli)
+ r = self.papi.cli_inband(cmd=cli)
self.hook.after_cli(cli)
if hasattr(r, 'reply'):
- return r.reply.decode().rstrip('\x00')
+ return r.reply
def ppcli(self, cli):
""" Helper method to print CLI command in case of info logging level.
return cli + "\n" + str(self.cli(cli))
def _convert_mac(self, mac):
- return mac.replace(':', '').decode('hex')
+ return mactobinary(mac)
def show_version(self):
""" """
:param is_static: (Default value = 0)
:param is_no_adj_fib: (Default value = 0)
"""
-
return self.api(
self.papi.ip_neighbor_add_del,
{'sw_if_index': sw_if_index,
def vxlan_gbp_tunnel_dump(self, sw_if_index=0xffffffff):
return self.api(self.papi.vxlan_gbp_tunnel_dump,
- {'sw_if_index': sw_if_index})
+ {'sw_if_index': sw_if_index,
+ '_no_type_conversion': True})
def pppoe_add_del_session(
self,
def gbp_endpoint_dump(self):
""" GBP endpoint Dump """
- return self.api(self.papi.gbp_endpoint_dump, {})
+ return self.api(self.papi.gbp_endpoint_dump,
+ {'_no_type_conversion': True})
def gbp_endpoint_group_add(self, epg, bd,
rd, uplink_sw_if_index):
def gbp_subnet_dump(self):
""" GBP Subnet Dump """
- return self.api(self.papi.gbp_subnet_dump, {})
+ return self.api(self.papi.gbp_subnet_dump,
+ {'_no_type_conversion': True})
def gbp_contract_add_del(self, is_add, src_epg, dst_epg, acl_index, rules):
""" GBP contract Add/Del """