| Conditions | 1 |
| Total Lines | 17 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Port Status message tests.""" |
||
| 20 | def _new_portstatus(): |
||
| 21 | """Crate new PortStatus and Port instances.""" |
||
| 22 | desc_name = 's1-eth1' |
||
| 23 | desc = Port(port_no=1, |
||
| 24 | hw_addr=HWAddress('62:43:e5:db:35:0a'), |
||
| 25 | name=desc_name, |
||
| 26 | config=0, |
||
| 27 | state=PortState.OFPPS_LIVE, |
||
| 28 | curr=PortFeatures.OFPPF_10GB_FD | PortFeatures.OFPPF_COPPER, |
||
| 29 | advertised=0, |
||
| 30 | supported=0, |
||
| 31 | peer=0, |
||
| 32 | curr_speed=10000000, |
||
| 33 | max_speed=0) |
||
| 34 | return PortStatus(xid=0, |
||
| 35 | reason=PortReason.OFPPR_MODIFY, |
||
| 36 | desc=desc) |
||
| 37 |