Skip to content

Commit

Permalink
Added support to configure the multiple lpars.
Browse files Browse the repository at this point in the history
In this commit addressed review comments,
1. Removed lpar_config option.

Signed-off-by: Samir Mulani <[email protected]>
  • Loading branch information
SamirMulani committed Oct 9, 2023
1 parent 0a23e6b commit 42e836a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions testcases/MachineConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ def setUp(self):
self.system_name = conf.args.system_name
self.cv_HMC = self.cv_SYSTEM.hmc
self.lpar_prof = conf.args.lpar_prof
try: self.lpar_config = conf.args.lpar_config
except AttributeError:
self.lpar_config = ""
self.lpar_flag = False
try: self.lpar_list = conf.args.lpar_list
except AttributeError:
self.lpar_list = ""
Expand Down Expand Up @@ -101,9 +99,10 @@ def update_hmc_object(self, target_hmc_ip, target_hmc_username, target_hmc_passw
self.cv_HMC.set_system(conf.system())

def runTest(self):
if self.lpar_list != "" and self.lpar_config == "multi":
if self.lpar_list != "":
self.lpar_list = self.lpar_list.split(",")
self.lpar_list.append(self.lpar_name)
self.lpar_flag = True
for lpar in self.lpar_list:
lpar = lpar.strip()
self.update_hmc_object(self.hmc_ip, self.hmc_user, self.hmc_password, self.system_name, lpar)
Expand All @@ -124,7 +123,7 @@ def callConfig(self, key, lpar=""):
config_value=self.machine_config['lpar']
if 'secureboot' in config_value:
self.sb_enable = self.validate_secureboot_parameter(self.machine_config)
status=LparConfig(self.cv_HMC,self.system_name,self.lpar_name,self.lpar_prof,self.machine_config['lpar'],sb_enable=self.sb_enable).LparSetup(self.lpar_config)
status=LparConfig(self.cv_HMC,self.system_name,self.lpar_name,self.lpar_prof,self.machine_config['lpar'],sb_enable=self.sb_enable).LparSetup(self.lpar_flag)
if status:
self.fail(status)

Expand Down Expand Up @@ -230,7 +229,8 @@ def LparSetup(self, lpar_config=""):
self.overcommit_ratio = 1
proc_mode = 'shared'
curr_proc_mode = self.cv_HMC.get_proc_mode()
if proc_mode in curr_proc_mode and lpar_config != "multi":
print("==========================> samir===========================###########################: ", lpar_config)
if proc_mode in curr_proc_mode and lpar_config == True:
log.info("System is already booted in shared mode.")
else:
self.cv_HMC.profile_bckup()
Expand Down

0 comments on commit 42e836a

Please sign in to comment.