ruby/trema/dsl/configuration.rb in trema-0.2.2.1 vs ruby/trema/dsl/configuration.rb in trema-0.2.3
- old
+ new
@@ -19,12 +19,12 @@
require "trema/app"
require "trema/host"
require "trema/link"
+require "trema/openflow-switch"
require "trema/packetin-filter"
-require "trema/switch"
require "trema/switch-manager"
module Trema
module DSL
@@ -41,20 +41,10 @@
# @return [Number]
#
attr_accessor :port
#
- # use tremashark?
- #
- # @example
- # config.tremashark = true
- #
- # @return [Boolean]
- #
- attr_accessor :tremashark
-
- #
# the hash of {App}
#
# @example
# p config.apps
# #=> {"trema tetris"=>#<Trema::App:0xb73c9328>, ...}
@@ -88,11 +78,11 @@
#
# the hash of {Switch}
#
# @example
# p config.switches
- # #=> {"switch #0"=>#<Trema::Switch:0xb73c9328>, ...}
+ # #=> {"switch #0"=>#<Trema::OpenflowSwitch:0xb73c9328>, ...}
#
# @return [Hash]
#
attr_reader :switches
@@ -105,16 +95,15 @@
#
# @return [Configuration]
#
def initialize
@port = 6633
- @tremashark = false
@apps = Trema::App.clear
@hosts = Trema::Host.clear
@links = Trema::Link.clear
@packetin_filter = Trema::PacketinFilter.clear
@switch_manager = Trema::SwitchManager.clear
- @switches = Trema::Switch.clear
+ @switches = Trema::OpenflowSwitch.clear
end
#
# Returns {PacketinFilter} configuration