Sha256: 3aab42ddcb7199c5f8d625809b9c30a3897a910ac4b0637a61c27eac261af4db

Contents?: true

Size: 1.31 KB

Versions: 23

Compression:

Stored size: 1.31 KB

Contents

Feature: "Switch Monitor" sample application

  In order to learn how to listen switch UP/DOWN event
  As a developer using Trema
  I want to execute "Switch Monitor" sample application

  Background:
    Given a file named "switch_monitor.conf" with:
      """
      vswitch { datapath_id 0x1 }
      vswitch { datapath_id 0x2 }
      vswitch { datapath_id 0x3 }
      """

  @slow_process
  Scenario: Run "Switch Monitor" C example
    Given I run `trema run ../../objects/examples/switch_monitor/switch_monitor -c switch_monitor.conf -d`
     And wait until "switch_monitor" is up
    When I run `trema kill 0x3`
    Then the file "../../tmp/log/switch_monitor.log" should contain "Switch 0x3 is DOWN"
    When I run `trema up 0x3`
     And *** sleep 10 ***
    Then the file "../../tmp/log/switch_monitor.log" should contain "All switches = 0x1, 0x2, 0x3"

  @slow_process
  Scenario: Run "Switch Monitor" Ruby example
    Given I run `trema run ../../src/examples/switch_monitor/switch-monitor.rb -c switch_monitor.conf -d`
     And wait until "SwitchMonitor" is up
    When I run `trema kill 0x3`
    Then the file "../../tmp/log/SwitchMonitor.log" should contain "Switch 0x3 is DOWN"
    When I run `trema up 0x3`
     And *** sleep 10 ***
    Then the file "../../tmp/log/SwitchMonitor.log" should contain "All switches = 0x1, 0x2, 0x3"

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trema-0.3.19 features/examples/switch_monitor.feature
trema-0.3.18 features/examples/switch_monitor.feature
trema-0.3.17 features/examples/switch_monitor.feature
trema-0.3.16 features/examples/switch_monitor.feature
trema-0.3.15 features/examples/switch_monitor.feature
trema-0.3.14 features/examples/switch_monitor.feature
trema-0.3.13 features/examples/switch_monitor.feature
trema-0.3.12 features/examples/switch_monitor.feature
trema-0.3.11 features/examples/switch_monitor.feature
trema-0.3.10 features/examples/switch_monitor.feature
trema-0.3.9 features/examples/switch_monitor.feature
trema-0.3.8 features/examples/switch_monitor.feature
trema-0.3.7 features/examples/switch_monitor.feature
trema-0.3.6 features/examples/switch_monitor.feature
trema-0.3.5 features/example.switch_monitor.feature
trema-0.3.4 features/example.switch_monitor.feature
trema-0.3.3 features/example.switch_monitor.feature
trema-0.3.2 features/example.switch_monitor.feature
trema-0.3.1 features/example.switch_monitor.feature
trema-0.3.0 features/example.switch_monitor.feature