Class: Trema::SwitchDaemon
- Inherits:
-
Object
- Object
- Trema::SwitchDaemon
- Defined in:
- ruby/trema/switch-daemon.rb
Constant Summary collapse
- MANDATORY_QUEUES =
[ :port_status, :packet_in, :state_notify ]
Instance Method Summary collapse
-
#initialize(queues) ⇒ SwitchDaemon
constructor
Creates a new abstract representation of SwitchDaemon instance by accepting and validating a hash of queue options.
-
#options ⇒ Array<String>
Constructs switch daemon’s options associating one or more controller name to a queue name.
Constructor Details
#initialize(queues) ⇒ SwitchDaemon
Creates a new abstract representation of SwitchDaemon instance by accepting and validating a hash of queue options.
38 39 40 41 |
# File 'ruby/trema/switch-daemon.rb', line 38 def initialize queues queues @queues = queues end |
Instance Method Details
#options ⇒ Array<String>
Constructs switch daemon’s options associating one or more controller name to a queue name.
49 50 51 52 53 54 |
# File 'ruby/trema/switch-daemon.rb', line 49 def all_queues = MANDATORY_QUEUES + [ :vendor ] all_queues.collect! do | each | queue each end.flatten! end |