Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maramsmurthy
Copy link
Contributor

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

Copy link
Collaborator

@abdhaleegit abdhaleegit left a 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

  1. no need of new testcase, add code in existing MachineConfg.py
  2. 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
  3. add the code inside Class CecConfig
  4. make sure you move the methods to set and get iocapcity inside CecConfig class
  5. if iocapcity param is not given.. than do nothing


def set_attribute_redfish(self, uri, attribute_name, attribute_value):
"""
"""
Copy link
Collaborator

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):
"""
"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add here some details

else:
log.debug("Provided bios attribute vaue is same a exisintg, "
f"ignoring set attribute for (self.bios_attribute)")

Copy link
Collaborator

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


def execute_io_enlarge_capacity(self):
cureent_io_enlarge = EBMCHostManagement.get_current_ioadapter_enlarged_capacity()
log.info("current io enlarger capacity: {cureent_io_enlarge}")

Copy link
Collaborator

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()

@abdhaleegit abdhaleegit self-assigned this Apr 16, 2024
@abdhaleegit
Copy link
Collaborator

Please upload the logs

@abdhaleegit
Copy link
Collaborator

@maramsmurthy Please push the latest code

@maramsmurthy maramsmurthy force-pushed the maramsmurthy_ioenlarge_redfish branch 2 times, most recently from 33d3f0d to 10c385b Compare May 8, 2024 13:03
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>
@maramsmurthy maramsmurthy force-pushed the maramsmurthy_ioenlarge_redfish branch from 10c385b to 50b7c76 Compare May 8, 2024 17:12
Copy link
Collaborator

@PraveenPenguin PraveenPenguin left a 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
"""
Copy link
Collaborator

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")
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can shorten variable name :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants