Skip to content

Conversation

@takara9
Copy link
Contributor

@takara9 takara9 commented Aug 8, 2025

I have changed the basic authentication for accessing iDRAC Redfish to X-Auth-Token authentication.

This will resolve the Life Cycle Log overflow issue.

@takara9 takara9 self-assigned this Aug 8, 2025
@takara9 takara9 marked this pull request as draft August 8, 2025 07:48
@takara9 takara9 requested a review from masa213f August 14, 2025 01:28
@takara9 takara9 marked this pull request as ready for review August 14, 2025 01:28
@takara9 takara9 force-pushed the x-auth-session branch 2 times, most recently from fd68113 to 69a7ad8 Compare August 28, 2025 08:51
@takara9 takara9 requested a review from masa213f August 28, 2025 08:53
@takara9 takara9 requested a review from masa213f August 29, 2025 00:19
Comment on lines 265 to 268
if resp.StatusCode == http.StatusOK {
return nil
}
return fmt.Errorf("error response from Redfish service: %d", resp.StatusCode)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if resp.StatusCode == http.StatusOK {
return nil
}
return fmt.Errorf("error response from Redfish service: %d", resp.StatusCode)
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("error response from Redfish service: %d", resp.StatusCode)
}
return nil

こちらの条件を逆にしてもらってもよいでしょうか。

基本的には、エラーがあったらearly return、関数の最後に到達したら成功、としてください。setup-hw(にかかわらず我々の書く多くのプログラム)の関数は、early returnを基本として書かれているので、そのようにしてほしいです。

Copy link
Contributor Author

@takara9 takara9 Aug 29, 2025

Choose a reason for hiding this comment

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

Status Code が 200でなければ、Eary return にしました。

@takara9 takara9 requested a review from masa213f August 29, 2025 01:48
Copy link
Contributor

@masa213f masa213f left a comment

Choose a reason for hiding this comment

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

LGTM

@takara9 takara9 merged commit 1dcfacf into main Aug 29, 2025
1 check passed
@takara9 takara9 deleted the x-auth-session branch August 29, 2025 02:14
@takara9 takara9 changed the title change authentication x-auth-token Change authentication x-auth-token Aug 29, 2025
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.

3 participants