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: 91abc7663d39537762fcb76a04f2ecca15d9cfdb
4
- data.tar.gz: 528a8a140b3de6913c7ccb625c7f76bccfa47603
3
+ metadata.gz: d76e0b88062d0560264ccfaebfa776c74028603c
4
+ data.tar.gz: 1ef49d23987c907dd5e9961180de9de4a7d4003a
5
5
  SHA512:
6
- metadata.gz: 19f211994fc164704f1959b380156013f48c003f35e2c4f34774d0f651711fad895bfdc2ed13269781fb8ad46a2a7259b576ca7b2df7499e8522dfdf2b080036
7
- data.tar.gz: 4cf311bb41bdbf72fe1c0dfc11f949e1623479122e0585fb3926c7a135543e496c5e3c3c7e7d1ce6df36d609c1eeda90453c4c5193b9417790c2d1845ea09c20
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.debug 'Found these redundant rules:'
35
- rules.each { |rule| logger.debug rule.raw_line.inspect }
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
- raise OnetableTerminator::Errors::CommandExecutionError, "#{error_msg}: #{iptables.stderr}" if iptables.error?
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
@@ -1,3 +1,3 @@
1
1
  module OnetableTerminator
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
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.2
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-24 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler