switch_disconnected handler
Background:
- Given I set the environment variables to:
variable value TREMA_LOG_DIR . TREMA_PID_DIR . TREMA_SOCKET_DIR . - And a file named "
switch_disconnected.rb" with:rubyclass SwitchDisconnected < Trema::Controller def switch_disconnected(dpid) logger.info "Switch #{dpid.to_hex} is disconnected." end end - And a file named "
trema.conf" with:rubyvswitch { datapath_id 0xabc }
Scenario: invoke switch_disconnected handler
- Given I use OpenFlow 1.0
- And I trema run "
switch_disconnected.rb" with the configuration "trema.conf" - When I successfully run `trema stop 0xabc`
- Then the file "
SwitchDisconnected.log" should contain:textSwitch 0xabc is disconnected.
Scenario: invoke switch_disconnected handler (OpenFlow 1.3)
- Given I use OpenFlow 1.3
- And I trema run "
switch_disconnected.rb" with the configuration "trema.conf" - When I successfully run `trema stop 0xabc`
- Then the file "
SwitchDisconnected.log" should contain:textSwitch 0xabc is disconnected.
Source: features/handlers/switch_disconnected.feature at commit 3711a30c, Trema (GPL license).