rubyipmi 0.9.0 → 0.9.1

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: d461e3d295c4e31dfe971e6c9283158abe3cb9ac
4
- data.tar.gz: 685a0f016ab45c40be2de1ded13da863bdba4cfb
3
+ metadata.gz: 02b0b1ca03e27eaf226f2f876b943d0db218fe07
4
+ data.tar.gz: d76b73dbf83a64d85663c304169e9ee24e010ac4
5
5
  SHA512:
6
- metadata.gz: 9dd16183f0bb968cee9043a5323a29215d1d5a0b317ac9531e859a7f68729aa647cd2016f5424fcee33b17bf3a346ef048d09a7e5e029cf63d7831117093551b
7
- data.tar.gz: ab8ea8f08702fcda75e79bb02dfd7970f0ce717aa51839bfeeab478df4a6c7e49bab5cfb7d63778d5e0a7eb7d12b42057f290f35c245e500c6d97d6ba5c84ce0
6
+ metadata.gz: 2682146a7c24f31144c1eedbf980cad87b86097fb6338999b60121e1537f427a5eb7be6e87811a2ccfb8200db4af75f38370089f859df885e9538ae337535f3a
7
+ data.tar.gz: ca76f38f6f5ad045591030352b8679e3536fe2b38e0d73e2deeef796f85d3f38cb8ab9d9a4326be28f21ae2279ac2376710f6845ba09a441fadb4419550174a9
data/README.md CHANGED
@@ -303,8 +303,8 @@ If you want to setup a custom logger (not required) you can also pass in a logge
303
303
  ### Diagnostics Function
304
304
  Running IPMI commands can be frustrating sometimes and with the addition of this library you are bound to find edge
305
305
  cases. If you do find an edge case there is a easy function that will generate a diagnostics file that you can
306
- review and optionally create an issue with for us to work. Without this information its really hard to help because
307
- every server is different. The following code will generate a file in /tmp/rubyipmi_diag_data.txt that we can use to
306
+ review and optionally create an issue with us to work with. Without this information its really hard to help because
307
+ every server is different. The following code will generate a file in /tmp/rubyipmi_diag_data.txt that we can use
308
308
  as test cases. Please look over the file for any sensitive data you don't want to share like ip/mac address.
309
309
 
310
310
  ```ruby
@@ -321,6 +321,16 @@ You can couple this with the logger and also generate a log file of all the comm
321
321
  Rubyipmi.get_diag(user, pass, host)
322
322
  ```
323
323
 
324
+ ### Test Function
325
+ If you need to test if the bmc device and run a basic call there is now a function that retruns boolean true when
326
+ the connection attempt was successful.
327
+
328
+ ```ruby
329
+ require 'rubyipmi'
330
+ conn = Rubyipmi.connect(user, pass, host)
331
+ conn.connection_works? => true|false
332
+ ```
333
+
324
334
  ## Contributing to rubyipmi
325
335
 
326
336
  * Check out the latest code to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/RELEASE_NOTES.md CHANGED
@@ -1,4 +1,17 @@
1
- ### 0.8.0
1
+ ### 0.9.1
2
+ * fixes an issue with connection_works? api call when command raises an error
3
+
4
+ ### 0.9.0
5
+ * move to rspec3 syntax
6
+ * added logging capabilities
7
+ * fix freeipmi lan issue with auto driver type not being loaded
8
+ * refactor get_diag function to be useful
9
+ * remove 1.9.2 support from travis matrix
2
10
 
11
+ ### 0.8.1
12
+ * switch to LGPL license
13
+ * remove rcov in favor of simplecov
14
+
15
+ ### 0.8.0
3
16
  * changed License from GPL to LGPL
4
17
  * added option to specify privilge-level
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.1
@@ -29,7 +29,11 @@ module Rubyipmi
29
29
 
30
30
  # test the connection to ensure we can at least make a single call
31
31
  def connection_works?
32
- status = ! (bmc.info.nil? || bmc.info.empty? )
32
+ begin
33
+ ! (bmc.info.nil? || bmc.info.empty? )
34
+ rescue
35
+ false
36
+ end
33
37
  end
34
38
 
35
39
  def drivers_map
@@ -33,7 +33,11 @@ module Rubyipmi
33
33
 
34
34
  # test the connection to ensure we can at least make a single call
35
35
  def connection_works?
36
- status = ! (bmc.info.nil? || bmc.info.empty? )
36
+ begin
37
+ ! (bmc.info.nil? || bmc.info.empty? )
38
+ rescue
39
+ false
40
+ end
37
41
  end
38
42
 
39
43
  def drivers_map
data/rubyipmi.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: rubyipmi 0.9.0 ruby lib
5
+ # stub: rubyipmi 0.9.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "rubyipmi"
9
- s.version = "0.9.0"
9
+ s.version = "0.9.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Corey Osman"]
14
- s.date = "2015-03-09"
14
+ s.date = "2015-03-11"
15
15
  s.description = "Provides a library for controlling IPMI devices using pure ruby code"
16
16
  s.email = "corey@logicminds.biz"
17
17
  s.extra_rdoc_files = [
@@ -26,6 +26,15 @@ describe "Connection" do
26
26
  expect(@conn.connection_works?).to eq true
27
27
  end
28
28
 
29
+ it 'can test the connection when credentials are wrong' do
30
+ user ||= ENV["ipmiuser"] || "admin"
31
+ pass = "wrong_password"
32
+ host ||= ENV["ipmihost"] || "192.168.1.16"
33
+ provider ||= ENV["ipmiprovider"] || "ipmitool"
34
+ conn = Rubyipmi.connect(user, pass, host, provider)
35
+ expect(conn.connection_works?).to eq false
36
+ end
37
+
29
38
  it 'can get diag info' do
30
39
  expect(@conn.get_diag.keys).to eq([:provider, :frus, :sensors, :bmc_info, :version])
31
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyipmi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Osman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec