Class: Trema::SwitchManager
- Inherits:
-
NetworkComponent
- Object
- NetworkComponent
- Trema::SwitchManager
- Includes:
- Daemon
- Defined in:
- ruby/trema/switch-manager.rb
Overview
The controller class of switch_manager
Instance Attribute Summary collapse
-
#no_flow_cleanup ⇒ Bool
Do not cleanup the flow table of switches on startup.
-
#rule ⇒ Hash
Event forwarding rule.
Instance Method Summary collapse
-
#initialize(rule, port = nil) ⇒ SwitchManager
constructor
Creates a switch manager controller.
-
#name ⇒ String
Returns the name of switch manager.
Methods included from Daemon
#pid_file, #restart!, #run, #run!, #running?, #shutdown, #shutdown!
Methods inherited from NetworkComponent
[], add, clear, each, inherited, size
Constructor Details
#initialize(rule, port = nil) ⇒ SwitchManager
Creates a switch manager controller
68 69 70 71 72 73 |
# File 'ruby/trema/switch-manager.rb', line 68 def initialize rule, port = nil @rule = rule @port = port @no_flow_cleanup = false SwitchManager.add self end |
Instance Attribute Details
#no_flow_cleanup ⇒ Bool
Do not cleanup the flow table of switches on startup
56 57 58 |
# File 'ruby/trema/switch-manager.rb', line 56 def no_flow_cleanup @no_flow_cleanup end |
#rule ⇒ Hash
Event forwarding rule
45 46 47 |
# File 'ruby/trema/switch-manager.rb', line 45 def rule @rule end |
Instance Method Details
#name ⇒ String
Returns the name of switch manager
84 85 86 |
# File 'ruby/trema/switch-manager.rb', line 84 def name "switch manager" end |