pio 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +20 -18
  4. data/features/{packet_data/arp-storm.pcap → arp-storm.pcap} +0 -0
  5. data/features/arp.feature +1 -1
  6. data/features/{packet_data/arp.pcap → arp.pcap} +0 -0
  7. data/features/dhcp.feature +210 -3
  8. data/features/{packet_data/dhcp.pcap → dhcp.pcap} +0 -0
  9. data/features/icmp.feature +1 -1
  10. data/features/{packet_data/icmp.pcap → icmp.pcap} +0 -0
  11. data/features/{packet_data/lldp.detailed.pcap → lldp.detailed.pcap} +0 -0
  12. data/features/lldp.feature +5 -5
  13. data/features/{packet_data/lldp.minimal.pcap → lldp.minimal.pcap} +0 -0
  14. data/features/{packet_data → open_flow10}/aggregate_stats_reply.raw +0 -0
  15. data/features/{packet_data → open_flow10}/aggregate_stats_request.raw +0 -0
  16. data/features/{packet_data → open_flow10}/barrier_reply.raw +0 -0
  17. data/features/{packet_data → open_flow10}/barrier_request.raw +0 -0
  18. data/features/{packet_data → open_flow10}/desc_stats_reply.raw +0 -0
  19. data/features/{packet_data → open_flow10}/desc_stats_request.raw +0 -0
  20. data/features/open_flow10/echo_reply.feature +10 -10
  21. data/features/{packet_data → open_flow10}/echo_reply.raw +0 -0
  22. data/features/open_flow10/echo_request.feature +10 -10
  23. data/features/{packet_data → open_flow10}/echo_request.raw +0 -0
  24. data/features/{packet_data → open_flow10}/error.raw +0 -0
  25. data/features/open_flow10/exact_match.feature +33 -33
  26. data/features/open_flow10/features_reply.feature +71 -71
  27. data/features/{packet_data → open_flow10}/features_reply.raw +0 -0
  28. data/features/open_flow10/features_request.feature +9 -9
  29. data/features/{packet_data → open_flow10}/features_request.raw +0 -0
  30. data/features/open_flow10/flow_mod.feature +167 -167
  31. data/features/{packet_data → open_flow10}/flow_mod_add.raw +0 -0
  32. data/features/{packet_data → open_flow10}/flow_mod_delete.raw +0 -0
  33. data/features/{packet_data → open_flow10}/flow_mod_delete_strict.raw +0 -0
  34. data/features/{packet_data → open_flow10}/flow_mod_modify.raw +0 -0
  35. data/features/{packet_data → open_flow10}/flow_mod_modify_strict.raw +0 -0
  36. data/features/{packet_data → open_flow10}/flow_removed.raw +0 -0
  37. data/features/{packet_data → open_flow10}/flow_stats_reply.raw +0 -0
  38. data/features/{packet_data → open_flow10}/flow_stats_request.raw +0 -0
  39. data/features/{packet_data → open_flow10}/get_config_reply.raw +0 -0
  40. data/features/{packet_data → open_flow10}/get_config_request.raw +0 -0
  41. data/features/open_flow10/hello.feature +9 -9
  42. data/features/{packet_data → open_flow10}/hello.raw +0 -0
  43. data/features/open_flow10/packet_in.feature +4 -4
  44. data/features/{packet_data → open_flow10}/packet_in_arp_request.raw +0 -0
  45. data/features/{packet_data → open_flow10}/packet_in_cbench.raw +0 -0
  46. data/features/open_flow10/packet_out.feature +3 -3
  47. data/features/{packet_data → open_flow10}/packet_out.raw +0 -0
  48. data/features/{packet_data → open_flow10}/port_mod.raw +0 -0
  49. data/features/{packet_data → open_flow10}/port_stats_reply.raw +0 -0
  50. data/features/{packet_data → open_flow10}/port_stats_request.raw +0 -0
  51. data/features/open_flow10/port_status.feature +3 -3
  52. data/features/{packet_data → open_flow10}/port_status.raw +0 -0
  53. data/features/{packet_data → open_flow10}/queue_get_config_reply.raw +0 -0
  54. data/features/{packet_data → open_flow10}/queue_get_config_request.raw +0 -0
  55. data/features/{packet_data → open_flow10}/set_config.raw +0 -0
  56. data/features/{packet_data → open_flow10}/table_stats_reply.raw +0 -0
  57. data/features/{packet_data → open_flow10}/table_stats_request.raw +0 -0
  58. data/features/{packet_data → open_flow10}/vendor.raw +0 -0
  59. data/features/{packet_data → open_flow10}/vendor_stats_request.raw +0 -0
  60. data/features/open_flow13/echo_reply.feature +64 -61
  61. data/features/{packet_data/echo13_reply_body.raw → open_flow13/echo_reply_body.raw} +0 -0
  62. data/features/{packet_data/echo13_reply_no_body.raw → open_flow13/echo_reply_no_body.raw} +0 -0
  63. data/features/open_flow13/echo_request.feature +64 -61
  64. data/features/{packet_data/echo13_request_body.raw → open_flow13/echo_request_body.raw} +0 -0
  65. data/features/{packet_data/echo13_request_no_body.raw → open_flow13/echo_request_no_body.raw} +0 -0
  66. data/features/open_flow13/features_reply.feature +53 -0
  67. data/features/open_flow13/features_reply.raw +0 -0
  68. data/features/open_flow13/features_request.feature +89 -0
  69. data/features/open_flow13/features_request.raw +0 -0
  70. data/features/open_flow13/hello.feature +26 -23
  71. data/features/{packet_data/hello13_no_version_bitmap.raw → open_flow13/hello_no_version_bitmap.raw} +0 -0
  72. data/features/{packet_data/hello13_version_bitmap.raw → open_flow13/hello_version_bitmap.raw} +0 -0
  73. data/features/step_definitions/open_flow_steps.rb +3 -0
  74. data/features/step_definitions/packet_data_steps.rb +9 -9
  75. data/features/udp.feature +3 -3
  76. data/features/{packet_data/udp_no_payload.raw → udp_no_payload.raw} +0 -0
  77. data/features/{packet_data/udp_with_payload.raw → udp_with_payload.raw} +0 -0
  78. data/lib/pio.rb +1 -9
  79. data/lib/pio/open_flow/actions.rb +8 -8
  80. data/lib/pio/open_flow/open_flow_header.rb +10 -0
  81. data/lib/pio/open_flow10.rb +15 -0
  82. data/lib/pio/open_flow10/echo.rb +15 -0
  83. data/lib/pio/open_flow10/exact_match.rb +51 -0
  84. data/lib/pio/{features.rb → open_flow10/features.rb} +8 -7
  85. data/lib/pio/{flow_mod.rb → open_flow10/flow_mod.rb} +1 -1
  86. data/lib/pio/{hello.rb → open_flow10/hello.rb} +0 -0
  87. data/lib/pio/{match.rb → open_flow10/match.rb} +46 -43
  88. data/lib/pio/{packet_in.rb → open_flow10/packet_in.rb} +0 -0
  89. data/lib/pio/{packet_out.rb → open_flow10/packet_out.rb} +0 -0
  90. data/lib/pio/{port_status.rb → open_flow10/port_status.rb} +0 -0
  91. data/lib/pio/open_flow13.rb +12 -0
  92. data/lib/pio/{echo.rb → open_flow13/echo.rb} +9 -13
  93. data/lib/pio/open_flow13/features_reply.rb +91 -0
  94. data/lib/pio/open_flow13/features_request.rb +54 -0
  95. data/lib/pio/{hello13.rb → open_flow13/hello.rb} +4 -1
  96. data/lib/pio/{set_eth_addr.rb → set_ether_address.rb} +7 -7
  97. data/lib/pio/{set_ip_addr.rb → set_ip_address.rb} +7 -7
  98. data/lib/pio/set_ip_tos.rb +1 -1
  99. data/lib/pio/set_transport_port.rb +2 -2
  100. data/lib/pio/version.rb +1 -1
  101. data/pio.gemspec +2 -2
  102. data/spec/pio/flow_mod_spec.rb +45 -45
  103. data/spec/pio/match_spec.rb +122 -120
  104. data/spec/pio/{hello13_spec.rb → open_flow13/hello_spec.rb} +11 -11
  105. data/spec/pio/packet_out_spec.rb +19 -19
  106. data/spec/pio/set_ether_destination_address_spec.rb +28 -0
  107. data/spec/pio/set_ether_source_address_spec.rb +28 -0
  108. data/spec/pio/set_ip_destination_address_spec.rb +27 -0
  109. data/spec/pio/set_ip_source_address_spec.rb +25 -0
  110. data/spec/pio/set_transport_destination_port_spec.rb +44 -0
  111. data/spec/pio/set_transport_source_port_spec.rb +44 -0
  112. data/spec/pio/wildcards_spec.rb +23 -21
  113. metadata +179 -165
  114. data/bin/byebug +0 -16
  115. data/lib/pio/exact_match.rb +0 -51
  116. data/spec/pio/set_eth_dst_addr_spec.rb +0 -28
  117. data/spec/pio/set_eth_src_addr_spec.rb +0 -28
  118. data/spec/pio/set_ip_dst_addr_spec.rb +0 -25
  119. data/spec/pio/set_ip_src_addr_spec.rb +0 -25
  120. data/spec/pio/set_transport_dst_port_spec.rb +0 -42
  121. data/spec/pio/set_transport_src_port_spec.rb +0 -42
File without changes
@@ -1,36 +1,36 @@
1
- Feature: Exact Match
2
- Scenario: parse #1
3
- When I create an exact match from "packet_in_arp_request.raw"
1
+ Feature: Pio::ExactMatch
2
+ Scenario: new (from ARP request Packet In)
3
+ When I create an exact match from "open_flow10/packet_in_arp_request.raw"
4
4
  And the message have the following fields and values:
5
- | field | value |
6
- | wildcards | {} |
7
- | in_port | 1 |
8
- | dl_src | ac:5d:10:31:37:79 |
9
- | dl_dst | ff:ff:ff:ff:ff:ff |
10
- | dl_vlan | 65535 |
11
- | dl_vlan_pcp | 0 |
12
- | dl_type | 2054 |
13
- | nw_tos | 0 |
14
- | nw_proto | 1 |
15
- | nw_src | 192.168.2.254 |
16
- | nw_dst | 192.168.2.5 |
17
- | tp_src | 0 |
18
- | tp_dst | 0 |
5
+ | field | value |
6
+ | wildcards | {} |
7
+ | in_port | 1 |
8
+ | ether_source_address | ac:5d:10:31:37:79 |
9
+ | ether_destination_address | ff:ff:ff:ff:ff:ff |
10
+ | vlan_vid | 65535 |
11
+ | vlan_priority | 0 |
12
+ | ether_type | 2054 |
13
+ | ip_tos | 0 |
14
+ | ip_protocol | 1 |
15
+ | ip_source_address | 192.168.2.254 |
16
+ | ip_destination_address | 192.168.2.5 |
17
+ | transport_source_port | 0 |
18
+ | transport_destination_port | 0 |
19
19
 
20
- Scenario: parse #2
21
- When I create an exact match from "packet_in_cbench.raw"
20
+ Scenario: new (from Cbench Packet In)
21
+ When I create an exact match from "open_flow10/packet_in_cbench.raw"
22
22
  And the message have the following fields and values:
23
- | field | value |
24
- | wildcards | {} |
25
- | in_port | 1 |
26
- | dl_src | 00:00:00:00:00:01 |
27
- | dl_dst | 80:00:00:00:00:01 |
28
- | dl_vlan | 65535 |
29
- | dl_vlan_pcp | 0 |
30
- | dl_type | 2048 |
31
- | nw_tos | 0 |
32
- | nw_proto | 255 |
33
- | nw_src | 192.168.0.40 |
34
- | nw_dst | 192.168.1.40 |
35
- | tp_src | 31256 |
36
- | tp_dst | 22635 |
23
+ | field | value |
24
+ | wildcards | {} |
25
+ | in_port | 1 |
26
+ | ether_source_address | 00:00:00:00:00:01 |
27
+ | ether_destination_address | 80:00:00:00:00:01 |
28
+ | vlan_vid | 65535 |
29
+ | vlan_priority | 0 |
30
+ | ether_type | 2048 |
31
+ | ip_tos | 0 |
32
+ | ip_protocol | 255 |
33
+ | ip_source_address | 192.168.0.40 |
34
+ | ip_destination_address | 192.168.1.40 |
35
+ | transport_source_port | 31256 |
36
+ | transport_destination_port | 22635 |
@@ -1,5 +1,5 @@
1
- Feature: Features Reply
2
- Scenario: create
1
+ Feature: Pio::Features::Reply
2
+ Scenario: new
3
3
  When I try to create an OpenFlow message with:
4
4
  """
5
5
  Pio::Features::Reply.new(
@@ -9,8 +9,8 @@ Feature: Features Reply
9
9
  capabilities: [:flow_stats, :table_stats, :port_stats, :queue_stats,
10
10
  :arp_match_ip],
11
11
  actions: [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan,
12
- :set_dl_src, :set_dl_dst, :set_nw_src, :set_nw_dst,
13
- :set_nw_tos, :set_tp_src, :set_tp_dst, :enqueue],
12
+ :set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address,
13
+ :set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue],
14
14
  ports: [{ port_no: 1,
15
15
  hardware_address: '11:22:33:44:55:66',
16
16
  name: 'port123',
@@ -21,76 +21,76 @@ Feature: Features Reply
21
21
  """
22
22
  Then it should finish successfully
23
23
  And the message have the following fields and values:
24
- | field | value |
25
- | class | Pio::Features::Reply |
26
- | ofp_version | 1 |
27
- | message_type | 6 |
28
- | message_length | 80 |
29
- | transaction_id | 0 |
30
- | xid | 0 |
31
- | datapath_id | 291 |
32
- | dpid | 291 |
33
- | n_buffers | 256 |
34
- | n_tables | 254 |
35
- | capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
36
- | actions | [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan, :set_dl_src, :set_dl_dst, :set_nw_src, :set_nw_dst, :set_nw_tos, :set_tp_src, :set_tp_dst, :enqueue] |
37
- | ports.length | 1 |
38
- | ports.first.datapath_id | 291 |
39
- | ports.first.port_no | 1 |
40
- | ports.first.mac_address | 11:22:33:44:55:66 |
41
- | ports.first.hardware_address | 11:22:33:44:55:66 |
42
- | ports.first.name | port123 |
43
- | ports.first.config | [:port_down] |
44
- | ports.first.state | [:link_down] |
45
- | ports.first.curr | [:port_10gb_fd, :port_copper] |
46
- | ports.first.advertised | [] |
47
- | ports.first.supported | [] |
48
- | ports.first.peer | [] |
24
+ | field | value |
25
+ | class | Pio::Features::Reply |
26
+ | ofp_version | 1 |
27
+ | message_type | 6 |
28
+ | message_length | 80 |
29
+ | transaction_id | 0 |
30
+ | xid | 0 |
31
+ | datapath_id | 291 |
32
+ | dpid | 291 |
33
+ | n_buffers | 256 |
34
+ | n_tables | 254 |
35
+ | capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
36
+ | actions | [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan, :set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address, :set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue] |
37
+ | ports.length | 1 |
38
+ | ports.first.datapath_id | 291 |
39
+ | ports.first.port_no | 1 |
40
+ | ports.first.mac_address | 11:22:33:44:55:66 |
41
+ | ports.first.hardware_address | 11:22:33:44:55:66 |
42
+ | ports.first.name | port123 |
43
+ | ports.first.config | [:port_down] |
44
+ | ports.first.state | [:link_down] |
45
+ | ports.first.curr | [:port_10gb_fd, :port_copper] |
46
+ | ports.first.advertised | [] |
47
+ | ports.first.supported | [] |
48
+ | ports.first.peer | [] |
49
49
 
50
- Scenario: parse
51
- When I try to parse a file named "features_reply.raw" with "Features::Reply" class
50
+ Scenario: read
51
+ When I try to parse a file named "open_flow10/features_reply.raw" with "Features::Reply" class
52
52
  Then it should finish successfully
53
53
  And the message have the following fields and values:
54
- | field | value |
55
- | class | Pio::Features::Reply |
56
- | ofp_version | 1 |
57
- | message_type | 6 |
58
- | message_length | 176 |
59
- | transaction_id | 2 |
60
- | xid | 2 |
61
- | datapath_id | 1 |
62
- | dpid | 1 |
63
- | n_buffers | 256 |
64
- | n_tables | 1 |
65
- | capabilities | [:flow_stats, :table_stats, :port_stats, :arp_match_ip] |
66
- | actions | [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan, :set_dl_src, :set_dl_dst, :set_nw_src, :set_nw_dst, :set_nw_tos, :set_tp_src, :set_tp_dst, :enqueue] |
67
- | ports.length | 3 |
68
- | ports.first.datapath_id | 1 |
69
- | ports.first.port_no | 2 |
70
- | ports.first.mac_address | 16:7d:a4:37:ba:10 |
71
- | ports.first.hardware_address | 16:7d:a4:37:ba:10 |
72
- | ports.first.name | trema0-0 |
73
- | ports.first.config | [] |
74
- | ports.first.state | [] |
75
- | ports.first.curr | [:port_10gb_fd, :port_copper] |
76
- | ports.first.advertised | [] |
77
- | ports.first.supported | [] |
78
- | ports.first.peer | [] |
79
- | ports.last.port_no | 1 |
80
- | ports.last.number | 1 |
81
- | ports.last.mac_address | 62:94:3a:f6:40:db |
82
- | ports.last.hardware_address | 62:94:3a:f6:40:db |
83
- | ports.last.name | trema1-0 |
84
- | ports.last.config | [] |
85
- | ports.last.state | [] |
86
- | ports.last.curr | [:port_10gb_fd, :port_copper] |
87
- | ports.last.advertised | [] |
88
- | ports.last.supported | [] |
89
- | ports.last.peer | [] |
90
- | ports.last.up? | true |
91
- | ports.last.down? | false |
92
- | ports.last.local? | false |
54
+ | field | value |
55
+ | class | Pio::Features::Reply |
56
+ | ofp_version | 1 |
57
+ | message_type | 6 |
58
+ | message_length | 176 |
59
+ | transaction_id | 2 |
60
+ | xid | 2 |
61
+ | datapath_id | 1 |
62
+ | dpid | 1 |
63
+ | n_buffers | 256 |
64
+ | n_tables | 1 |
65
+ | capabilities | [:flow_stats, :table_stats, :port_stats, :arp_match_ip] |
66
+ | actions | [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan, :set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address, :set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue] |
67
+ | ports.length | 3 |
68
+ | ports.first.datapath_id | 1 |
69
+ | ports.first.port_no | 2 |
70
+ | ports.first.mac_address | 16:7d:a4:37:ba:10 |
71
+ | ports.first.hardware_address | 16:7d:a4:37:ba:10 |
72
+ | ports.first.name | trema0-0 |
73
+ | ports.first.config | [] |
74
+ | ports.first.state | [] |
75
+ | ports.first.curr | [:port_10gb_fd, :port_copper] |
76
+ | ports.first.advertised | [] |
77
+ | ports.first.supported | [] |
78
+ | ports.first.peer | [] |
79
+ | ports.last.port_no | 1 |
80
+ | ports.last.number | 1 |
81
+ | ports.last.mac_address | 62:94:3a:f6:40:db |
82
+ | ports.last.hardware_address | 62:94:3a:f6:40:db |
83
+ | ports.last.name | trema1-0 |
84
+ | ports.last.config | [] |
85
+ | ports.last.state | [] |
86
+ | ports.last.curr | [:port_10gb_fd, :port_copper] |
87
+ | ports.last.advertised | [] |
88
+ | ports.last.supported | [] |
89
+ | ports.last.peer | [] |
90
+ | ports.last.up? | true |
91
+ | ports.last.down? | false |
92
+ | ports.last.local? | false |
93
93
 
94
94
  Scenario: parse error
95
- When I try to parse a file named "echo_reply.raw" with "Pio::Features::Reply" class
95
+ When I try to parse a file named "open_flow10/echo_reply.raw" with "Pio::Features::Reply" class
96
96
  Then it should fail with "Pio::ParseError", "Invalid Features Reply message."
@@ -1,5 +1,5 @@
1
- Feature: Features Request
2
- Scenario: create
1
+ Feature: Pio::Features::Request
2
+ Scenario: new
3
3
  When I try to create an OpenFlow message with:
4
4
  """
5
5
  Pio::Features::Request.new
@@ -15,7 +15,7 @@ Feature: Features Request
15
15
  | xid | 0 |
16
16
  | user_data | |
17
17
 
18
- Scenario: create (transaction_id: 123)
18
+ Scenario: new(transaction_id: 123)
19
19
  When I try to create an OpenFlow message with:
20
20
  """
21
21
  Pio::Features::Request.new(transaction_id: 123)
@@ -31,7 +31,7 @@ Feature: Features Request
31
31
  | xid | 123 |
32
32
  | user_data | |
33
33
 
34
- Scenario: create (xid: 123)
34
+ Scenario: new(xid: 123)
35
35
  When I try to create an OpenFlow message with:
36
36
  """
37
37
  Pio::Features::Request.new(xid: 123)
@@ -47,22 +47,22 @@ Feature: Features Request
47
47
  | xid | 123 |
48
48
  | user_data | |
49
49
 
50
- Scenario: create (xid: -1) and error
50
+ Scenario: new(xid: -1) and error
51
51
  When I try to create an OpenFlow message with:
52
52
  """
53
53
  Pio::Features::Request.new(xid: -1)
54
54
  """
55
55
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
56
56
 
57
- Scenario: create (xid: 2**32) and error
57
+ Scenario: new(xid: 2**32) and error
58
58
  When I try to create an OpenFlow message with:
59
59
  """
60
60
  Pio::Features::Request.new(xid: 2**32)
61
61
  """
62
62
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
63
63
 
64
- Scenario: parse
65
- When I try to parse a file named "features_request.raw" with "Pio::Features::Request" class
64
+ Scenario: read
65
+ When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Features::Request" class
66
66
  Then it should finish successfully
67
67
  And the message have the following fields and values:
68
68
  | field | value |
@@ -75,5 +75,5 @@ Feature: Features Request
75
75
  | user_data | |
76
76
 
77
77
  Scenario: parse error
78
- When I try to parse a file named "echo_request.raw" with "Pio::Features::Request" class
78
+ When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Features::Request" class
79
79
  Then it should fail with "Pio::ParseError", "Invalid Features Request message."
@@ -1,181 +1,181 @@
1
- Feature: Flow Mod
2
- Scenario: parse (Flow Mod Add)
3
- When I try to parse a file named "flow_mod_add.raw" with "FlowMod" class
1
+ Feature: Pio::FlowMod
2
+ Scenario: read (Flow Mod Add)
3
+ When I try to parse a file named "open_flow10/flow_mod_add.raw" with "Pio::FlowMod" class
4
4
  Then it should finish successfully
5
5
  And the message have the following fields and values:
6
- | field | value |
7
- | ofp_version | 1 |
8
- | message_type | 14 |
9
- | message_length | 192 |
10
- | transaction_id | 0 |
11
- | xid | 0 |
12
- | match.wildcards | {:nw_src=>24, :nw_dst=>24} |
13
- | match.in_port | 1 |
14
- | match.dl_src | 00:00:00:00:00:0a |
15
- | match.dl_dst | 00:00:00:00:00:14 |
16
- | match.dl_vlan | 0 |
17
- | match.dl_vlan_pcp | 0 |
18
- | match.dl_type | 2048 |
19
- | match.nw_tos | 0 |
20
- | match.nw_proto | 1 |
21
- | match.nw_src | 10.0.0.0 |
22
- | match.nw_src.prefixlen | 8 |
23
- | match.nw_dst | 20.0.0.0 |
24
- | match.nw_dst.prefixlen | 8 |
25
- | match.tp_src | 8 |
26
- | match.tp_dst | 0 |
27
- | cookie | 0 |
28
- | command | add |
29
- | idle_timeout | 0 |
30
- | hard_timeout | 0 |
31
- | priority | 65535 |
32
- | buffer_id | 4294967295 |
33
- | out_port | 65535 |
34
- | flags | [:send_flow_rem] |
35
- | actions.length | 12 |
36
- | actions.first.class | Pio::SetVlanVid |
37
- | actions.first.vlan_id | 10 |
6
+ | field | value |
7
+ | ofp_version | 1 |
8
+ | message_type | 14 |
9
+ | message_length | 192 |
10
+ | transaction_id | 0 |
11
+ | xid | 0 |
12
+ | match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
13
+ | match.in_port | 1 |
14
+ | match.ether_source_address | 00:00:00:00:00:0a |
15
+ | match.ether_destination_address | 00:00:00:00:00:14 |
16
+ | match.vlan_vid | 0 |
17
+ | match.vlan_priority | 0 |
18
+ | match.ether_type | 2048 |
19
+ | match.ip_tos | 0 |
20
+ | match.ip_protocol | 1 |
21
+ | match.ip_source_address | 10.0.0.0 |
22
+ | match.ip_source_address.prefixlen | 8 |
23
+ | match.ip_destination_address | 20.0.0.0 |
24
+ | match.ip_destination_address.prefixlen | 8 |
25
+ | match.transport_source_port | 8 |
26
+ | match.transport_destination_port | 0 |
27
+ | cookie | 0 |
28
+ | command | add |
29
+ | idle_timeout | 0 |
30
+ | hard_timeout | 0 |
31
+ | priority | 65535 |
32
+ | buffer_id | 4294967295 |
33
+ | out_port | 65535 |
34
+ | flags | [:send_flow_rem] |
35
+ | actions.length | 12 |
36
+ | actions.first.class | Pio::SetVlanVid |
37
+ | actions.first.vlan_id | 10 |
38
38
 
39
- Scenario: parse (Flow Mod Modify)
40
- When I try to parse a file named "flow_mod_modify.raw" with "FlowMod" class
39
+ Scenario: read (Flow Mod Modify)
40
+ When I try to parse a file named "open_flow10/flow_mod_modify.raw" with "Pio::FlowMod" class
41
41
  Then it should finish successfully
42
42
  And the message have the following fields and values:
43
- | field | value |
44
- | ofp_version | 1 |
45
- | message_type | 14 |
46
- | message_length | 192 |
47
- | transaction_id | 0 |
48
- | xid | 0 |
49
- | match.wildcards | {:nw_src=>24, :nw_dst=>24} |
50
- | match.in_port | 1 |
51
- | match.dl_src | 00:00:00:00:00:0a |
52
- | match.dl_dst | 00:00:00:00:00:14 |
53
- | match.dl_vlan | 0 |
54
- | match.dl_vlan_pcp | 0 |
55
- | match.dl_type | 2048 |
56
- | match.nw_tos | 0 |
57
- | match.nw_proto | 1 |
58
- | match.nw_src | 10.0.0.0 |
59
- | match.nw_src.prefixlen | 8 |
60
- | match.nw_dst | 20.0.0.0 |
61
- | match.nw_dst.prefixlen | 8 |
62
- | match.tp_src | 8 |
63
- | match.tp_dst | 0 |
64
- | cookie | 0 |
65
- | command | modify |
66
- | idle_timeout | 0 |
67
- | hard_timeout | 0 |
68
- | priority | 65535 |
69
- | buffer_id | 4294967295 |
70
- | out_port | 65535 |
71
- | flags | [:send_flow_rem] |
72
- | actions.length | 12 |
73
- | actions.first.class | Pio::SetVlanVid |
74
- | actions.first.vlan_id | 10 |
43
+ | field | value |
44
+ | ofp_version | 1 |
45
+ | message_type | 14 |
46
+ | message_length | 192 |
47
+ | transaction_id | 0 |
48
+ | xid | 0 |
49
+ | match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
50
+ | match.in_port | 1 |
51
+ | match.ether_source_address | 00:00:00:00:00:0a |
52
+ | match.ether_destination_address | 00:00:00:00:00:14 |
53
+ | match.vlan_vid | 0 |
54
+ | match.vlan_priority | 0 |
55
+ | match.ether_type | 2048 |
56
+ | match.ip_tos | 0 |
57
+ | match.ip_protocol | 1 |
58
+ | match.ip_source_address | 10.0.0.0 |
59
+ | match.ip_source_address.prefixlen | 8 |
60
+ | match.ip_destination_address | 20.0.0.0 |
61
+ | match.ip_destination_address.prefixlen | 8 |
62
+ | match.transport_source_port | 8 |
63
+ | match.transport_destination_port | 0 |
64
+ | cookie | 0 |
65
+ | command | modify |
66
+ | idle_timeout | 0 |
67
+ | hard_timeout | 0 |
68
+ | priority | 65535 |
69
+ | buffer_id | 4294967295 |
70
+ | out_port | 65535 |
71
+ | flags | [:send_flow_rem] |
72
+ | actions.length | 12 |
73
+ | actions.first.class | Pio::SetVlanVid |
74
+ | actions.first.vlan_id | 10 |
75
75
 
76
- Scenario: parse (Flow Mod Modify Strict)
77
- When I try to parse a file named "flow_mod_modify_strict.raw" with "FlowMod" class
76
+ Scenario: read (Flow Mod Modify Strict)
77
+ When I try to parse a file named "open_flow10/flow_mod_modify_strict.raw" with "Pio::FlowMod" class
78
78
  Then it should finish successfully
79
79
  And the message have the following fields and values:
80
- | field | value |
81
- | ofp_version | 1 |
82
- | message_type | 14 |
83
- | message_length | 192 |
84
- | transaction_id | 0 |
85
- | xid | 0 |
86
- | match.wildcards | {:nw_src=>24, :nw_dst=>24} |
87
- | match.in_port | 1 |
88
- | match.dl_src | 00:00:00:00:00:0a |
89
- | match.dl_dst | 00:00:00:00:00:14 |
90
- | match.dl_vlan | 0 |
91
- | match.dl_vlan_pcp | 0 |
92
- | match.dl_type | 2048 |
93
- | match.nw_tos | 0 |
94
- | match.nw_proto | 1 |
95
- | match.nw_src | 10.0.0.0 |
96
- | match.nw_src.prefixlen | 8 |
97
- | match.nw_dst | 20.0.0.0 |
98
- | match.nw_dst.prefixlen | 8 |
99
- | match.tp_src | 8 |
100
- | match.tp_dst | 0 |
101
- | cookie | 0 |
102
- | command | modify_strict |
103
- | idle_timeout | 0 |
104
- | hard_timeout | 0 |
105
- | priority | 65535 |
106
- | buffer_id | 4294967295 |
107
- | out_port | 65535 |
108
- | flags | [:send_flow_rem] |
109
- | actions.length | 12 |
110
- | actions.first.class | Pio::SetVlanVid |
111
- | actions.first.vlan_id | 10 |
80
+ | field | value |
81
+ | ofp_version | 1 |
82
+ | message_type | 14 |
83
+ | message_length | 192 |
84
+ | transaction_id | 0 |
85
+ | xid | 0 |
86
+ | match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
87
+ | match.in_port | 1 |
88
+ | match.ether_source_address | 00:00:00:00:00:0a |
89
+ | match.ether_destination_address | 00:00:00:00:00:14 |
90
+ | match.vlan_vid | 0 |
91
+ | match.vlan_priority | 0 |
92
+ | match.ether_type | 2048 |
93
+ | match.ip_tos | 0 |
94
+ | match.ip_protocol | 1 |
95
+ | match.ip_source_address | 10.0.0.0 |
96
+ | match.ip_source_address.prefixlen | 8 |
97
+ | match.ip_destination_address | 20.0.0.0 |
98
+ | match.ip_destination_address.prefixlen | 8 |
99
+ | match.transport_source_port | 8 |
100
+ | match.transport_destination_port | 0 |
101
+ | cookie | 0 |
102
+ | command | modify_strict |
103
+ | idle_timeout | 0 |
104
+ | hard_timeout | 0 |
105
+ | priority | 65535 |
106
+ | buffer_id | 4294967295 |
107
+ | out_port | 65535 |
108
+ | flags | [:send_flow_rem] |
109
+ | actions.length | 12 |
110
+ | actions.first.class | Pio::SetVlanVid |
111
+ | actions.first.vlan_id | 10 |
112
112
 
113
- Scenario: parse (Flow Mod Delete)
114
- When I try to parse a file named "flow_mod_delete.raw" with "FlowMod" class
113
+ Scenario: read (Flow Mod Delete)
114
+ When I try to parse a file named "open_flow10/flow_mod_delete.raw" with "Pio::FlowMod" class
115
115
  Then it should finish successfully
116
116
  And the message have the following fields and values:
117
- | field | value |
118
- | ofp_version | 1 |
119
- | message_type | 14 |
120
- | message_length | 72 |
121
- | transaction_id | 0 |
122
- | xid | 0 |
123
- | match.wildcards | {:nw_src=>24, :nw_dst=>24} |
124
- | match.in_port | 1 |
125
- | match.dl_src | 00:00:00:00:00:0a |
126
- | match.dl_dst | 00:00:00:00:00:00 |
127
- | match.dl_vlan | 0 |
128
- | match.dl_vlan_pcp | 0 |
129
- | match.dl_type | 2048 |
130
- | match.nw_tos | 0 |
131
- | match.nw_proto | 1 |
132
- | match.nw_src | 10.0.0.0 |
133
- | match.nw_src.prefixlen | 8 |
134
- | match.nw_dst | 20.0.0.0 |
135
- | match.nw_dst.prefixlen | 8 |
136
- | match.tp_src | 8 |
137
- | match.tp_dst | 0 |
138
- | cookie | 0 |
139
- | command | delete |
140
- | idle_timeout | 0 |
141
- | hard_timeout | 0 |
142
- | priority | 65535 |
143
- | buffer_id | 4294967295 |
144
- | out_port | 65535 |
145
- | flags | [] |
146
- | actions | [] |
117
+ | field | value |
118
+ | ofp_version | 1 |
119
+ | message_type | 14 |
120
+ | message_length | 72 |
121
+ | transaction_id | 0 |
122
+ | xid | 0 |
123
+ | match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
124
+ | match.in_port | 1 |
125
+ | match.ether_source_address | 00:00:00:00:00:0a |
126
+ | match.ether_destination_address | 00:00:00:00:00:00 |
127
+ | match.vlan_vid | 0 |
128
+ | match.vlan_priority | 0 |
129
+ | match.ether_type | 2048 |
130
+ | match.ip_tos | 0 |
131
+ | match.ip_protocol | 1 |
132
+ | match.ip_source_address | 10.0.0.0 |
133
+ | match.ip_source_address.prefixlen | 8 |
134
+ | match.ip_destination_address | 20.0.0.0 |
135
+ | match.ip_destination_address.prefixlen | 8 |
136
+ | match.transport_source_port | 8 |
137
+ | match.transport_destination_port | 0 |
138
+ | cookie | 0 |
139
+ | command | delete |
140
+ | idle_timeout | 0 |
141
+ | hard_timeout | 0 |
142
+ | priority | 65535 |
143
+ | buffer_id | 4294967295 |
144
+ | out_port | 65535 |
145
+ | flags | [] |
146
+ | actions | [] |
147
147
 
148
- Scenario: parse (Flow Mod Delete Strict)
149
- When I try to parse a file named "flow_mod_delete_strict.raw" with "FlowMod" class
148
+ Scenario: read (Flow Mod Delete Strict)
149
+ When I try to parse a file named "open_flow10/flow_mod_delete_strict.raw" with "Pio::FlowMod" class
150
150
  Then it should finish successfully
151
151
  And the message have the following fields and values:
152
- | field | value |
153
- | ofp_version | 1 |
154
- | message_type | 14 |
155
- | message_length | 72 |
156
- | transaction_id | 0 |
157
- | xid | 0 |
158
- | match.wildcards | {:nw_src=>24, :nw_dst=>24} |
159
- | match.in_port | 1 |
160
- | match.dl_src | 00:00:00:00:00:0a |
161
- | match.dl_dst | 00:00:00:00:00:14 |
162
- | match.dl_vlan | 0 |
163
- | match.dl_vlan_pcp | 0 |
164
- | match.dl_type | 2048 |
165
- | match.nw_tos | 0 |
166
- | match.nw_proto | 1 |
167
- | match.nw_src | 10.0.0.0 |
168
- | match.nw_src.prefixlen | 8 |
169
- | match.nw_dst | 20.0.0.0 |
170
- | match.nw_dst.prefixlen | 8 |
171
- | match.tp_src | 8 |
172
- | match.tp_dst | 0 |
173
- | cookie | 1 |
174
- | command | delete_strict |
175
- | idle_timeout | 0 |
176
- | hard_timeout | 0 |
177
- | priority | 65535 |
178
- | buffer_id | 4294967295 |
179
- | out_port | 65535 |
180
- | flags | [] |
181
- | actions | [] |
152
+ | field | value |
153
+ | ofp_version | 1 |
154
+ | message_type | 14 |
155
+ | message_length | 72 |
156
+ | transaction_id | 0 |
157
+ | xid | 0 |
158
+ | match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
159
+ | match.in_port | 1 |
160
+ | match.ether_source_address | 00:00:00:00:00:0a |
161
+ | match.ether_destination_address | 00:00:00:00:00:14 |
162
+ | match.vlan_vid | 0 |
163
+ | match.vlan_priority | 0 |
164
+ | match.ether_type | 2048 |
165
+ | match.ip_tos | 0 |
166
+ | match.ip_protocol | 1 |
167
+ | match.ip_source_address | 10.0.0.0 |
168
+ | match.ip_source_address.prefixlen | 8 |
169
+ | match.ip_destination_address | 20.0.0.0 |
170
+ | match.ip_destination_address.prefixlen | 8 |
171
+ | match.transport_source_port | 8 |
172
+ | match.transport_destination_port | 0 |
173
+ | cookie | 1 |
174
+ | command | delete_strict |
175
+ | idle_timeout | 0 |
176
+ | hard_timeout | 0 |
177
+ | priority | 65535 |
178
+ | buffer_id | 4294967295 |
179
+ | out_port | 65535 |
180
+ | flags | [] |
181
+ | actions | [] |