ibm_power_hmc 0.17.0 → 0.18.0
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/lib/ibm_power_hmc/connection.rb +2 -13
- data/lib/ibm_power_hmc/parser.rb +66 -2
- data/lib/ibm_power_hmc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a067e3697998766bac04fad91eafee2e1563a5203c9bdcd9570cccea7b8cf3d
|
4
|
+
data.tar.gz: 0152c5e104b2fe95acb8a232e448708c3e44fd59cf2754a743da35a2856cc3a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc1d8e450a39902ea9aaee7765b2bd8c8850a9d7dc99abca96ee320287852d0d3fb7738fd4820edd3827c00030e66edaada481aab2de9e3850a9d8b32c98e2c1
|
7
|
+
data.tar.gz: 01c46f3e296b808afccfcf37e4a3f259b51b807fc051929965e4f2d5eba0cd3f4e14e0432819c9626b36647128d0fb59e9a1e1b0b6c740e839662308991f3079
|
@@ -94,7 +94,7 @@ module IbmPowerHmc
|
|
94
94
|
end
|
95
95
|
|
96
96
|
##
|
97
|
-
# @!method managed_system(sys_uuid
|
97
|
+
# @!method managed_system(sys_uuid, group_name = nil)
|
98
98
|
# Retrieve information about a managed system.
|
99
99
|
# @param sys_uuid [String] The UUID of the managed system.
|
100
100
|
# @param group_name [String] The extended group attributes.
|
@@ -194,17 +194,6 @@ module IbmPowerHmc
|
|
194
194
|
response.body[1..-2]
|
195
195
|
end
|
196
196
|
|
197
|
-
##
|
198
|
-
# @!method rename_lpar(lpar_uuid, new_name)
|
199
|
-
# Rename a logical partition.
|
200
|
-
# @param lpar_uuid [String] The UUID of the logical partition.
|
201
|
-
# @param new_name [String] The new name of the logical partition.
|
202
|
-
def rename_lpar(lpar_uuid, new_name)
|
203
|
-
modify_object do
|
204
|
-
lpar(lpar_uuid).tap { |lpar| lpar.name = new_name }
|
205
|
-
end
|
206
|
-
end
|
207
|
-
|
208
197
|
##
|
209
198
|
# @!method lpar_migrate_validate(lpar_uuid, target_sys_name, sync = true)
|
210
199
|
# Validate if a logical partition can be migrated to another managed system.
|
@@ -528,7 +517,7 @@ module IbmPowerHmc
|
|
528
517
|
# @!method shared_processor_pool(sys_uuid, pool_uuid = nil)
|
529
518
|
# Retrieve information about Shared Processor Pools.
|
530
519
|
# @param sys_uuid [String] The UUID of the managed system.
|
531
|
-
# @param pool_uuid [String] The UUID of the shared
|
520
|
+
# @param pool_uuid [String] The UUID of the shared processor pool (return all pools if omitted)
|
532
521
|
# @return [Array<IbmPowerHmc::SharedProcessorPool>, IbmPowerHmc::SharedProcessorPool] The list of shared processor pools.
|
533
522
|
def shared_processor_pool(sys_uuid, pool_uuid = nil)
|
534
523
|
if pool_uuid.nil?
|
data/lib/ibm_power_hmc/parser.rb
CHANGED
@@ -419,6 +419,14 @@ module IbmPowerHmc
|
|
419
419
|
def vfc_mappings
|
420
420
|
collection_of("VirtualFibreChannelMappings", "VirtualFibreChannelMapping")
|
421
421
|
end
|
422
|
+
|
423
|
+
def seas
|
424
|
+
collection_of("SharedEthernetAdapters", "SharedEthernetAdapter")
|
425
|
+
end
|
426
|
+
|
427
|
+
def trunks
|
428
|
+
collection_of("TrunkAdapters", "TrunkAdapter")
|
429
|
+
end
|
422
430
|
end
|
423
431
|
|
424
432
|
# Group information
|
@@ -442,6 +450,53 @@ module IbmPowerHmc
|
|
442
450
|
end
|
443
451
|
end
|
444
452
|
|
453
|
+
# SEA information
|
454
|
+
class SharedEthernetAdapter < AbstractNonRest
|
455
|
+
ATTRS = {
|
456
|
+
:udid => "UniqueDeviceID",
|
457
|
+
:name => "DeviceName",
|
458
|
+
:state => "ConfigurationState",
|
459
|
+
:large_send => "LargeSend",
|
460
|
+
:vlan_id => "PortVLANID",
|
461
|
+
:ha_mode => "HighAvailabilityMode",
|
462
|
+
:qos_mode => "QualityOfServiceMode",
|
463
|
+
:jumbo => "JumboFramesEnabled",
|
464
|
+
:queue_size => "QueueSize",
|
465
|
+
:primary => "IsPrimary"
|
466
|
+
}.freeze
|
467
|
+
|
468
|
+
def iface
|
469
|
+
elem = xml.elements["IPInterface"]
|
470
|
+
IPInterface.new(elem) unless elem.nil?
|
471
|
+
end
|
472
|
+
|
473
|
+
def device
|
474
|
+
elem = xml.elements["BackingDeviceChoice/*[1]"]
|
475
|
+
begin
|
476
|
+
Module.const_get("IbmPowerHmc::#{elem.name}").new(elem) unless elem.nil?
|
477
|
+
rescue NameError
|
478
|
+
nil
|
479
|
+
end
|
480
|
+
end
|
481
|
+
|
482
|
+
def trunks
|
483
|
+
collection_of("TrunkAdapters", "TrunkAdapter")
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
# IP Interface information
|
488
|
+
class IPInterface < AbstractNonRest
|
489
|
+
ATTRS = {
|
490
|
+
:name => "InterfaceName",
|
491
|
+
:state => "State",
|
492
|
+
:hostname => "HostName",
|
493
|
+
:ip => "IPAddress",
|
494
|
+
:netmask => "SubnetMask",
|
495
|
+
:gateway => "Gateway",
|
496
|
+
:prefix => "IPV6Prefix",
|
497
|
+
}.freeze
|
498
|
+
end
|
499
|
+
|
445
500
|
# Empty parent class to match K2 schema definition
|
446
501
|
class VirtualSCSIStorage < AbstractNonRest; end
|
447
502
|
|
@@ -552,6 +607,7 @@ module IbmPowerHmc
|
|
552
607
|
# Virtual Ethernet Adapter information
|
553
608
|
class VirtualEthernetAdapter < VirtualIOAdapter
|
554
609
|
ATTRS = ATTRS.merge({
|
610
|
+
:name => "DeviceName",
|
555
611
|
:macaddr => "MACAddress",
|
556
612
|
:vswitch_id => "VirtualSwitchID",
|
557
613
|
:vlan_id => "PortVLANID",
|
@@ -570,9 +626,17 @@ module IbmPowerHmc
|
|
570
626
|
end
|
571
627
|
end
|
572
628
|
|
573
|
-
#
|
574
|
-
class
|
629
|
+
# Trunk Adapter information
|
630
|
+
class TrunkAdapter < VirtualEthernetAdapter; end
|
575
631
|
|
632
|
+
class EthernetBackingDevice < IOAdapter
|
633
|
+
def iface
|
634
|
+
elem = xml.elements["IPInterface"]
|
635
|
+
IPInterface.new(elem) unless elem.nil?
|
636
|
+
end
|
637
|
+
end
|
638
|
+
|
639
|
+
# LP-HEA information
|
576
640
|
class HostEthernetAdapterLogicalPort < EthernetBackingDevice
|
577
641
|
ATTRS = ATTRS.merge({
|
578
642
|
:macaddr => "MACAddress",
|
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.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IBM Power
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|