Class: Dcmgr::VNet::Tasks::AcceptARPToHost
- Inherits:
-
Dcmgr::VNet::Task
- Object
- Dcmgr::VNet::Task
- Dcmgr::VNet::Tasks::AcceptARPToHost
- Includes:
- Netfilter
- Defined in:
- lib/dcmgr/vnet/tasks/accept_arp_to_host.rb
Overview
Explicitely allows ARP traffic to take place from the instance to the host
Instance Attribute Summary collapse
-
#enable_logging ⇒ Object
readonly
Returns the value of attribute enable_logging.
-
#host_ip ⇒ Object
readonly
Returns the value of attribute host_ip.
-
#inst_ip ⇒ Object
readonly
Returns the value of attribute inst_ip.
-
#log_prefix ⇒ Object
readonly
Returns the value of attribute log_prefix.
Attributes inherited from Dcmgr::VNet::Task
Instance Method Summary collapse
-
#initialize(host_ip, inst_ip, enable_logging, log_prefix) ⇒ AcceptARPToHost
constructor
A new instance of AcceptARPToHost.
Constructor Details
#initialize(host_ip, inst_ip, enable_logging, log_prefix) ⇒ AcceptARPToHost
Returns a new instance of AcceptARPToHost.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_to_host.rb', line 15 def initialize(host_ip,inst_ip,enable_logging,log_prefix) super() @enable_logging = enable_logging @log_prefix = log_prefix @host_ip = host_ip @inst_ip = inst_ip self.rules << EbtablesRule.new(:filter,:input,:arp,:outgoing,"--protocol arp --arp-ip-src #{self.inst_ip} --arp-ip-dst #{self.host_ip} --log-ip --log-arp --log-prefix '#{self.log_prefix}' -j CONTINUE") if self.enable_logging self.rules << EbtablesRule.new(:filter,:input,:arp,:outgoing,"--protocol arp --arp-ip-src #{self.inst_ip} -j ACCEPT") end |
Instance Attribute Details
#enable_logging ⇒ Object (readonly)
Returns the value of attribute enable_logging.
10 11 12 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_to_host.rb', line 10 def enable_logging @enable_logging end |
#host_ip ⇒ Object (readonly)
Returns the value of attribute host_ip.
12 13 14 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_to_host.rb', line 12 def host_ip @host_ip end |
#inst_ip ⇒ Object (readonly)
Returns the value of attribute inst_ip.
13 14 15 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_to_host.rb', line 13 def inst_ip @inst_ip end |
#log_prefix ⇒ Object (readonly)
Returns the value of attribute log_prefix.
11 12 13 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_to_host.rb', line 11 def log_prefix @log_prefix end |