Class: Dcmgr::VNet::Netfilter::EbtablesChain

Inherits:
Chain
  • Object
show all
Defined in:
lib/dcmgr/vnet/netfilter/chain.rb

Overview

}

Instance Attribute Summary

Attributes inherited from Chain

#name, #table

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table, name) ⇒ EbtablesChain

Returns a new instance of EbtablesChain.

Raises:

  • (ArgumentError)


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_madeObject



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