33
33
34
34
import OpTestConfiguration
35
35
import OpTestLogger
36
+ from common import OpTestASM
36
37
from common import OpTestHMC
37
38
from common import OpTestInstallUtil
38
39
from common .OpTestUtil import OpTestUtil
@@ -59,6 +60,7 @@ def setUp(self):
59
60
self .lpar_prof = conf .args .lpar_prof
60
61
self .util = OpTestUtil (conf )
61
62
self .lpar_flag = False
63
+ self .cv_BMC = self .cv_SYSTEM .bmc
62
64
try :
63
65
self .lpar_list = conf .args .lpar_list
64
66
except AttributeError :
@@ -141,6 +143,7 @@ def callConfig(self, key, lpar=""):
141
143
if key == "cec" :
142
144
lmb_size = None
143
145
num_hugepages = None
146
+ ioenlargecapacity = None
144
147
setup = 0
145
148
if not self .cv_HMC .lpar_vios :
146
149
self .skipTest ("Please pass lpar_vios in config file." )
@@ -159,10 +162,16 @@ def callConfig(self, key, lpar=""):
159
162
num_hugepages = re .findall (
160
163
'hugepages=[0-9]+' ,
161
164
str (self .machine_config ))[0 ].split ('=' )[1 ]
165
+ if "iocapacity" in config_value :
166
+ setup = 1
167
+ if self .bmc_type in ["EBMC_PHYP" , "FSP_PHYP" ]:
168
+ ioenlargecapacity = re .findall (
169
+ 'iocapacity=[0-9]+' , str (self .machine_config ))[0 ].split ('=' )[1 ]
162
170
163
171
status = CecConfig (self .cv_HMC , self .system_name , self .lpar_name ,
164
172
self .lpar_prof , lmb = lmb_size ,
165
- hugepages = num_hugepages ).CecSetup ()
173
+ hugepages = num_hugepages , iocapacity = ioenlargecapacity ,
174
+ bmc_type = self .bmc_type , bmc = self .cv_SYSTEM .bmc ).CecSetup ()
166
175
if status :
167
176
self .fail (status )
168
177
if not setup :
@@ -471,7 +480,8 @@ class CecConfig():
471
480
'''
472
481
473
482
def __init__ (self , cv_HMC = None , system_name = None ,
474
- lpar_name = None , lpar_prof = None , lmb = None , hugepages = None ):
483
+ lpar_name = None , lpar_prof = None , lmb = None , hugepages = None ,
484
+ iocapacity = None , bmc_type = None , bmc = None ):
475
485
476
486
self .cv_HMC = cv_HMC
477
487
self .system_name = system_name
@@ -480,7 +490,11 @@ def __init__(self, cv_HMC=None, system_name=None,
480
490
self .lmb_size = lmb
481
491
self .num_hugepages = hugepages
482
492
self .setup = 0
483
- self .cec_dict = {'lmb_cec' : None , 'hugepages' : None }
493
+ self .iocapacity = iocapacity
494
+ self .cec_dict = {'lmb_cec' : None , 'hugepages' : None , 'iocapacity' : None }
495
+ self .config = OpTestConfiguration .conf
496
+ self .bmc_type = bmc_type
497
+ self .bmc = bmc
484
498
485
499
def CecSetup (self ):
486
500
@@ -491,6 +505,11 @@ def CecSetup(self):
491
505
self .lmb_setup ()
492
506
if self .cec_dict ['hugepages' ] is not None :
493
507
self .hugepage_16gb_setup ()
508
+ if self .cec_dict ['iocapacity' ] is not None :
509
+ if bmc_type == "EBMC_PHYP" :
510
+ self .bmc .rest_api .configure_enlarged_io (self .iocapacity )
511
+ elif bmc_type == "FSP_PHYP" :
512
+ self .cv_ASM .configure_enlarged_io (self .iocapacity )
494
513
if self .setup :
495
514
self .cv_HMC .poweron_system ()
496
515
self .ValidateCEC_Setup ()
@@ -516,6 +535,11 @@ def ValidateCEC_Setup(self):
516
535
self .setting_16gb_hugepage_profile ()
517
536
else :
518
537
self .cec_dict ['hugepages' ] = self .num_hugepages
538
+ if self .iocapacity :
539
+ if self .bmc_type == "FSP_PHYP" :
540
+ self .bmc .cv_ASM .configure_enlarged_io (self .iocapacity )
541
+ else :
542
+ self .bmc .rest_api .configure_enlarged_io (self .iocapacity )
519
543
520
544
def lmb_setup (self ):
521
545
# Configure the lmb as per user request
0 commit comments