Sha256: 7e1cd6979fae4bad92e7feb858a2b9654c9b52e4cf541fb991dd330a03c13db9
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
Feature: dump_flows Background: Given I set the environment variables to: | variable | value | | TREMA_LOG_DIR | . | | TREMA_PID_DIR | . | | TREMA_SOCKET_DIR | . | And a file named "noop_controller.rb" with: """ruby class NoopController < Trema::Controller; end """ And a file named "flow_mod_controller.rb" with: """ruby class FlowModController < Trema::Controller def switch_ready(datapath_id) send_flow_mod_add(datapath_id, match: Match.new) end end """ And a file named "trema.conf" with: """ruby vswitch('of_switch') { datapath_id 0xabc } """ @sudo Scenario: dump_flows (no flow entries) Given I trema run "noop_controller.rb" with the configuration "trema.conf" When I successfully run `trema dump_flows of_switch` Then the output from "trema dump_flows of_switch" should contain exactly "" @sudo Scenario: dump_flows (one flow entry) Given I trema run "flow_mod_controller.rb" with the configuration "trema.conf" When I successfully run `trema dump_flows of_switch` Then the output should match: """ ^cookie=0x0, duration=\d+\.\d+s, table=0, n_packets=0, n_bytes=0, idle_age=\d+, priority=0 actions=drop """ @sudo Scenario: dump_flows OpenFlow 1.3 (no flow entries) Given I use OpenFlow 1.3 And I trema run "noop_controller.rb" with the configuration "trema.conf" When I successfully run `trema dump_flows of_switch` Then the output from "trema dump_flows of_switch" should contain exactly "" @sudo Scenario: dump_flows OpenFlow 1.3 (one flow entry) Given I use OpenFlow 1.3 And I trema run "flow_mod_controller.rb" with the configuration "trema.conf" When I successfully run `trema dump_flows of_switch` Then the output should match: """ ^cookie=0x0, duration=\d+\.\d+s, table=0, n_packets=0, n_bytes=0, priority=0 actions=drop """
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trema-0.10.1 | features/trema_dump_flows/dump_flows.feature |
trema-0.10.0 | features/trema_dump_flows/dump_flows.feature |