pio 0.25.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +4 -0
  4. data/Rakefile +1 -1
  5. data/bin/terminal-notifier +16 -0
  6. data/features/open_flow10/bad_request.feature +35 -0
  7. data/features/open_flow10/bad_request.raw +0 -0
  8. data/features/open_flow10/barrier_reply.feature +4 -4
  9. data/features/open_flow10/barrier_request.feature +4 -4
  10. data/features/open_flow10/echo_reply.feature +13 -13
  11. data/features/open_flow10/echo_request.feature +6 -6
  12. data/features/open_flow10/enqueue.feature +17 -0
  13. data/features/open_flow10/features_reply.feature +2 -2
  14. data/features/open_flow10/features_request.feature +28 -28
  15. data/features/open_flow10/flow_mod.feature +5 -5
  16. data/features/open_flow10/flow_stats_reply.feature +12 -12
  17. data/features/open_flow10/flow_stats_request.feature +3 -3
  18. data/features/open_flow10/hello.feature +8 -15
  19. data/features/open_flow10/hello_failed.feature +69 -0
  20. data/features/open_flow10/hello_failed.raw +0 -0
  21. data/features/open_flow10/nxast_learn.raw +0 -0
  22. data/features/open_flow10/packet_in.feature +2 -2
  23. data/features/open_flow10/packet_out.feature +13 -13
  24. data/features/open_flow10/port_status.feature +1 -1
  25. data/features/open_flow10/send_out_port.feature +106 -0
  26. data/features/open_flow10/set_ether_destination_address.feature +16 -0
  27. data/features/open_flow10/set_ether_source_address.feature +16 -0
  28. data/features/open_flow10/set_ip_destination_address.feature +16 -0
  29. data/features/open_flow10/set_ip_source_address.feature +16 -0
  30. data/features/open_flow10/set_ip_tos.feature +16 -0
  31. data/features/open_flow10/set_transport_destination_port.feature +16 -0
  32. data/features/open_flow10/set_transport_source_port.feature +16 -0
  33. data/features/open_flow10/set_vlan_priority.feature +16 -0
  34. data/features/open_flow10/set_vlan_vid.feature +16 -0
  35. data/features/open_flow10/strip_vlan_header.feature +15 -0
  36. data/features/open_flow10/vendor_action.feature +14 -0
  37. data/features/open_flow13/bad_request.feature +35 -0
  38. data/features/open_flow13/bad_request.raw +0 -0
  39. data/features/open_flow13/echo_reply.feature +7 -7
  40. data/features/open_flow13/echo_request.feature +7 -7
  41. data/features/open_flow13/features_reply.feature +2 -2
  42. data/features/open_flow13/features_request.feature +28 -28
  43. data/features/open_flow13/flow_mod.feature +24 -24
  44. data/features/open_flow13/hello.feature +5 -5
  45. data/features/open_flow13/hello_failed.feature +69 -0
  46. data/features/open_flow13/hello_failed.raw +0 -0
  47. data/features/open_flow13/packet_in.feature +3 -3
  48. data/features/open_flow13/packet_out.feature +3 -3
  49. data/features/open_flow13/send_out_port.feature +101 -10
  50. data/features/open_flow13/table_stats_reply.raw +0 -0
  51. data/features/open_flow13/table_stats_request.raw +0 -0
  52. data/features/open_flow_read.feature +6 -0
  53. data/features/step_definitions/Gemfile +9 -0
  54. data/features/step_definitions/Gemfile.lock +76 -0
  55. data/features/step_definitions/Guardfile +4 -0
  56. data/features/step_definitions/LICENSE +675 -0
  57. data/features/step_definitions/README.md +7 -0
  58. data/features/step_definitions/Rakefile +10 -0
  59. data/features/step_definitions/dump_flows_steps.rb +13 -0
  60. data/features/step_definitions/packet_data_steps.rb +4 -0
  61. data/features/step_definitions/rest_api_steps.rb +40 -0
  62. data/features/step_definitions/show_stats_steps.rb +83 -0
  63. data/features/step_definitions/trema_steps.rb +33 -0
  64. data/features/step_definitions/virtual_link_steps.rb +8 -0
  65. data/lib/pio/open_flow.rb +5 -5
  66. data/lib/pio/open_flow/echo.rb +1 -1
  67. data/lib/pio/open_flow/error.rb +19 -0
  68. data/lib/pio/open_flow/format.rb +2 -1
  69. data/lib/pio/open_flow/hello_failed_code.rb +21 -0
  70. data/lib/pio/open_flow/open_flow_header.rb +11 -2
  71. data/lib/pio/open_flow/port.rb +69 -0
  72. data/lib/pio/open_flow10.rb +5 -0
  73. data/lib/pio/open_flow10/actions.rb +8 -6
  74. data/lib/pio/open_flow10/enqueue.rb +13 -13
  75. data/lib/pio/open_flow10/error.rb +28 -0
  76. data/lib/pio/open_flow10/error/bad_request.rb +66 -0
  77. data/lib/pio/open_flow10/error/error_type10.rb +26 -0
  78. data/lib/pio/open_flow10/error/hello_failed.rb +41 -0
  79. data/lib/pio/open_flow10/features.rb +6 -10
  80. data/lib/pio/open_flow10/flow_mod.rb +1 -1
  81. data/lib/pio/open_flow10/flow_stats_request.rb +1 -1
  82. data/lib/pio/open_flow10/hello.rb +2 -2
  83. data/lib/pio/open_flow10/match.rb +2 -2
  84. data/lib/pio/{open_flow/phy_port.rb → open_flow10/phy_port16.rb} +4 -4
  85. data/lib/pio/open_flow10/port16.rb +21 -0
  86. data/lib/pio/open_flow10/port_status.rb +1 -1
  87. data/lib/pio/open_flow10/send_out_port.rb +16 -40
  88. data/lib/pio/open_flow10/set_ether_address.rb +9 -8
  89. data/lib/pio/open_flow10/set_ip_address.rb +4 -4
  90. data/lib/pio/open_flow10/set_ip_tos.rb +4 -4
  91. data/lib/pio/open_flow10/set_transport_port.rb +12 -12
  92. data/lib/pio/open_flow10/set_vlan.rb +4 -4
  93. data/lib/pio/open_flow10/set_vlan_vid.rb +0 -12
  94. data/lib/pio/open_flow10/strip_vlan_header.rb +7 -7
  95. data/lib/pio/open_flow10/vendor_action.rb +33 -0
  96. data/lib/pio/open_flow13.rb +3 -0
  97. data/lib/pio/open_flow13/actions.rb +3 -3
  98. data/lib/pio/open_flow13/error.rb +28 -0
  99. data/lib/pio/open_flow13/error/bad_request.rb +66 -0
  100. data/lib/pio/open_flow13/error/error_type13.rb +37 -0
  101. data/lib/pio/open_flow13/error/hello_failed.rb +42 -0
  102. data/lib/pio/open_flow13/features_reply.rb +33 -33
  103. data/lib/pio/open_flow13/features_request.rb +3 -3
  104. data/lib/pio/open_flow13/flow_mod.rb +2 -2
  105. data/lib/pio/open_flow13/goto_table.rb +2 -0
  106. data/lib/pio/open_flow13/packet_out.rb +1 -1
  107. data/lib/pio/open_flow13/port32.rb +21 -0
  108. data/lib/pio/open_flow13/send_out_port.rb +3 -2
  109. data/lib/pio/version.rb +1 -1
  110. data/pio.gemspec +5 -5
  111. data/spec/pio/open_flow10/enqueue_spec.rb +22 -22
  112. data/spec/pio/open_flow10/error/hello_failed_spec.rb +26 -0
  113. data/spec/pio/open_flow10/flow_mod_spec.rb +6 -6
  114. data/spec/pio/open_flow10/flow_stats_request_spec.rb +1 -1
  115. data/spec/pio/open_flow10/hello_spec.rb +3 -3
  116. data/spec/pio/open_flow10/packet_out_spec.rb +33 -33
  117. data/spec/pio/{open_flow/phy_port_spec.rb → open_flow10/phy_port16_spec.rb} +7 -7
  118. data/spec/pio/open_flow10/send_out_port_spec.rb +28 -28
  119. data/spec/pio/open_flow10/set_ether_destination_address_spec.rb +2 -2
  120. data/spec/pio/open_flow10/set_ether_source_address_spec.rb +2 -2
  121. data/spec/pio/open_flow10/set_ip_destination_address_spec.rb +4 -4
  122. data/spec/pio/open_flow10/set_ip_source_address_spec.rb +4 -4
  123. data/spec/pio/open_flow10/set_ip_tos_spec.rb +4 -4
  124. data/spec/pio/open_flow10/set_transport_destination_port_spec.rb +11 -11
  125. data/spec/pio/open_flow10/set_transport_source_port_spec.rb +11 -11
  126. data/spec/pio/open_flow10/set_vlan_priority_spec.rb +4 -4
  127. data/spec/pio/open_flow10/set_vlan_vid_spec.rb +4 -4
  128. data/spec/pio/open_flow10/strip_vlan_header_spec.rb +6 -6
  129. data/spec/pio/open_flow13/error/bad_request_spec.rb +6 -0
  130. data/spec/pio/open_flow13/error/hello_failed_spec.rb +26 -0
  131. data/spec/pio/open_flow13/hello_spec.rb +3 -3
  132. data/spec/support/shared_examples_for_openflow_messages.rb +40 -27
  133. metadata +106 -16
  134. data/lib/pio/open_flow/port_number.rb +0 -39
@@ -10,7 +10,7 @@ Feature: Pio::FlowStats::Reply
10
10
  | field | value |
11
11
  | ofp_version | 1 |
12
12
  | message_type | 17 |
13
- | message_length | 12 |
13
+ | length | 12 |
14
14
  | transaction_id | 0 |
15
15
  | xid | 0 |
16
16
  | stats_type | :flow |
@@ -31,7 +31,7 @@ Feature: Pio::FlowStats::Reply
31
31
  | field | value |
32
32
  | ofp_version | 1 |
33
33
  | message_type | 17 |
34
- | message_length | 228 |
34
+ | length | 228 |
35
35
  | transaction_id | 6 |
36
36
  | xid | 6 |
37
37
  | stats_type | :flow |
@@ -63,11 +63,11 @@ Feature: Pio::FlowStats::Reply
63
63
  | stats[0].byte_count | 1000 |
64
64
  | stats[0].actions.length | 2 |
65
65
  | stats[0].actions[0].class | Pio::OpenFlow10::SendOutPort |
66
- | stats[0].actions[0].port_number | 1 |
67
- | stats[0].actions[0].max_len | 0 |
66
+ | stats[0].actions[0].port | 1 |
67
+ | stats[0].actions[0].max_length | 0 |
68
68
  | stats[0].actions[1].class | Pio::OpenFlow10::SendOutPort |
69
- | stats[0].actions[1].port_number | 2 |
70
- | stats[0].actions[1].max_len | 0 |
69
+ | stats[0].actions[1].port | 2 |
70
+ | stats[0].actions[1].max_length | 0 |
71
71
  | stats[1].entry_length | 112 |
72
72
  | stats[1].table_id | 4 |
73
73
  | stats[1].match.wildcards.keys.size | 14 |
@@ -95,11 +95,11 @@ Feature: Pio::FlowStats::Reply
95
95
  | stats[1].byte_count | 1000 |
96
96
  | stats[1].actions.length | 3 |
97
97
  | stats[1].actions[0].class | Pio::OpenFlow10::SendOutPort |
98
- | stats[1].actions[0].port_number | 1 |
99
- | stats[1].actions[0].max_len | 0 |
98
+ | stats[1].actions[0].port | 1 |
99
+ | stats[1].actions[0].max_length | 0 |
100
100
  | stats[1].actions[1].class | Pio::OpenFlow10::SendOutPort |
101
- | stats[1].actions[1].port_number | 2 |
102
- | stats[1].actions[1].max_len | 0 |
101
+ | stats[1].actions[1].port | 2 |
102
+ | stats[1].actions[1].max_length | 0 |
103
103
  | stats[1].actions[2].class | Pio::OpenFlow10::SendOutPort |
104
- | stats[1].actions[2].port_number | 3 |
105
- | stats[1].actions[2].max_len | 0 |
104
+ | stats[1].actions[2].port | 3 |
105
+ | stats[1].actions[2].max_length | 0 |
@@ -10,7 +10,7 @@ Feature: Pio::FlowStats::Request
10
10
  | field | value |
11
11
  | ofp_version | 1 |
12
12
  | message_type | 16 |
13
- | message_length | 56 |
13
+ | length | 56 |
14
14
  | transaction_id | 0 |
15
15
  | xid | 0 |
16
16
  | stats_type | :flow |
@@ -40,7 +40,7 @@ Feature: Pio::FlowStats::Request
40
40
  | field | value |
41
41
  | ofp_version | 1 |
42
42
  | message_type | 16 |
43
- | message_length | 56 |
43
+ | length | 56 |
44
44
  | transaction_id | 0 |
45
45
  | xid | 0 |
46
46
  | stats_type | :flow |
@@ -68,7 +68,7 @@ Feature: Pio::FlowStats::Request
68
68
  | field | value |
69
69
  | ofp_version | 1 |
70
70
  | message_type | 16 |
71
- | message_length | 56 |
71
+ | length | 56 |
72
72
  | transaction_id | 13 |
73
73
  | xid | 13 |
74
74
  | stats_type | :flow |
@@ -1,5 +1,9 @@
1
1
  @open_flow10
2
2
  Feature: Pio::Hello
3
+
4
+ Hello messages are exchanged between the switch and controller upon
5
+ connection startup.
6
+
3
7
  Scenario: new
4
8
  When I try to create an OpenFlow message with:
5
9
  """
@@ -10,7 +14,7 @@ Feature: Pio::Hello
10
14
  | field | value |
11
15
  | ofp_version | 1 |
12
16
  | message_type | 0 |
13
- | message_length | 8 |
17
+ | length | 8 |
14
18
  | transaction_id | 0 |
15
19
  | xid | 0 |
16
20
  | body | |
@@ -26,7 +30,7 @@ Feature: Pio::Hello
26
30
  | field | value |
27
31
  | ofp_version | 1 |
28
32
  | message_type | 0 |
29
- | message_length | 8 |
33
+ | length | 8 |
30
34
  | transaction_id | 123 |
31
35
  | xid | 123 |
32
36
  | body | |
@@ -42,19 +46,12 @@ Feature: Pio::Hello
42
46
  | field | value |
43
47
  | ofp_version | 1 |
44
48
  | message_type | 0 |
45
- | message_length | 8 |
49
+ | length | 8 |
46
50
  | transaction_id | 123 |
47
51
  | xid | 123 |
48
52
  | body | |
49
53
  | user_data | |
50
54
 
51
- Scenario: new(unknown_attr: 'foo') and error
52
- When I try to create an OpenFlow message with:
53
- """
54
- Pio::Hello.new(unknown_attr: 'foo')
55
- """
56
- Then it should fail with "RuntimeError", "Unknown option: unknown_attr"
57
-
58
55
  Scenario: read
59
56
  When I try to parse a file named "open_flow10/hello.raw" with "Hello" class
60
57
  Then it should finish successfully
@@ -62,12 +59,8 @@ Feature: Pio::Hello
62
59
  | field | value |
63
60
  | ofp_version | 1 |
64
61
  | message_type | 0 |
65
- | message_length | 8 |
62
+ | length | 8 |
66
63
  | transaction_id | 23 |
67
64
  | xid | 23 |
68
65
  | body | |
69
66
  | user_data | |
70
-
71
- Scenario: parse error
72
- When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Hello" class
73
- Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Hello message."
@@ -0,0 +1,69 @@
1
+ @open_flow10
2
+ Feature: Pio::Error::HelloFailed
3
+
4
+ Hello protocol failed
5
+
6
+ Scenario: new
7
+ When I try to create an OpenFlow message with:
8
+ """
9
+ Pio::Error::HelloFailed.new
10
+ """
11
+ Then it should finish successfully
12
+ And the message has the following fields and values:
13
+ | field | value |
14
+ | ofp_version | 1 |
15
+ | message_type | 1 |
16
+ | length | 12 |
17
+ | transaction_id | 0 |
18
+ | xid | 0 |
19
+ | error_type | :hello_failed |
20
+ | error_code | :incompatible |
21
+ | description | |
22
+
23
+ Scenario: new(description: 'error description')
24
+ When I try to create an OpenFlow message with:
25
+ """
26
+ Pio::Error::HelloFailed.new(description: 'error description')
27
+ """
28
+ Then it should finish successfully
29
+ And the message has the following fields and values:
30
+ | field | value |
31
+ | ofp_version | 1 |
32
+ | message_type | 1 |
33
+ | length | 29 |
34
+ | transaction_id | 0 |
35
+ | xid | 0 |
36
+ | error_type | :hello_failed |
37
+ | error_code | :incompatible |
38
+ | description | error description |
39
+
40
+ Scenario: new(error_code: :permissions_error)
41
+ When I try to create an OpenFlow message with:
42
+ """
43
+ Pio::Error::HelloFailed.new(error_code: :permissions_error)
44
+ """
45
+ Then it should finish successfully
46
+ And the message has the following fields and values:
47
+ | field | value |
48
+ | ofp_version | 1 |
49
+ | message_type | 1 |
50
+ | length | 12 |
51
+ | transaction_id | 0 |
52
+ | xid | 0 |
53
+ | error_type | :hello_failed |
54
+ | error_code | :permissions_error |
55
+ | description | |
56
+
57
+ Scenario: read
58
+ When I try to parse a file named "open_flow10/hello_failed.raw" with "Pio::Error::HelloFailed" class
59
+ Then it should finish successfully
60
+ And the message has the following fields and values:
61
+ | field | value |
62
+ | ofp_version | 1 |
63
+ | message_type | 1 |
64
+ | length | 29 |
65
+ | transaction_id | 0 |
66
+ | xid | 0 |
67
+ | error_type | :hello_failed |
68
+ | error_code | :incompatible |
69
+ | description | error description |
@@ -23,7 +23,7 @@ Feature: Pio::PacketIn
23
23
  | field | value |
24
24
  | ofp_version | 1 |
25
25
  | message_type | 10 |
26
- | message_length | 78 |
26
+ | length | 78 |
27
27
  | transaction_id | 0 |
28
28
  | xid | 0 |
29
29
  | buffer_id | 4294967040 |
@@ -43,7 +43,7 @@ Feature: Pio::PacketIn
43
43
  | field | value |
44
44
  | ofp_version | 1 |
45
45
  | message_type | 10 |
46
- | message_length | 78 |
46
+ | length | 78 |
47
47
  | transaction_id | 0 |
48
48
  | xid | 0 |
49
49
  | buffer_id | 4294967040 |
@@ -4,16 +4,16 @@ Feature: Pio::PacketOut
4
4
  When I try to parse a file named "open_flow10/packet_out.raw" with "PacketOut" class
5
5
  Then it should finish successfully
6
6
  And the message has the following fields and values:
7
- | field | value |
8
- | ofp_version | 1 |
9
- | message_type | 13 |
10
- | message_length | 88 |
11
- | transaction_id | 22 |
12
- | xid | 22 |
13
- | buffer_id | 4294967295 |
14
- | in_port | 65535 |
15
- | actions.length | 1 |
16
- | actions.first.class | Pio::OpenFlow10::SendOutPort |
17
- | actions.first.port_number | 2 |
18
- | actions.first.max_len | 65535 |
19
- | raw_data.length | 64 |
7
+ | field | value |
8
+ | ofp_version | 1 |
9
+ | message_type | 13 |
10
+ | length | 88 |
11
+ | transaction_id | 22 |
12
+ | xid | 22 |
13
+ | buffer_id | 4294967295 |
14
+ | in_port | 65535 |
15
+ | actions.length | 1 |
16
+ | actions.first.class | Pio::OpenFlow10::SendOutPort |
17
+ | actions.first.port | 2 |
18
+ | actions.first.max_length | 65535 |
19
+ | raw_data.length | 64 |
@@ -7,7 +7,7 @@ Feature: Pio::PortStatus
7
7
  | class | Pio::OpenFlow10::PortStatus |
8
8
  | ofp_version | 1 |
9
9
  | message_type | 12 |
10
- | message_length | 64 |
10
+ | length | 64 |
11
11
  | transaction_id | 4 |
12
12
  | xid | 4 |
13
13
  | reason | :delete |
@@ -0,0 +1,106 @@
1
+ @open_flow10
2
+ Feature: Pio::SendOutPort
3
+
4
+ Scenario: new(1)
5
+ When I try to create an OpenFlow action with:
6
+ """
7
+ Pio::SendOutPort.new(1)
8
+ """
9
+ Then it should finish successfully
10
+ And the action has the following fields and values:
11
+ | field | value |
12
+ | action_type | 0 |
13
+ | length | 8 |
14
+ | port | 1 |
15
+ | max_length | 65535 |
16
+
17
+ Scenario: new(:all)
18
+ When I try to create an OpenFlow action with:
19
+ """
20
+ Pio::SendOutPort.new(:all)
21
+ """
22
+ Then it should finish successfully
23
+ And the action has the following fields and values:
24
+ | field | value |
25
+ | action_type | 0 |
26
+ | length | 8 |
27
+ | port | :all |
28
+ | max_length | 65535 |
29
+
30
+ Scenario: new(:controller)
31
+ When I try to create an OpenFlow action with:
32
+ """
33
+ Pio::SendOutPort.new(:controller)
34
+ """
35
+ Then it should finish successfully
36
+ And the action has the following fields and values:
37
+ | field | value |
38
+ | action_type | 0 |
39
+ | length | 8 |
40
+ | port | :controller |
41
+ | max_length | 65535 |
42
+
43
+ Scenario: new(:local)
44
+ When I try to create an OpenFlow action with:
45
+ """
46
+ Pio::SendOutPort.new(:local)
47
+ """
48
+ Then it should finish successfully
49
+ And the action has the following fields and values:
50
+ | field | value |
51
+ | action_type | 0 |
52
+ | length | 8 |
53
+ | port | :local |
54
+ | max_length | 65535 |
55
+
56
+ Scenario: new(:table)
57
+ When I try to create an OpenFlow action with:
58
+ """
59
+ Pio::SendOutPort.new(:table)
60
+ """
61
+ Then it should finish successfully
62
+ And the action has the following fields and values:
63
+ | field | value |
64
+ | action_type | 0 |
65
+ | length | 8 |
66
+ | port | :table |
67
+ | max_length | 65535 |
68
+
69
+ Scenario: new(:in_port)
70
+ When I try to create an OpenFlow action with:
71
+ """
72
+ Pio::SendOutPort.new(:in_port)
73
+ """
74
+ Then it should finish successfully
75
+ And the action has the following fields and values:
76
+ | field | value |
77
+ | action_type | 0 |
78
+ | length | 8 |
79
+ | port | :in_port |
80
+ | max_length | 65535 |
81
+
82
+ Scenario: new(:normal)
83
+ When I try to create an OpenFlow action with:
84
+ """
85
+ Pio::SendOutPort.new(:normal)
86
+ """
87
+ Then it should finish successfully
88
+ And the action has the following fields and values:
89
+ | field | value |
90
+ | action_type | 0 |
91
+ | length | 8 |
92
+ | port | :normal |
93
+ | max_length | 65535 |
94
+
95
+ Scenario: new(:flood)
96
+ When I try to create an OpenFlow action with:
97
+ """
98
+ Pio::SendOutPort.new(:flood)
99
+ """
100
+ Then it should finish successfully
101
+ And the action has the following fields and values:
102
+ | field | value |
103
+ | action_type | 0 |
104
+ | length | 8 |
105
+ | port | :flood |
106
+ | max_length | 65535 |
@@ -0,0 +1,16 @@
1
+ @open_flow10
2
+ Feature: Pio::SetEtherDestinationAddress
3
+
4
+ Scenario: new('11:22:33:44:55:66')
5
+ When I try to create an OpenFlow action with:
6
+ """
7
+ Pio::SetEtherDestinationAddress.new('11:22:33:44:55:66')
8
+ """
9
+ Then it should finish successfully
10
+ And the action has the following fields and values:
11
+ | field | value |
12
+ | action_type | 5 |
13
+ | length | 16 |
14
+ | mac_address | 11:22:33:44:55:66 |
15
+
16
+
@@ -0,0 +1,16 @@
1
+ @open_flow10
2
+ Feature: Pio::SetEtherSourceAddress
3
+
4
+ Scenario: new('11:22:33:44:55:66')
5
+ When I try to create an OpenFlow action with:
6
+ """
7
+ Pio::SetEtherSourceAddress.new('11:22:33:44:55:66')
8
+ """
9
+ Then it should finish successfully
10
+ And the action has the following fields and values:
11
+ | field | value |
12
+ | action_type | 4 |
13
+ | length | 16 |
14
+ | mac_address | 11:22:33:44:55:66 |
15
+
16
+
@@ -0,0 +1,16 @@
1
+ @open_flow10
2
+ Feature: Pio::SetIpDestinationAddress
3
+
4
+ Scenario: new('192.168.0.1')
5
+ When I try to create an OpenFlow action with:
6
+ """
7
+ Pio::SetIpDestinationAddress.new('192.168.0.1')
8
+ """
9
+ Then it should finish successfully
10
+ And the action has the following fields and values:
11
+ | field | value |
12
+ | action_type | 7 |
13
+ | length | 8 |
14
+ | ip_address | 192.168.0.1 |
15
+
16
+
@@ -0,0 +1,16 @@
1
+ @open_flow10
2
+ Feature: Pio::SetIpSourceAddress
3
+
4
+ Scenario: new('192.168.0.1')
5
+ When I try to create an OpenFlow action with:
6
+ """
7
+ Pio::SetIpSourceAddress.new('192.168.0.1')
8
+ """
9
+ Then it should finish successfully
10
+ And the action has the following fields and values:
11
+ | field | value |
12
+ | action_type | 6 |
13
+ | length | 8 |
14
+ | ip_address | 192.168.0.1 |
15
+
16
+