Conditions | 2 |
Total Lines | 16 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | """ |
||
10 | 1 | def process_packet_in(event): |
|
11 | """ |
||
12 | |||
13 | Args: |
||
14 | event |
||
15 | Return: |
||
16 | ethernet: frame |
||
17 | in_port: incoming port |
||
18 | switch: incoming switch |
||
19 | """ |
||
20 | 1 | of_version = event.content['message'].header.version |
|
21 | 1 | if of_version.value == 4: |
|
22 | 1 | return openflow13.packet_in(event, event.content['message']) |
|
23 | |||
24 | 1 | log.error("Invalid OpenFlow version") |
|
25 | 1 | return 0, 0, 0 |
|
26 | |||
46 |