collins_client 0.2.20 → 0.2.21

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: 82af07b81292bf644d807ab02787436f4a29dca5
4
- data.tar.gz: c6f125aeebe6b089f1b2d5a6acbe9e42e2bdf47c
3
+ metadata.gz: b6afd6d1e81ac9f0be91c9f51a1f70ab3061d517
4
+ data.tar.gz: 267ac66abed3eaa9097aa327730937cef88e7242
5
5
  SHA512:
6
- metadata.gz: f34de9ce41bdc45276de5847bd36b23e31cf27a1997a55910df03e8dea761907b9b4c0edc81570b5e421c73f1ff412f3a35b85fdefe664c44aa01d1c7cb34aff
7
- data.tar.gz: db2c3365884a81a0358e195427507bfe50f3053223d5b4a825aa6f78db6549b1d80eab5d2b67148988a0a853202b4cc934e0f535bd1321acc5c1ea9b19e21223
6
+ metadata.gz: 2a26161a69c4fc8e7a85a68e3024ba0ad04df1b0be9dae45fe255cbdd0ef897eb8a70402387bbfe55640c76273e3940c0e2552653f4de60135b18e8a618c82f8
7
+ data.tar.gz: eedba513d88c58b05e54874eb3e43428261dbf2acf0cac7a98469d2f7f46e8a070d480b2619c1573db42bfa27a8a303dbf786534a44d8796a9021c8b8bc52d14
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.20
1
+ 0.2.21
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  "lib/collins/api/asset_type.rb",
25
25
  "lib/collins/api/attributes.rb",
26
26
  "lib/collins/api/ip_address.rb",
27
+ "lib/collins/api/ipmi.rb",
27
28
  "lib/collins/api/logging.rb",
28
29
  "lib/collins/api/management.rb",
29
30
  "lib/collins/api/tag.rb",
@@ -4,6 +4,7 @@ require 'collins/api/asset_state'
4
4
  require 'collins/api/asset_type'
5
5
  require 'collins/api/attributes'
6
6
  require 'collins/api/ip_address'
7
+ require 'collins/api/ipmi'
7
8
  require 'collins/api/logging'
8
9
  require 'collins/api/management'
9
10
  require 'collins/api/tag'
@@ -108,6 +109,7 @@ module Collins
108
109
  include Collins::Api::AssetType
109
110
  include Collins::Api::Attributes
110
111
  include Collins::Api::IpAddress
112
+ include Collins::Api::Ipmi
111
113
  include Collins::Api::Logging
112
114
  include Collins::Api::Management
113
115
  include Collins::Api::Tag
@@ -8,6 +8,7 @@ module Collins; module Api
8
8
  asset = get_asset_or_tag asset_or_tag
9
9
  parameters = {
10
10
  :generate_ipmi => get_option(:generate_ipmi, options, false),
11
+ :ipmi_pool => get_option(:ipmi_pool, options, nil),
11
12
  :status => get_option(:status, options, asset.status),
12
13
  :type => get_option(:type, options, asset.type)
13
14
  }
@@ -0,0 +1,17 @@
1
+
2
+ module Collins; module Api
3
+
4
+ module Ipmi
5
+
6
+ def ipmi_pools
7
+ logger.debug("Finding IPMI address pools")
8
+ http_get("/api/ipmi/pools") do |response|
9
+ parse_response response, :expects => 200, :default => [], :raise => strict? do |json|
10
+ json["data"]["POOLS"]
11
+ end
12
+ end
13
+ end
14
+
15
+ end # module Ipmi
16
+
17
+ end; end
@@ -193,6 +193,15 @@ module Collins
193
193
  extract(extras, "HARDWARE", "CPU") || []
194
194
  end
195
195
 
196
+ # @return [Fixnum] Number of GPU's found
197
+ def gpu_count
198
+ (extract(extras, "HARDWARE", "GPU") || []).length
199
+ end
200
+ # @return [Array<Hash>] GPU information
201
+ def gpus
202
+ extract(extras, "HARDWARE", "GPU") || []
203
+ end
204
+
196
205
  # @return [Array<Hash>] Disk information
197
206
  def disks
198
207
  extract(extras, "HARDWARE", "DISK") || []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collins_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Matheny
@@ -119,6 +119,7 @@ files:
119
119
  - lib/collins/api/asset_type.rb
120
120
  - lib/collins/api/attributes.rb
121
121
  - lib/collins/api/ip_address.rb
122
+ - lib/collins/api/ipmi.rb
122
123
  - lib/collins/api/logging.rb
123
124
  - lib/collins/api/management.rb
124
125
  - lib/collins/api/tag.rb