diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-07-23 16:03:36 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-07-31 21:06:38 +0900 |
commit | 0e4c83d4e41c61e07354026a54426eb7aee8d3a8 (patch) | |
tree | 55d747c2d5b91712911c78081bb6bf1361c04af4 | |
parent | 620852451adcd1b19a46206a13c5e116669077b6 (diff) |
of13 OFPMatch: remove now unused code
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_3_parser.py | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py index 03a10443..b2189ddc 100644 --- a/ryu/ofproto/ofproto_v1_3_parser.py +++ b/ryu/ofproto/ofproto_v1_3_parser.py @@ -349,35 +349,11 @@ class FlowWildcards(object): class OFPMatch(StringifyMixin): - def __init__(self, fields=[], type_=None, _normalize=False, **kwargs): + def __init__(self, _normalize=False, **kwargs): super(OFPMatch, self).__init__() self._wc = FlowWildcards() self._flow = Flow() self.fields = [] - # accept type_ and length to be compatible with parser - if not type_ is None: - self.type = type_ - if fields: - # we are doing de-stringify. - # we have two goals: - # - the resulted object should be serialize()-able. - # - the resulted object should be inspectable by applications. - # ie. fields[] should be filled. - # mimic appropriate set_foo calls and the first half of serialize. - import sys - this_module = sys.modules[__name__] - for o in fields: - assert len(o) == 1 - for k, v in o.iteritems(): - cls = getattr(this_module, k) - mask = v.get("mask", None) - header = OFPMatchField.cls_to_header(cls, not mask is None) - value = v["value"] - value = self._decode_value(value) - if not mask is None: - mask = self._decode_value(mask) - f = cls(header, value, mask) - self.fields.append(f) # eg. # OFPMatch(eth_src=('ff:ff:ff:00:00:00'), eth_type=0x800, |