rubyipmi 0.9.1 → 0.9.2
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 +4 -4
- data/README.md +62 -4
- data/VERSION +1 -1
- data/lib/rubyipmi.rb +4 -4
- data/rubyipmi.gemspec +3 -3
- data/spec/integration/rubyipmi_spec.rb +2 -2
- data/spec/unit/rubyipmi_spec.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fb4c5a2ee5350e88825085a4d8bc8629c0540a7
|
4
|
+
data.tar.gz: 4e4ecc9f2c3cda0a9bc9d1dc2f95c85f01209abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 524f30bca98d535eab2ba5ff77a68816f8bcffe6d7c290e2f0024e25f1ccb2c994134fdaba359088d4c9eaec4338f9d8dc64193450c52428573e6fa198f8e5fb
|
7
|
+
data.tar.gz: d6304c667418b10143d7e9b753a2c2dfab367acbd888de03efc12a589a444cacf10d8e486ee136166626f85b37a5f4dbfd03ddba817576629d6baf20ad58dc67
|
data/README.md
CHANGED
@@ -1,3 +1,36 @@
|
|
1
|
+
Table of Contents
|
2
|
+
=================
|
3
|
+
|
4
|
+
* [Rubyipmi](#rubyipmi)
|
5
|
+
* [Projects that use Rubyipmi](#projects-that-use-rubyipmi)
|
6
|
+
* [Support](#support)
|
7
|
+
* [Using the library in your code](#using-the-library-in-your-code)
|
8
|
+
* [Requirements](#requirements)
|
9
|
+
* [Create a connection object](#create-a-connection-object)
|
10
|
+
* [Use power functions (not all listed)](#use-power-functions-not-all-listed)
|
11
|
+
* [Boot to specific device](#boot-to-specific-device)
|
12
|
+
* [Sensors](#sensors)
|
13
|
+
* [Fru](#fru)
|
14
|
+
* [Testing](#testing)
|
15
|
+
* [Security](#security)
|
16
|
+
* [How the library works](#how-the-library-works)
|
17
|
+
* [Creating a new command](#creating-a-new-command)
|
18
|
+
* [Writing a function for running a command](#writing-a-function-for-running-a-command)
|
19
|
+
* [Running the cmd](#running-the-cmd)
|
20
|
+
* [The Options hash](#the-options-hash)
|
21
|
+
* [How to get the results of the command](#how-to-get-the-results-of-the-command)
|
22
|
+
* [The command function](#the-command-function)
|
23
|
+
* [The following are tools bundled with freeipmi](#the-following-are-tools-bundled-with-freeipmi)
|
24
|
+
* [To contrast ipmitool has one command with many options](#to-contrast-ipmitool-has-one-command-with-many-options)
|
25
|
+
* [Auto Detect workarounds](#auto-detect-workarounds)
|
26
|
+
* [Troubleshooting](#troubleshooting)
|
27
|
+
* [Log files](#log-files)
|
28
|
+
* [Diagnostics Function](#diagnostics-function)
|
29
|
+
* [Test Function](#test-function)
|
30
|
+
* [Contributing to rubyipmi](#contributing-to-rubyipmi)
|
31
|
+
* [Copyright](#copyright)
|
32
|
+
* [Freeipmi Documented Workarounds](#freeipmi-documented-workarounds)
|
33
|
+
|
1
34
|
# Rubyipmi
|
2
35
|
This gem is a ruby wrapper for the freeipmi and ipmitool command line tools.
|
3
36
|
It provides a ruby implementation of ipmi commands that will make it simple to connect to BMC devices from ruby.
|
@@ -6,12 +39,37 @@ It provides a ruby implementation of ipmi commands that will make it simple to c
|
|
6
39
|
[](http://badge.fury.io/rb/rubyipmi)
|
7
40
|
[](https://coveralls.io/r/logicminds/rubyipmi)
|
8
41
|
|
42
|
+
Rubyipmi was built because I wanted an object oriented way to get data from BMC devices. I also wanted it easy to use
|
43
|
+
and if any IPMI hacks/workarounds were required I wanted to build those into the library to make life easier.
|
44
|
+
|
9
45
|
## Projects that use Rubyipmi
|
10
46
|
* https://github.com/sensu/sensu-community-plugins/blob/master/plugins/ipmi/check-sensor.rb
|
11
|
-
* https://github.com/theforeman/smart-proxy
|
12
|
-
* https://github.com/logicminds/ipmispec
|
47
|
+
* https://github.com/theforeman/smart-proxy (Turns Rubyipmi into a Remote Web API Proxy server)
|
48
|
+
* https://github.com/logicminds/ipmispec (just started)
|
13
49
|
|
14
50
|
Don't see your project listed? Create a PR with your project listed here.
|
51
|
+
|
52
|
+
## Support
|
53
|
+
General support is offered via github issues and whenever I have time I will try to resolve any issues. I do offer
|
54
|
+
professional paid support through my [company](http://www.logicminds.biz) and can be contracted to work directly with your organization
|
55
|
+
on Rubyipmi or other related automation/devops projects that you might have.
|
56
|
+
|
57
|
+
At this time I only have one test server (HP DL380 G5) which I used to perform tests against. While I try to keep the code
|
58
|
+
generic in nature there may be newer devices that do not work correctly and its an issue I cannot troubleshoot directly. If you would
|
59
|
+
like to see newer/other devices be part of my test suite and you have extra servers lying around. I would encourage you to donate
|
60
|
+
server equipment so that I can extend my test suite against this newer equipment.
|
61
|
+
|
62
|
+
Servers I have never tested against.
|
63
|
+
|
64
|
+
* Dell
|
65
|
+
* IBM
|
66
|
+
* HP server with ilo3+
|
67
|
+
* Super Micro
|
68
|
+
* Cisco
|
69
|
+
|
70
|
+
IPMI is designed to support any equipment that implements the standard. But there are always problems with people deviating
|
71
|
+
from the standard. In general this library should work will all servers.
|
72
|
+
|
15
73
|
## Using the library in your code
|
16
74
|
|
17
75
|
### Requirements
|
@@ -48,11 +106,11 @@ Don't see your project listed? Create a PR with your project listed here.
|
|
48
106
|
|
49
107
|
Should you need to specify some additional options or the provider type
|
50
108
|
```ruby
|
51
|
-
conn = Rubyipmi.connect(
|
109
|
+
conn = Rubyipmi.connect("username", "password", "hostname", 'freeipmi', {:privilege =>'USER'})
|
52
110
|
```
|
53
111
|
|
54
112
|
|
55
|
-
####
|
113
|
+
#### power functions
|
56
114
|
|
57
115
|
```ruby
|
58
116
|
require 'rubyipmi'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.2
|
data/lib/rubyipmi.rb
CHANGED
@@ -154,8 +154,8 @@ module Rubyipmi
|
|
154
154
|
when "ipmitool"
|
155
155
|
cmdpath = locate_command('ipmitool')
|
156
156
|
else
|
157
|
-
logger.error("Invalid BMC provider type") if logger
|
158
|
-
|
157
|
+
logger.error("Invalid BMC provider type #{provider}") if logger
|
158
|
+
false
|
159
159
|
end
|
160
160
|
# return false if command was not found
|
161
161
|
return ! cmdpath.nil?
|
@@ -167,10 +167,10 @@ module Rubyipmi
|
|
167
167
|
|
168
168
|
# returns true if any of the providers are installed
|
169
169
|
def self.provider_installed?
|
170
|
-
providers_installed
|
170
|
+
providers_installed.length > 0
|
171
171
|
end
|
172
172
|
|
173
|
-
def self.providers_installed
|
173
|
+
def self.providers_installed
|
174
174
|
available = []
|
175
175
|
providers.each do |prov|
|
176
176
|
if is_provider_installed?(prov)
|
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.
|
5
|
+
# stub: rubyipmi 0.9.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "rubyipmi"
|
9
|
-
s.version = "0.9.
|
9
|
+
s.version = "0.9.2"
|
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-
|
14
|
+
s.date = "2015-03-19"
|
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 = [
|
@@ -48,12 +48,12 @@ describe "rubyipmi" do
|
|
48
48
|
begin
|
49
49
|
conn = Rubyipmi.connect(@user, @pass, @host, "bogus")
|
50
50
|
rescue Exception => e
|
51
|
-
expect(e.message).to match(/
|
51
|
+
expect(e.message).to match(/The IPMI provider: bogus is not installed/)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
55
|
it "check to find any available installed providers" do
|
56
|
-
expect(Rubyipmi.providers_installed
|
56
|
+
expect(Rubyipmi.providers_installed.length).to be > 0
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'can get diag info' do
|
data/spec/unit/rubyipmi_spec.rb
CHANGED
@@ -22,8 +22,9 @@ describe :Rubyipmi do
|
|
22
22
|
expect(Rubyipmi.is_provider_installed?('freeipmi')).to eq true
|
23
23
|
end
|
24
24
|
|
25
|
-
it 'is provider installed should return
|
26
|
-
expect{Rubyipmi.is_provider_installed?('bad_provider')}.
|
25
|
+
it 'is provider installed should return false when bad provider' do
|
26
|
+
expect{Rubyipmi.is_provider_installed?('bad_provider')}.to_not raise_error
|
27
|
+
expect(Rubyipmi.is_provider_installed?('bad_provider')).to be_falsey
|
27
28
|
end
|
28
29
|
|
29
30
|
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.
|
4
|
+
version: 0.9.2
|
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-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|