Created
April 3, 2012 03:41
-
-
Save yasuhito/2289123 to your computer and use it in GitHub Desktop.
コントローラの switch_ready を起こすだけのスイッチ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MinimumSwitch < Switch | |
def start | |
info "Started (datapath_id=#{ datapath_id.to_hex })." | |
end | |
def controller_connected | |
info "Connected to a controller." | |
send_message Hello.new | |
end | |
def features_request xid | |
info "Features Request (transaction_id=#{ xid })." | |
send_message FeaturesReply.new( :datapath_id => datapath_id, :transaction_id => xid ) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment