Sha256: 1ecd213ff95a1abf652d98c1b20ee59837b035221721f40ef13d7f813b72515d

Contents?: true

Size: 1.56 KB

Versions: 32

Compression:

Stored size: 1.56 KB

Contents

Feature: "Learning Switch" sample application

  In order to learn how to implement software L2 switch
  As a developer using Trema
  I want to execute "Learning Switch" sample application

  Background:
    Given a file named "learning_switch.conf" with:
      """
      vswitch("learning") { datapath_id "0xabc" }

      vhost("host1") { ip "192.168.0.1" }
      vhost("host2") { ip "192.168.0.2" }

      link "learning", "host1"
      link "learning", "host2"
      """

  @slow_process
  Scenario: Run "Learning Switch" C example
    Given I run `trema run ../../objects/examples/learning_switch/learning_switch -c learning_switch.conf -d`
     And wait until "learning_switch" is up
    When I send 1 packet from host1 to host2
     And I run `trema show_stats host1 --tx`
     And I run `trema show_stats host2 --rx`
    Then the output from "trema show_stats host1 --tx" should contain "192.168.0.2,1,192.168.0.1,1,1,50"
     And the output from "trema show_stats host2 --rx" should contain "192.168.0.2,1,192.168.0.1,1,1,50"

  @slow_process
  Scenario: Run "Learning Switch" Ruby example
    Given I run `trema run ../../src/examples/learning_switch/learning-switch.rb -c learning_switch.conf -d`
     And wait until "LearningSwitch" is up
    When I send 1 packet from host1 to host2
     And I run `trema show_stats host1 --tx`
     And I run `trema show_stats host2 --rx`
    Then the output from "trema show_stats host1 --tx" should contain "192.168.0.2,1,192.168.0.1,1,1,50"
     And the output from "trema show_stats host2 --rx" should contain "192.168.0.2,1,192.168.0.1,1,1,50"

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
trema-0.4.6 features/examples/learning_switch.feature
trema-0.4.5 features/examples/learning_switch.feature
trema-0.4.4 features/examples/learning_switch.feature
trema-0.4.3 features/examples/learning_switch.feature
trema-0.4.2 features/examples/learning_switch.feature
trema-0.4.1 features/examples/learning_switch.feature
trema-0.4.0 features/examples/learning_switch.feature
trema-0.3.21 features/examples/learning_switch.feature
trema-0.3.20 features/examples/learning_switch.feature
trema-0.3.19 features/examples/learning_switch.feature
trema-0.3.18 features/examples/learning_switch.feature
trema-0.3.17 features/examples/learning_switch.feature
trema-0.3.16 features/examples/learning_switch.feature
trema-0.3.15 features/examples/learning_switch.feature
trema-0.3.14 features/examples/learning_switch.feature
trema-0.3.13 features/examples/learning_switch.feature
trema-0.3.12 features/examples/learning_switch.feature
trema-0.3.11 features/examples/learning_switch.feature
trema-0.3.10 features/examples/learning_switch.feature
trema-0.3.9 features/examples/learning_switch.feature