Class: Lshmcusr
- Inherits:
-
Object
- Object
- Lshmcusr
- Defined in:
- lib/HMC/lshmcusr.rb
Instance Attribute Summary collapse
-
#authentication_type ⇒ Object
readonly
Returns the value of attribute authentication_type.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#data_string_raw ⇒ Object
readonly
Returns the value of attribute data_string_raw.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
-
#idle_timeout ⇒ Object
readonly
Returns the value of attribute idle_timeout.
-
#inactivity_expiration ⇒ Object
readonly
Returns the value of attribute inactivity_expiration.
-
#min_pwage ⇒ Object
readonly
Returns the value of attribute min_pwage.
-
#name ⇒ Object
readonly
options are taken from: www.ibm.com/support/knowledgecenter/en/POWER8/p8edm/mkhmcusr.html.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#password_encryption ⇒ Object
readonly
Returns the value of attribute password_encryption.
-
#pwage ⇒ Object
readonly
Returns the value of attribute pwage.
-
#remote_ssh_access ⇒ Object
readonly
Returns the value of attribute remote_ssh_access.
-
#remote_webui_access ⇒ Object
readonly
Returns the value of attribute remote_webui_access.
-
#resourcerole ⇒ Object
readonly
Returns the value of attribute resourcerole.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
-
#session_timeout ⇒ Object
readonly
Returns the value of attribute session_timeout.
-
#taskrole ⇒ Object
readonly
Returns the value of attribute taskrole.
-
#verify_timeout ⇒ Object
readonly
Returns the value of attribute verify_timeout.
Instance Method Summary collapse
-
#initialize(string) ⇒ Lshmcusr
constructor
A new instance of Lshmcusr.
- #parse(string) ⇒ Object
Constructor Details
#initialize(string) ⇒ Lshmcusr
Returns a new instance of Lshmcusr.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# 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 |
Instance Attribute Details
#authentication_type ⇒ Object (readonly)
Returns the value of attribute authentication_type.
17 18 19 |
# File 'lib/HMC/lshmcusr.rb', line 17 def authentication_type @authentication_type end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/HMC/lshmcusr.rb', line 8 def data @data end |
#data_string_raw ⇒ Object (readonly)
Returns the value of attribute data_string_raw.
9 10 11 |
# File 'lib/HMC/lshmcusr.rb', line 9 def data_string_raw @data_string_raw end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
14 15 16 |
# File 'lib/HMC/lshmcusr.rb', line 14 def description @description end |
#disabled ⇒ Object (readonly)
Returns the value of attribute disabled.
28 29 30 |
# File 'lib/HMC/lshmcusr.rb', line 28 def disabled @disabled end |
#idle_timeout ⇒ Object (readonly)
Returns the value of attribute idle_timeout.
23 24 25 |
# File 'lib/HMC/lshmcusr.rb', line 23 def idle_timeout @idle_timeout end |
#inactivity_expiration ⇒ Object (readonly)
Returns the value of attribute inactivity_expiration.
24 25 26 |
# File 'lib/HMC/lshmcusr.rb', line 24 def inactivity_expiration @inactivity_expiration end |
#min_pwage ⇒ Object (readonly)
Returns the value of attribute min_pwage.
20 21 22 |
# File 'lib/HMC/lshmcusr.rb', line 20 def min_pwage @min_pwage end |
#name ⇒ Object (readonly)
options are taken from: www.ibm.com/support/knowledgecenter/en/POWER8/p8edm/mkhmcusr.html
12 13 14 |
# File 'lib/HMC/lshmcusr.rb', line 12 def name @name end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
26 27 28 |
# File 'lib/HMC/lshmcusr.rb', line 26 def password @password end |
#password_encryption ⇒ Object (readonly)
Returns the value of attribute password_encryption.
27 28 29 |
# File 'lib/HMC/lshmcusr.rb', line 27 def password_encryption @password_encryption end |
#pwage ⇒ Object (readonly)
Returns the value of attribute pwage.
15 16 17 |
# File 'lib/HMC/lshmcusr.rb', line 15 def pwage @pwage end |
#remote_ssh_access ⇒ Object (readonly)
Returns the value of attribute remote_ssh_access.
19 20 21 |
# File 'lib/HMC/lshmcusr.rb', line 19 def remote_ssh_access @remote_ssh_access end |
#remote_webui_access ⇒ Object (readonly)
Returns the value of attribute remote_webui_access.
18 19 20 |
# File 'lib/HMC/lshmcusr.rb', line 18 def remote_webui_access @remote_webui_access end |
#resourcerole ⇒ Object (readonly)
Returns the value of attribute resourcerole.
16 17 18 |
# File 'lib/HMC/lshmcusr.rb', line 16 def resourcerole @resourcerole end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
25 26 27 |
# File 'lib/HMC/lshmcusr.rb', line 25 def resources @resources end |
#session_timeout ⇒ Object (readonly)
Returns the value of attribute session_timeout.
21 22 23 |
# File 'lib/HMC/lshmcusr.rb', line 21 def session_timeout @session_timeout end |
#taskrole ⇒ Object (readonly)
Returns the value of attribute taskrole.
13 14 15 |
# File 'lib/HMC/lshmcusr.rb', line 13 def taskrole @taskrole end |
#verify_timeout ⇒ Object (readonly)
Returns the value of attribute verify_timeout.
22 23 24 |
# File 'lib/HMC/lshmcusr.rb', line 22 def verify_timeout @verify_timeout end |
Instance Method Details
#parse(string) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# 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 |