ibm_power_hmc 0.32.0 → 0.33.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f481e04a9c2a34b287dd44740a0930d2ea44c27780168e3b7310beda41905dae
4
- data.tar.gz: 82cc25ecfd3be18fee1b6eb45fc6d3b2c9de7dc54da859e6a34a60a8f30dc69e
3
+ metadata.gz: 36ed340724fb51fc1906ed5dfeb943076ade762209ddddeb99b9f85dc6aa52ba
4
+ data.tar.gz: 4622e2246bfbec8fbaed9684c65bf62b7b53cb3ccc0a451d7fb1e1e67534a385
5
5
  SHA512:
6
- metadata.gz: 2193e14677214e00c91658d424701418664ff17e2a4d0cfcc57553599b1e12c0680028e569606c73306e88917e358e9ea72b8491b6647aff033d12eb1fea2346
7
- data.tar.gz: cb6309b5de0e05ee25245aa56f95f9c9de0b2fe3bcb71cd10f0af67bf38758cfdcae422e22b15b64992cfaf099eead90bbe7bed82dd8cea8814394e64a68834b
6
+ metadata.gz: 863f9036e3e18980cdcc73a2fac26bd0d5e50f83cbe9d9be50f782671903e3ce02cdfff4faeecf4a1243ce76a8c43a55ba41fae0a149c08e3016d38615d349d0
7
+ data.tar.gz: 1a96ee9d81d1ee7083dddbc6b1abab572e37cca1bffa04f75d9567dac09b7548cb7f7aeeb13a1cfac1954390cad7b3e528ae58d3afe73d0190c3dd33317ea292
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## v0.33.0
2
+ * Add request id for log (#144)
3
+ * Added attribute mapping (#143)
4
+ ## v0.32.1
5
+ * Fix host attributes (#145)
1
6
  ## v0.32.0
2
7
  * Add vm attributes (#142)
3
8
  ## v0.31.0
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "securerandom"
4
+
3
5
  # Module for IBM HMC Rest API Client
4
6
  module IbmPowerHmc
5
7
  WEB_XMLNS = "http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/"
@@ -147,7 +149,8 @@ module IbmPowerHmc
147
149
  reauth = false
148
150
  # Check for relative URLs
149
151
  url = "https://#{@hostname}#{url}" if url.start_with?("/")
150
- logger.debug("HMC API request: #{method.upcase} #{url}")
152
+ req_id = SecureRandom.hex(4)
153
+ logger.debug("HMC API request [#{req_id}]: #{method.upcase} #{url}")
151
154
  begin
152
155
  headers = headers.merge("X-API-Session" => @api_session_token)
153
156
  start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
@@ -160,11 +163,11 @@ module IbmPowerHmc
160
163
  :timeout => @timeout
161
164
  )
162
165
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time
163
- logger.debug("HMC API response: #{response.code} #{method.upcase} #{url} (#{'%.3f' % elapsed}s)")
166
+ logger.debug("HMC API response [#{req_id}]: #{response.code} #{method.upcase} #{url} (#{'%.3f' % elapsed}s)")
164
167
  response
165
168
  rescue RestClient::Exception => e
166
169
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time
167
- logger.debug("HMC API error: #{e.http_code} #{method.upcase} #{url} (#{'%.3f' % elapsed}s) -- #{e.message}")
170
+ logger.debug("HMC API error [#{req_id}]: #{e.http_code} #{method.upcase} #{url} (#{'%.3f' % elapsed}s) -- #{e.message}")
168
171
  raise HttpNotFound.new(e), "Not found" if e.http_code == 404
169
172
 
170
173
  # Do not retry on failed logon attempts.
@@ -441,8 +441,8 @@ module IbmPowerHmc
441
441
  :keystore_signed_updates_no_verify => "KeyStoreSignedUpdatesWithoutVerificationAllowed",
442
442
  :linux_dynamic_key_secure_boot => "LinuxDynamicKeySecureBootEnabled",
443
443
  # Persistent Memory
444
- :max_dram_pmem_vols => "AssociatedPartitionPersistentMemoryConfiguration/MaximumDramPersistentMemoryVolumes",
445
- :current_dram_pmem_vols => "AssociatedPartitionPersistentMemoryConfiguration/CurrentDramPersistentMemoryVolumes",
444
+ :max_dram_pmem_vols => "AssociatedPersistentMemoryConfiguration/MaximumDramPersistentMemoryVolumes",
445
+ :current_dram_pmem_vols => "AssociatedPersistentMemoryConfiguration/CurrentDramPersistentMemoryVolumes",
446
446
  # Placement & Resource Groups
447
447
  :partition_placement => "PartitionPlacement",
448
448
  :min_affinity_score => "MinimumAffinityScore",
@@ -454,9 +454,43 @@ module IbmPowerHmc
454
454
  :current_max_virtual_io_slots => "PartitionIOConfiguration/CurrentMaximumVirtualIOSlots",
455
455
  :hsl_opticonnect_pool => "PartitionIOConfiguration/HighSpeedLinkOpticonnectPool",
456
456
  :virtual_opticonnect_pool => "PartitionIOConfiguration/VirtualOpticonnectPool",
457
- :alternate_load_source => "PartitionIOConfiguration/AlternateLoadSource",
458
- :console => "PartitionIOConfiguration/Console",
459
- :load_source => "PartitionIOConfiguration/LoadSource"
457
+ :alternate_load_source => "PartitionIOConfiguration/TaggedIO/AlternateLoadSource",
458
+ :console => "PartitionIOConfiguration/TaggedIO/Console",
459
+ :load_source => "PartitionIOConfiguration/TaggedIO/LoadSource",
460
+ # General
461
+ :allow_perf_data_collection => "AllowPerformanceDataCollection",
462
+ :availability_priority => "AvailabilityPriority",
463
+ :current_profile_sync => "CurrentProfileSync",
464
+ :vtpm_enabled => "IsVirtualTrustedPlatformModuleEnabled",
465
+ :partition_uuid => "PartitionUUID",
466
+ :pending_cpu_compat_mode => "PendingProcessorCompatibilityMode",
467
+ :service_partition => "IsServicePartition",
468
+ :mac_address_prefix => "MACAddressPrefix",
469
+ :migration_disable => "MigrationDisable",
470
+ :default_profile_name => "DefaultProfileName",
471
+ :last_activated_profile => "LastActivatedProfile",
472
+ :key_store_size => "KeyStoreSize",
473
+ :system_name => "SystemName",
474
+ :uses_hsl_opticonnect => "UsesHighSpeedLinkOpticonnect",
475
+ :uses_virtual_opticonnect => "UsesVirtualOpticonnect",
476
+ :virtual_serial_number => "VirtualSerialNumber",
477
+ :restricted_io_partition => "IsRestrictedIOPartition",
478
+ :designated_ipl_source => "DesignatedIPLSource",
479
+ :ibmi_restricted_io_sriov => "IBMiRestrictedIOModeSRIOVLogicalPortAssignmentCapable",
480
+ :network_install_iscsi_name => "NetworkInstalliSCSIInitiatorNameDefault",
481
+ :hw_accel_qos => "HardwareAcceleratorQoS",
482
+ # Memory Configuration
483
+ :active_mem_expansion_enabled => "PartitionMemoryConfiguration/ActiveMemoryExpansionEnabled",
484
+ :expansion_factor => "PartitionMemoryConfiguration/ExpansionFactor",
485
+ :hw_page_table_ratio => "PartitionMemoryConfiguration/HardwarePageTableRatio",
486
+ :current_max_huge_pages => "PartitionMemoryConfiguration/CurrentMaximumHugePageCount",
487
+ :current_min_huge_pages => "PartitionMemoryConfiguration/CurrentMinimumHugePageCount",
488
+ :runtime_huge_pages => "PartitionMemoryConfiguration/RuntimeHugePageCount",
489
+ :physical_page_table_ratio => "PartitionMemoryConfiguration/PhysicalPageTableRatio",
490
+ # Processor Configuration
491
+ :has_dedicated_procs => "PartitionProcessorConfiguration/HasDedicatedProcessors",
492
+ :shared_pool_id => "PartitionProcessorConfiguration/SharedProcessorConfiguration/SharedProcessorPoolID",
493
+ :runtime_uncapped_weight => "PartitionProcessorConfiguration/CurrentSharedProcessorConfiguration/RuntimeUncappedWeight"
460
494
  }.freeze
461
495
 
462
496
  def sys_uuid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IbmPowerHmc
4
- VERSION = "0.32.0"
4
+ VERSION = "0.33.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm_power_hmc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - IBM Power