Module: IDRAC::License

Included in:
Client
Defined in:
lib/idrac/license.rb

Instance Method Summary collapse

Instance Method Details

#clear_license_version_cacheObject



23
24
25
# File 'lib/idrac/license.rb', line 23

def clear_license_version_cache
  @license_version = nil
end

#license_infoHash?

Gets the license information from the iDRAC

Returns:

  • (Hash, nil)

    License details



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/idrac/license.rb', line 5

def license_info
  # Try standard endpoint first (iDRAC 9+)
  if (data = safe_get("/redfish/v1/LicenseService/Licenses"))
    if data["Members"]&.any?
      license_uri = data["Members"][0]["@odata.id"]
      return safe_get(license_uri) || try_dell_oem_license_path
    end
  end

  try_dell_oem_license_path
end

#license_versionInteger?

Extracts the iDRAC generation (e.g. 8, 9) from license or server header

Returns:

  • (Integer, nil)


19
20
21
# File 'lib/idrac/license.rb', line 19

def license_version
  @license_version ||= compute_license_version
end