class Lshmcusr
Attributes
authentication_type[R]
data[R]
data_string_raw[R]
description[R]
disabled[R]
idle_timeout[R]
inactivity_expiration[R]
min_pwage[R]
name[R]
options are taken from: www.ibm.com/support/knowledgecenter/en/POWER8/p8edm/mkhmcusr.html
password[R]
password_encryption[R]
pwage[R]
remote_ssh_access[R]
remote_webui_access[R]
resourcerole[R]
resources[R]
session_timeout[R]
taskrole[R]
verify_timeout[R]
Public Class Methods
new(string)
click to toggle source
# File lib/HMC/lshmcusr.rb, line 31 def initialize(string) @data = Hash.new @data_string_raw='' @_variables = Hash.new @_variables['variables_int'] = [ 'disabled', 'pwage', 'remote_webui_access', 'remote_ssh_access', 'min_pwage', 'session_timeout', 'verify_timeout', 'idle_timeout', 'inactivity_expiration' ] @_variables['variables_string'] = [ 'name', 'taskrole', 'description', 'resourcerole', 'authentication_type', 'resources', 'password_encryption' ] @name = nil @taskrole = nil @description = nil @pwage = nil @resourcerole = nil @authentication_type = nil @remote_webui_access = nil @remote_ssh_access = nil @min_pwage = nil @session_timeout = nil @verify_timeout = nil @idle_timeout = nil @inactivity_expiration = nil @resources = nil @password = nil @password_encryption = nil @disabled = nil if string.length > 0 @data_string_raw = string self.parse(string) end end
Public Instance Methods
parse(string)
click to toggle source
# File lib/HMC/lshmcusr.rb, line 66 def parse(string) array = HmcString.parse(string) array.each_pair { | key, value| if @_variables['variables_int'].include?(key) instance_variable_set("@#{key}", value.to_i) elsif @_variables['variables_string'].include?(key) instance_variable_set("@#{key}", value) else raise Exception "Unknown variable #{key}, #{value}" end } end