make the ssh auth call with the correct operation
This commit is contained in:
parent
ce18a1d11f
commit
99f1956fb0
@ -184,7 +184,7 @@ func Batch(objects []*objectResource, operation string) ([]*objectResource, erro
|
|||||||
return nil, Error(err)
|
return nil, Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
req, err := newBatchApiRequest()
|
req, err := newBatchApiRequest(operation)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, Error(err)
|
return nil, Error(err)
|
||||||
}
|
}
|
||||||
@ -613,13 +613,13 @@ func newClientRequest(method, rawurl string, header map[string]string) (*http.Re
|
|||||||
return req, nil
|
return req, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newBatchApiRequest() (*http.Request, error) {
|
func newBatchApiRequest(operation string) (*http.Request, error) {
|
||||||
endpoint := Config.Endpoint()
|
endpoint := Config.Endpoint()
|
||||||
|
|
||||||
res, err := sshAuthenticate(endpoint, "download", "")
|
res, err := sshAuthenticate(endpoint, operation, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tracerx.Printf("ssh: attempted with %s. Error: %s",
|
tracerx.Printf("ssh: %s attempted with %s. Error: %s",
|
||||||
endpoint.SshUserAndHost, err.Error(),
|
operation, endpoint.SshUserAndHost, err.Error(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user