Skip to content

sliceable_switch_features

nickkaranatsios edited this page Apr 19, 2012 · 36 revisions

Sliceable's switch cucumber features

This page contains sliceable's switch cucumber features tests results. For each cucumber scenario a configuration image and a table of test results is accompanied.

Port-binding

One OpenFlow switch, two slices, four hosts/servers, port-based bindings, default mode.
port_binding_feature_1

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535
                   host1                         0x1           3           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host3                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.

port_binding_feature_1_table

Two OpenFlow switches, two slices, four hosts/servers, port-based bindings, default mode.
port_binding_feature_2

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x2           1           65535
                   host1                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host3                         0x2           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.

port_binding_feature_1_table

cucumber ../apps/sliceable_routing_switch/features/port_binding.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, two slices, four servers, port binding                                                                                            # ../apps/sliceable_routing_switch/features/port_binding.feature:8
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 3    | 0xffff | host1      |
      | test1    | 0x1  | 1    | 0xffff | host2      |
      | test2    | 0x1  | 2    | 0xffff | host3      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"
      link "sliceable_routing_switch1", "host3"
      link "sliceable_routing_switch1", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host4 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |

  Scenario: Two openflow switches, two slices, four servers, port binding                                                                                            # ../apps/sliceable_routing_switch/features/port_binding.feature:117
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 2    | 0xffff | host1      |
      | test1    | 0x2  | 1    | 0xffff | host2      |
      | test2    | 0x2  | 2    | 0xffff | host3      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }
      vswitch("sliceable_routing_switch2") { datapath_id "0x2" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch2", "host3"
      link "sliceable_routing_switch2", "host4"
      link "sliceable_routing_switch1", "sliceable_routing_switch2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host4 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |

2 scenarios (2 passed)
67 steps (67 passed)
1m56.969s

Port-binding multiple slices feature

One OpenFlow switch, two slices, four hosts/servers, port-based bindings, default mode.
port_binding_multiple_slices_feature_1

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535
                   host1                         0x1           3           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host4                         0x1           4           65535
                   host3                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.

port_binding_multiple_slices_feature_1_table

Six OpenFlow switches, three slices, six hosts/servers, port-based bindings, default mode.

port_binding_multiple_slices_feature_2

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x2           1           65535
                   host1                         0x1           3           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host4                         0x4           3           65535
                   host3                         0x3           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.
[Description]
slice3

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host5                         0x5           1           65535
                   host6                         0x6           1           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
No bindings found.

port_binding_feature_multiple_slices_2_table

cucumber ../apps/sliceable_routing_switch/features/port_binding_multiple_slices.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, two slices, four servers, port binding                                                                                            # ../apps/sliceable_routing_switch/features/port_binding_multiple_slices.feature:8
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 3    | 0xffff | host1      |
      | test1    | 0x1  | 1    | 0xffff | host2      |
      | test2    | 0x1  | 2    | 0xffff | host3      |
      | test2    | 0x1  | 4    | 0xffff | host4      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"
      link "sliceable_routing_switch1", "host3"
      link "sliceable_routing_switch1", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    And I send packets from host1 to host2 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host1 --tx" (log = "tx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host2 --rx" (log = "rx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host1.log" and "rx.host2.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host2 to host1 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host2 --tx" (log = "tx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host1 --rx" (log = "rx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host2.log" and "rx.host1.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host3 to host4 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host3 --tx" (log = "tx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host4 --rx" (log = "rx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host3.log" and "rx.host4.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host4 to host3 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host4 --tx" (log = "tx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host3 --rx" (log = "rx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host4.log" and "rx.host3.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71

  Scenario: Six openflow switches, three slices, six servers, port binding                                                                                         # ../apps/sliceable_routing_switch/features/port_binding_multiple_slices.feature:62
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
      | test3    | slice3      |
    And the following port binding records                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 3    | 0xffff | host1      |
      | test1    | 0x2  | 1    | 0xffff | host2      |
      | test2    | 0x3  | 2    | 0xffff | host3      |
      | test2    | 0x4  | 3    | 0xffff | host4      |
      | test3    | 0x5  | 1    | 0xffff | host5      |
      | test3    | 0x6  | 1    | 0xffff | host6      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }
      vswitch("sliceable_routing_switch2") { datapath_id "0x2" }
      vswitch("sliceable_routing_switch3") { datapath_id "0x3" }
      vswitch("sliceable_routing_switch4") { datapath_id "0x4" }
      vswitch("sliceable_routing_switch5") { datapath_id "0x5" }
      vswitch("sliceable_routing_switch6") { datapath_id "0x6" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }
      vhost("host5") { mac "00:00:00:00:00:05" }
      vhost("host6") { mac "00:00:00:00:00:06" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch3", "host3"
      link "sliceable_routing_switch4", "host4"
      link "sliceable_routing_switch5", "host5"
      link "sliceable_routing_switch6", "host6"
      link "sliceable_routing_switch1", "sliceable_routing_switch2"
      link "sliceable_routing_switch1", "sliceable_routing_switch3"
      link "sliceable_routing_switch2", "sliceable_routing_switch4"
      link "sliceable_routing_switch3", "sliceable_routing_switch5"
      link "sliceable_routing_switch4", "sliceable_routing_switch6"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    And I send packets from host1 to host2 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host1 --tx" (log = "tx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host2 --rx" (log = "rx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host1.log" and "rx.host2.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host2 to host1 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host2 --tx" (log = "tx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host1 --rx" (log = "rx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host2.log" and "rx.host1.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host3 to host4 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host3 --tx" (log = "tx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host4 --rx" (log = "rx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host3.log" and "rx.host4.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host4 to host3 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host4 --tx" (log = "tx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host3 --rx" (log = "rx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host4.log" and "rx.host3.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host5 to host6 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host5 --tx" (log = "tx.host5.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host6 --rx" (log = "rx.host6.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host5.log" and "rx.host6.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host6 to host5 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host4 --tx" (log = "tx.host6.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host3 --rx" (log = "rx.host5.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host6.log" and "rx.host5.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71

2 scenarios (2 passed)
53 steps (53 passed)
2m35.403s

MAC-based bindings on ports feature

One OpenFlow switch, two slices, four hosts/servers, MAC-based bindings on ports, restrict hosts mode.

mac_binding_on_ports_feature_1

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535
                   host1                         0x1           3           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host2_mac                         0x1           1           65535           00:00:00:00:00:02
               host1_mac                         0x1           3           65535           00:00:00:00:00:01
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host3                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host3_mac                         0x1           2           65535           00:00:00:00:00:03

port_binding_feature_1_table.jpg

One OpenFlow switch, two slices, four hosts/servers, MAC-based bindings on ports (invalid MAC address), restrict mode.

mac_binding_on_ports_feature_2

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535
                   host1                         0x1           3           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host2_mac                         0x1           1           65535           00:00:00:00:00:02
               host1_mac                         0x1           3           65535           00:00:00:00:00:01
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host3                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host3_mac                         0x1           2           65535           00:00:00:00:00:03

mac_binding_on_ports_feature_2_table

Two OpenFlow switches, two slices, four hosts/servers, MAC-based bindings on ports, restrict mode.

mac_binding_on_ports_feature_2

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535
                   host1                         0x1           3           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host2_mac                         0x1           1           65535           00:00:00:00:00:02
               host1_mac                         0x1           3           65535           00:00:00:00:00:01
[Description]
slice2

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host3                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host3_mac                         0x1           2           65535           00:00:00:00:00:03

mac_binding_on_ports_feature_3_table

cucumber ../apps/sliceable_routing_switch/features/port_mac_binding.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, two slices, four servers, port and mac binding                                                                                                     # ../apps/sliceable_routing_switch/features/port_mac_binding.feature:8
    Given the following slice records                                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 3    | 0xffff | host1      |
      | test1    | 0x1  | 1    | 0xffff | host2      |
      | test2    | 0x1  | 2    | 0xffff | host3      |
    And the following port and mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:52
      | slice_id | port_binding_id | address           | binding_id |
      | test1    | host1           | 00:00:00:00:00:01 | host1_mac  |
      | test1    | host2           | 00:00:00:00:00:02 | host2_mac  |
      | test2    | host3           | 00:00:00:00:00:03 | host3_mac  |
    And the following filter records                                                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --restrict_hosts" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"
      link "sliceable_routing_switch1", "host3"
      link "sliceable_routing_switch1", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host4 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |

  Scenario: One openflow switch, two slices, four servers, port and mac binding ( invalid mac address )                                                                             # ../apps/sliceable_routing_switch/features/port_mac_binding.feature:122
    Given the following slice records                                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 3    | 0xffff | host1      |
      | test1    | 0x1  | 1    | 0xffff | host2      |
      | test2    | 0x1  | 2    | 0xffff | host3      |
    And the following port and mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:52
      | slice_id | port_binding_id | address           | binding_id |
      | test1    | host1           | 00:00:00:00:00:01 | host1_mac  |
      | test1    | host2           | 00:00:00:00:00:02 | host2_mac  |
      | test2    | host3           | 00:00:00:00:00:03 | host3_mac  |
    And the following filter records                                                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                                             # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --restrict_hosts" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch2") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:ff" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch2", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch2", "host3"
      link "sliceable_routing_switch2", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |

  Scenario: Two openflow switches, two slices, four servers, port and mac binding                                                                                                     # ../apps/sliceable_routing_switch/features/port_mac_binding.feature:181
    Given the following slice records                                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 2    | 0xffff | host1      |
      | test1    | 0x2  | 1    | 0xffff | host2      |
      | test2    | 0x2  | 2    | 0xffff | host3      |
    And the following port and mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:52
      | slice_id | port_binding_id | address           | binding_id |
      | test1    | host1           | 00:00:00:00:00:01 | host1_mac  |
      | test1    | host2           | 00:00:00:00:00:02 | host2_mac  |
      | test2    | host3           | 00:00:00:00:00:03 | host3_mac  |
    And the following filter records                                                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                                             # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --restrict_hosts" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }
      vswitch("sliceable_routing_switch2") { datapath_id "0x2" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch2", "host3"
      link "sliceable_routing_switch2", "host4"
      link "sliceable_routing_switch1", "sliceable_routing_switch2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host4 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |

  Scenario: One openflow switch, two slices, four servers, port and mac binding ( invalid mac address ) # ../apps/sliceable_routing_switch/features/port_mac_binding.feature:298
    Given the following slice records                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following port binding records                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 3    | 0xffff | host1      |
      | test1    | 0x1  | 1    | 0xffff | host2      |
      | test2    | 0x1  | 2    | 0xffff | host3      |
    And the following port and mac binding records                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:52
      | slice_id | port_binding_id | address           | binding_id |
      | test1    | host1           | 00:00:00:00:00:01 | host1_mac  |
      | test1    | host2           | 00:00:00:00:00:02 | host2_mac  |
      | test2    | host3           | 00:00:00:00:00:03 | host3_mac  |
    And the following filter records                                                                    # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |

4 scenarios (4 passed)
87 steps (87 passed)
2m32.021s

Mixed port-mac bindings feature

One OpenFlow switch, one slice, two hosts/servers, port-based and MAC-based bindings, default mode.

port_mac_mixed_bindings_feature

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host1                         0x1           2           65535

[MAC-based bindings]
                      ID                         MAC
                   host2           00:00:00:00:00:02

[MAC-based bindings on ports]
No bindings found.

port_mac_mixed_binding_feature_table

cucumber ../apps/sliceable_routing_switch/features/port_mac_mixed_binding.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, one slice, two servers, one port binding, one mac binding                                                                        # ../apps/sliceable_routing_switch/features/port_mac_mixed_binding.feature:8
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
    And the following port binding records                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 2    | 0xffff | host1      |
    And the following mac binding records                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:02 | host2      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 1     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 2     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 1     | 1     |

1 scenario (1 passed)
16 steps (16 passed)
0m27.200s

Mixed port-binding feature

One OpenFlow switch, one slice, two hosts/servers, port-based and MAC-based bindings on ports, restrict hosts mode.

port_port_mac_mixed_binding_feature

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535
                   host1                         0x1           2           65535

[MAC-based bindings]
No bindings found.

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host2_mac                         0x1           1           65535           00:00:00:00:00:02

port_port_mac_mixed_binding_feature_table

cucumber ../apps/sliceable_routing_switch/features/port_port_mac_mixed_binding.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, one slice, two servers, one port binding, one port and mac binding                                                                                # ../apps/sliceable_routing_switch/features/port_port_mac_mixed_binding.feature:8
    Given the following slice records                                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
    And the following port binding records                                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 2    | 0xffff | host1      |
      | test1    | 0x1  | 1    | 0xffff | host2      |
    And the following port and mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:52
      | slice_id | port_binding_id | address           | binding_id |
      | test1    | host2           | 00:00:00:00:00:02 | host2_mac  |
    And the following filter records                                                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --restrict_hosts" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 1     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 2     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 1     | 0     |

1 scenario (1 passed)
16 steps (16 passed)
0m27.042s

Mac-based binding feature

One OpenFlow switch, two slices, four hosts/servers, MAC-based bindings, default mode.

mac_bindings_feature_1

[Description]
slice1

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host2           00:00:00:00:00:02
                   host1           00:00:00:00:00:01

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host3           00:00:00:00:00:03

[MAC-based bindings on ports]
No bindings found.

mac_bindings_feature_1_table

Two OpenFlow switches, two slices, four hosts/servers, MAC-based bindings, default mode.

mac_bindings_feature_2

[Description]
slice1

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host2           00:00:00:00:00:02
                   host1           00:00:00:00:00:01

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host3           00:00:00:00:00:03

[MAC-based bindings on ports]
No bindings found.

mac_bindings_feature_2_table

cucumber ../apps/sliceable_routing_switch/features/mac_binding.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, two slices, four servers, mac binding                                                                                             # ../apps/sliceable_routing_switch/features/mac_binding.feature:8
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following mac binding records                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
      | test1    | 00:00:00:00:00:02 | host2      |
      | test2    | 00:00:00:00:00:03 | host3      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"
      link "sliceable_routing_switch1", "host3"
      link "sliceable_routing_switch1", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 0     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host4 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |

  Scenario: Two openflow switches, two slices, four servers, mac binding                                                                                             # ../apps/sliceable_routing_switch/features/mac_binding.feature:117
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following mac binding records                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
      | test1    | 00:00:00:00:00:02 | host2      |
      | test2    | 00:00:00:00:00:03 | host3      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }
      vswitch("sliceable_routing_switch2") { datapath_id "0x2" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch2", "host3"
      link "sliceable_routing_switch2", "host4"
      link "sliceable_routing_switch1", "sliceable_routing_switch2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 0     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host4 to host1                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |

2 scenarios (2 passed)
67 steps (67 passed)
1m58.538s

Mac-binding loose mode feature

One OpenFlow switch, two slices, four hosts/servers, MAC-based bindings.

mac_bindings_loose_feature_1

mac_bindings_loose_mode_feature_1_table

cucumber ../apps/sliceable_routing_switch/features/mac_binding_loose_mode.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, two slices, four servers, mac binding ( loose mode )                                                                                      # ../apps/sliceable_routing_switch/features/mac_binding_loose_mode.feature:8
    Given the following slice records                                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
      | test1    | 00:00:00:00:00:02 | host2      |
      | test2    | 00:00:00:00:00:03 | host3      |
    And the following filter records                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --loose" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"
      link "sliceable_routing_switch1", "host3"
      link "sliceable_routing_switch1", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 1     |
    When I send 1 packets from host4 to host1                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 1     |
    When I send 1 packets from host1 to host4                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 1     |

  Scenario: Two openflow switches, two slices, four servers, mac binding ( loose mode )                                                                                      # ../apps/sliceable_routing_switch/features/mac_binding_loose_mode.feature:117
    Given the following slice records                                                                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
      | test1    | 00:00:00:00:00:02 | host2      |
      | test2    | 00:00:00:00:00:03 | host3      |
    And the following filter records                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                                    # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --loose" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }
      vswitch("sliceable_routing_switch2") { datapath_id "0x2" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch2", "host3"
      link "sliceable_routing_switch2", "host4"
      link "sliceable_routing_switch1", "sliceable_routing_switch2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 0     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 0     | 1     | 0     | 0     |
    When I send 1 packets from host2 to host1                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 1     | 0     | 0     |
    When I send 1 packets from host1 to host2                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 2     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 0     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 0     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 0     |
    When I send 1 packets from host3 to host1                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 3     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 0     |
    When I send 1 packets from host1 to host3                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 4     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 0     |
    When I send 1 packets from host1 to host4                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 1     |
    When I send 1 packets from host4 to host1                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 5     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 1     |
    When I send 1 packets from host1 to host4                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 | host3 | host4 |
      | 6     | 1     | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 | host3 | host4 |
      | 1     | 2     | 1     | 1     |

2 scenarios (2 passed)
67 steps (67 passed)
1m56.250s

Mac-binding multiple slices feature

One OpenFlow switch, two slices, four hosts/servers, MAC-based bindings, default mode.

mac_bindings_multiple_slices_feature_1

[Description]
slice1

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host2           00:00:00:00:00:02
                   host1           00:00:00:00:00:01

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host4           00:00:00:00:00:04
                   host3           00:00:00:00:00:03

[MAC-based bindings on ports]
No bindings found.

mac_bindings_multiple_slices_feature_1_table

Six OpenFlow switches, three slices, six hosts/servers, MAC-based bindings, default mode.

mac_bindings_multiple_slices_feature_2

[Description]
slice1

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host2           00:00:00:00:00:02
                   host1           00:00:00:00:00:01

[MAC-based bindings on ports]
No bindings found.
[Description]
slice2

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host4           00:00:00:00:00:04
                   host3           00:00:00:00:00:03

[MAC-based bindings on ports]
No bindings found.
[Description]
slice3

[Port-based bindings]
No bindings found.

[MAC-based bindings]
                      ID                         MAC
                   host5           00:00:00:00:00:05
                   host6           00:00:00:00:00:06

[MAC-based bindings on ports]
No bindings found.

mac_binding_multiple_slices_feature_2_table

cucumber ../apps/sliceable_routing_switch/features/mac_binding_multiple_slices.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, two slices, four servers, mac binding                                                                                             # ../apps/sliceable_routing_switch/features/mac_binding_multiple_slices.feature:8
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
    And the following mac binding records                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
      | test1    | 00:00:00:00:00:02 | host2      |
      | test2    | 00:00:00:00:00:03 | host3      |
      | test2    | 00:00:00:00:00:04 | host4      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"
      link "sliceable_routing_switch1", "host3"
      link "sliceable_routing_switch1", "host4"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    And I send packets from host2 to host1 (duration = 1)                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I reset stats to host2                                                                                                                                     # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/reset_stats.rb:18
    And I send packets from host1 to host2 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host1 --tx" (log = "tx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host2 --rx" (log = "rx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host1.log" and "rx.host2.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host2 to host1 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host2 --tx" (log = "tx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host1 --rx" (log = "rx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host2.log" and "rx.host1.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host4 to host3 (duration = 1)                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I reset stats to host4                                                                                                                                     # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/reset_stats.rb:18
    And I send packets from host3 to host4 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host3 --tx" (log = "tx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host4 --rx" (log = "rx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host3.log" and "rx.host4.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host4 to host3 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host4 --tx" (log = "tx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host3 --rx" (log = "rx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host4.log" and "rx.host3.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71

  Scenario: Six openflow switches, three slices, six servers, mac binding                                                                                          # ../apps/sliceable_routing_switch/features/mac_binding_multiple_slices.feature:66
    Given the following slice records                                                                                                                              # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
      | test2    | slice2      |
      | test3    | slice3      |
    And the following mac binding records                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
      | test1    | 00:00:00:00:00:02 | host2      |
      | test2    | 00:00:00:00:00:03 | host3      |
      | test2    | 00:00:00:00:00:04 | host4      |
      | test3    | 00:00:00:00:00:05 | host5      |
      | test3    | 00:00:00:00:00:06 | host6      |
    And the following filter records                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    And I terminated all trema services                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/kill_steps.rb:21
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }
      vswitch("sliceable_routing_switch2") { datapath_id "0x2" }
      vswitch("sliceable_routing_switch3") { datapath_id "0x3" }
      vswitch("sliceable_routing_switch4") { datapath_id "0x4" }
      vswitch("sliceable_routing_switch5") { datapath_id "0x5" }
      vswitch("sliceable_routing_switch6") { datapath_id "0x6" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }
      vhost("host3") { mac "00:00:00:00:00:03" }
      vhost("host4") { mac "00:00:00:00:00:04" }
      vhost("host5") { mac "00:00:00:00:00:05" }
      vhost("host6") { mac "00:00:00:00:00:06" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch2", "host2"
      link "sliceable_routing_switch3", "host3"
      link "sliceable_routing_switch4", "host4"
      link "sliceable_routing_switch5", "host5"
      link "sliceable_routing_switch6", "host6"
      link "sliceable_routing_switch1", "sliceable_routing_switch2"
      link "sliceable_routing_switch1", "sliceable_routing_switch3"
      link "sliceable_routing_switch2", "sliceable_routing_switch4"
      link "sliceable_routing_switch3", "sliceable_routing_switch5"
      link "sliceable_routing_switch4", "sliceable_routing_switch6"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    And I send packets from host2 to host1 (duration = 1)                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I reset stats to host2                                                                                                                                     # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/reset_stats.rb:18
    And I send packets from host1 to host2 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host1 --tx" (log = "tx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host2 --rx" (log = "rx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host1.log" and "rx.host2.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host2 to host1 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host2 --tx" (log = "tx.host2.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host1 --rx" (log = "rx.host1.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host2.log" and "rx.host1.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host4 to host3 (duration = 1)                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I reset stats to host4                                                                                                                                     # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/reset_stats.rb:18
    And I send packets from host3 to host4 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host3 --tx" (log = "tx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host4 --rx" (log = "rx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host3.log" and "rx.host4.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host4 to host3 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host4 --tx" (log = "tx.host4.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host3 --rx" (log = "rx.host3.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host4.log" and "rx.host3.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host6 to host5 (duration = 1)                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I reset stats to host6                                                                                                                                     # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/reset_stats.rb:18
    And I send packets from host5 to host6 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host5 --tx" (log = "tx.host5.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host6 --rx" (log = "rx.host6.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host5.log" and "rx.host6.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71
    And I send packets from host6 to host5 (duration = 10)                                                                                                         # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:32
    And I try to run "./trema show_stats host4 --tx" (log = "tx.host6.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    And I try to run "./trema show_stats host3 --rx" (log = "rx.host5.log")                                                                                        # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:27
    Then the content of "tx.host6.log" and "rx.host5.log" should be identical                                                                                      # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/log_steps.rb:71

2 scenarios (2 passed)
63 steps (63 passed)
2m43.939s

All-bindings feature

One OpenFlow switch, one slice, two hosts/servers, mixed all bindings.

all-bindings-feature

[Description]
slice1

[Port-based bindings]
                      ID                 Datapath ID        Port             VID
                   host2                         0x1           1           65535

[MAC-based bindings]
                      ID                         MAC
                   host1           00:00:00:00:00:01

[MAC-based bindings on ports]
                      ID                 Datapath ID        Port             VID                         MAC
               host2_mac                         0x1           1           65535           00:00:00:00:00:02

all-bindings-table

cucumber ../apps/sliceable_routing_switch/features/mac_port_mac_mixed_binding.feature 
Feature: control multiple openflow switches using sliceable_routing_switch
  
  As a Trema user
  I want to control multiple openflow switches using sliceable_routing_switch application
  So that I can send and receive packets

  Scenario: One openflow switch, one slice, two servers, one port binding, one port and mac binding                                                                                # ../apps/sliceable_routing_switch/features/mac_port_mac_mixed_binding.feature:8
    Given the following slice records                                                                                                                                               # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:29
      | slice_id | description |
      | test1    | slice1      |
    And the following mac binding records                                                                                                                                           # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:44
      | slice_id | address           | binding_id |
      | test1    | 00:00:00:00:00:01 | host1      |
    And the following port binding records                                                                                                                                          # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:37
      | slice_id | dpid | port | vid    | binding_id |
      | test1    | 0x1  | 1    | 0xffff | host2      |
    And the following port and mac binding records                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:52
      | slice_id | port_binding_id | address           | binding_id |
      | test1    | host2           | 00:00:00:00:00:02 | host2_mac  |
    And the following filter records                                                                                                                                                # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/create_table_steps.rb:21
      | filter_id | rule_specification      |
      | default   | priority=0 action=ALLOW |
    When I try trema run "../apps/sliceable_routing_switch/sliceable_routing_switch -s tmp/slice.db -f tmp/filter.db --restrict_hosts" with following configuration (backgrounded): # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/run_steps.rb:32
      """
      vswitch("sliceable_routing_switch1") { datapath_id "0x1" }

      vhost("host1") { mac "00:00:00:00:00:01" }
      vhost("host2") { mac "00:00:00:00:00:02" }

      link "sliceable_routing_switch1", "host1"
      link "sliceable_routing_switch1", "host2"

      run { path "../apps/topology/topology" }
      run { path "../apps/topology/topology_discovery" }

      event :port_status => "topology", :packet_in => "filter", :state_notify => "topology"
      filter :lldp => "topology_discovery", :packet_in => "sliceable_routing_switch"
      """
    And wait until "sliceable_routing_switch" is up                                                                                                                                 # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:26
    And *** sleep 15 ***                                                                                                                                                            # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/misc_steps.rb:21
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 1     | 0     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 0     | 1     |
    When I send 1 packets from host2 to host1                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 1     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 1     | 1     |
    When I send 1 packets from host1 to host2                                                                                                                                       # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/send_packets_steps.rb:21
    Then the total number of tx packets should be:                                                                                                                                  # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:21
      | host1 | host2 |
      | 2     | 1     |
    And the total number of rx packets should be:                                                                                                                                   # /host/Users/co2kara/Documents/projects/apps/sliceable_routing_switch/features/step_definitions/stats_steps.rb:28
      | host1 | host2 |
      | 1     | 2     |

1 scenario (1 passed)
17 steps (17 passed)
0m27.168s