Update OcLib
This commit is contained in:
@@ -218,12 +218,12 @@ func postCreateServiceAccount(peerID string, s *resources.StorageResource, calle
|
||||
l.Debug().Msg("Lauching execution on" + p.UUID)
|
||||
_, err := p.LaunchPeerExecution(p.UUID, wfId, tools.MINIO_SVCACC, tools.POST, nil, caller)
|
||||
if err != nil {
|
||||
l.Error().Msg("Error when executing on peer at " + p.Url + " when creating a S3 service account")
|
||||
l.Error().Msg("Error when executing on peer at " + p.APIUrl + " when creating a S3 service account")
|
||||
l.Error().Msg(err.Error())
|
||||
return err
|
||||
}
|
||||
if caller.LastResults["code"].(int) != 200 {
|
||||
l.Error().Msg(fmt.Sprint("Error when trying to create a serviceAccount on storage " + s.Name + " on peer at " + p.Url))
|
||||
l.Error().Msg(fmt.Sprint("Error when trying to create a serviceAccount on storage " + s.Name + " on peer at " + p.APIUrl))
|
||||
if _, ok := caller.LastResults["body"]; ok {
|
||||
l.Error().Msg(string(caller.LastResults["body"].([]byte)))
|
||||
return fmt.Errorf(string(caller.LastResults["body"].(map[string]interface{})["error"].([]byte)))
|
||||
@@ -317,14 +317,14 @@ func getServiceAccountCredentials(peerID string, storageRes resources.StorageRes
|
||||
l.Debug().Msg("Lauching execution on" + p.UUID)
|
||||
resp, err := p.LaunchPeerExecution(p.UUID, wfId, tools.MINIO_SVCACC, tools.POST, body, caller)
|
||||
if err != nil {
|
||||
l.Error().Msg("Error when executing on peer at " + p.Url + " when retrieving S3 credentials")
|
||||
l.Error().Msg("Error when executing on peer at " + p.APIUrl + " when retrieving S3 credentials")
|
||||
l.Error().Msg(err.Error())
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
result_code := caller.LastResults["code"].(int)
|
||||
if !slices.Contains([]int{200, 201}, result_code) {
|
||||
l.Error().Msg(fmt.Sprint("Error when trying to create a serviceAccount on storage " + storageRes.Name + " on peer at " + p.Url))
|
||||
l.Error().Msg(fmt.Sprint("Error when trying to create a serviceAccount on storage " + storageRes.Name + " on peer at " + p.APIUrl))
|
||||
if _, ok := caller.LastResults["body"]; ok {
|
||||
l.Error().Msg(string(caller.LastResults["body"].([]byte)))
|
||||
return "", "", fmt.Errorf(string(caller.LastResults["body"].(map[string]interface{})["error"].([]byte)))
|
||||
@@ -364,14 +364,14 @@ func postS3Secret(peerID string, s resources.StorageResource, caller *tools.HTTP
|
||||
|
||||
_, err := p.LaunchPeerExecution(p.UUID, wfId, tools.MINIO_SVCACC_SECRET, tools.POST, body, caller)
|
||||
if err != nil {
|
||||
l.Error().Msg("Error when executing on peer at " + p.Url + " when creating a secret holding s3 credentials in namespace " + execId)
|
||||
l.Error().Msg("Error when executing on peer at " + p.APIUrl + " when creating a secret holding s3 credentials in namespace " + execId)
|
||||
l.Error().Msg(err.Error())
|
||||
return fmt.Errorf("Error when executing on peer at " + p.Url + " when creating a secret holding s3 credentials" + " : " + err.Error())
|
||||
return fmt.Errorf("Error when executing on peer at " + p.APIUrl + " when creating a secret holding s3 credentials" + " : " + err.Error())
|
||||
}
|
||||
|
||||
result_code := caller.LastResults["code"].(int)
|
||||
if !slices.Contains([]int{200, 201}, result_code) {
|
||||
l.Error().Msg(fmt.Sprint("Error when trying to post the credential to " + s.Name + "to a secret on peer at " + p.Url))
|
||||
l.Error().Msg(fmt.Sprint("Error when trying to post the credential to " + s.Name + "to a secret on peer at " + p.APIUrl))
|
||||
if _, ok := caller.LastResults["body"]; ok {
|
||||
l.Error().Msg(string(caller.LastResults["body"].([]byte)))
|
||||
return fmt.Errorf(string(caller.LastResults["body"].(map[string]interface{})["error"].([]byte)))
|
||||
|
||||
Reference in New Issue
Block a user