trema 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ruby/trema/flow-removed.c +3 -0
- data/ruby/trema/match.c +19 -0
- data/ruby/trema/packet-in.c +3 -0
- data/ruby/trema/port.c +12 -0
- data/ruby/trema/send-out-port.rb +1 -1
- data/ruby/trema/version.rb +1 -1
- data/spec/spec_helper.rb +8 -0
- data/spec/support/action.rb +4 -4
- data/spec/trema/barrier-request_spec.rb +1 -1
- data/spec/trema/cli_spec.rb +1 -3
- data/spec/trema/controller_spec.rb +1 -1
- data/spec/trema/dsl/configuration_spec.rb +24 -24
- data/spec/trema/dsl/link_spec.rb +4 -6
- data/spec/trema/dsl/run_spec.rb +7 -11
- data/spec/trema/dsl/runner_spec.rb +9 -9
- data/spec/trema/dsl/switch_spec.rb +5 -11
- data/spec/trema/dsl/vhost_spec.rb +1 -3
- data/spec/trema/dsl/vswitch_spec.rb +7 -15
- data/spec/trema/echo-request_spec.rb +1 -1
- data/spec/trema/enqueue_spec.rb +4 -4
- data/spec/trema/features-reply_spec.rb +1 -1
- data/spec/trema/features-request_spec.rb +1 -1
- data/spec/trema/flow-removed_spec.rb +19 -19
- data/spec/trema/get-config-request_spec.rb +1 -1
- data/spec/trema/hardware-switch_spec.rb +3 -3
- data/spec/trema/host_spec.rb +2 -2
- data/spec/trema/list-switches-reply_spec.rb +1 -1
- data/spec/trema/mac_spec.rb +1 -1
- data/spec/trema/match_spec.rb +8 -8
- data/spec/trema/open-vswitch_spec.rb +6 -6
- data/spec/trema/openflow-error_spec.rb +15 -15
- data/spec/trema/packet-in_spec.rb +210 -208
- data/spec/trema/packet-out_spec.rb +4 -6
- data/spec/trema/port-mod_spec.rb +28 -29
- data/spec/trema/port-status-modify_spec.rb +2 -2
- data/spec/trema/port_spec.rb +9 -9
- data/spec/trema/queue-get-config-reply_spec.rb +2 -2
- data/spec/trema/send-out-port_spec.rb +53 -43
- data/spec/trema/set-config_spec.rb +2 -2
- data/spec/trema/set-eth-dst-addr_spec.rb +3 -3
- data/spec/trema/set-eth-src-addr_spec.rb +3 -3
- data/spec/trema/set-ip-dst-addr_spec.rb +20 -16
- data/spec/trema/set-ip-src-addr_spec.rb +20 -16
- data/spec/trema/set-ip-tos_spec.rb +20 -21
- data/spec/trema/set-transport-dst-port_spec.rb +22 -23
- data/spec/trema/set-transport-src-port_spec.rb +22 -23
- data/spec/trema/set-vlan-priority_spec.rb +20 -21
- data/spec/trema/set-vlan-vid_spec.rb +20 -21
- data/spec/trema/shell/vhost_spec.rb +7 -7
- data/spec/trema/shell/vswitch_spec.rb +8 -8
- data/spec/trema/stats-reply_spec.rb +23 -23
- data/spec/trema/strip-vlan-header_spec.rb +9 -9
- data/spec/trema/switch-daemon_spec.rb +15 -15
- data/spec/trema/util_spec.rb +2 -6
- data/spec/trema/vendor-action_spec.rb +24 -36
- metadata +4 -4
@@ -41,16 +41,14 @@ end
|
|
41
41
|
describe "packet-out" do
|
42
42
|
context "a controller instance" do
|
43
43
|
it "should respond to #send_packet_out" do
|
44
|
-
PacketOutController.new.
|
44
|
+
expect( PacketOutController.new ).to respond_to(:send_packet_out)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
|
49
49
|
context "when invoked with no datapath_id" do
|
50
50
|
it "should raise an error" do
|
51
|
-
|
52
|
-
PacketOutController.new.send_packet_out
|
53
|
-
end.should raise_error("wrong number of arguments (0 for 1)")
|
51
|
+
expect { PacketOutController.new.send_packet_out }.to raise_error("wrong number of arguments (0 for 1)")
|
54
52
|
end
|
55
53
|
end
|
56
54
|
|
@@ -66,7 +64,7 @@ describe "packet-out" do
|
|
66
64
|
}.run( PacketOutController ) {
|
67
65
|
send_packets "host2", "host1"
|
68
66
|
sleep 2
|
69
|
-
vhost( "host1" ).rx_stats.n_pkts.
|
67
|
+
expect( vhost( "host1" ).rx_stats.n_pkts ).to eq( 1 )
|
70
68
|
}
|
71
69
|
end
|
72
70
|
end
|
@@ -114,7 +112,7 @@ describe "packet-out" do
|
|
114
112
|
:actions => Trema::ActionOutput.new( :port => 1 )
|
115
113
|
)
|
116
114
|
sleep 2
|
117
|
-
vhost( "host2" ).rx_stats.n_pkts.
|
115
|
+
expect( vhost( "host2" ).rx_stats.n_pkts ).to eq( 1 )
|
118
116
|
}
|
119
117
|
end
|
120
118
|
end
|
data/spec/trema/port-mod_spec.rb
CHANGED
@@ -33,7 +33,7 @@ describe PortMod, ".new( VALID OPTIONS )" do
|
|
33
33
|
)
|
34
34
|
}
|
35
35
|
its( :port_no ) { should == 2 }
|
36
|
-
its(
|
36
|
+
its( "hw_addr.to_s" ) { should eq "11:22:33:44:55:66" }
|
37
37
|
its( :config ) { should == 1 }
|
38
38
|
its( :mask ) { should == 1 }
|
39
39
|
its( :advertise ) { should == 0 }
|
@@ -42,46 +42,45 @@ describe PortMod, ".new( VALID OPTIONS )" do
|
|
42
42
|
|
43
43
|
describe "hw_addr" do
|
44
44
|
it "should be a Trema::Mac object" do
|
45
|
-
PortMod.new(
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
expect( PortMod.new(
|
46
|
+
:port_no => 2,
|
47
|
+
:hw_addr => Mac::new( "11:22:33:44:55:66" ),
|
48
|
+
:config => 1,
|
49
|
+
:mask => 1,
|
50
|
+
:advertise => 0
|
51
|
+
).hw_addr.to_s ).to eq( "11:22:33:44:55:66" )
|
52
52
|
end
|
53
53
|
|
54
54
|
|
55
55
|
it "should be a string('11:22:33:44:55')" do
|
56
|
-
PortMod.new(
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
expect( PortMod.new(
|
57
|
+
:port_no => 2,
|
58
|
+
:hw_addr => "11:22:33:44:55:66",
|
59
|
+
:config => 1,
|
60
|
+
:mask => 1,
|
61
|
+
:advertise => 0 ).hw_addr.to_s ).to eq( "11:22:33:44:55:66" )
|
62
62
|
end
|
63
63
|
|
64
64
|
|
65
65
|
it "should be a number(281474976710655)" do
|
66
|
-
PortMod.new(
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
expect( PortMod.new(
|
67
|
+
:port_no => 2,
|
68
|
+
:hw_addr => 281474976710655,
|
69
|
+
:config => 1,
|
70
|
+
:mask => 1,
|
71
|
+
:advertise => 0 ).hw_addr.to_s ).to eq( "ff:ff:ff:ff:ff:ff" )
|
72
72
|
end
|
73
73
|
|
74
74
|
|
75
75
|
it "should otherwise raise ArgumentError" do
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
end.should raise_error ArgumentError
|
76
|
+
expect { PortMod.new(
|
77
|
+
:port_no => 2,
|
78
|
+
:hw_addr => Array.new( 1234 ),
|
79
|
+
:config => 1,
|
80
|
+
:mask => 1,
|
81
|
+
:advertise => 0
|
82
|
+
)
|
83
|
+
}.to raise_error( ArgumentError )
|
85
84
|
end
|
86
85
|
end
|
87
86
|
end
|
@@ -51,8 +51,8 @@ module Trema
|
|
51
51
|
link "host", "0xabc"
|
52
52
|
}.run( PortStatusController ) {
|
53
53
|
controller( "PortStatusController" ).should_receive( :port_status ).with do | dpid, message |
|
54
|
-
dpid.
|
55
|
-
message.
|
54
|
+
expect( dpid ).to eq( 0xabc )
|
55
|
+
expect( message ).to be_an_instance_of( PortStatusModify )
|
56
56
|
end
|
57
57
|
|
58
58
|
controller( "PortStatusController" ).send_message 0xabc, FeaturesRequest.new
|
data/spec/trema/port_spec.rb
CHANGED
@@ -25,31 +25,31 @@ require "trema"
|
|
25
25
|
describe Trema::Port do
|
26
26
|
it "should have its port number" do
|
27
27
|
port = Trema::Port.new( :number => 123 )
|
28
|
-
port.number.
|
28
|
+
expect( port.number ).to be( 123 )
|
29
29
|
end
|
30
30
|
|
31
31
|
it "should check the port up" do
|
32
32
|
port = Trema::Port.new( :config => 0, :state => 0 )
|
33
|
-
port.up
|
34
|
-
port.down
|
33
|
+
expect( port.up? ).to be_true
|
34
|
+
expect( port.down? ).to be_false
|
35
35
|
end
|
36
36
|
|
37
37
|
it "should check the port down(config=0,state=1)" do
|
38
38
|
port = Trema::Port.new( :config => 0, :state => 1 )
|
39
|
-
port.up
|
40
|
-
port.down
|
39
|
+
expect( port.up? ).to be_false
|
40
|
+
expect( port.down? ).to be_true
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should check the port down(config=1,state=0)" do
|
44
44
|
port = Trema::Port.new( :config => 1, :state => 0 )
|
45
|
-
port.up
|
46
|
-
port.down
|
45
|
+
expect( port.up? ).to be_false
|
46
|
+
expect( port.down? ).to be_true
|
47
47
|
end
|
48
48
|
|
49
49
|
it "should check the port down(config=1,state=1)" do
|
50
50
|
port = Trema::Port.new( :config => 1, :state => 1 )
|
51
|
-
port.up
|
52
|
-
port.down
|
51
|
+
expect( port.up? ).to be_false
|
52
|
+
expect( port.down? ).to be_true
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -34,8 +34,8 @@ describe QueueGetConfigReply, ".new( VALID OPTIONS )" do
|
|
34
34
|
:queues => Queue.queues
|
35
35
|
)
|
36
36
|
end
|
37
|
-
its(
|
38
|
-
its(
|
37
|
+
its( "queues.length" ) { should == 2 }
|
38
|
+
its( "queues.first" ) { should be_an_instance_of PacketQueue }
|
39
39
|
its( :datapath_id ) { should == 0xabc }
|
40
40
|
its( :transaction_id ) { should == 123 }
|
41
41
|
end
|
@@ -21,63 +21,73 @@ require "trema"
|
|
21
21
|
|
22
22
|
|
23
23
|
describe SendOutPort, :type => "actions" do
|
24
|
-
|
25
|
-
subject { SendOutPort.new(
|
24
|
+
describe "#new(port_number)" do
|
25
|
+
subject( :send_out_port ) { SendOutPort.new( port_number ) }
|
26
26
|
|
27
|
-
its( :port_number ) { should == 1 }
|
28
|
-
its( :max_len ) { should == 2 ** 16 - 1 }
|
29
|
-
its( :to_s ) { should == "SendOutPort: port=1, max_len=65535" }
|
30
|
-
end
|
31
27
|
|
32
|
-
|
33
|
-
|
28
|
+
context "with port_number (1)" do
|
29
|
+
let( :port_number ) { 1 }
|
34
30
|
|
35
|
-
|
36
|
-
|
37
|
-
its( :
|
38
|
-
its( :to_s ) { should == "SendOutPort: port=1, max_len=65535" }
|
31
|
+
its( :port_number ) { should eq( 1 ) }
|
32
|
+
its( :max_len ) { should eq( 2 ** 16 - 1 ) }
|
33
|
+
its( :to_s ) { should eq( "SendOutPort: port_number=1, max_len=65535" ) }
|
39
34
|
end
|
40
35
|
|
41
|
-
it_validates "option range", :number, 0..( 2 ** 16 - 1 )
|
42
|
-
end
|
43
36
|
|
44
|
-
|
45
|
-
|
37
|
+
context "with port_number (10)" do
|
38
|
+
let( :port_number ) { 10 }
|
46
39
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
40
|
+
context "when set as FlowMod's action", :sudo => true do
|
41
|
+
it "should insert a new flow entry with action (output:10)" do
|
42
|
+
class TestController < Controller; end
|
43
|
+
network {
|
44
|
+
vswitch { datapath_id 0xabc }
|
45
|
+
}.run( TestController ) {
|
46
|
+
controller( "TestController" ).send_flow_mod_add( 0xabc, :actions => send_out_port )
|
47
|
+
sleep 2
|
48
|
+
expect( vswitch( "0xabc" ) ).to have( 1 ).flows
|
49
|
+
expect( vswitch( "0xabc" ).flows[ 0 ].actions ).to eq( "output:10" )
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
51
53
|
end
|
52
54
|
|
53
|
-
|
55
|
+
|
56
|
+
it_validates "option is within range", :port_number, 0..( 2 ** 16 - 1 )
|
54
57
|
end
|
55
58
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
59
|
+
|
60
|
+
describe "#new(:port_number => value)" do
|
61
|
+
subject { SendOutPort.new( :port_number => port_number ) }
|
62
|
+
|
63
|
+
|
64
|
+
context "with option (:port_number => 1)" do
|
65
|
+
let( :port_number ) { 1 }
|
66
|
+
|
67
|
+
its( :port_number ) { should eq( 1 ) }
|
68
|
+
its( :max_len ) { should eq( 2 ** 16 - 1 ) }
|
69
|
+
its( :to_s ) { should eq( "SendOutPort: port_number=1, max_len=65535" ) }
|
67
70
|
end
|
68
71
|
end
|
69
72
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
}
|
73
|
+
|
74
|
+
describe "#new(:port_number => value1, :max_len => value2)" do
|
75
|
+
subject { SendOutPort.new( options ) }
|
76
|
+
|
77
|
+
|
78
|
+
context "with options (:port_number => 1, :max_len => 256)" do
|
79
|
+
let( :options ) { { :port_number => 1, :max_len => 256 } }
|
80
|
+
|
81
|
+
its( :port_number ) { should eq( 1 ) }
|
82
|
+
its( :max_len ) { should eq( 256 ) }
|
83
|
+
its( :to_s ) { should eq( "SendOutPort: port_number=1, max_len=256" ) }
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
context "with options (:port_number => 1, :max_len => max_len)" do
|
88
|
+
let( :options ) { { :port_number => 1, :max_len => max_len } }
|
89
|
+
|
90
|
+
it_validates "option is within range", :max_len, 0..( 2 ** 16 - 1 )
|
81
91
|
end
|
82
92
|
end
|
83
93
|
end
|
@@ -59,8 +59,8 @@ describe SetConfig, ".new( VALID OPTIONS )" do
|
|
59
59
|
vswitch { datapath_id 0xabc }
|
60
60
|
}.run( SetConfigController ) {
|
61
61
|
controller( "SetConfigController" ).should_receive( :get_config_reply ) do | dpid, arg |
|
62
|
-
arg.flags.
|
63
|
-
arg.miss_send_len.
|
62
|
+
expect( arg.flags ).to eq( 0 )
|
63
|
+
expect( arg.miss_send_len ).to eq( 0 )
|
64
64
|
end
|
65
65
|
set_config = SetConfig.new( :flags => 0, :miss_send_len => 0, :transaction_id => 123 )
|
66
66
|
controller( "SetConfigController" ).send_message( 0xabc, set_config )
|
@@ -51,7 +51,7 @@ describe SetEthDstAddr, ".new( mac_address )", :type => "actions" do
|
|
51
51
|
it { expect { subject }.to raise_error( TypeError ) }
|
52
52
|
end
|
53
53
|
|
54
|
-
it_validates "option range", :mac_address, 0..0xffffffffffff
|
54
|
+
it_validates "option is within range", :mac_address, 0..0xffffffffffff
|
55
55
|
|
56
56
|
context "when sending a Flow Mod with action set to SetEthDstAddr" do
|
57
57
|
let( :mac_address ) { "52:54:00:a8:ad:8c" }
|
@@ -63,8 +63,8 @@ describe SetEthDstAddr, ".new( mac_address )", :type => "actions" do
|
|
63
63
|
}.run( TestController ) {
|
64
64
|
controller( "TestController" ).send_flow_mod_add( 0xabc, :actions => subject )
|
65
65
|
sleep 2
|
66
|
-
vswitch( "0xabc" ).
|
67
|
-
vswitch( "0xabc" ).flows[ 0 ].actions.
|
66
|
+
expect( vswitch( "0xabc" ) ).to have( 1 ).flows
|
67
|
+
expect( vswitch( "0xabc" ).flows[ 0 ].actions ).to eq( "mod_dl_dst:52:54:00:a8:ad:8c" )
|
68
68
|
}
|
69
69
|
end
|
70
70
|
end
|
@@ -51,7 +51,7 @@ describe SetEthSrcAddr, ".new( mac_address )", :type => "actions" do
|
|
51
51
|
it { expect { subject }.to raise_error( TypeError ) }
|
52
52
|
end
|
53
53
|
|
54
|
-
it_validates "option range", :mac_address, 0..0xffffffffffff
|
54
|
+
it_validates "option is within range", :mac_address, 0..0xffffffffffff
|
55
55
|
|
56
56
|
context "when sending a Flow Mod with action set to SetEthSrcAddr" do
|
57
57
|
let( :mac_address ) { "52:54:00:a8:ad:8c" }
|
@@ -63,8 +63,8 @@ describe SetEthSrcAddr, ".new( mac_address )", :type => "actions" do
|
|
63
63
|
}.run( TestController ) {
|
64
64
|
controller( "TestController" ).send_flow_mod_add( 0xabc, :actions => subject )
|
65
65
|
sleep 2
|
66
|
-
vswitch( "0xabc" ).
|
67
|
-
vswitch( "0xabc" ).flows[ 0 ].actions.
|
66
|
+
expect( vswitch( "0xabc" ) ).to have( 1 ).flows
|
67
|
+
expect( vswitch( "0xabc" ).flows[ 0 ].actions ).to eq( "mod_dl_src:52:54:00:a8:ad:8c" )
|
68
68
|
}
|
69
69
|
end
|
70
70
|
end
|
@@ -20,32 +20,36 @@ require File.join( File.dirname( __FILE__ ), "..", "spec_helper" )
|
|
20
20
|
require "trema"
|
21
21
|
|
22
22
|
|
23
|
-
describe SetIpDstAddr, ".new(ip_address)" do
|
23
|
+
describe SetIpDstAddr, ".new(ip_address)", :type => "actions" do
|
24
24
|
subject { SetIpDstAddr.new( ip_address ) }
|
25
25
|
|
26
|
-
context %{
|
26
|
+
context %{with ip_address ("192.168.1.1")} do
|
27
27
|
let( :ip_address ) { "192.168.1.1" }
|
28
|
-
its(
|
28
|
+
its( "ip_address.to_s" ) { should == "192.168.1.1" }
|
29
29
|
end
|
30
|
-
end
|
31
30
|
|
31
|
+
context %{with invalid ip_address ("192.168.1")} do
|
32
|
+
let( :ip_address ) { "192.168.1" }
|
33
|
+
it { expect { subject }.to raise_error( ArgumentError ) }
|
34
|
+
end
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
+
context "with invalid ip_address ([1, 2, 3])" do
|
37
|
+
let( :ip_address ) { [ 1, 2, 3 ] }
|
38
|
+
it { expect { subject }.to raise_error( TypeError ) }
|
39
|
+
end
|
36
40
|
|
41
|
+
context "when sending a Flow Mod with SetIpDstAddr" do
|
42
|
+
let( :ip_address ) { "192.168.1.1" }
|
37
43
|
|
38
|
-
|
39
|
-
|
40
|
-
it "should have a flow with action set to mod_nw_dst" do
|
41
|
-
class FlowModAddController < Controller; end
|
44
|
+
it "should insert a flow entry with action (mod_nw_dst:192.168.1.1)" do
|
45
|
+
class TestController < Controller; end
|
42
46
|
network {
|
43
47
|
vswitch { datapath_id 0xabc }
|
44
|
-
}.run(
|
45
|
-
controller( "
|
46
|
-
sleep 2
|
47
|
-
vswitch( "0xabc" ).
|
48
|
-
vswitch( "0xabc" ).flows[0].actions.
|
48
|
+
}.run( TestController ) {
|
49
|
+
controller( "TestController" ).send_flow_mod_add( 0xabc, :actions => subject )
|
50
|
+
sleep 2
|
51
|
+
expect( vswitch( "0xabc" ) ).to have( 1 ).flows
|
52
|
+
expect( vswitch( "0xabc" ).flows[ 0 ].actions ).to eq( "mod_nw_dst:192.168.1.1" )
|
49
53
|
}
|
50
54
|
end
|
51
55
|
end
|
@@ -20,32 +20,36 @@ require File.join( File.dirname( __FILE__ ), "..", "spec_helper" )
|
|
20
20
|
require "trema"
|
21
21
|
|
22
22
|
|
23
|
-
describe SetIpSrcAddr, ".new(ip_address)" do
|
23
|
+
describe SetIpSrcAddr, ".new(ip_address)", :type => "actions" do
|
24
24
|
subject { SetIpSrcAddr.new( ip_address ) }
|
25
25
|
|
26
|
-
context %{
|
26
|
+
context %{with ip_address ("192.168.1.1")} do
|
27
27
|
let( :ip_address ) { "192.168.1.1" }
|
28
|
-
its(
|
28
|
+
its( "ip_address.to_s" ) { should == "192.168.1.1" }
|
29
29
|
end
|
30
|
-
end
|
31
30
|
|
31
|
+
context %{with invalid ip_address ("192.168.1")} do
|
32
|
+
let( :ip_address ) { "192.168.1" }
|
33
|
+
it { expect { subject }.to raise_error( ArgumentError ) }
|
34
|
+
end
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
+
context "with invalid ip_address ([1, 2, 3])" do
|
37
|
+
let( :ip_address ) { [ 1, 2, 3 ] }
|
38
|
+
it { expect { subject }.to raise_error( TypeError ) }
|
39
|
+
end
|
36
40
|
|
41
|
+
context "when sending a Flow Mod with SetIpSrcAddr" do
|
42
|
+
let( :ip_address ) { "192.168.1.1" }
|
37
43
|
|
38
|
-
|
39
|
-
|
40
|
-
it "should have a flow with action set to mod_nw_src" do
|
41
|
-
class FlowModAddController < Controller; end
|
44
|
+
it "should insert a flow entry with action (mod_nw_src:192.168.1.1)" do
|
45
|
+
class TestController < Controller; end
|
42
46
|
network {
|
43
47
|
vswitch { datapath_id 0xabc }
|
44
|
-
}.run(
|
45
|
-
controller( "
|
46
|
-
sleep 2
|
47
|
-
vswitch( "0xabc" ).
|
48
|
-
vswitch( "0xabc" ).flows[0].actions.
|
48
|
+
}.run( TestController ) {
|
49
|
+
controller( "TestController" ).send_flow_mod_add( 0xabc, :actions => subject )
|
50
|
+
sleep 2
|
51
|
+
expect( vswitch( "0xabc" ) ).to have( 1 ).flows
|
52
|
+
expect( vswitch( "0xabc" ).flows[ 0 ].actions ).to eq( "mod_nw_src:192.168.1.1" )
|
49
53
|
}
|
50
54
|
end
|
51
55
|
end
|