Fix spell check in group feature message Maintain name consistency in meter type in Meter Features message in OF 1.3 Add length field in group statistics reply in OF 1.2

Signed-off-by: Sriram Natarajan <natarajan.sriram@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Sriram Natarajan 2014-09-21 17:15:00 -07:00 committed by FUJITA Tomonori
parent 2674a272f2
commit 97c9e79743
3 changed files with 7 additions and 6 deletions

View File

@ -158,7 +158,7 @@ from ryu.ofproto import inet
#
# request body format:
# {"meter_id": <int>,
# "bands":[{"action": "<DROP or REMARK>",
# "bands":[{"action": "<DROP or DSCP_REMARK>",
# "flag": "<KBPS or PKTPS or BURST or STATS"
# "burst_size": <int>,
# "rate": <int>,

View File

@ -664,7 +664,8 @@ def get_group_stats(dp, waiters):
c = {'packet_count': bucket_counter.packet_count,
'byte_count': bucket_counter.byte_count}
bucket_counters.append(c)
g = {'group_id': stats.group_id,
g = {'length': stats.length,
'group_id': stats.group_id,
'ref_count': stats.ref_count,
'packet_count': stats.packet_count,
'byte_count': stats.byte_count,
@ -684,7 +685,7 @@ def get_group_features(dp, waiters):
cap_convert = {ofp.OFPGFC_SELECT_WEIGHT: 'SELECT_WEIGHT',
ofp.OFPGFC_SELECT_LIVENESS: 'SELECT_LIVENESS',
ofp.OFPGFC_CHAINING: 'CHAINING',
ofp.OFPGFC_CHAINING_CHECKS: 'CHAINING_CHCEKS'}
ofp.OFPGFC_CHAINING_CHECKS: 'CHAINING_CHECKS'}
act_convert = {ofp.OFPAT_OUTPUT: 'OUTPUT',
ofp.OFPAT_COPY_TTL_OUT: 'COPY_TTL_OUT',
ofp.OFPAT_COPY_TTL_IN: 'COPY_TTL_IN',

View File

@ -747,7 +747,7 @@ def get_meter_config(dp, waiters):
dp.ofproto.OFPMF_STATS: 'STATS'}
band_type = {dp.ofproto.OFPMBT_DROP: 'DROP',
dp.ofproto.OFPMBT_DSCP_REMARK: 'REMARK',
dp.ofproto.OFPMBT_DSCP_REMARK: 'DSCP_REMARK',
dp.ofproto.OFPMBT_EXPERIMENTER: 'EXPERIMENTER'}
stats = dp.ofproto_parser.OFPMeterConfigStatsRequest(
@ -817,7 +817,7 @@ def get_group_features(dp, waiters):
cap_convert = {ofp.OFPGFC_SELECT_WEIGHT: 'SELECT_WEIGHT',
ofp.OFPGFC_SELECT_LIVENESS: 'SELECT_LIVENESS',
ofp.OFPGFC_CHAINING: 'CHAINING',
ofp.OFPGFC_CHAINING_CHECKS: 'CHAINING_CHCEKS'}
ofp.OFPGFC_CHAINING_CHECKS: 'CHAINING_CHECKS'}
act_convert = {ofp.OFPAT_OUTPUT: 'OUTPUT',
ofp.OFPAT_COPY_TTL_OUT: 'COPY_TTL_OUT',
ofp.OFPAT_COPY_TTL_IN: 'COPY_TTL_IN',
@ -976,7 +976,7 @@ def mod_meter_entry(dp, flow, cmd):
if band_type == 'DROP':
bands.append(
dp.ofproto_parser.OFPMeterBandDrop(rate, burst_size))
elif band_type == 'REMARK':
elif band_type == 'DSCP_REMARK':
prec_level = int(band.get('prec_level', 0))
bands.append(
dp.ofproto_parser.OFPMeterBandDscpRemark(