def build_routes(iface, **settings):
    '''
    Add route scripts for a network interface using up commands.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.build_routes eth0 <settings>
    '''

    iface = iface.lower()
    opts = _parse_routes(iface, settings)
    try:
        template = JINJA.get_template('route_eth.jinja')
    except jinja2.exceptions.TemplateNotFound:
        log.error('Could not load template route_eth.jinja')
        return ''

    add_routecfg = template.render(route_type='add',
                                   routes=opts['routes'],
                                   iface=iface)

    del_routecfg = template.render(route_type='del',
                                   routes=opts['routes'],
                                   iface=iface)

    if settings in 'test' and settings['test']:
        return _read_temp(add_routecfg + del_routecfg)

    filename = _write_file_routes(iface,
                                  add_routecfg,
                                  _DEB_NETWORK_UP_DIR,
                                  'route-{0}')
    results = _read_file(filename)

    filename = _write_file_routes(iface,
                                  del_routecfg,
                                  _DEB_NETWORK_DOWN_DIR,
                                  'route-{0}')
    results += _read_file(filename)

    return results
dataset/ETHPy150Open saltstack/salt/salt/modules/debian_ip.py/build_routes/swapped operands of `in`