Ejemplo n.º 1
0
def get_parameters(kwarg):
    # if no limit specified, set it to zero to make
    # the next call happy
    kwarg['limit'] = kwarg.get('limit', 0)
    tbfp = get_rate_parameters(kwarg)
    # create an alias -- while TBF uses 'buffer', rate
    # policy uses 'burst'
    tbfp['burst'] = tbfp['buffer']
    # action resolver
    tbfp['action'] = actions[kwarg.get('action', 'reclassify')]
    return {'attrs': [['TCA_POLICE_TBF', tbfp], ['TCA_POLICE_RATE', True]]}
Ejemplo n.º 2
0
def get_parameters(kwarg):
    # if no limit specified, set it to zero to make
    # the next call happy
    kwarg['limit'] = kwarg.get('limit', 0)
    tbfp = get_rate_parameters(kwarg)
    # create an alias -- while TBF uses 'buffer', rate
    # policy uses 'burst'
    tbfp['burst'] = tbfp['buffer']
    # action resolver
    tbfp['action'] = actions[kwarg.get('action', 'reclassify')]
    return {'attrs': [['TCA_POLICE_TBF', tbfp],
                      ['TCA_POLICE_RATE', True]]}
Ejemplo n.º 3
0
def get_parameters(kwarg):
    parms = get_rate_parameters(kwarg)
    # fill parameters
    return {'attrs': [['TCA_TBF_PARMS', parms],
                      ['TCA_TBF_RTAB', True]]}
Ejemplo n.º 4
0
def get_parameters(kwarg):
    parms = get_rate_parameters(kwarg)
    # fill parameters
    return {'attrs': [['TCA_TBF_PARMS', parms], ['TCA_TBF_RTAB', True]]}