@@ -180,9 +180,7 @@ def check_lpar_secureboot_state(self, hmc_con):
180
180
def hmc_secureboot_on_off (self , enable = True ):
181
181
'''
182
182
Enable/Disable Secure Boot from HMC
183
- 1. PowerOFF/Shutdown LPAR from HMC
184
- 2. Enable/Disable Secure boot using 'chsyscfg' command
185
- 3. PowerON/Activate the LPAR and boot to Operating System
183
+ Enable/Disable Secure boot using 'chsyscfg' command
186
184
'''
187
185
# Set Secure Boot value using HMC command
188
186
cmd = ('chsyscfg -r lpar -m %s -i "name=%s, secure_boot=' %
@@ -863,6 +861,34 @@ def is_msp_enabled(self, mg_system, vios_name, remote_hmc=None):
863
861
if int (msp_output [0 ]) != 1 :
864
862
return False
865
863
return True
864
+
865
+ def is_perfcollection_enabled (self ):
866
+ '''
867
+ Get Performance Information collection allowed in hmc profile
868
+
869
+ :returns: Ture if allow_perf_collection in hmc otherwise false
870
+ '''
871
+
872
+ rc = self .run_command ("lssyscfg -m %s -r lpar --filter lpar_names=%s -F allow_perf_collection"
873
+ % (self .mg_system , self .lpar_name ))
874
+ if rc :
875
+ return True
876
+ return False
877
+
878
+ def hmc_perfcollect_configure (self , enable = True ):
879
+ '''
880
+ Enable/Disable perfcollection from HMC
881
+ The value for enabling perfcollection is 1, and for disabling it is 0.
882
+ '''
883
+
884
+ cmd = ('chsyscfg -r lpar -m %s -i "name=%s, allow_perf_collection=' %
885
+ (self .mg_system , self .lpar_name ))
886
+ if enable :
887
+ cmd = '%s1"' % cmd
888
+ else :
889
+ cmd = '%s0"' % cmd
890
+ self .run_command (cmd , timeout = 300 )
891
+
866
892
867
893
def gather_logs (self , list_of_commands = [], remote_hmc = None , output_dir = None ):
868
894
'''
0 commit comments