Sha256: 2881be7e791d97a98829851706045a54a0208d8af7ccffa52fc10d9c06ddac12

Contents?: true

Size: 889 Bytes

Versions: 8

Compression:

Stored size: 889 Bytes

Contents

Feature: -p (--port) option

  -p (--port) option overrides the default openflow channel port.

  Background:
    Given a file named "switch_ready.rb" with:
      """ruby
      class SwitchReady < Trema::Controller
        def switch_ready(dpid)
          logger.info 'connected to port 1234'
        end
      end
      """
    And a file named "trema.conf" with:
      """ruby
      vswitch {
        datapath_id 0xabc
        port 1234
      }
      """

  @sudo
  Scenario: -p option
    When I successfully run `trema run -p 1234 switch_ready.rb -c trema.conf -d`
    And I run `sleep 5`
    Then the file "SwitchReady.log" should contain "connected to port 1234"

  @sudo
  Scenario: --port option
    When I successfully run `trema run --port 1234 switch_ready.rb -c trema.conf -d`
    And I run `sleep 5`
    Then the file "SwitchReady.log" should contain "connected to port 1234"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
trema-0.8.4 features/trema_run/port_option.feature
trema-0.8.3 features/trema_run/port_option.feature
trema-0.8.2 features/trema_run/port_option.feature
trema-0.8.1 features/trema_run/port_option.feature
trema-0.8.0 features/trema_run/port_option.feature
trema-0.7.1 features/trema_run/port_option.feature
trema-0.7.0 features/trema_run/port_option.feature
trema-0.6.0 features/trema_run/port_option.feature