Class: Dcmgr::VNet::Netfilter::EbtablesChain
- 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) ⇒ EbtablesChain
constructor
A new instance of EbtablesChain.
Constructor Details
#initialize(table, name) ⇒ EbtablesChain
Returns a new instance of EbtablesChain.
49 50 51 52 53 54 |
# File 'lib/dcmgr/vnet/netfilter/chain.rb', line 49 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
56 57 58 59 60 61 62 |
# File 'lib/dcmgr/vnet/netfilter/chain.rb', line 56 def self.pre_made { :filter => [:input,:output,:forward], :nat => [:prerouting,:postrouting,:output], :broute => [:brouting] } end |