Remove duplicated definitions
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
ebb69c8dad
commit
4d9819c4a3
@ -193,7 +193,6 @@ REST_SWITCHID = 'switch_id'
|
||||
REST_COMMAND_RESULT = 'command_result'
|
||||
REST_PRIORITY = 'priority'
|
||||
REST_VLANID = 'vlan_id'
|
||||
REST_DL_VLAN = 'dl_vlan'
|
||||
REST_PORT_NAME = 'port_name'
|
||||
REST_QUEUE_TYPE = 'type'
|
||||
REST_QUEUE_MAX_RATE = 'max_rate'
|
||||
|
@ -52,8 +52,8 @@ ERROR = 'error'
|
||||
WARNING = 'warning'
|
||||
|
||||
# error-info
|
||||
# bad-element and ok-element are defined above
|
||||
BAD_ATTRIBUTE = 'bad-attribute'
|
||||
# bad-attribute, bad-element and ok-element are defined above
|
||||
# BAD_ATTRIBUTE = 'bad-attribute'
|
||||
# BAD_ELEMENT = 'bad-element'
|
||||
# OK_ELEMENT = 'ok-element'
|
||||
ERR_ELEMENT = 'err-element'
|
||||
|
@ -259,10 +259,6 @@ class ClsRule(object):
|
||||
self.wc.wildcards &= ~FWW_IPV6_LABEL
|
||||
self.flow.ipv6_label = label
|
||||
|
||||
def set_ipv6_label(self, label):
|
||||
self.wc.wildcards &= ~FWW_IPV6_LABEL
|
||||
self.flow.ipv6_label = label
|
||||
|
||||
def set_ipv6_src_masked(self, src, mask):
|
||||
self.wc.ipv6_src_mask = mask
|
||||
self.flow.ipv6_src = [x & y for (x, y) in zip(src, mask)]
|
||||
|
@ -197,9 +197,6 @@ OFP_ACTION_OUTPUT_PACK_STR = '!HHHH'
|
||||
OFP_ACTION_OUTPUT_SIZE = 8
|
||||
assert calcsize(OFP_ACTION_OUTPUT_PACK_STR) == OFP_ACTION_OUTPUT_SIZE
|
||||
|
||||
# define constants
|
||||
OFP_VLAN_NONE = 0xffff
|
||||
|
||||
OFP_ACTION_VLAN_VID_PACK_STR = '!HHH2x'
|
||||
OFP_ACTION_VLAN_VID_SIZE = 8
|
||||
assert calcsize(OFP_ACTION_VLAN_VID_PACK_STR) == OFP_ACTION_VLAN_VID_SIZE
|
||||
|
@ -3205,12 +3205,6 @@ class OFPActionPopPbb(OFPAction):
|
||||
ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
|
||||
return cls()
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
(type_, len_) = struct.unpack_from(
|
||||
ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
|
||||
return cls()
|
||||
|
||||
|
||||
@OFPAction.register_action_type(
|
||||
ofproto.OFPAT_EXPERIMENTER,
|
||||
|
@ -4114,18 +4114,6 @@ class OFPTableStats(ofproto_parser.namedtuple('OFPTableStats', (
|
||||
return stats
|
||||
|
||||
|
||||
class OFPTableStats(ofproto_parser.namedtuple('OFPTableStats', (
|
||||
'table_id', 'active_count', 'lookup_count',
|
||||
'matched_count'))):
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
tbl = struct.unpack_from(ofproto.OFP_TABLE_STATS_PACK_STR,
|
||||
buf, offset)
|
||||
stats = cls(*tbl)
|
||||
stats.length = ofproto.OFP_TABLE_STATS_SIZE
|
||||
return stats
|
||||
|
||||
|
||||
@_set_stats_type(ofproto.OFPMP_TABLE, OFPTableStats)
|
||||
@_set_msg_type(ofproto.OFPT_MULTIPART_REQUEST)
|
||||
class OFPTableStatsRequest(OFPMultipartRequest):
|
||||
@ -5444,12 +5432,6 @@ class OFPActionPopPbb(OFPAction):
|
||||
ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
|
||||
return cls()
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
(type_, len_) = struct.unpack_from(
|
||||
ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
|
||||
return cls()
|
||||
|
||||
|
||||
@OFPAction.register_action_type(
|
||||
ofproto.OFPAT_EXPERIMENTER,
|
||||
|
@ -4255,18 +4255,6 @@ class OFPTableStats(ofproto_parser.namedtuple('OFPTableStats', (
|
||||
return stats
|
||||
|
||||
|
||||
class OFPTableStats(ofproto_parser.namedtuple('OFPTableStats', (
|
||||
'table_id', 'active_count', 'lookup_count',
|
||||
'matched_count'))):
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
tbl = struct.unpack_from(ofproto.OFP_TABLE_STATS_PACK_STR,
|
||||
buf, offset)
|
||||
stats = cls(*tbl)
|
||||
stats.length = ofproto.OFP_TABLE_STATS_SIZE
|
||||
return stats
|
||||
|
||||
|
||||
@_set_stats_type(ofproto.OFPMP_TABLE_STATS, OFPTableStats)
|
||||
@_set_msg_type(ofproto.OFPT_MULTIPART_REQUEST)
|
||||
class OFPTableStatsRequest(OFPMultipartRequest):
|
||||
@ -5554,12 +5542,6 @@ class OFPActionPopPbb(OFPAction):
|
||||
ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
|
||||
return cls()
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
(type_, len_) = struct.unpack_from(
|
||||
ofproto.OFP_ACTION_HEADER_PACK_STR, buf, offset)
|
||||
return cls()
|
||||
|
||||
|
||||
@OFPAction.register_action_type(ofproto.OFPAT_METER,
|
||||
ofproto.OFP_ACTION_METER_SIZE)
|
||||
|
@ -115,14 +115,6 @@ class RunTest(tester.TestFlowBase):
|
||||
action = dp.ofproto_parser.OFPActionOutput(out_port)
|
||||
self.add_action(dp, [action, ])
|
||||
|
||||
def test_rule_set_in_port(self, dp):
|
||||
in_port = 32
|
||||
self._verify = ['in_port', in_port]
|
||||
|
||||
rule = nx_match.ClsRule()
|
||||
rule.set_in_port(in_port)
|
||||
self.add_rule(dp, rule)
|
||||
|
||||
def test_action_vlan_vid(self, dp):
|
||||
vlan_vid = 2
|
||||
self._verify = [dp.ofproto.OFPAT_SET_VLAN_VID,
|
||||
|
Loading…
Reference in New Issue
Block a user