trema 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd254b79f9c14fa501bbd579c616b4a387f2d832
4
- data.tar.gz: fbf648fbf79f72498a28fa45d93095042c93a074
3
+ metadata.gz: a874485c89ec22dec27a4ff7445ef1226f19ab44
4
+ data.tar.gz: c42a5dae78876b28a2ac924a11cb62ed46e8e882
5
5
  SHA512:
6
- metadata.gz: 960bf892ff737db25a541bd8b20929d76b4e6103a541fc16fc6c0fb0c7e92f85ffc4ede76bb5ce9558bff7d567b20e6a65cff7eadc8e944bafc407e03ded2af6
7
- data.tar.gz: 7d2229720caa81f7f3a9a36b1a4b326e024c724bdea82745d0896fb93205abee59d382f7370c202c133c20b98b42b5e65c4dac7a0876e5a3b4e8c052ebbe23cd
6
+ metadata.gz: 1aedce74834ac14034d4c71e0d0da7d2459b3555a8b3fe2f0db7b991e64849f7b21b95c6513955621325a2bca2efdcdb972a8b031a31aa01dd39fdc1141a5087
7
+ data.tar.gz: 060fe0e12cda2aad5c7e4b0509f075a9019d5f1671398be129bc964ea205c6ea3d83159b4771c40549be4d796a3d7cb9ca53ba31a4530129330918701a162f2a
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  ## develop (unreleased)
4
4
 
5
5
 
6
+ ## 0.5.1 (8/4/2015)
7
+ ### Bugs fixed
8
+ * [#396](https://github.com/trema/trema/issues/396): `send_flow_mod_add` doesn't allow `:idle_timeout` and `:hard_timeout` options.
9
+
10
+
6
11
  ## 0.5.0 (8/2/2015)
7
12
  ### Changes
8
13
  * [#392](https://github.com/trema/trema/pull/392): Allow packet_in, etc during startup.
@@ -0,0 +1,67 @@
1
+ Feature: Controller#send_flow_mod_add
2
+ Background:
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 "trema.conf" with:
9
+ """
10
+ vswitch { datapath_id 0xabc }
11
+ """
12
+
13
+ @sudo
14
+ Scenario: Controller#send_flow_mod_add (OpenFlow 1.0)
15
+ Given a file named "flow_mod_controller10.rb" with:
16
+ """
17
+ class FlowModController10 < Trema::Controller
18
+ def switch_ready(datapath_id)
19
+ logger.info 'Sending a FlowMod with OpenFlow 1.0 options'
20
+ send_flow_mod_add(
21
+ datapath_id,
22
+ actions: [],
23
+ buffer_id: 0,
24
+ command: :add,
25
+ flags: [],
26
+ hard_timeout: 0,
27
+ idle_timeout: 0,
28
+ match: Match.new(),
29
+ out_port: 0,
30
+ priority: 0
31
+ )
32
+ logger.info 'Sent a FlowMod successfully'
33
+ end
34
+ end
35
+ """
36
+ When I successfully run `trema run flow_mod_controller10.rb -c trema.conf -d`
37
+ And I run `sleep 5`
38
+ Then the file "FlowModController10.log" should contain "Sent a FlowMod successfully"
39
+
40
+ @sudo
41
+ Scenario: Controller#send_flow_mod_add (OpenFlow 1.3)
42
+ Given a file named "flow_mod_controller13.rb" with:
43
+ """
44
+ class FlowModController13 < Trema::Controller
45
+ def switch_ready(datapath_id)
46
+ logger.info 'Sending a FlowMod with OpenFlow 1.3 options'
47
+ send_flow_mod_add(
48
+ datapath_id,
49
+ buffer_id: 0,
50
+ command: :add,
51
+ flags: [],
52
+ hard_timeout: 0,
53
+ idle_timeout: 0,
54
+ instructions: [],
55
+ match: Match.new(),
56
+ out_port: 0,
57
+ priority: 0,
58
+ table_id: 0
59
+ )
60
+ logger.info 'Sent a FlowMod successfully'
61
+ end
62
+ end
63
+ """
64
+ When I successfully run `trema run flow_mod_controller13.rb --openflow13 -c trema.conf -d`
65
+ And I run `sleep 5`
66
+ Then the file "FlowModController13.log" should contain "Sent a FlowMod successfully"
67
+
@@ -45,6 +45,20 @@ Feature: trema run command
45
45
  And I run `sleep 5`
46
46
  Then the file "SwitchReady.log" should contain "Hello 0xabc!"
47
47
 
48
+ @sudo
49
+ Scenario: trema run with --openflow13 option
50
+ Given a file named "null_controller.rb" with:
51
+ """
52
+ class NullController < Trema::Controller; end
53
+ """
54
+ And a file named "trema.conf" with:
55
+ """
56
+ vswitch { datapath_id 0xabc }
57
+ """
58
+ When I successfully run `trema -v run null_controller.rb --openflow13 -c trema.conf -d`
59
+ And I run `sleep 5`
60
+ Then the output should contain "protocols=OpenFlow13"
61
+
48
62
  @sudo
49
63
  Scenario: trema run empty file and error
50
64
  Given a file named "empty.rb" with:
data/lib/trema/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Base module.
2
2
  module Trema
3
3
  # gem version.
4
- VERSION = '0.5.0'.freeze
4
+ VERSION = '0.5.1'.freeze
5
5
  end
data/trema.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency 'bundler', '~> 1.10.6'
25
25
  gem.add_dependency 'gli', '~> 2.13.1'
26
26
  gem.add_dependency 'phut', '~> 0.6.6'
27
- gem.add_dependency 'pio', '~> 0.24.0'
27
+ gem.add_dependency 'pio', '~> 0.24.1'
28
28
  gem.add_dependency 'rake'
29
29
 
30
30
  # Docs
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.5.0
4
+ version: 0.5.1
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-08-02 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.24.0
61
+ version: 0.24.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 0.24.0
68
+ version: 0.24.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -231,7 +231,7 @@ files:
231
231
  - features/cleanup_on_failure.feature
232
232
  - features/echo_reply_handler.feature
233
233
  - features/logging.feature
234
- - features/open_flow13.feature
234
+ - features/send_flow_mod_add.feature
235
235
  - features/step_definitions/.gitignore
236
236
  - features/step_definitions/.rubocop.yml
237
237
  - features/step_definitions/.travis.yml
@@ -1,50 +0,0 @@
1
- Feature: OpenFlow1.3
2
- Background:
3
- Given I set the environment variables to:
4
- | variable | value |
5
- | TREMA_LOG_DIR | . |
6
- | TREMA_PID_DIR | . |
7
- | TREMA_SOCKET_DIR | . |
8
-
9
- @sudo
10
- Scenario: trema run with --openflow13 option
11
- Given a file named "null_controller.rb" with:
12
- """
13
- class NullController < Trema::Controller; end
14
- """
15
- And a file named "trema.conf" with:
16
- """
17
- vswitch { datapath_id 0xabc }
18
- """
19
- When I successfully run `trema -v run null_controller.rb --openflow13 -c trema.conf -d`
20
- And I run `sleep 5`
21
- Then the output should contain "protocols=OpenFlow13"
22
-
23
- @sudo
24
- Scenario: send_flow_mod_add
25
- Given a file named "flow_mod_controller.rb" with:
26
- """
27
- class FlowModController < Trema::Controller
28
- def switch_ready(datapath_id)
29
- logger.info 'Sending a FlowMod with OpenFlow 1.3 options'
30
- send_flow_mod_add(
31
- datapath_id,
32
- table_id: 0,
33
- idle_timeout: 180,
34
- flags: [],
35
- priority: 1,
36
- match: Match.new({}),
37
- instructions: []
38
- )
39
- logger.info 'Sent a FlowMod successfully'
40
- end
41
- end
42
- """
43
- And a file named "trema.conf" with:
44
- """
45
- vswitch { datapath_id 0xabc }
46
- """
47
- When I successfully run `trema run flow_mod_controller.rb --openflow13 -c trema.conf -d`
48
- And I run `sleep 5`
49
- Then the file "FlowModController.log" should contain "Sent a FlowMod successfully"
50
-