Sha256: 51c333df868d4acce0c3da0bb2ea7137bda748ea0bd49e0018569adee87af9e4
Contents?: true
Size: 620 Bytes
Versions: 2
Compression:
Stored size: 620 Bytes
Contents
# -*- coding: utf-8 -*- module Dcmgr module VNet module Tasks # Explicitely allows IP traffic between "friend" instances # Friends are determined by an Isolator class class AcceptIpFromFriends < Task include Dcmgr::VNet::Netfilter attr_reader :friend_ips def initialize(friend_ips) super() @friend_ips = friend_ips friend_ips.each { |friend_ip| self.rules << IptablesRule.new(:filter,:forward,nil,:incoming,"-s #{friend_ip} -j ACCEPT") } end end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
wakame-vdc-agents-11.12.0 | lib/dcmgr/vnet/tasks/accept_ip_from_friends.rb |
wakame-vdc-dcmgr-11.12.0 | lib/dcmgr/vnet/tasks/accept_ip_from_friends.rb |