- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Change authentication x-auth-token #147
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
Conversation
91b509a    to
    ff74a8c      
    Compare
  
    fd68113    to
    69a7ad8      
    Compare
  
            
          
                redfish/redfish.go
              
                Outdated
          
        
      | if resp.StatusCode == http.StatusOK { | ||
| return nil | ||
| } | ||
| return fmt.Errorf("error response from Redfish service: %d", resp.StatusCode) | 
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.
| 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を基本として書かれているので、そのようにしてほしいです。
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.
Status Code が 200でなければ、Eary return にしました。
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.
LGTM
6ce7fa6    to
    e71029a      
    Compare
  
    
I have changed the basic authentication for accessing iDRAC Redfish to X-Auth-Token authentication.
This will resolve the Life Cycle Log overflow issue.