Skip to content

Instantly share code, notes, and snippets.

@yasuhito
Created April 3, 2012 03:41
Show Gist options
  • Save yasuhito/2289123 to your computer and use it in GitHub Desktop.
Save yasuhito/2289123 to your computer and use it in GitHub Desktop.
コントローラの switch_ready を起こすだけのスイッチ
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