onetable-terminator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 194af37cf6b335216d3d7974b352da6e0cacf142
4
+ data.tar.gz: d5ded223a1a2fbc531e58185b5ed0faf14a01d09
5
+ SHA512:
6
+ metadata.gz: 5361838cd73c76dece352df61ad134737acafb3881df7a741b3048ef82235ed9d04c184e181d8532a51720a37e70788b8d503fa8cd0dfa0fcf7452028270bd7d
7
+ data.tar.gz: 6b4fc4ced5fa7cd69194cccd9a097de341f609eae58c40273fc9f27cffa47a025cda9b1253df058e60638287de131a0ccd75226757b0347a98bce05a5bf71c33
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ example
11
+ /vendor/
12
+ /coverage/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ sudo: false
2
+
3
+ language: ruby
4
+ rvm:
5
+ - ruby-head
6
+ - 2.2
7
+ - 2.1
8
+ - 2.0
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: ruby-head
13
+ fast_finish: true
14
+
15
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at kimle.michal@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in onetable-terminator.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2016 Michal Kimle
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # onatebale-terminator
2
+
3
+ Cleans OpenNebula's forgotten iptables rules.
4
+
5
+ [![Build Status](https://secure.travis-ci.org/Misenko/onetable-terminator.png)](http://travis-ci.org/Misenko/onetable-terminator)
6
+
7
+ ## Usage
8
+
9
+ ```bash
10
+ $ onetable-terminator clean
11
+
12
+ Options:
13
+ [--driver=DRIVER] # OpenNebula's VNM driver
14
+ # Default: fw_driver
15
+ [--debug], [--no-debug] # Runs onetable-terminator in debug mode.
16
+ [--dry-run], [--no-dry-run] # Runs without making changes to current iptables. Automatically in debug mode.
17
+ ```
18
+
19
+ ## Contributing
20
+ 1. Fork it ( https://github.com/Misenko/onetable-terminator/fork )
21
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
22
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
23
+ 4. Push to the branch (`git push origin my-new-feature`)
24
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'onetable_terminator'
3
+
4
+ OnetableTerminator::CLI.start(ARGV)
@@ -0,0 +1,9 @@
1
+ module OnetableTerminator; end
2
+
3
+ require 'onetable_terminator/version'
4
+ require 'onetable_terminator/structures'
5
+ require 'onetable_terminator/errors'
6
+ require 'onetable_terminator/iptables'
7
+ require 'onetable_terminator/lock'
8
+ require 'onetable_terminator/core'
9
+ require 'onetable_terminator/cli'
@@ -0,0 +1,51 @@
1
+ require 'thor'
2
+ require 'yell'
3
+
4
+ module OnetableTerminator
5
+ class CLI < Thor
6
+ class_option :debug,
7
+ default: false,
8
+ type: :boolean,
9
+ desc: 'Runs onetable-terminator in debug mode.'
10
+ class_option :"dry-run",
11
+ default: false,
12
+ type: :boolean,
13
+ desc: 'Runs without making changes to current iptables. Automatically in debug mode.'
14
+
15
+ option :driver,
16
+ default: 'fw_driver',
17
+ type: :string,
18
+ desc: 'OpenNebula\'s VNM driver'
19
+ desc 'clean', 'Removes OpenNebula\'s forgotten iptables rules. Default command.'
20
+ def clean
21
+ initialize_logger options
22
+
23
+ lock = OnetableTerminator::Lock.new options[:driver]
24
+ lock.lock
25
+
26
+ core = OnetableTerminator::Core.new options[:"dry-run"]
27
+ core.run
28
+
29
+ lock.unlock
30
+ end
31
+
32
+ desc 'version', 'Prints onetable-terminator version'
33
+ def version
34
+ $stdout.puts OnetableTerminator::VERSION
35
+ end
36
+
37
+ default_task :clean
38
+
39
+ private
40
+
41
+ def initialize_logger(parameters)
42
+ logging_level = 'INFO'
43
+ logging_level = 'DEBUG' if parameters[:debug]
44
+
45
+ Yell.new :stdout, name: Object, level: logging_level.downcase, format: Yell::DefaultFormat
46
+ Object.send :include, Yell::Loggable
47
+
48
+ logger.debug 'Running in debug mode...'
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,47 @@
1
+ module OnetableTerminator
2
+ class Core
3
+ attr_reader :exec, :rules_handler
4
+
5
+ def initialize(dry_run = false)
6
+ @exec = OnetableTerminator::Iptables::Exec.new dry_run
7
+ @rules_handler = OnetableTerminator::Iptables::RulesHandler.new
8
+ end
9
+
10
+ def run
11
+ rules = retrieve_redundant_rules
12
+
13
+ if rules.empty?
14
+ logger.debug 'Found no redundant rules, nothing to delete'
15
+ return
16
+ end
17
+
18
+ log_redundant_rules rules
19
+ delete_redundant_rules rules
20
+ end
21
+
22
+ private
23
+
24
+ def retrieve_redundant_rules
25
+ nics = exec.load_opennebula_chain
26
+ rules = rules_handler.find_redundant_rules(nics)
27
+ rules.sort! { |left, right| left.number <=> right.number }
28
+ rules.reverse!
29
+
30
+ rules
31
+ end
32
+
33
+ def log_redundant_rules(rules)
34
+ logger.debug 'Found these redundant rules:'
35
+ rules.each { |rule| logger.debug rule.raw_line.inspect }
36
+ end
37
+
38
+ def delete_redundant_rules(rules)
39
+ logger.debug 'Deleting redundant rules and chains...'
40
+ rules.each do |rule|
41
+ exec.delete_opennebula_rule rule.number
42
+ exec.flush_opennebula_chain rule.target
43
+ exec.delete_opennebula_chain rule.target
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,6 @@
1
+ module OnetableTerminator
2
+ module Errors; end
3
+ end
4
+
5
+ require 'onetable_terminator/errors/command_execution_error'
6
+ require 'onetable_terminator/errors/parsing_error'
@@ -0,0 +1,5 @@
1
+ module OnetableTerminator
2
+ module Errors
3
+ class CommandExecutionError < ::StandardError; end
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module OnetableTerminator
2
+ module Errors
3
+ class Core < ::StandardError; end
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module OnetableTerminator\
2
+ module Errors
3
+ class ParsingError < ::StandardError; end
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module OnetableTerminator
2
+ module Iptables; end
3
+ end
4
+
5
+ require 'onetable_terminator/iptables/parser'
6
+ require 'onetable_terminator/iptables/exec'
7
+ require 'onetable_terminator/iptables/rules_handler'
@@ -0,0 +1,69 @@
1
+ require 'mixlib/shellout'
2
+
3
+ module OnetableTerminator
4
+ module Iptables
5
+ class Exec
6
+ attr_reader :parser, :dry_run
7
+
8
+ IPTABLES_BINARY = '/sbin/iptables'.freeze
9
+ OPENNEBULA_CHAIN = 'opennebula'.freeze
10
+ COMMAND_LIST_OPENNEBULA_CHAIN = [IPTABLES_BINARY, '-L', OPENNEBULA_CHAIN, '-n', '--line-numbers'].freeze
11
+ COMMAND_DELETE_OPENNEBULA_RULE = [IPTABLES_BINARY, '-D', OPENNEBULA_CHAIN].freeze
12
+ COMMAND_FLUSH_OPENNEBULA_CHAIN = [IPTABLES_BINARY, '-F'].freeze
13
+ COMMAND_DELETE_OPENNEBULA_CHAIN = [IPTABLES_BINARY, '-X'].freeze
14
+
15
+ def initialize(dry_run = false)
16
+ @parser = OnetableTerminator::Iptables::Parser.new
17
+ @dry_run = dry_run
18
+ end
19
+
20
+ def load_opennebula_chain
21
+ output = run_command COMMAND_LIST_OPENNEBULA_CHAIN, 'Cannot retrieve rules for opennebula iptables chain', safe: true
22
+
23
+ logger.debug('Output:')
24
+ logger.debug(output)
25
+
26
+ parser.parse_rules output
27
+ end
28
+
29
+ def delete_opennebula_rule(rule_number)
30
+ command = COMMAND_DELETE_OPENNEBULA_RULE.dup
31
+ command << rule_number.to_s
32
+
33
+ run_command command, 'Cannot delete opennebula chain rule'
34
+ end
35
+
36
+ def flush_opennebula_chain(chain)
37
+ command = COMMAND_FLUSH_OPENNEBULA_CHAIN.dup
38
+ command << chain
39
+
40
+ run_command command, 'Cannot flush opennebula chain'
41
+ end
42
+
43
+ def delete_opennebula_chain(chain)
44
+ command = COMMAND_DELETE_OPENNEBULA_CHAIN.dup
45
+ command << chain
46
+
47
+ run_command command, 'Cannot delete opennebula chain'
48
+ end
49
+
50
+ private
51
+
52
+ def run_command(command, error_msg, options = {})
53
+ logger.debug("Running command: #{command.inspect}")
54
+ output = ''
55
+
56
+ if !dry_run || options[:safe]
57
+ iptables = Mixlib::ShellOut.new(command)
58
+ iptables.run_command
59
+
60
+ output = iptables.stdout
61
+
62
+ raise OnetableTerminator::Errors::CommandExecutionError, "#{error_msg}: #{iptables.stderr}" if iptables.error?
63
+ end
64
+
65
+ output
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,74 @@
1
+ module OnetableTerminator
2
+ module Iptables
3
+ class Parser
4
+ COLUMN_COUNT = 11
5
+ TARGET_COLUMN_COUNT = 4
6
+ TARGET_VM_ID_COLUMN = 1
7
+ TARGET_IO_COLUMN = 3
8
+ NUMBER_COLUMN = 0
9
+ TARGET_COLUMN = 1
10
+ NIC_COLUMN = 9
11
+
12
+ def parse_rules(output)
13
+ nics = {}
14
+ lines = output.lines
15
+ normalize_output!(lines)
16
+
17
+ lines.each do |line|
18
+ parsed_line = parse_line line
19
+ nic_name = parsed_line[:nic]
20
+
21
+ nic = nics[nic_name]
22
+ unless nic
23
+ nic = OnetableTerminator::Structures::Nic.new nic_name
24
+ nics[nic_name] = nic
25
+ end
26
+ nic.add_rule OnetableTerminator::Structures::Rule.new parsed_line
27
+ end
28
+
29
+ nics.values
30
+ end
31
+
32
+ private
33
+
34
+ def normalize_output!(lines)
35
+ lines.shift 2
36
+
37
+ unless lines.empty?
38
+ accept_line = lines.pop
39
+ raise OnetableTerminator::Errors::ParsingError, "Missing last ACCEPT rule" unless accept_line =~ /ACCEPT/
40
+ end
41
+ end
42
+
43
+ def parse_line(line)
44
+ logger.debug "Parsing line #{line.inspect}"
45
+ splitted_line = line.split
46
+ raise OnetableTerminator::Errors::ParsingError, "Cannot parse line #{line.inspect}" unless splitted_line.size == COLUMN_COUNT
47
+
48
+ target = parse_target splitted_line[TARGET_COLUMN]
49
+ number = splitted_line[NUMBER_COLUMN]
50
+
51
+ raise OnetableTerminator::Errors::ParsingError, "Cannot parse line number for line #{line.inspect}" unless number =~ /\A\d+\z/
52
+
53
+ parsed_line = { number: number.to_i, nic: splitted_line[NIC_COLUMN], raw_line: line, target: splitted_line[TARGET_COLUMN] }.merge target
54
+ logger.debug "Line parsed: #{parsed_line.inspect}"
55
+
56
+ parsed_line
57
+ end
58
+
59
+ def parse_target(target)
60
+ slices = target.split('-', TARGET_COLUMN_COUNT)
61
+
62
+ raise OnetableTerminator::Errors::ParsingError, "Cannot parse target #{target.inspect}" unless slices.size == TARGET_COLUMN_COUNT
63
+
64
+ vm_id = slices[TARGET_VM_ID_COLUMN]
65
+ io = slices[TARGET_IO_COLUMN]
66
+
67
+ raise OnetableTerminator::Errors::ParsingError, "Cannot parse VM ID for chain #{target.inspect}" unless vm_id =~ /\A\d+\z/
68
+ raise OnetableTerminator::Errors::ParsingError, "Cannot detect input/output for chain #{target.inspect}" unless io == 'i' || io == 'o'
69
+
70
+ { vm_id: vm_id.to_i, io: io }
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,34 @@
1
+ module OnetableTerminator
2
+ module Iptables
3
+ class RulesHandler
4
+ def find_redundant_rules(nics)
5
+ rules = []
6
+
7
+ nics.each do |nic|
8
+ logger.debug "Validating rules for NIC #{nic.name.inspect}"
9
+ sorted_rules = nic.rules.sort { |left, right| right.vm_id <=> left.vm_id }
10
+ correct_vm_id = sorted_rules.first.vm_id
11
+ logger.debug "Correct VM ID is #{correct_vm_id.inspect}"
12
+ redundant_rules = sorted_rules.reject { |rule| rule.vm_id == correct_vm_id }
13
+
14
+ log_redundant redundant_rules
15
+
16
+ rules.concat redundant_rules
17
+ end
18
+
19
+ rules
20
+ end
21
+
22
+ private
23
+
24
+ def log_redundant(redundant_rules)
25
+ if redundant_rules.empty?
26
+ logger.debug 'Found no redundant rules'
27
+ else
28
+ logger.debug "Found #{redundant_rules.size} redundant rules:"
29
+ redundant_rules.each { |redundant_rule| logger.debug redundant_rule.raw_line.to_s }
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,18 @@
1
+ module OnetableTerminator
2
+ class Lock
3
+ attr_reader :filename, :file
4
+
5
+ def initialize(driver)
6
+ @filename = "/tmp/onevnm-#{driver}-lock"
7
+ end
8
+
9
+ def lock
10
+ @file = File.open(filename, 'w')
11
+ file.flock(File::LOCK_EX)
12
+ end
13
+
14
+ def unlock
15
+ file.close
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,6 @@
1
+ module OnetableTerminator
2
+ module Structures; end
3
+ end
4
+
5
+ require 'onetable_terminator/structures/rule'
6
+ require 'onetable_terminator/structures/nic'
@@ -0,0 +1,20 @@
1
+ module OnetableTerminator
2
+ module Structures
3
+ class Nic
4
+ attr_reader :name, :rules
5
+
6
+ def initialize(name)
7
+ @name = name
8
+ @rules = []
9
+ end
10
+
11
+ def add_rule(rule)
12
+ rules << rule
13
+ end
14
+
15
+ def ==(other)
16
+ name == other.name && rules == other.rules
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ module OnetableTerminator
2
+ module Structures
3
+ class Rule
4
+ attr_accessor :number, :vm_id, :nic, :raw_line, :io, :target
5
+
6
+ def initialize(line_hash)
7
+ @number = line_hash[:number]
8
+ @raw_line = line_hash[:raw_line]
9
+ @io = line_hash[:io]
10
+ @target = line_hash[:target]
11
+ @vm_id = line_hash[:vm_id]
12
+ end
13
+
14
+ def ==(other)
15
+ number == other.number && raw_line == other.raw_line && io == other.io && target == other.target && vm_id == other.vm_id
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,3 @@
1
+ module OnetableTerminator
2
+ VERSION = '0.1.0'.freeze
3
+ end
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'onetable_terminator/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'onetable-terminator'
8
+ spec.version = OnetableTerminator::VERSION
9
+ spec.authors = ['Michal Kimle']
10
+ spec.email = ['kimle.michal@gmail.com']
11
+
12
+ spec.summary = "Cleans OpenNebula's forgotten iptables rules."
13
+ spec.description = "Cleans OpenNebula's forgotten iptables rules."
14
+ spec.homepage = 'https://github.com/Misenko/onetable-terminator'
15
+ spec.license = 'Apache License, Version 2.0'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.12'
22
+ spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'rspec', '~> 3.0'
24
+ spec.add_development_dependency 'rspec-collection_matchers', '~> 1.1'
25
+ spec.add_development_dependency 'rubocop', '~> 0.42'
26
+ spec.add_development_dependency 'simplecov', '~> 0.12'
27
+ spec.add_development_dependency 'pry', '~> 0.10'
28
+
29
+ spec.add_runtime_dependency 'thor', '~> 0.19'
30
+ spec.add_runtime_dependency 'yell', '~> 2.0'
31
+ spec.add_runtime_dependency 'mixlib-shellout', '~> 2.2'
32
+ end
metadata ADDED
@@ -0,0 +1,211 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: onetable-terminator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Michal Kimle
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-collection_matchers
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.42'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.42'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.12'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.12'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.10'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.10'
111
+ - !ruby/object:Gem::Dependency
112
+ name: thor
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.19'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.19'
125
+ - !ruby/object:Gem::Dependency
126
+ name: yell
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: mixlib-shellout
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '2.2'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '2.2'
153
+ description: Cleans OpenNebula's forgotten iptables rules.
154
+ email:
155
+ - kimle.michal@gmail.com
156
+ executables:
157
+ - onetable-terminator
158
+ extensions: []
159
+ extra_rdoc_files: []
160
+ files:
161
+ - ".gitignore"
162
+ - ".rspec"
163
+ - ".travis.yml"
164
+ - CODE_OF_CONDUCT.md
165
+ - Gemfile
166
+ - LICENSE.txt
167
+ - README.md
168
+ - Rakefile
169
+ - bin/onetable-terminator
170
+ - lib/onetable_terminator.rb
171
+ - lib/onetable_terminator/cli.rb
172
+ - lib/onetable_terminator/core.rb
173
+ - lib/onetable_terminator/errors.rb
174
+ - lib/onetable_terminator/errors/command_execution_error.rb
175
+ - lib/onetable_terminator/errors/core_error.rb
176
+ - lib/onetable_terminator/errors/parsing_error.rb
177
+ - lib/onetable_terminator/iptables.rb
178
+ - lib/onetable_terminator/iptables/exec.rb
179
+ - lib/onetable_terminator/iptables/parser.rb
180
+ - lib/onetable_terminator/iptables/rules_handler.rb
181
+ - lib/onetable_terminator/lock.rb
182
+ - lib/onetable_terminator/structures.rb
183
+ - lib/onetable_terminator/structures/nic.rb
184
+ - lib/onetable_terminator/structures/rule.rb
185
+ - lib/onetable_terminator/version.rb
186
+ - onetable-terminator.gemspec
187
+ homepage: https://github.com/Misenko/onetable-terminator
188
+ licenses:
189
+ - Apache License, Version 2.0
190
+ metadata: {}
191
+ post_install_message:
192
+ rdoc_options: []
193
+ require_paths:
194
+ - lib
195
+ required_ruby_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
+ requirements:
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: '0'
205
+ requirements: []
206
+ rubyforge_project:
207
+ rubygems_version: 2.5.1
208
+ signing_key:
209
+ specification_version: 4
210
+ summary: Cleans OpenNebula's forgotten iptables rules.
211
+ test_files: []