trema 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +6 -0
- data/bin/trema +12 -4
- data/features/.nav +6 -0
- data/features/api/logging.feature +10 -3
- data/features/api/send_flow_mod_add.feature +8 -3
- data/features/handlers/barrier_reply.feature +6 -1
- data/features/handlers/description_stats_reply.feature +6 -1
- data/features/handlers/echo_reply.feature +6 -1
- data/features/handlers/hello_failed.feature +6 -1
- data/features/handlers/packet_in.feature +8 -3
- data/features/handlers/start.feature +6 -1
- data/features/handlers/switch_disconnected.feature +6 -1
- data/features/handlers/switch_ready.feature +6 -1
- data/features/logger/debug.feature +10 -4
- data/features/logger/error.feature +10 -4
- data/features/logger/fatal.feature +10 -4
- data/features/logger/info.feature +10 -4
- data/features/logger/warn.feature +10 -4
- data/features/step_definitions/dump_flows_steps.rb +6 -8
- data/features/step_definitions/rest_api_steps.rb +3 -3
- data/features/step_definitions/show_stats_steps.rb +3 -1
- data/features/step_definitions/trema_steps.rb +17 -8
- data/features/support/hooks.rb +3 -6
- data/features/trema_delete_link/delete_link.feature +7 -0
- data/features/trema_dump_flows/dump_flows.feature +49 -0
- data/features/trema_killall/all_option.feature +6 -1
- data/features/trema_killall/killall.feature +6 -1
- data/features/trema_killall/socket_dir_option.feature +7 -0
- data/features/trema_netns/README.md +5 -0
- data/features/trema_netns/netns.feature +55 -0
- data/features/trema_run/conf_option.feature +8 -3
- data/features/trema_run/daemonize_option.feature +6 -1
- data/features/trema_run/log_dir_option.feature +7 -3
- data/features/trema_run/logging_level_option.feature +7 -2
- data/features/trema_run/openflow13_option.feature +9 -4
- data/features/trema_run/pid_dir_option.feature +7 -3
- data/features/trema_run/port_option.feature +8 -3
- data/features/trema_run/run.feature +7 -0
- data/features/trema_run/socket_dir_option.feature +13 -11
- data/features/trema_start/start.feature +10 -5
- data/features/trema_stop/stop.feature +8 -3
- data/lib/trema/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/trema.gemspec +8 -8
- metadata +21 -19
- data/.ruby-version +0 -1
@@ -3,7 +3,11 @@ Feature: -P (--pid_dir) option
|
|
3
3
|
-P (--pid_dir) option specifies the location to put pid files
|
4
4
|
|
5
5
|
Background:
|
6
|
-
Given
|
6
|
+
Given I set the environment variables to:
|
7
|
+
| variable | value |
|
8
|
+
| TREMA_LOG_DIR | . |
|
9
|
+
| TREMA_SOCKET_DIR | . |
|
10
|
+
And a file named "null_controller.rb" with:
|
7
11
|
"""ruby
|
8
12
|
class NullController < Trema::Controller; end
|
9
13
|
"""
|
@@ -12,14 +16,14 @@ Feature: -P (--pid_dir) option
|
|
12
16
|
Scenario: -P option
|
13
17
|
Given a directory named "pid"
|
14
18
|
When I successfully run `trema run null_controller.rb -P pid -d`
|
15
|
-
And
|
19
|
+
And sleep 3
|
16
20
|
Then a file named "pid/NullController.pid" should exist
|
17
21
|
|
18
22
|
@sudo
|
19
23
|
Scenario: --pid_dir option
|
20
24
|
Given a directory named "pid"
|
21
25
|
When I successfully run `trema run null_controller.rb --pid_dir pid -d`
|
22
|
-
And
|
26
|
+
And sleep 3
|
23
27
|
Then a file named "pid/NullController.pid" should exist
|
24
28
|
|
25
29
|
@sudo
|
@@ -3,7 +3,12 @@ Feature: -p (--port) option
|
|
3
3
|
-p (--port) option overrides the default openflow channel port.
|
4
4
|
|
5
5
|
Background:
|
6
|
-
Given
|
6
|
+
Given I set the environment variables to:
|
7
|
+
| variable | value |
|
8
|
+
| TREMA_LOG_DIR | . |
|
9
|
+
| TREMA_PID_DIR | . |
|
10
|
+
| TREMA_SOCKET_DIR | . |
|
11
|
+
And a file named "switch_ready.rb" with:
|
7
12
|
"""ruby
|
8
13
|
class SwitchReady < Trema::Controller
|
9
14
|
def switch_ready(dpid)
|
@@ -22,11 +27,11 @@ Feature: -p (--port) option
|
|
22
27
|
@sudo
|
23
28
|
Scenario: -p option
|
24
29
|
When I successfully run `trema run -p 1234 switch_ready.rb -c trema.conf -d`
|
25
|
-
And
|
30
|
+
And sleep 5
|
26
31
|
Then the file "SwitchReady.log" should contain "connected to port 1234"
|
27
32
|
|
28
33
|
@sudo
|
29
34
|
Scenario: --port option
|
30
35
|
When I successfully run `trema run --port 1234 switch_ready.rb -c trema.conf -d`
|
31
|
-
And
|
36
|
+
And sleep 5
|
32
37
|
Then the file "SwitchReady.log" should contain "connected to port 1234"
|
@@ -3,26 +3,28 @@ Feature: -S (--socket_dir) option
|
|
3
3
|
-S (--socket_dir) option specifies the location to put socket files
|
4
4
|
|
5
5
|
Background:
|
6
|
-
Given
|
6
|
+
Given I set the environment variables to:
|
7
|
+
| variable | value |
|
8
|
+
| TREMA_LOG_DIR | . |
|
9
|
+
| TREMA_PID_DIR | . |
|
10
|
+
And a file named "null_controller.rb" with:
|
7
11
|
"""ruby
|
8
12
|
class NullController < Trema::Controller; end
|
9
13
|
"""
|
10
14
|
|
11
15
|
@sudo
|
12
16
|
Scenario: -S option
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
And a socket file named "sock/trema.NullController.ctl" should exist
|
17
|
+
When I successfully run `trema run null_controller.rb -S . -d`
|
18
|
+
And sleep 3
|
19
|
+
Then a socket file named "NullController.ctl" should exist
|
20
|
+
And a socket file named "trema.NullController.ctl" should exist
|
18
21
|
|
19
22
|
@sudo
|
20
23
|
Scenario: --socket_dir option
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
And a socket file named "sock/trema.NullController.ctl" should exist
|
24
|
+
When I successfully run `trema run null_controller.rb --socket_dir . -d`
|
25
|
+
And sleep 3
|
26
|
+
Then a socket file named "NullController.ctl" should exist
|
27
|
+
And a socket file named "trema.NullController.ctl" should exist
|
26
28
|
|
27
29
|
@sudo
|
28
30
|
Scenario: "No such directory" error
|
@@ -1,6 +1,11 @@
|
|
1
1
|
Feature: start
|
2
2
|
Background:
|
3
|
-
Given
|
3
|
+
Given I set the environment variables to:
|
4
|
+
| variable | value |
|
5
|
+
| TREMA_LOG_DIR | . |
|
6
|
+
| TREMA_PID_DIR | . |
|
7
|
+
| TREMA_SOCKET_DIR | . |
|
8
|
+
And a file named "switch_ready_controller.rb" with:
|
4
9
|
"""ruby
|
5
10
|
class SwitchReadyController < Trema::Controller
|
6
11
|
def start(_args)
|
@@ -28,9 +33,9 @@ Feature: start
|
|
28
33
|
@sudo
|
29
34
|
Scenario: stop and start a switch
|
30
35
|
Given I successfully run `trema stop 0xabc`
|
31
|
-
And
|
36
|
+
And sleep 3
|
32
37
|
When I successfully run `trema start 0xabc`
|
33
|
-
And
|
38
|
+
And sleep 10
|
34
39
|
Then the file "SwitchReadyController.log" should contain:
|
35
40
|
"""
|
36
41
|
Switch 0xabc connected again.
|
@@ -39,9 +44,9 @@ Feature: start
|
|
39
44
|
@sudo
|
40
45
|
Scenario: stop and start host_name
|
41
46
|
Given I successfully run `trema stop host1`
|
42
|
-
And
|
47
|
+
And sleep 3
|
43
48
|
When I successfully run `trema start host1`
|
44
|
-
And
|
49
|
+
And sleep 10
|
45
50
|
Then the file named "vhost.host1.pid" should exist
|
46
51
|
|
47
52
|
@sudo
|
@@ -1,6 +1,11 @@
|
|
1
1
|
Feature: stop
|
2
2
|
Background:
|
3
|
-
Given
|
3
|
+
Given I set the environment variables to:
|
4
|
+
| variable | value |
|
5
|
+
| TREMA_LOG_DIR | . |
|
6
|
+
| TREMA_PID_DIR | . |
|
7
|
+
| TREMA_SOCKET_DIR | . |
|
8
|
+
And a file named "switch_disconnected_controller.rb" with:
|
4
9
|
"""ruby
|
5
10
|
class SwitchDisconnectedController < Trema::Controller
|
6
11
|
def switch_disconnected(dpid)
|
@@ -23,7 +28,7 @@ Feature: stop
|
|
23
28
|
@sudo
|
24
29
|
Scenario: stop a switch
|
25
30
|
When I successfully run `trema stop 0xabc`
|
26
|
-
And
|
31
|
+
And sleep 10
|
27
32
|
Then the file "SwitchDisconnectedController.log" should contain:
|
28
33
|
"""
|
29
34
|
Switch 0xabc is disconnected.
|
@@ -32,7 +37,7 @@ Feature: stop
|
|
32
37
|
@sudo
|
33
38
|
Scenario: stop a host
|
34
39
|
When I successfully run `trema stop host1`
|
35
|
-
And
|
40
|
+
And sleep 5
|
36
41
|
Then the file "vhost.host1.pid" should not exist
|
37
42
|
|
38
43
|
@sudo
|
data/lib/trema/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -8,7 +8,7 @@ if ENV['CODECLIMATE_REPO_TOKEN']
|
|
8
8
|
formatters << CodeClimate::TestReporter::Formatter
|
9
9
|
end
|
10
10
|
|
11
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter
|
11
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters)
|
12
12
|
SimpleCov.start { add_filter '/vendor/' }
|
13
13
|
|
14
14
|
require 'rspec/given'
|
data/trema.gemspec
CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |gem|
|
|
21
21
|
|
22
22
|
gem.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
23
23
|
|
24
|
-
gem.add_dependency 'bundler', '~> 1.
|
25
|
-
gem.add_dependency 'gli', '~> 2.13.
|
26
|
-
gem.add_dependency 'phut', '~> 0.7.
|
24
|
+
gem.add_dependency 'bundler', '~> 1.11.2'
|
25
|
+
gem.add_dependency 'gli', '~> 2.13.4'
|
26
|
+
gem.add_dependency 'phut', '~> 0.7.5'
|
27
27
|
gem.add_dependency 'pio', '~> 0.30.0'
|
28
28
|
|
29
29
|
# Docs
|
@@ -31,13 +31,13 @@ Gem::Specification.new do |gem|
|
|
31
31
|
gem.add_development_dependency 'yard', '~> 0.8.7.6'
|
32
32
|
|
33
33
|
# Test
|
34
|
-
gem.add_development_dependency 'aruba', '~> 0.
|
34
|
+
gem.add_development_dependency 'aruba', '~> 0.11.2'
|
35
35
|
gem.add_development_dependency 'codeclimate-test-reporter', '~> 0.4.8'
|
36
|
-
gem.add_development_dependency 'coveralls', '~> 0.8.
|
36
|
+
gem.add_development_dependency 'coveralls', '~> 0.8.10'
|
37
37
|
gem.add_development_dependency 'cucumber', '~> 2.1.0'
|
38
38
|
gem.add_development_dependency 'rake'
|
39
|
-
gem.add_development_dependency 'reek', '~> 3.
|
40
|
-
gem.add_development_dependency 'rspec', '~> 3.
|
39
|
+
gem.add_development_dependency 'reek', '~> 3.7.1'
|
40
|
+
gem.add_development_dependency 'rspec', '~> 3.4.0'
|
41
41
|
gem.add_development_dependency 'rspec-given', '~> 3.7.1'
|
42
|
-
gem.add_development_dependency 'rubocop', '~> 0.
|
42
|
+
gem.add_development_dependency 'rubocop', '~> 0.35.1'
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yasuhito Takamiya
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.11.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.11.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.13.
|
33
|
+
version: 2.13.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.13.
|
40
|
+
version: 2.13.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: phut
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.7.
|
47
|
+
version: 0.7.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.7.
|
54
|
+
version: 0.7.5
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pio
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.11.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.11.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: codeclimate-test-reporter
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.8.
|
131
|
+
version: 0.8.10
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.8.
|
138
|
+
version: 0.8.10
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: cucumber
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,28 +170,28 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 3.
|
173
|
+
version: 3.7.1
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 3.
|
180
|
+
version: 3.7.1
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rspec
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 3.
|
187
|
+
version: 3.4.0
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 3.
|
194
|
+
version: 3.4.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: rspec-given
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,14 +212,14 @@ dependencies:
|
|
212
212
|
requirements:
|
213
213
|
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: 0.
|
215
|
+
version: 0.35.1
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 0.
|
222
|
+
version: 0.35.1
|
223
223
|
description: Trema is a full-stack, easy-to-use framework for developing OpenFlow
|
224
224
|
controllers in Ruby.
|
225
225
|
email:
|
@@ -233,7 +233,6 @@ files:
|
|
233
233
|
- ".hound.yml"
|
234
234
|
- ".rspec"
|
235
235
|
- ".rubocop.yml"
|
236
|
-
- ".ruby-version"
|
237
236
|
- ".travis.yml"
|
238
237
|
- CHANGELOG.md
|
239
238
|
- CONTRIBUTING.md
|
@@ -277,10 +276,13 @@ files:
|
|
277
276
|
- features/trema_delete_link/README.md
|
278
277
|
- features/trema_delete_link/delete_link.feature
|
279
278
|
- features/trema_delete_link/socket_dir_option.feature
|
279
|
+
- features/trema_dump_flows/dump_flows.feature
|
280
280
|
- features/trema_killall/README.md
|
281
281
|
- features/trema_killall/all_option.feature
|
282
282
|
- features/trema_killall/killall.feature
|
283
283
|
- features/trema_killall/socket_dir_option.feature
|
284
|
+
- features/trema_netns/README.md
|
285
|
+
- features/trema_netns/netns.feature
|
284
286
|
- features/trema_run/README.md
|
285
287
|
- features/trema_run/conf_option.feature
|
286
288
|
- features/trema_run/daemonize_option.feature
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.0
|