elesai 0.6.3 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/{check_elesai → check_lsi} +0 -0
- data/lib/elesai/cli.rb +8 -3
- data/lib/elesai/version.rb +1 -1
- metadata +4 -5
File without changes
|
data/lib/elesai/cli.rb
CHANGED
@@ -16,6 +16,7 @@ module Elesai
|
|
16
16
|
|
17
17
|
def initialize(arguments)
|
18
18
|
@arguments = arguments
|
19
|
+
@whoami = File.basename($PROGRAM_NAME).to_sym
|
19
20
|
|
20
21
|
@global_options = { :debug => false, :megacli => 'MegaCli' }
|
21
22
|
@action_options = { :monitor => :nagios, :mode => :active }
|
@@ -37,7 +38,11 @@ module Elesai
|
|
37
38
|
process_command
|
38
39
|
|
39
40
|
rescue => e #ArgumentError, OptionParser::MissingArgument, Senedsa::SendNsca::ConfigurationError => e
|
40
|
-
|
41
|
+
if @global_options[:debug]
|
42
|
+
output_message "#{e.message}\n #{e.backtrace.join("\n ")}",1
|
43
|
+
else
|
44
|
+
output_message e.message,1
|
45
|
+
end
|
41
46
|
end
|
42
47
|
end
|
43
48
|
|
@@ -79,9 +84,9 @@ module Elesai
|
|
79
84
|
}
|
80
85
|
|
81
86
|
opts.order!
|
82
|
-
output_message opts, 0 if @arguments.size == 0 or @global_options[:HELP]
|
87
|
+
output_message opts, 0 if (@arguments.size == 0 and @whoami != :check_lsi) or @global_options[:HELP]
|
83
88
|
|
84
|
-
@action =
|
89
|
+
@action = @whoami == :check_lsi ? :check : @arguments.shift.to_sym
|
85
90
|
raise OptionParser::InvalidArgument, "invalid action #@action" if actions[@action].nil?
|
86
91
|
actions[@action].order!
|
87
92
|
end
|
data/lib/elesai/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elesai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: workflow
|
@@ -65,7 +65,7 @@ description: Elesai is a wrapper around LSI's MegaCli utility that provides acce
|
|
65
65
|
email: gerir@evernote.com
|
66
66
|
executables:
|
67
67
|
- elesai
|
68
|
-
-
|
68
|
+
- check_lsi
|
69
69
|
extensions: []
|
70
70
|
extra_rdoc_files: []
|
71
71
|
files:
|
@@ -76,7 +76,7 @@ files:
|
|
76
76
|
- lib/elesai/megacli.rb
|
77
77
|
- lib/elesai/version.rb
|
78
78
|
- lib/elesai.rb
|
79
|
-
- bin/
|
79
|
+
- bin/check_lsi
|
80
80
|
- bin/elesai
|
81
81
|
- LICENSE
|
82
82
|
- README.md
|
@@ -106,4 +106,3 @@ signing_key:
|
|
106
106
|
specification_version: 3
|
107
107
|
summary: Wrapper for LSI's MegaCli utility
|
108
108
|
test_files: []
|
109
|
-
has_rdoc:
|