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 Lenovo support #52

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Added Lenovo support #52

merged 1 commit into from
Mar 12, 2024

Conversation

MrBr-github
Copy link
Contributor

@MrBr-github MrBr-github commented Mar 11, 2024

Tested on ThinkSystem SR650 V2
Lenovo redfish documentation: https://pubs.lenovo.com/xcc-restapi/insert_eject_virtual_media_patch or same as PDF

There is a limitation
Lenovo uses 308 redirect as seen in error below and python added support for it only in python 3.11

Same 308 redirects seen on HP 360 Gen8

IMO this python3.11 prerequisite can be added to documentation and/or to container

Error: tried accessing URL https://__MY_LENOVO_SERVER__/redfish/v1
Traceback (most recent call last):
  File "/auto/mtrswgwork/michaelbr/aicli/main/aicli", line 8, in <module>
    sys.exit(cli())
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/cli.py", line 1454, in cli
    args.func(args)
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/cli.py", line 221, in create_deployment
    ai.create_deployment(args.cluster, overrides, force=args.force, debug=args.debugredfish)
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/__init__.py", line 1536, in create_deployment
    boot_result = boot_hosts(boot_overrides, debug=debug)
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/__init__.py", line 61, in boot_hosts
    red = Redfish(bmc_url, bmc_user, bmc_password, debug=debug)
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/kfish/__init__.py", line 74, in __init__
    self.model, self.url, self.user, self.password = get_info(url, user, password)
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/kfish/__init__.py", line 38, in get_info
    raise e
  File "/auto/mtrswgwork/michaelbr/aicli/main/ailib/kfish/__init__.py", line 35, in get_info
    v1data = json.loads(urlopen(request).read())
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 308: Permanent Redirect

tested on ThinkSystem SR650 V2 server
@MrBr-github MrBr-github marked this pull request as ready for review March 11, 2024 16:23
@karmab karmab merged commit 79ef5c6 into karmab:main Mar 12, 2024
1 check passed
karmab added a commit that referenced this pull request Mar 12, 2024
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.

2 participants