ibm_power_hmc 0.8.0 → 0.8.1
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/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/.rubocop_local.yml +0 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/ibm_power_hmc.gemspec +0 -0
- data/lib/ibm_power_hmc/connection.rb +3 -3
- data/lib/ibm_power_hmc/job.rb +0 -0
- data/lib/ibm_power_hmc/parser.rb +44 -48
- data/lib/ibm_power_hmc/pcm.rb +0 -0
- data/lib/ibm_power_hmc/version.rb +1 -1
- data/lib/ibm_power_hmc.rb +0 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af5d28dd76ae4e57514691d4ab40e023ca18a6a7e71c4691b15c564097920964
|
4
|
+
data.tar.gz: 68a2d511853792668bca5247da9c1910725367ff6fb65ec3f21674953b7be876
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77ff9b3db36ef774dd64b37d14b5bd57226cbfe31dece9e17c799089c94418d24bea27f2504fbd0ec84d9e3120023a11db1e4619f06e46f92f12c629398d1ff
|
7
|
+
data.tar.gz: 0feb113a298fb117d6ef5cbfaf1fbab3b6a7e72bb69a749c7a36bc0255147d1e0b640879acd1e233780eecb8ef96768efe35e43ea56e3c73ecd7914b63387f09
|
data/.gitignore
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/.rubocop_local.yml
CHANGED
File without changes
|
data/CHANGELOG.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/ibm_power_hmc.gemspec
CHANGED
File without changes
|
@@ -560,8 +560,8 @@ module IbmPowerHmc
|
|
560
560
|
break if response.code != 204 || !wait
|
561
561
|
end
|
562
562
|
FeedParser.new(response.body).objects(:Event).map do |e|
|
563
|
-
data = e.data.split("/")
|
564
|
-
if data[-2].eql?("UserTask")
|
563
|
+
data = e.data.split("/") unless e.data.nil?
|
564
|
+
if !data.nil? && data.length >= 2 && data[-2].eql?("UserTask")
|
565
565
|
e.usertask = usertask(data.last)
|
566
566
|
end
|
567
567
|
e
|
@@ -580,7 +580,7 @@ module IbmPowerHmc
|
|
580
580
|
if j['status'].eql?("Completed")
|
581
581
|
case j['key']
|
582
582
|
when "TEMPLATE_PARTITION_SAVE", "TEMPLATE_PARTITION_SAVE_AS", "TEMPLATE_PARTITION_CAPTURE"
|
583
|
-
j['template_uuid'] = templates_summary.
|
583
|
+
j['template_uuid'] = templates_summary.find { |t| t.name.eql?(j['labelParams'].first) }&.uuid
|
584
584
|
end
|
585
585
|
end
|
586
586
|
j
|
data/lib/ibm_power_hmc/job.rb
CHANGED
File without changes
|
data/lib/ibm_power_hmc/parser.rb
CHANGED
@@ -74,9 +74,6 @@ module IbmPowerHmc
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
private_constant :Parser
|
78
|
-
private_constant :FeedParser
|
79
|
-
|
80
77
|
##
|
81
78
|
# HMC generic K2 non-REST object.
|
82
79
|
# @abstract
|
@@ -135,6 +132,15 @@ module IbmPowerHmc
|
|
135
132
|
uuid_from_href(link.attributes["href"], index)
|
136
133
|
end.compact
|
137
134
|
end
|
135
|
+
|
136
|
+
def collection_of(name, type)
|
137
|
+
objtype = Module.const_get("IbmPowerHmc::#{type}")
|
138
|
+
xml.get_elements("#{name}/#{type}").map do |elem|
|
139
|
+
objtype.new(elem)
|
140
|
+
end
|
141
|
+
rescue
|
142
|
+
[]
|
143
|
+
end
|
138
144
|
end
|
139
145
|
|
140
146
|
##
|
@@ -190,12 +196,19 @@ module IbmPowerHmc
|
|
190
196
|
ATTRS = {
|
191
197
|
:name => "ManagementConsoleName",
|
192
198
|
:build_level => "VersionInfo/BuildLevel",
|
193
|
-
:version => "BaseVersion"
|
199
|
+
:version => "BaseVersion",
|
200
|
+
:ssh_pubkey => "PublicSSHKeyValue"
|
194
201
|
}.freeze
|
195
202
|
|
196
203
|
def managed_systems_uuids
|
197
204
|
uuids_from_links("ManagedSystems")
|
198
205
|
end
|
206
|
+
|
207
|
+
def ssh_authkeys
|
208
|
+
xml.get_elements("AuthorizedKeysValue/AuthorizedKey").map do |elem|
|
209
|
+
elem.text&.strip
|
210
|
+
end.compact
|
211
|
+
end
|
199
212
|
end
|
200
213
|
|
201
214
|
# Managed System information
|
@@ -232,9 +245,7 @@ module IbmPowerHmc
|
|
232
245
|
end
|
233
246
|
|
234
247
|
def io_adapters
|
235
|
-
|
236
|
-
IOAdapter.new(elem)
|
237
|
-
end
|
248
|
+
collection_of("AssociatedSystemIOConfiguration/IOSlots/IOSlot/RelatedIOAdapter", "IOAdapter")
|
238
249
|
end
|
239
250
|
|
240
251
|
def vswitches_uuids
|
@@ -277,8 +288,8 @@ module IbmPowerHmc
|
|
277
288
|
}.freeze
|
278
289
|
|
279
290
|
def sys_uuid
|
280
|
-
|
281
|
-
uuid_from_href(
|
291
|
+
href = singleton("AssociatedManagedSystem", "href")
|
292
|
+
uuid_from_href(href) unless href.nil?
|
282
293
|
end
|
283
294
|
|
284
295
|
def net_adap_uuids
|
@@ -286,9 +297,7 @@ module IbmPowerHmc
|
|
286
297
|
end
|
287
298
|
|
288
299
|
def lhea_ports
|
289
|
-
|
290
|
-
HostEthernetAdapterLogicalPort.new(elem)
|
291
|
-
end
|
300
|
+
collection_of("HostEthernetAdapterLogicalPorts", "HostEthernetAdapterLogicalPort")
|
292
301
|
end
|
293
302
|
|
294
303
|
def sriov_elp_uuids
|
@@ -321,9 +330,7 @@ module IbmPowerHmc
|
|
321
330
|
# VIOS information
|
322
331
|
class VirtualIOServer < BasePartition
|
323
332
|
def pvs
|
324
|
-
|
325
|
-
PhysicalVolume.new(elem)
|
326
|
-
end
|
333
|
+
collection_of("PhysicalVolumes", "PhysicalVolume")
|
327
334
|
end
|
328
335
|
|
329
336
|
def rep
|
@@ -332,15 +339,11 @@ module IbmPowerHmc
|
|
332
339
|
end
|
333
340
|
|
334
341
|
def vscsi_mappings
|
335
|
-
|
336
|
-
VirtualSCSIMapping.new(elem)
|
337
|
-
end
|
342
|
+
collection_of("VirtualSCSIMappings", "VirtualSCSIMapping")
|
338
343
|
end
|
339
344
|
|
340
345
|
def vfc_mappings
|
341
|
-
|
342
|
-
VirtualFibreChannelMapping.new(elem)
|
343
|
-
end
|
346
|
+
collection_of("VirtualFibreChannelMappings", "VirtualFibreChannelMapping")
|
344
347
|
end
|
345
348
|
end
|
346
349
|
|
@@ -390,9 +393,7 @@ module IbmPowerHmc
|
|
390
393
|
}.freeze
|
391
394
|
|
392
395
|
def vopts
|
393
|
-
|
394
|
-
VirtualOpticalMedia.new(elem)
|
395
|
-
end
|
396
|
+
collection_of("OpticalMedia", "VirtualOpticalMedia")
|
396
397
|
end
|
397
398
|
end
|
398
399
|
|
@@ -424,7 +425,7 @@ module IbmPowerHmc
|
|
424
425
|
|
425
426
|
def vswitch_uuid
|
426
427
|
href = singleton("AssociatedSwitch", "href")
|
427
|
-
uuid_from_href(href)
|
428
|
+
uuid_from_href(href) unless href.nil?
|
428
429
|
end
|
429
430
|
|
430
431
|
def lpars_uuids
|
@@ -511,7 +512,7 @@ module IbmPowerHmc
|
|
511
512
|
class VirtualSCSIMapping < AbstractNonRest
|
512
513
|
def lpar_uuid
|
513
514
|
href = singleton("AssociatedLogicalPartition", "href")
|
514
|
-
uuid_from_href(href)
|
515
|
+
uuid_from_href(href) unless href.nil?
|
515
516
|
end
|
516
517
|
|
517
518
|
def client
|
@@ -562,7 +563,7 @@ module IbmPowerHmc
|
|
562
563
|
|
563
564
|
def vios_uuid
|
564
565
|
href = singleton("ConnectingPartition", "href")
|
565
|
-
uuid_from_href(href)
|
566
|
+
uuid_from_href(href) unless href.nil?
|
566
567
|
end
|
567
568
|
end
|
568
569
|
|
@@ -606,7 +607,7 @@ module IbmPowerHmc
|
|
606
607
|
class VirtualFibreChannelMapping < AbstractNonRest
|
607
608
|
def lpar_uuid
|
608
609
|
href = singleton("AssociatedLogicalPartition", "href")
|
609
|
-
uuid_from_href(href)
|
610
|
+
uuid_from_href(href) unless href.nil?
|
610
611
|
end
|
611
612
|
|
612
613
|
def client
|
@@ -636,16 +637,14 @@ module IbmPowerHmc
|
|
636
637
|
|
637
638
|
def lpar_uuid
|
638
639
|
href = singleton("ConnectingPartition", "href")
|
639
|
-
uuid_from_href(href)
|
640
|
+
uuid_from_href(href) unless href.nil?
|
640
641
|
end
|
641
642
|
end
|
642
643
|
|
643
644
|
# VFC client information
|
644
645
|
class VirtualFibreChannelClientAdapter < VirtualFibreChannelAdapter
|
645
646
|
def nport_loggedin
|
646
|
-
|
647
|
-
VirtualFibreChannelNPortLoginStatus.new(elem)
|
648
|
-
end
|
647
|
+
collection_of("NportLoggedInStatus", "VirtualFibreChannelNPortLoginStatus")
|
649
648
|
end
|
650
649
|
|
651
650
|
def server
|
@@ -699,9 +698,7 @@ module IbmPowerHmc
|
|
699
698
|
}.freeze
|
700
699
|
|
701
700
|
def pvs
|
702
|
-
|
703
|
-
PhysicalVolume.new(elem)
|
704
|
-
end
|
701
|
+
collection_of("PhysicalVolumes", "PhysicalVolume")
|
705
702
|
end
|
706
703
|
end
|
707
704
|
|
@@ -713,15 +710,17 @@ module IbmPowerHmc
|
|
713
710
|
:tier_capable => "ClusterCapabilities/IsTierCapable"
|
714
711
|
}.freeze
|
715
712
|
|
713
|
+
def repopvs
|
714
|
+
collection_of("RepositoryDisk", "PhysicalVolume")
|
715
|
+
end
|
716
|
+
|
716
717
|
def ssp_uuid
|
717
718
|
href = singleton("ClusterSharedStoragePool", "href")
|
718
|
-
uuid_from_href(href)
|
719
|
+
uuid_from_href(href) unless href.nil?
|
719
720
|
end
|
720
721
|
|
721
722
|
def nodes
|
722
|
-
|
723
|
-
Node.new(elem)
|
724
|
-
end
|
723
|
+
collection_of("Node", "Node")
|
725
724
|
end
|
726
725
|
end
|
727
726
|
|
@@ -736,13 +735,14 @@ module IbmPowerHmc
|
|
736
735
|
|
737
736
|
def vios_uuid
|
738
737
|
href = singleton("VirtualIOServer", "href")
|
739
|
-
uuid_from_href(href)
|
738
|
+
uuid_from_href(href) unless href.nil?
|
740
739
|
end
|
741
740
|
end
|
742
741
|
|
743
742
|
# SSP information
|
744
743
|
class SharedStoragePool < AbstractRest
|
745
744
|
ATTRS = {
|
745
|
+
:id => "SharedStoragePoolID",
|
746
746
|
:name => "StoragePoolName",
|
747
747
|
:udid => "UniqueDeviceID",
|
748
748
|
:capacity => "Capacity",
|
@@ -754,13 +754,11 @@ module IbmPowerHmc
|
|
754
754
|
|
755
755
|
def cluster_uuid
|
756
756
|
href = singleton("AssociatedCluster", "href")
|
757
|
-
uuid_from_href(href)
|
757
|
+
uuid_from_href(href) unless href.nil?
|
758
758
|
end
|
759
759
|
|
760
760
|
def pvs
|
761
|
-
|
762
|
-
PhysicalVolume.new(elem)
|
763
|
-
end
|
761
|
+
collection_of("PhysicalVolumes", "PhysicalVolume")
|
764
762
|
end
|
765
763
|
|
766
764
|
def tiers_uuids
|
@@ -768,9 +766,7 @@ module IbmPowerHmc
|
|
768
766
|
end
|
769
767
|
|
770
768
|
def lus
|
771
|
-
|
772
|
-
LogicalUnit.new(elem)
|
773
|
-
end
|
769
|
+
collection_of("LogicalUnits", "LogicalUnit")
|
774
770
|
end
|
775
771
|
end
|
776
772
|
|
@@ -788,7 +784,7 @@ module IbmPowerHmc
|
|
788
784
|
|
789
785
|
def ssp_uuid
|
790
786
|
href = singleton("AssociatedSharedStoragePool", "href")
|
791
|
-
uuid_from_href(href)
|
787
|
+
uuid_from_href(href) unless href.nil?
|
792
788
|
end
|
793
789
|
|
794
790
|
def lus_uuids
|
data/lib/ibm_power_hmc/pcm.rb
CHANGED
File without changes
|
data/lib/ibm_power_hmc.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm_power_hmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IBM Power
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.1'
|
27
27
|
description: A Ruby gem for interacting with the IBM Hardware Management Console (HMC).
|
28
|
-
email:
|
28
|
+
email:
|
29
29
|
executables: []
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
@@ -55,7 +55,7 @@ metadata:
|
|
55
55
|
homepage_uri: http://github.com/IBM/ibm_power_hmc_sdk_ruby
|
56
56
|
source_code_uri: http://github.com/IBM/ibm_power_hmc_sdk_ruby
|
57
57
|
changelog_uri: http://github.com/IBM/ibm_power_hmc_sdk_ruby/blob/master/CHANGELOG.md
|
58
|
-
post_install_message:
|
58
|
+
post_install_message:
|
59
59
|
rdoc_options: []
|
60
60
|
require_paths:
|
61
61
|
- lib
|
@@ -70,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
rubygems_version: 3.1.
|
74
|
-
signing_key:
|
73
|
+
rubygems_version: 3.1.2
|
74
|
+
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: IBM Power HMC Ruby gem.
|
77
77
|
test_files: []
|