New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Redfish API for following operation #819
base: master
Are you sure you want to change the base?
Added Redfish API for following operation #819
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maramsmurthy Thanks for the PR, few things to change
- no need of new testcase, add code in existing MachineConfg.py
- this is config set so values to be set is passed as key value pair by user iocapacity=12 and code sets it and validate
- add the code inside Class CecConfig
- make sure you move the methods to set and get iocapcity inside CecConfig class
- if iocapcity param is not given.. than do nothing
|
||
def set_attribute_redfish(self, uri, attribute_name, attribute_value): | ||
""" | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add details in doc string
|
||
def generate_ssl_auth_token(self, ip_add = self.conf.args.bmc_ip): | ||
""" | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add here some details
testcases/BMCRedFish.py
Outdated
else: | ||
log.debug("Provided bios attribute vaue is same a exisintg, " | ||
f"ignoring set attribute for (self.bios_attribute)") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need of sepearate py testcase... make sure you add the ioenlargecapacity code into MachineConfig.py and remove BMCRedFish.py
see if you can move get_current_ioadapter_enlarged_capacity() and set_ioenlarge_capacity(self) to common utils or EBMC or MachineConfig.py
testcases/MachineConfig.py
Outdated
|
||
def execute_io_enlarge_capacity(self): | ||
cureent_io_enlarge = EBMCHostManagement.get_current_ioadapter_enlarged_capacity() | ||
log.info("current io enlarger capacity: {cureent_io_enlarge}") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get a new parameter in Class CecConfig() i.e self.iocapcity for ioenlargecapacity and if given call set() and validate values set... using get()
Please upload the logs |
@maramsmurthy Please push the latest code |
33d3f0d
to
10c385b
Compare
Reading a BIOS attribute using Redfish API Set value to BIOS attribute using Redfish API IOEnlarger capacity BIOS attribute can be update and read using Signed-off-by: Maram Srimannarayana Murthy <msmurthy@linux.vnet.ibm.com>
10c385b
to
50b7c76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maramsmurthy split commit in at least two commit as that will good to have logical code changes history
def generate_ssl_auth_token(self, ip_add = None): | ||
""" | ||
Generates ssl key and returns the ssl key | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel both of these function moved in common/OpTestEBMC.py
it well helps to tight coupling as these will never used outside EBMC use case
if token: | ||
return token | ||
else: | ||
print("Token not found in response") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about using log
@@ -98,6 +99,7 @@ def callConfig(self, key): | |||
if key == "cec": | |||
lmb_size= None | |||
num_hugepages = None | |||
ioenlargecapacity = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can shorten variable name :)
Reading a BIOS attribute using Redfish API
Set value to BIOS attribute using Redfish API
IOEnlarger capacity BIOS attribute can be update and read using BMCRedFish.py