def ri_find_wrapper(switch_instance, vlan=None, ip_address=None, bandwith=100, mtu=1500, vrf=0):
"""Wrapper of "find" function for RouteInterface table.
Notes:
This is temporary function.
Args:
switch_instance(object): Switch instance
vlan(str): Vlan on which route interface is implemented.
ip_address(str): IP address of route interface.
mtu(int): MTU of route interface.
bandwith(int): Bandwith of route interface
vrf(int): Virtual route Id
Returns:
row
Examples::
_ri_find_wrapper(env.switch[1], vlan=10, ip_address="10.0.10.1/24", mtu=100, bandwith=1500, vrf=0)
"""
try:
result = switch_instance.nb.RouteInterface.find(vlan, ip_address, bandwith, mtu, vrf)
except XMLRPCFault:
result = switch_instance.nb.RouteInterface.find(ip_address)
return result
评论列表
文章目录