Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbin committed Jul 24, 2020
1 parent e660e25 commit d45ee2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/apigateway/handler/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ const (
BATCH_HOST_REGISTER_QUANTITY_LIMITATION = 1000
)


var (
BatchHostRegisterTemplate = []string{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}
BatchHostRegisterTemplate = []string{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}
BatchHostISORegisterTemplate = []string{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR}
BatchHostPXERegisterTemplate = []string{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR_OPTIONAL}
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/multicloud/huawei/client/modules/manager_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (self *SBaseManager) jsonRequest(request requests.IRequest) (http.Header, j

switch err := e.(type) {
case *HuaweiClientError:
if (err.Code == 499 || err.Code == 429 )&& retry > 0 && request.GetMethod() == "GET" {
if (err.Code == 499 || err.Code == 429) && retry > 0 && request.GetMethod() == "GET" {
retry -= 1
time.Sleep(3 * time.Second * time.Duration(MAX_RETRY-retry))
} else if (err.Code == 404 || strings.Contains(err.Details, "could not be found") || strings.Contains(err.Details, "does not exist")) && request.GetMethod() != "POST" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/multicloud/huawei/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (self *SHuaweiClient) fetchProjects() ([]SProject, error) {
if err == nil {
self.projects = projects
}

return projects, err
}

Expand Down

0 comments on commit d45ee2c

Please sign in to comment.