@validate(name=ROUTER_ID)
def validate_router_id(router_id):
    if not router_id:
        raise MissingRequiredConf(conf_name=ROUTER_ID)

    if not isinstance(router_id, str):
        raise ConfigTypeError(conf_name=ROUTER_ID)
    if not is_valid_ipv4(router_id):
        raise ConfigValueError(desc='Invalid router id %s' % router_id)

    return router_id
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/rtconf/common.py/validate_router_id/original