vcenter_lib 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 183c9b6df0f9435d8dc54acb0bbbef438b1906ba
4
- data.tar.gz: f3eb1ac505a72d18b354f49c462f4e2633a7a137
3
+ metadata.gz: 2376ecb47d79ea967c886252fc7ed379cebf9316
4
+ data.tar.gz: 1fbfc80536138813480ce2fcc755702db768af36
5
5
  SHA512:
6
- metadata.gz: 4a9539cc4c08d9153b72118122765f84da118a017c6725c5eb21d8ac50d75e8db340cde103769b5db44ddce128525dbe023cb1d7e11cefbc8db28faa687d3158
7
- data.tar.gz: e1ed62bfafdb5bab1455dd1d3b0c3b600611ab9373edbc7be37bc8837e0e45f72fd010c7c1cf3d7fbd39081186200e54031f44c047f7c798eeccc98779968bb3
6
+ metadata.gz: f4d74f9f8ea4bea63040cc91ace53585b2d87ce34613485c99a63399bdbbbc0adf935db86601f4aacbc8a2c7bb1d34d3d731163f70cd210576f7626b5a2b4ae7
7
+ data.tar.gz: 3474b8371d6667c03188e705e4f7f6c1d9fa61f5675facb12664b2c13d3d0e8c1f36f616a64a3eeeb36008ef33595b6fa29e0c5e294ff5451cc0521f9150ca58
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /pkg/
9
9
  /spec/reports/
10
10
  /tmp/
11
- /m31.rb
11
+ /*.gem
12
+ /m31.rb
@@ -1,3 +1,3 @@
1
1
  module VcenterLib
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
@@ -50,6 +50,13 @@ module VcenterLib
50
50
  @vcenter = vcenter
51
51
  end
52
52
 
53
+ # get all vms and their facts
54
+ def facts
55
+ vm_mos_to_h(@vcenter.vms).map do |h|
56
+ [h['name'], h]
57
+ end
58
+ end
59
+
53
60
  # convert a VMware RbVmomi::VIM::ManagedObject into a simple hash.
54
61
  def vm_mo_to_h(vm_mo, attributes = ATTRIBUTES)
55
62
  return nil unless vm_mo
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcenter_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Meyling
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbvmomi
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.6.8
142
+ rubygems_version: 2.5.1
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: easy access to vcenter informations