Class: Trema::DSL::Configuration
- Inherits:
-
Object
- Object
- Trema::DSL::Configuration
- Defined in:
- ruby/trema/dsl/configuration.rb
Overview
The current configuration of Trema.
Instance Attribute Summary collapse
-
#apps ⇒ Hash
readonly
the hash of App.
-
#hosts ⇒ Hash
readonly
the hash of Host.
-
#links ⇒ Hash
readonly
the hash of Link.
-
#netnss ⇒ Object
readonly
Returns the value of attribute netnss.
-
#port ⇒ Number
set/get the port number for switch manager to listen to.
-
#switches ⇒ Hash
readonly
the hash of Switch.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Creates a new Trema configuration.
-
#packetin_filter ⇒ PacketinFilter
Returns PacketinFilter configuration.
-
#switch_manager ⇒ SwitchManager
Returns SwitchManager configuration.
Constructor Details
#initialize ⇒ Configuration
Creates a new Trema configuration
99 100 101 102 103 104 105 106 107 108 |
# File 'ruby/trema/dsl/configuration.rb', line 99 def initialize @port = 6633 @apps = Trema::App.clear @hosts = Trema::Host.clear @links = Trema::Link.clear @packetin_filter = Trema::PacketinFilter.clear @switch_manager = Trema::SwitchManager.clear @switches = Trema::OpenflowSwitch.clear @netnss = Trema::Netns.clear end |
Instance Attribute Details
#apps ⇒ Hash (readonly)
the hash of App
52 53 54 |
# File 'ruby/trema/dsl/configuration.rb', line 52 def apps @apps end |
#hosts ⇒ Hash (readonly)
the hash of Host
63 64 65 |
# File 'ruby/trema/dsl/configuration.rb', line 63 def hosts @hosts end |
#links ⇒ Hash (readonly)
the hash of Link
74 75 76 |
# File 'ruby/trema/dsl/configuration.rb', line 74 def links @links end |
#netnss ⇒ Object (readonly)
Returns the value of attribute netnss.
88 89 90 |
# File 'ruby/trema/dsl/configuration.rb', line 88 def netnss @netnss end |
#port ⇒ Number
set/get the port number for switch manager to listen to
41 42 43 |
# File 'ruby/trema/dsl/configuration.rb', line 41 def port @port end |
#switches ⇒ Hash (readonly)
the hash of Switch
85 86 87 |
# File 'ruby/trema/dsl/configuration.rb', line 85 def switches @switches end |
Instance Method Details
#packetin_filter ⇒ PacketinFilter
Returns PacketinFilter configuration
119 120 121 |
# File 'ruby/trema/dsl/configuration.rb', line 119 def packetin_filter @packetin_filter.values.last end |
#switch_manager ⇒ SwitchManager
Returns SwitchManager configuration
132 133 134 |
# File 'ruby/trema/dsl/configuration.rb', line 132 def switch_manager @switch_manager.values.last end |