onetable-terminator 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76e0b88062d0560264ccfaebfa776c74028603c
|
4
|
+
data.tar.gz: 1ef49d23987c907dd5e9961180de9de4a7d4003a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdbc0a27265d41dbdfc4c781605025bc8216873cfabd020ef6bfb98dc1fe71705451be83f6acbcf307335b815d26c667e54007cbeb5f167a6bab999551b66cfa
|
7
|
+
data.tar.gz: 76769fef2669e513f2af746b91d8b177d8b439387c5347d3e34356df30d1ad9d308989233b6befb608fa741b2dcc5306c9a2d1c9ce16662fb10993def297b168
|
@@ -31,8 +31,8 @@ module OnetableTerminator
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def log_redundant_rules(rules)
|
34
|
-
logger.
|
35
|
-
rules.each { |rule| logger.
|
34
|
+
logger.info 'Found these redundant rules:'
|
35
|
+
rules.each { |rule| logger.info rule.raw_line.inspect }
|
36
36
|
end
|
37
37
|
|
38
38
|
def delete_redundant_rules(rules)
|
@@ -18,7 +18,7 @@ module OnetableTerminator
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def load_opennebula_chain
|
21
|
-
output = run_command COMMAND_LIST_OPENNEBULA_CHAIN, 'Cannot retrieve rules for opennebula iptables chain', safe: true
|
21
|
+
output = run_command COMMAND_LIST_OPENNEBULA_CHAIN, 'Cannot retrieve rules for opennebula iptables chain', safe: true, log_only: true
|
22
22
|
|
23
23
|
logger.debug('Output:')
|
24
24
|
logger.debug(output)
|
@@ -58,8 +58,14 @@ module OnetableTerminator
|
|
58
58
|
iptables.run_command
|
59
59
|
|
60
60
|
output = iptables.stdout
|
61
|
-
|
62
|
-
|
61
|
+
if iptables.error?
|
62
|
+
if options[:log_only]
|
63
|
+
logger.warn "Command execution error: #{error_msg}: #{iptables.stderr}"
|
64
|
+
return ''
|
65
|
+
end
|
66
|
+
|
67
|
+
raise OnetableTerminator::Errors::CommandExecutionError, "#{error_msg}: #{iptables.stderr}" if iptables.error?
|
68
|
+
end
|
63
69
|
end
|
64
70
|
|
65
71
|
output
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onetable-terminator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michal Kimle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|