Class: Dcmgr::VNet::Netfilter::IptablesChain
- Defined in:
- lib/dcmgr/vnet/netfilter/chain.rb
Overview
}
Instance Attribute Summary
Attributes inherited from Chain
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(table, name) ⇒ IptablesChain
constructor
A new instance of IptablesChain.
Constructor Details
#initialize(table, name) ⇒ IptablesChain
Returns a new instance of IptablesChain.
25 26 27 28 29 30 |
# File 'lib/dcmgr/vnet/netfilter/chain.rb', line 25 def initialize(table,name) raise ArgumentError, "table #{table} doesn't exist. Existing tables are '#{self.class.pre_made.keys.join(",")}'." unless self.class.pre_made.keys.member?(table) raise ArgumentError, "name can not be any of the following: '#{self.class.pre_made[table].join(",")}'." if self.class.pre_made[table].member?(name) super end |
Class Method Details
.pre_made ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/dcmgr/vnet/netfilter/chain.rb', line 32 def self.pre_made { :filter => [:input,:output,:forward], :nat => [:prerouting,:postrouting,:output], :mangle => [:prerouting,:output,:input,:postrouting], :raw => [:prerouting, :output] } end |