diff options
author | Simon Horman <horms@verge.net.au> | 2014-03-19 15:37:39 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-03-21 20:43:05 +0900 |
commit | 5ba92e9ad28c3129aa0885ae5676c67765f91f76 (patch) | |
tree | 61c0f4de266dfe2d20066095a989b5018126e57b /.travis.yml | |
parent | e04d1697e0f16551bd3f6f9ad4089273a0fd386b (diff) |
Allow messages inside messages
Bundle Add Message and Request Forward Message, which is part of OpenFlow
1.4, encapsulates an OpenFlow message in side an OpenFlow message.
This patch prepares for this by adding a MsgInMsgBase class, a subclass of
MsgBase which allows its subclasses to include subclasses of either
MsgInMsgBase or MsgBase when when parsing classes from JSON: The MsgBase
class does not allow this.
This change has three parts:
* Remove the assertion in
ofproto_parser.py:StringifyMixin::cls_from_jsondict_key()
that cls is not a subclass of MsgBase.
* Pass **additional_args to various stringify.py:StringifyMixin decoder
methods to make the datapath available when instantiating
MsgBase subclasses.
* Override _decode_value() in MsgInMsgBase to pass **additional_args
to decoder. The method in the parent class, StringifyMixin,
does not pass **additional_args.
The effect is to pass a datapath argument if
the class is a subclass of MsgInMsgBase but not if the
class is a direct subclass of MsgBase.
By only making messages which allow messages inside them
subclasses of MsgInMsgBase this allows the datapath
argument to be passed to the decoder if and only if needed.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions