helpers.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:taf 作者: taf3 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号