this will be used for OFPMatch from_jsondict implementation. as json has no notion of tuples, we will use a list instead.
Signed-off-by: YAMAMOTO Takashi <[email protected]> --- ryu/ofproto/oxm_fields.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ryu/ofproto/oxm_fields.py b/ryu/ofproto/oxm_fields.py index f317da0..47bb146 100644 --- a/ryu/ofproto/oxm_fields.py +++ b/ryu/ofproto/oxm_fields.py @@ -135,7 +135,9 @@ def from_user(name_to_field, name, user_value): num = int(name.split('_')[1]) else: raise KeyError('unknown match field ' + name) - if isinstance(user_value, tuple): + # the 'list' case below is a bit hack; json.dumps silently maps + # python tuples into json lists. + if isinstance(user_value, (tuple, list)): (value, mask) = user_value else: value = user_value -- 1.8.1.5 ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
