Class: Sys
- Inherits:
-
Object
- Object
- Sys
- Defined in:
- lib/HMC/Sys.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#_variables ⇒ Object
readonly
Returns the value of attribute _variables.
-
#active_lpar_mobility_capable ⇒ Object
readonly
Returns the value of attribute active_lpar_mobility_capable.
-
#active_lpar_share_idle_procs_capable ⇒ Object
readonly
Returns the value of attribute active_lpar_share_idle_procs_capable.
-
#active_mem_expansion_capable ⇒ Object
readonly
Returns the value of attribute active_mem_expansion_capable.
-
#active_mem_sharing_capable ⇒ Object
readonly
Returns the value of attribute active_mem_sharing_capable.
-
#addr_broadcast_perf_policy_capable ⇒ Object
readonly
Returns the value of attribute addr_broadcast_perf_policy_capable.
-
#application_capable_5250 ⇒ Object
readonly
changed as number can’t be on the beginning.
-
#assign_5250_cpw_percent ⇒ Object
readonly
Returns the value of attribute assign_5250_cpw_percent.
-
#bsr_capable ⇒ Object
readonly
Returns the value of attribute bsr_capable.
-
#cod_mem_capable ⇒ Object
readonly
Returns the value of attribute cod_mem_capable.
-
#cod_proc_capable ⇒ Object
readonly
Returns the value of attribute cod_proc_capable.
-
#curr_mfg_default_boot_mode ⇒ Object
readonly
Returns the value of attribute curr_mfg_default_boot_mode.
-
#curr_mfg_default_ipl_source ⇒ Object
readonly
Returns the value of attribute curr_mfg_default_ipl_source.
-
#curr_power_on_side ⇒ Object
readonly
Returns the value of attribute curr_power_on_side.
-
#curr_power_on_speed ⇒ Object
readonly
Returns the value of attribute curr_power_on_speed.
-
#curr_power_on_speed_override ⇒ Object
readonly
Returns the value of attribute curr_power_on_speed_override.
-
#curr_sys_keylock ⇒ Object
readonly
Returns the value of attribute curr_sys_keylock.
-
#dataString ⇒ Object
readonly
Returns the value of attribute dataString.
-
#detailed_state ⇒ Object
readonly
Returns the value of attribute detailed_state.
-
#dynamic_platform_optimization_capable ⇒ Object
readonly
Returns the value of attribute dynamic_platform_optimization_capable.
-
#electronic_err_reporting_capable ⇒ Object
readonly
Returns the value of attribute electronic_err_reporting_capable.
-
#firmware_power_saver_capable ⇒ Object
readonly
Returns the value of attribute firmware_power_saver_capable.
-
#hardware_active_mem_expansion_capable ⇒ Object
readonly
Returns the value of attribute hardware_active_mem_expansion_capable.
-
#hardware_discovery_capable ⇒ Object
readonly
Returns the value of attribute hardware_discovery_capable.
-
#hardware_power_saver_capable ⇒ Object
readonly
Returns the value of attribute hardware_power_saver_capable.
-
#hca_bandwidth_capabilities ⇒ Object
readonly
Returns the value of attribute hca_bandwidth_capabilities.
-
#hca_capable ⇒ Object
readonly
Returns the value of attribute hca_capable.
-
#hmc ⇒ Object
Returns the value of attribute hmc.
-
#huge_page_mem_capable ⇒ Object
readonly
Returns the value of attribute huge_page_mem_capable.
-
#inactive_lpar_mobility_capable ⇒ Object
readonly
Returns the value of attribute inactive_lpar_mobility_capable.
-
#ipaddr ⇒ Object
readonly
Returns the value of attribute ipaddr.
-
#lhea_capable ⇒ Object
readonly
Returns the value of attribute lhea_capable.
-
#lpar_avail_priority_capable ⇒ Object
readonly
Returns the value of attribute lpar_avail_priority_capable.
-
#lpar_proc_compat_mode_capable ⇒ Object
readonly
Returns the value of attribute lpar_proc_compat_mode_capable.
-
#lpar_remote_restart_capable ⇒ Object
readonly
Returns the value of attribute lpar_remote_restart_capable.
-
#lpar_suspend_capable ⇒ Object
readonly
Returns the value of attribute lpar_suspend_capable.
-
#max_lpars ⇒ Object
readonly
Returns the value of attribute max_lpars.
-
#max_power_ctrl_lpars ⇒ Object
readonly
Returns the value of attribute max_power_ctrl_lpars.
-
#max_remote_restart_capable_lpars ⇒ Object
readonly
Returns the value of attribute max_remote_restart_capable_lpars.
-
#max_suspend_capable_lpars ⇒ Object
readonly
Returns the value of attribute max_suspend_capable_lpars.
-
#mfg_default_config ⇒ Object
readonly
Returns the value of attribute mfg_default_config.
-
#micro_lpar_capable ⇒ Object
readonly
Returns the value of attribute micro_lpar_capable.
-
#name ⇒ Object
power5.
-
#os400_capable ⇒ Object
readonly
Returns the value of attribute os400_capable.
-
#pend_mfg_default_boot_mode ⇒ Object
readonly
Returns the value of attribute pend_mfg_default_boot_mode.
-
#pend_mfg_default_ipl_source ⇒ Object
readonly
Returns the value of attribute pend_mfg_default_ipl_source.
-
#pend_power_on_lpar_start_policy ⇒ Object
readonly
Returns the value of attribute pend_power_on_lpar_start_policy.
-
#pend_power_on_option ⇒ Object
readonly
Returns the value of attribute pend_power_on_option.
-
#pend_power_on_side ⇒ Object
readonly
Returns the value of attribute pend_power_on_side.
-
#pend_power_on_speed ⇒ Object
readonly
Returns the value of attribute pend_power_on_speed.
-
#pend_power_on_speed_override ⇒ Object
readonly
Returns the value of attribute pend_power_on_speed_override.
-
#pend_sys_keylock ⇒ Object
readonly
Returns the value of attribute pend_sys_keylock.
-
#power_off_policy ⇒ Object
readonly
Returns the value of attribute power_off_policy.
-
#power_on_attr ⇒ Object
readonly
Returns the value of attribute power_on_attr.
-
#power_on_lpar_start_policy ⇒ Object
readonly
Returns the value of attribute power_on_lpar_start_policy.
-
#power_on_method ⇒ Object
readonly
Returns the value of attribute power_on_method.
-
#power_on_option ⇒ Object
readonly
Returns the value of attribute power_on_option.
-
#power_on_type ⇒ Object
readonly
Returns the value of attribute power_on_type.
-
#powervm_lpar_remote_restart_capable ⇒ Object
readonly
Returns the value of attribute powervm_lpar_remote_restart_capable.
-
#redundant_err_path_reporting_capable ⇒ Object
readonly
Returns the value of attribute redundant_err_path_reporting_capable.
-
#serial_num ⇒ Object
readonly
Returns the value of attribute serial_num.
-
#service_lpar_id ⇒ Object
readonly
Returns the value of attribute service_lpar_id.
-
#service_lpar_name ⇒ Object
readonly
Returns the value of attribute service_lpar_name.
-
#shared_eth_failover_capable ⇒ Object
readonly
Returns the value of attribute shared_eth_failover_capable.
-
#sni_msg_passing_capable ⇒ Object
readonly
Returns the value of attribute sni_msg_passing_capable.
-
#sp_boot_attr ⇒ Object
readonly
Returns the value of attribute sp_boot_attr.
-
#sp_boot_major_type ⇒ Object
readonly
Returns the value of attribute sp_boot_major_type.
-
#sp_boot_minor_type ⇒ Object
readonly
Returns the value of attribute sp_boot_minor_type.
-
#sp_failover_capable ⇒ Object
readonly
Returns the value of attribute sp_failover_capable.
-
#sp_version ⇒ Object
readonly
Returns the value of attribute sp_version.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#sys ⇒ Object
readonly
Returns the value of attribute sys.
-
#sys_time ⇒ Object
readonly
Returns the value of attribute sys_time.
-
#type_model ⇒ Object
readonly
Returns the value of attribute type_model.
-
#vet_activation_capable ⇒ Object
readonly
Returns the value of attribute vet_activation_capable.
-
#virtual_fc_capable ⇒ Object
readonly
Returns the value of attribute virtual_fc_capable.
-
#virtual_io_server_capable ⇒ Object
readonly
Returns the value of attribute virtual_io_server_capable.
-
#virtual_switch_capable ⇒ Object
readonly
Returns the value of attribute virtual_switch_capable.
-
#vsi_on_veth_capable ⇒ Object
readonly
Returns the value of attribute vsi_on_veth_capable.
-
#vsn_phase2_capable ⇒ Object
readonly
Returns the value of attribute vsn_phase2_capable.
Instance Method Summary collapse
- #dataGet_cmd ⇒ Object
- #dataSet(data_string) ⇒ Object
- #decodeString(string) ⇒ Object (also: #parse)
- #findLparID_cmd(lparName) ⇒ Object
- #findLparName_cmd(lparID) ⇒ Object
- #getLparsList_cmd ⇒ Object
- #getLparsScsiSlots_cmd ⇒ Object
- #getProfiles_cmd ⇒ Object
-
#initialize(name = '', hmc = '') ⇒ Sys
constructor
A new instance of Sys.
-
#lslic_cmd ⇒ Object
www.ibm.com/support/knowledgecenter/P8ESS/p8edm/lslic.html lslic - list Licensed Internal Code levels.
- #parse_f(string, format) ⇒ Object
- #start_cmd ⇒ Object
-
#start_time ⇒ Object
each type of frame can have different time to start this function is used in sleep value to not check to often the state of frame.
- #statusCheck_cmd ⇒ Object
- #stop_cmd ⇒ Object
- #type_model_serial ⇒ Object
Constructor Details
#initialize(name = '', hmc = '') ⇒ Sys
Returns a new instance of Sys.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/HMC/Sys.rb', line 91 def initialize(name = '', hmc = '') @name = name @hmc = hmc @_variables = {} @_variables['int'] = %w[ addr_broadcast_perf_policy_capable firmware_power_saver_capable hardware_power_saver_capable hca_capable huge_page_mem_capable sp_failover_capable sni_msg_passing_capable max_power_ctrl_lpars ] @_variables['int_unavialble'] = %w[ power_off_policy active_lpar_mobility_capable inactive_lpar_mobility_capable active_lpar_share_idle_procs_capable active_mem_expansion_capable hardware_active_mem_expansion_capable active_mem_sharing_capable bsr_capable cod_mem_capable cod_proc_capable dynamic_platform_optimization_capable electronic_err_reporting_capable hardware_discovery_capable lhea_capable lpar_avail_priority_capable lpar_proc_compat_mode_capable lpar_remote_restart_capable powervm_lpar_remote_restart_capable lpar_suspend_capable micro_lpar_capable os400_capable redundant_err_path_reporting_capable shared_eth_failover_capable vet_activation_capable virtual_fc_capable virtual_io_server_capable virtual_switch_capable vsn_phase2_capable vsi_on_veth_capable assign_5250_cpw_percent max_lpars max_remote_restart_capable_lpars max_suspend_capable_lpars hca_bandwidth_capabilities mfg_default_config ] @_variables['string'] = %w[ name type_model serial_num ipaddr state detailed_state sys_time service_lpar_id service_lpar_name curr_sys_keylock pend_sys_keylock curr_power_on_side pend_power_on_side curr_power_on_speed pend_power_on_speed curr_power_on_speed_override pend_power_on_speed_override power_on_type power_on_option power_on_lpar_start_policy pend_power_on_option pend_power_on_lpar_start_policy power_on_method power_on_attr sp_boot_attr sp_boot_major_type sp_boot_minor_type sp_version curr_mfg_default_ipl_source pend_mfg_default_ipl_source curr_mfg_default_boot_mode pend_mfg_default_boot_mode ] end |
Instance Attribute Details
#_variables ⇒ Object (readonly)
Returns the value of attribute _variables.
89 90 91 |
# File 'lib/HMC/Sys.rb', line 89 def _variables @_variables end |
#active_lpar_mobility_capable ⇒ Object (readonly)
Returns the value of attribute active_lpar_mobility_capable.
20 21 22 |
# File 'lib/HMC/Sys.rb', line 20 def active_lpar_mobility_capable @active_lpar_mobility_capable end |
#active_lpar_share_idle_procs_capable ⇒ Object (readonly)
Returns the value of attribute active_lpar_share_idle_procs_capable.
22 23 24 |
# File 'lib/HMC/Sys.rb', line 22 def active_lpar_share_idle_procs_capable @active_lpar_share_idle_procs_capable end |
#active_mem_expansion_capable ⇒ Object (readonly)
Returns the value of attribute active_mem_expansion_capable.
23 24 25 |
# File 'lib/HMC/Sys.rb', line 23 def active_mem_expansion_capable @active_mem_expansion_capable end |
#active_mem_sharing_capable ⇒ Object (readonly)
Returns the value of attribute active_mem_sharing_capable.
25 26 27 |
# File 'lib/HMC/Sys.rb', line 25 def active_mem_sharing_capable @active_mem_sharing_capable end |
#addr_broadcast_perf_policy_capable ⇒ Object (readonly)
Returns the value of attribute addr_broadcast_perf_policy_capable.
26 27 28 |
# File 'lib/HMC/Sys.rb', line 26 def addr_broadcast_perf_policy_capable @addr_broadcast_perf_policy_capable end |
#application_capable_5250 ⇒ Object (readonly)
changed as number can’t be on the beginning
87 88 89 |
# File 'lib/HMC/Sys.rb', line 87 def application_capable_5250 @application_capable_5250 end |
#assign_5250_cpw_percent ⇒ Object (readonly)
Returns the value of attribute assign_5250_cpw_percent.
55 56 57 |
# File 'lib/HMC/Sys.rb', line 55 def assign_5250_cpw_percent @assign_5250_cpw_percent end |
#bsr_capable ⇒ Object (readonly)
Returns the value of attribute bsr_capable.
27 28 29 |
# File 'lib/HMC/Sys.rb', line 27 def bsr_capable @bsr_capable end |
#cod_mem_capable ⇒ Object (readonly)
Returns the value of attribute cod_mem_capable.
28 29 30 |
# File 'lib/HMC/Sys.rb', line 28 def cod_mem_capable @cod_mem_capable end |
#cod_proc_capable ⇒ Object (readonly)
Returns the value of attribute cod_proc_capable.
29 30 31 |
# File 'lib/HMC/Sys.rb', line 29 def cod_proc_capable @cod_proc_capable end |
#curr_mfg_default_boot_mode ⇒ Object (readonly)
Returns the value of attribute curr_mfg_default_boot_mode.
85 86 87 |
# File 'lib/HMC/Sys.rb', line 85 def curr_mfg_default_boot_mode @curr_mfg_default_boot_mode end |
#curr_mfg_default_ipl_source ⇒ Object (readonly)
Returns the value of attribute curr_mfg_default_ipl_source.
83 84 85 |
# File 'lib/HMC/Sys.rb', line 83 def curr_mfg_default_ipl_source @curr_mfg_default_ipl_source end |
#curr_power_on_side ⇒ Object (readonly)
Returns the value of attribute curr_power_on_side.
65 66 67 |
# File 'lib/HMC/Sys.rb', line 65 def curr_power_on_side @curr_power_on_side end |
#curr_power_on_speed ⇒ Object (readonly)
Returns the value of attribute curr_power_on_speed.
67 68 69 |
# File 'lib/HMC/Sys.rb', line 67 def curr_power_on_speed @curr_power_on_speed end |
#curr_power_on_speed_override ⇒ Object (readonly)
Returns the value of attribute curr_power_on_speed_override.
69 70 71 |
# File 'lib/HMC/Sys.rb', line 69 def curr_power_on_speed_override @curr_power_on_speed_override end |
#curr_sys_keylock ⇒ Object (readonly)
Returns the value of attribute curr_sys_keylock.
63 64 65 |
# File 'lib/HMC/Sys.rb', line 63 def curr_sys_keylock @curr_sys_keylock end |
#dataString ⇒ Object (readonly)
Returns the value of attribute dataString.
8 9 10 |
# File 'lib/HMC/Sys.rb', line 8 def dataString @dataString end |
#detailed_state ⇒ Object (readonly)
Returns the value of attribute detailed_state.
17 18 19 |
# File 'lib/HMC/Sys.rb', line 17 def detailed_state @detailed_state end |
#dynamic_platform_optimization_capable ⇒ Object (readonly)
Returns the value of attribute dynamic_platform_optimization_capable.
30 31 32 |
# File 'lib/HMC/Sys.rb', line 30 def dynamic_platform_optimization_capable @dynamic_platform_optimization_capable end |
#electronic_err_reporting_capable ⇒ Object (readonly)
Returns the value of attribute electronic_err_reporting_capable.
31 32 33 |
# File 'lib/HMC/Sys.rb', line 31 def electronic_err_reporting_capable @electronic_err_reporting_capable end |
#firmware_power_saver_capable ⇒ Object (readonly)
Returns the value of attribute firmware_power_saver_capable.
32 33 34 |
# File 'lib/HMC/Sys.rb', line 32 def firmware_power_saver_capable @firmware_power_saver_capable end |
#hardware_active_mem_expansion_capable ⇒ Object (readonly)
Returns the value of attribute hardware_active_mem_expansion_capable.
24 25 26 |
# File 'lib/HMC/Sys.rb', line 24 def hardware_active_mem_expansion_capable @hardware_active_mem_expansion_capable end |
#hardware_discovery_capable ⇒ Object (readonly)
Returns the value of attribute hardware_discovery_capable.
34 35 36 |
# File 'lib/HMC/Sys.rb', line 34 def hardware_discovery_capable @hardware_discovery_capable end |
#hardware_power_saver_capable ⇒ Object (readonly)
Returns the value of attribute hardware_power_saver_capable.
33 34 35 |
# File 'lib/HMC/Sys.rb', line 33 def hardware_power_saver_capable @hardware_power_saver_capable end |
#hca_bandwidth_capabilities ⇒ Object (readonly)
Returns the value of attribute hca_bandwidth_capabilities.
60 61 62 |
# File 'lib/HMC/Sys.rb', line 60 def hca_bandwidth_capabilities @hca_bandwidth_capabilities end |
#hca_capable ⇒ Object (readonly)
Returns the value of attribute hca_capable.
35 36 37 |
# File 'lib/HMC/Sys.rb', line 35 def hca_capable @hca_capable end |
#hmc ⇒ Object
Returns the value of attribute hmc.
10 11 12 |
# File 'lib/HMC/Sys.rb', line 10 def hmc @hmc end |
#huge_page_mem_capable ⇒ Object (readonly)
Returns the value of attribute huge_page_mem_capable.
36 37 38 |
# File 'lib/HMC/Sys.rb', line 36 def huge_page_mem_capable @huge_page_mem_capable end |
#inactive_lpar_mobility_capable ⇒ Object (readonly)
Returns the value of attribute inactive_lpar_mobility_capable.
21 22 23 |
# File 'lib/HMC/Sys.rb', line 21 def inactive_lpar_mobility_capable @inactive_lpar_mobility_capable end |
#ipaddr ⇒ Object (readonly)
Returns the value of attribute ipaddr.
16 17 18 |
# File 'lib/HMC/Sys.rb', line 16 def ipaddr @ipaddr end |
#lhea_capable ⇒ Object (readonly)
Returns the value of attribute lhea_capable.
37 38 39 |
# File 'lib/HMC/Sys.rb', line 37 def lhea_capable @lhea_capable end |
#lpar_avail_priority_capable ⇒ Object (readonly)
Returns the value of attribute lpar_avail_priority_capable.
38 39 40 |
# File 'lib/HMC/Sys.rb', line 38 def lpar_avail_priority_capable @lpar_avail_priority_capable end |
#lpar_proc_compat_mode_capable ⇒ Object (readonly)
Returns the value of attribute lpar_proc_compat_mode_capable.
39 40 41 |
# File 'lib/HMC/Sys.rb', line 39 def lpar_proc_compat_mode_capable @lpar_proc_compat_mode_capable end |
#lpar_remote_restart_capable ⇒ Object (readonly)
Returns the value of attribute lpar_remote_restart_capable.
40 41 42 |
# File 'lib/HMC/Sys.rb', line 40 def lpar_remote_restart_capable @lpar_remote_restart_capable end |
#lpar_suspend_capable ⇒ Object (readonly)
Returns the value of attribute lpar_suspend_capable.
42 43 44 |
# File 'lib/HMC/Sys.rb', line 42 def lpar_suspend_capable @lpar_suspend_capable end |
#max_lpars ⇒ Object (readonly)
Returns the value of attribute max_lpars.
56 57 58 |
# File 'lib/HMC/Sys.rb', line 56 def max_lpars @max_lpars end |
#max_power_ctrl_lpars ⇒ Object (readonly)
Returns the value of attribute max_power_ctrl_lpars.
57 58 59 |
# File 'lib/HMC/Sys.rb', line 57 def max_power_ctrl_lpars @max_power_ctrl_lpars end |
#max_remote_restart_capable_lpars ⇒ Object (readonly)
Returns the value of attribute max_remote_restart_capable_lpars.
58 59 60 |
# File 'lib/HMC/Sys.rb', line 58 def max_remote_restart_capable_lpars @max_remote_restart_capable_lpars end |
#max_suspend_capable_lpars ⇒ Object (readonly)
Returns the value of attribute max_suspend_capable_lpars.
59 60 61 |
# File 'lib/HMC/Sys.rb', line 59 def max_suspend_capable_lpars @max_suspend_capable_lpars end |
#mfg_default_config ⇒ Object (readonly)
Returns the value of attribute mfg_default_config.
82 83 84 |
# File 'lib/HMC/Sys.rb', line 82 def mfg_default_config @mfg_default_config end |
#micro_lpar_capable ⇒ Object (readonly)
Returns the value of attribute micro_lpar_capable.
43 44 45 |
# File 'lib/HMC/Sys.rb', line 43 def micro_lpar_capable @micro_lpar_capable end |
#name ⇒ Object
power5
12 13 14 |
# File 'lib/HMC/Sys.rb', line 12 def name @name end |
#os400_capable ⇒ Object (readonly)
Returns the value of attribute os400_capable.
44 45 46 |
# File 'lib/HMC/Sys.rb', line 44 def os400_capable @os400_capable end |
#pend_mfg_default_boot_mode ⇒ Object (readonly)
Returns the value of attribute pend_mfg_default_boot_mode.
86 87 88 |
# File 'lib/HMC/Sys.rb', line 86 def pend_mfg_default_boot_mode @pend_mfg_default_boot_mode end |
#pend_mfg_default_ipl_source ⇒ Object (readonly)
Returns the value of attribute pend_mfg_default_ipl_source.
84 85 86 |
# File 'lib/HMC/Sys.rb', line 84 def pend_mfg_default_ipl_source @pend_mfg_default_ipl_source end |
#pend_power_on_lpar_start_policy ⇒ Object (readonly)
Returns the value of attribute pend_power_on_lpar_start_policy.
75 76 77 |
# File 'lib/HMC/Sys.rb', line 75 def pend_power_on_lpar_start_policy @pend_power_on_lpar_start_policy end |
#pend_power_on_option ⇒ Object (readonly)
Returns the value of attribute pend_power_on_option.
74 75 76 |
# File 'lib/HMC/Sys.rb', line 74 def pend_power_on_option @pend_power_on_option end |
#pend_power_on_side ⇒ Object (readonly)
Returns the value of attribute pend_power_on_side.
66 67 68 |
# File 'lib/HMC/Sys.rb', line 66 def pend_power_on_side @pend_power_on_side end |
#pend_power_on_speed ⇒ Object (readonly)
Returns the value of attribute pend_power_on_speed.
68 69 70 |
# File 'lib/HMC/Sys.rb', line 68 def pend_power_on_speed @pend_power_on_speed end |
#pend_power_on_speed_override ⇒ Object (readonly)
Returns the value of attribute pend_power_on_speed_override.
70 71 72 |
# File 'lib/HMC/Sys.rb', line 70 def pend_power_on_speed_override @pend_power_on_speed_override end |
#pend_sys_keylock ⇒ Object (readonly)
Returns the value of attribute pend_sys_keylock.
64 65 66 |
# File 'lib/HMC/Sys.rb', line 64 def pend_sys_keylock @pend_sys_keylock end |
#power_off_policy ⇒ Object (readonly)
Returns the value of attribute power_off_policy.
19 20 21 |
# File 'lib/HMC/Sys.rb', line 19 def power_off_policy @power_off_policy end |
#power_on_attr ⇒ Object (readonly)
Returns the value of attribute power_on_attr.
77 78 79 |
# File 'lib/HMC/Sys.rb', line 77 def power_on_attr @power_on_attr end |
#power_on_lpar_start_policy ⇒ Object (readonly)
Returns the value of attribute power_on_lpar_start_policy.
73 74 75 |
# File 'lib/HMC/Sys.rb', line 73 def power_on_lpar_start_policy @power_on_lpar_start_policy end |
#power_on_method ⇒ Object (readonly)
Returns the value of attribute power_on_method.
76 77 78 |
# File 'lib/HMC/Sys.rb', line 76 def power_on_method @power_on_method end |
#power_on_option ⇒ Object (readonly)
Returns the value of attribute power_on_option.
72 73 74 |
# File 'lib/HMC/Sys.rb', line 72 def power_on_option @power_on_option end |
#power_on_type ⇒ Object (readonly)
Returns the value of attribute power_on_type.
71 72 73 |
# File 'lib/HMC/Sys.rb', line 71 def power_on_type @power_on_type end |
#powervm_lpar_remote_restart_capable ⇒ Object (readonly)
Returns the value of attribute powervm_lpar_remote_restart_capable.
41 42 43 |
# File 'lib/HMC/Sys.rb', line 41 def powervm_lpar_remote_restart_capable @powervm_lpar_remote_restart_capable end |
#redundant_err_path_reporting_capable ⇒ Object (readonly)
Returns the value of attribute redundant_err_path_reporting_capable.
45 46 47 |
# File 'lib/HMC/Sys.rb', line 45 def redundant_err_path_reporting_capable @redundant_err_path_reporting_capable end |
#serial_num ⇒ Object (readonly)
Returns the value of attribute serial_num.
15 16 17 |
# File 'lib/HMC/Sys.rb', line 15 def serial_num @serial_num end |
#service_lpar_id ⇒ Object (readonly)
Returns the value of attribute service_lpar_id.
61 62 63 |
# File 'lib/HMC/Sys.rb', line 61 def service_lpar_id @service_lpar_id end |
#service_lpar_name ⇒ Object (readonly)
Returns the value of attribute service_lpar_name.
62 63 64 |
# File 'lib/HMC/Sys.rb', line 62 def service_lpar_name @service_lpar_name end |
#shared_eth_failover_capable ⇒ Object (readonly)
Returns the value of attribute shared_eth_failover_capable.
46 47 48 |
# File 'lib/HMC/Sys.rb', line 46 def shared_eth_failover_capable @shared_eth_failover_capable end |
#sni_msg_passing_capable ⇒ Object (readonly)
Returns the value of attribute sni_msg_passing_capable.
47 48 49 |
# File 'lib/HMC/Sys.rb', line 47 def sni_msg_passing_capable @sni_msg_passing_capable end |
#sp_boot_attr ⇒ Object (readonly)
Returns the value of attribute sp_boot_attr.
78 79 80 |
# File 'lib/HMC/Sys.rb', line 78 def sp_boot_attr @sp_boot_attr end |
#sp_boot_major_type ⇒ Object (readonly)
Returns the value of attribute sp_boot_major_type.
79 80 81 |
# File 'lib/HMC/Sys.rb', line 79 def sp_boot_major_type @sp_boot_major_type end |
#sp_boot_minor_type ⇒ Object (readonly)
Returns the value of attribute sp_boot_minor_type.
80 81 82 |
# File 'lib/HMC/Sys.rb', line 80 def sp_boot_minor_type @sp_boot_minor_type end |
#sp_failover_capable ⇒ Object (readonly)
Returns the value of attribute sp_failover_capable.
48 49 50 |
# File 'lib/HMC/Sys.rb', line 48 def sp_failover_capable @sp_failover_capable end |
#sp_version ⇒ Object (readonly)
Returns the value of attribute sp_version.
81 82 83 |
# File 'lib/HMC/Sys.rb', line 81 def sp_version @sp_version end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
13 14 15 |
# File 'lib/HMC/Sys.rb', line 13 def state @state end |
#sys ⇒ Object (readonly)
Returns the value of attribute sys.
7 8 9 |
# File 'lib/HMC/Sys.rb', line 7 def sys @sys end |
#sys_time ⇒ Object (readonly)
Returns the value of attribute sys_time.
18 19 20 |
# File 'lib/HMC/Sys.rb', line 18 def sys_time @sys_time end |
#type_model ⇒ Object (readonly)
Returns the value of attribute type_model.
14 15 16 |
# File 'lib/HMC/Sys.rb', line 14 def type_model @type_model end |
#vet_activation_capable ⇒ Object (readonly)
Returns the value of attribute vet_activation_capable.
49 50 51 |
# File 'lib/HMC/Sys.rb', line 49 def vet_activation_capable @vet_activation_capable end |
#virtual_fc_capable ⇒ Object (readonly)
Returns the value of attribute virtual_fc_capable.
50 51 52 |
# File 'lib/HMC/Sys.rb', line 50 def virtual_fc_capable @virtual_fc_capable end |
#virtual_io_server_capable ⇒ Object (readonly)
Returns the value of attribute virtual_io_server_capable.
51 52 53 |
# File 'lib/HMC/Sys.rb', line 51 def virtual_io_server_capable @virtual_io_server_capable end |
#virtual_switch_capable ⇒ Object (readonly)
Returns the value of attribute virtual_switch_capable.
52 53 54 |
# File 'lib/HMC/Sys.rb', line 52 def virtual_switch_capable @virtual_switch_capable end |
#vsi_on_veth_capable ⇒ Object (readonly)
Returns the value of attribute vsi_on_veth_capable.
54 55 56 |
# File 'lib/HMC/Sys.rb', line 54 def vsi_on_veth_capable @vsi_on_veth_capable end |
#vsn_phase2_capable ⇒ Object (readonly)
Returns the value of attribute vsn_phase2_capable.
53 54 55 |
# File 'lib/HMC/Sys.rb', line 53 def vsn_phase2_capable @vsn_phase2_capable end |
Instance Method Details
#dataGet_cmd ⇒ Object
249 250 251 |
# File 'lib/HMC/Sys.rb', line 249 def dataGet_cmd 'lssyscfg -r sys' end |
#dataSet(data_string) ⇒ Object
179 180 181 |
# File 'lib/HMC/Sys.rb', line 179 def dataSet(data_string) @dataString = data_string end |
#decodeString(string) ⇒ Object Also known as: parse
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/HMC/Sys.rb', line 212 def decodeString(string) HmcString.parse(string).each do |name, value| if @_variables['int_unavialble'].include?(name) if value == 'unavailable' || value == 'null' instance_variable_set("@#{name}", value.to_s) else instance_variable_set("@#{name}", value.to_i) end elsif @_variables['int'].include?(name) instance_variable_set("@#{name}", value.to_i) elsif @_variables['string'].include?(name) instance_variable_set("@#{name}", value.to_s) elsif name == '5250_application_capable' @application_capable_5250 = value.to_i else print "unknown name: #{name} with value #{value}" raise end end end |
#findLparID_cmd(lparName) ⇒ Object
267 268 269 |
# File 'lib/HMC/Sys.rb', line 267 def findLparID_cmd lparName "lssyscfg -r lpar -m #{@name} --filter \"lpar_names=#{lparName}\" -F lpar_id" end |
#findLparName_cmd(lparID) ⇒ Object
271 272 273 |
# File 'lib/HMC/Sys.rb', line 271 def findLparName_cmd lparID "lssyscfg -r lpar -m #{@name} --filter \"lpar_ids=#{lparID}\" -F name" end |
#getLparsList_cmd ⇒ Object
275 276 277 |
# File 'lib/HMC/Sys.rb', line 275 def getLparsList_cmd "lssyscfg -r lpar -m #{@name} -F \"lpar_id,name\"" end |
#getLparsScsiSlots_cmd ⇒ Object
279 280 281 |
# File 'lib/HMC/Sys.rb', line 279 def getLparsScsiSlots_cmd "lshwres -r virtualio --rsubtype scsi -m #{@name} --level lpar" end |
#getProfiles_cmd ⇒ Object
283 284 285 |
# File 'lib/HMC/Sys.rb', line 283 def getProfiles_cmd "lssyscfg -r prof -m #{@name}" end |
#lslic_cmd ⇒ Object
www.ibm.com/support/knowledgecenter/P8ESS/p8edm/lslic.html lslic - list Licensed Internal Code levels
289 290 291 |
# File 'lib/HMC/Sys.rb', line 289 def lslic_cmd "lslic -m #{@name} -t syspower" end |
#parse_f(string, format) ⇒ Object
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/HMC/Sys.rb', line 183 def parse_f(string, format) values = string.split(',') keys = format.split(',') keys.each_index do |id| key = keys[id] value = values[id] if @_variables['int_unavialble'].include?(key) if value == 'unavailable' && value == 'null' instance_variable_set("@#{key}", value.to_s) else instance_variable_set("@#{key}", value.to_i) end elsif @_variables['string'].include?(key) instance_variable_set("@#{key}", value.to_s) elsif @_variables['int'].include?(key) instance_variable_set("@#{key}", value.to_i) elsif key == '5250_application_capable' @application_capable_5250 = value.to_i else print "unknown name: #{key} with value #{value}" raise end end end |
#start_cmd ⇒ Object
253 254 255 |
# File 'lib/HMC/Sys.rb', line 253 def start_cmd "chsysstate -m #{@name} -r sys -o on" end |
#start_time ⇒ Object
each type of frame can have different time to start this function is used in sleep value to not check to often the state of frame
259 260 261 |
# File 'lib/HMC/Sys.rb', line 259 def start_time 120 end |
#statusCheck_cmd ⇒ Object
245 246 247 |
# File 'lib/HMC/Sys.rb', line 245 def statusCheck_cmd "lssyscfg -m #{@name} -r sys -F state" end |
#stop_cmd ⇒ Object
263 264 265 |
# File 'lib/HMC/Sys.rb', line 263 def stop_cmd "chsysstate -m #{@name} -r sys -o off" end |
#type_model_serial ⇒ Object
238 239 240 241 242 243 |
# File 'lib/HMC/Sys.rb', line 238 def type_model_serial raise 'unknown type_model' if type_model.nil? raise 'unknown serial' if serial_num.nil? type_model.to_s + '*' + serial_num end |