| Total Complexity | 1 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """Test PortMod message.""" |
||
| 2 | from pyof.v0x01.common.phy_port import PortConfig, PortFeatures |
||
| 3 | from pyof.v0x01.controller2switch.port_mod import PortMod |
||
| 4 | from tests.unit.test_struct import TestStruct |
||
| 5 | |||
| 6 | |||
| 7 | class TestPortMod(TestStruct): |
||
| 8 | """Test class for PortMod.""" |
||
| 9 | |||
| 10 | @classmethod |
||
| 11 | def setUpClass(cls): |
||
| 12 | """[Controller2Switch/PortMod] - size 32.""" |
||
| 13 | super().setUpClass() |
||
| 14 | super().set_raw_dump_file('v0x01', 'ofpt_port_mod') |
||
| 15 | super().set_raw_dump_object(PortMod, xid=3, port_no=80, |
||
| 16 | hw_addr='aa:bb:cc:00:33:9f', |
||
| 17 | config=PortConfig.OFPPC_PORT_DOWN, |
||
| 18 | mask=PortConfig.OFPPC_NO_FWD, |
||
| 19 | advertise=PortFeatures.OFPPF_FIBER) |
||
| 20 | super().set_minimum_size(32) |
||
| 21 |