mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-12 08:06:49 +02:00
ofproto: Fix invalid error code OFPQCFC_EPERM -> OFPSCFC_EPERM (EXT-208)
Invalid error code OFPQCFC_EPERM should be OFPSCFC_EPERM instead. This is EXT-208 that was included in Openflow v1.3.1. OFPSCFC_EPERM is backported to ofproto_v1_2 so that any new or updated application could consistently use OFPSCFC_EPERM to handle all protocol versions. OFPQCFC_EPERM is left in ofproto_v1_2 and ofproto_v1_3 definitions for backward compatibility. Signed-off-by: Shu Shen <shu.shen@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
2889711e46
commit
4de8c7425e
@ -738,7 +738,13 @@ OFPQOFC_EPERM = 2 # Permissions error.
|
||||
# enum ofp_switch_config_failed_code
|
||||
OFPSCFC_BAD_FLAGS = 0 # Specified flags is invalid.
|
||||
OFPSCFC_BAD_LEN = 1 # Specified len is invalid.
|
||||
OFPQCFC_EPERM = 2 # Permissions error.
|
||||
OFPQCFC_EPERM = 2 # Permissions error (depracated).
|
||||
# New or updated Ryu applications shall use
|
||||
# OFPSCFC_EPERM. The variable name is a typo of
|
||||
# in specifications before v1.3.1 (EXT-208).
|
||||
OFPSCFC_EPERM = 2 # Permissions error.
|
||||
# Ported back to ofproto_v1_2 for consistency with
|
||||
# later OF specs (EXT-208).
|
||||
|
||||
# enum ofp_role_request_failed_code
|
||||
OFPRRFC_STALE = 0 # Stale Message: old generation_id.
|
||||
|
||||
@ -1021,7 +1021,11 @@ OFPQOFC_EPERM = 2 # Permissions error.
|
||||
# enum ofp_switch_config_failed_code
|
||||
OFPSCFC_BAD_FLAGS = 0 # Specified flags is invalid.
|
||||
OFPSCFC_BAD_LEN = 1 # Specified len is invalid.
|
||||
OFPQCFC_EPERM = 2 # Permissions error.
|
||||
OFPQCFC_EPERM = 2 # Permissions error (depracated).
|
||||
# New or updated Ryu applications shall use
|
||||
# OFPSCFC_EPERM. The variable name is a typo of
|
||||
# in specifications before v1.3.1 (EXT-208).
|
||||
OFPSCFC_EPERM = 2 # Permissions error.
|
||||
|
||||
# enum ofp_role_request_failed_code
|
||||
OFPRRFC_STALE = 0 # Stale Message: old generation_id.
|
||||
|
||||
@ -850,7 +850,7 @@ OFPQOFC_EPERM = 2 # Permissions error.
|
||||
# enum ofp_switch_config_failed_code
|
||||
OFPSCFC_BAD_FLAGS = 0 # Specified flags is invalid.
|
||||
OFPSCFC_BAD_LEN = 1 # Specified len is invalid.
|
||||
OFPQCFC_EPERM = 2 # Permissions error.
|
||||
OFPSCFC_EPERM = 2 # Permissions error.
|
||||
|
||||
# enum ofp_role_request_failed_code
|
||||
OFPRRFC_STALE = 0 # Stale Message: old generation_id.
|
||||
|
||||
@ -630,7 +630,7 @@ class TestOfprot12(unittest.TestCase):
|
||||
def test_enum_ofp_switch_config_failed_code(self):
|
||||
eq_(OFPSCFC_BAD_FLAGS, 0)
|
||||
eq_(OFPSCFC_BAD_LEN, 1)
|
||||
eq_(OFPQCFC_EPERM, 2)
|
||||
eq_(OFPSCFC_EPERM, 2)
|
||||
|
||||
def test_enum_ofp_role_request_failed_code(self):
|
||||
eq_(OFPRRFC_STALE, 0)
|
||||
|
||||
@ -742,7 +742,7 @@ class TestOFPErrorMsg(unittest.TestCase):
|
||||
|
||||
def test_parser_p10_2(self):
|
||||
type_ = ofproto.OFPET_SWITCH_CONFIG_FAILED
|
||||
code = ofproto.OFPQCFC_EPERM
|
||||
code = ofproto.OFPSCFC_EPERM
|
||||
data = 'Error Message.'
|
||||
self._test_parser(type_, code, data)
|
||||
|
||||
@ -1196,7 +1196,7 @@ class TestOFPErrorMsg(unittest.TestCase):
|
||||
|
||||
def test_serialize_p10_2(self):
|
||||
self._test_serialize_p(ofproto.OFPET_SWITCH_CONFIG_FAILED,
|
||||
ofproto.OFPQCFC_EPERM)
|
||||
ofproto.OFPSCFC_EPERM)
|
||||
|
||||
def test_serialize_p11_0(self):
|
||||
self._test_serialize_p(ofproto.OFPET_ROLE_REQUEST_FAILED,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user