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

Allow specifying the Redfish system name: #400

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Oct 21, 2024

What does this PR implement/change/remove?

For Redfish implementations that manage multiple systems being able to specify the system name is required to be able to interact with the desired machine. This is the case with sushy-tools, which is a redfish emulator for libvirt and others. Also, enabling redfish basic auth was not plumbed through and is now.

Checklist

  • Tests added
  • Similar commits squashed

The HW vendor this change applies to (if applicable)

The HW model number, product name this change applies to (if applicable)

The BMC firmware and/or BIOS versions that this change applies to (if applicable)

What version of tooling - vendor specific or opensource does this change depend on (if applicable)

Description for changelog/release notes

For Redfish implementations that manage multiple
systems bening able to specify the system name
is required. This is the case with sushy-tools,
which is a redfish emulator for libvirt and others.

Signed-off-by: Jacob Weinstock <[email protected]>
return nil, err
}

return c.matchingSystem(s), nil
Copy link
Member

@joelrebel joelrebel Oct 22, 2024

Choose a reason for hiding this comment

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

edit: ignore this comment - I now see the method defaults to returning all Systems.

We'd want to keep the default behavior here - to return all Systems - when c.systemName was not specified

Suggested change
return c.matchingSystem(s), nil
if c.systemName != "" {
return c.matchingSystem(s), nil
}
return s, nil

@@ -120,6 +127,8 @@ func New(host, user, pass string, log logr.Logger, opts ...Option) *Conn {
redfishwrapper.WithHTTPClient(defaultConfig.HttpClient),
redfishwrapper.WithVersionsNotCompatible(defaultConfig.VersionsNotCompatible),
redfishwrapper.WithEtagMatchDisabled(defaultConfig.DisableEtagMatch),
redfishwrapper.WithBasicAuthEnabled(defaultConfig.UseBasicAuth),
Copy link
Member

Choose a reason for hiding this comment

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

thanks for fixing this

@mergify mergify bot merged commit 8a5f5a1 into bmc-toolbox:main Oct 22, 2024
5 checks passed
@jacobweinstock jacobweinstock deleted the update-virtualmedia branch October 22, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants