Bump proxmox-api-go

This commit is contained in:
Calle Pettersson 2020-02-26 08:47:44 +01:00
parent 591b684f08
commit 81a65dac4f
5 changed files with 17 additions and 9 deletions

2
go.mod
View File

@ -14,7 +14,7 @@ require (
github.com/NaverCloudPlatform/ncloud-sdk-go-v2 v1.1.0
github.com/PuerkitoBio/goquery v1.5.0 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/Telmate/proxmox-api-go v0.0.0-20200116224409-320525bf3340
github.com/Telmate/proxmox-api-go v0.0.0-20200225212220-a29566462efd
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af // indirect
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190418113227-25233c783f4e
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f

2
go.sum
View File

@ -43,6 +43,8 @@ github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUW
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/Telmate/proxmox-api-go v0.0.0-20200116224409-320525bf3340 h1:bOjy6c07dpipWm11dL92FbtmXGnDywOm2uKzG4CePuY=
github.com/Telmate/proxmox-api-go v0.0.0-20200116224409-320525bf3340/go.mod h1:OGWyIMJ87/k/GCz8CGiWB2HOXsOVDM6Lpe/nFPkC4IQ=
github.com/Telmate/proxmox-api-go v0.0.0-20200225212220-a29566462efd h1:Moss3RtB00h4omKW+leNGIGIfmHcnkZPTJ5d0A0fY14=
github.com/Telmate/proxmox-api-go v0.0.0-20200225212220-a29566462efd/go.mod h1:OGWyIMJ87/k/GCz8CGiWB2HOXsOVDM6Lpe/nFPkC4IQ=
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af h1:DBNMBMuMiWYu0b+8KMJuWmfCkcxl09JwdlqwDZZ6U14=
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw=
github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8=

View File

@ -201,11 +201,7 @@ func (config ConfigQemu) CloneVm(sourceVmr *VmRef, vmr *VmRef, client *Client) (
}
_, err = client.CloneQemuVm(sourceVmr, params)
if err != nil {
return
}
return config.UpdateConfig(vmr, client)
return err
}
func (config ConfigQemu) UpdateConfig(vmr *VmRef, client *Client) (err error) {

View File

@ -167,11 +167,21 @@ func (s *Session) Do(req *http.Request) (*http.Response, error) {
}
resp, err := s.httpClient.Do(req)
if err != nil {
return nil, err
}
// The response body reader needs to be closed, but lots of places call
// session.Do, and they might not be able to reliably close it themselves.
// Therefore, read the body out, close the original, then replace it with
// a NopCloser over the bytes, which does not need to be closed downsteam.
respBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
resp.Body.Close()
resp.Body = ioutil.NopCloser(bytes.NewReader(respBody))
if *Debug {
dr, _ := httputil.DumpResponse(resp, true)
log.Printf("<<<<<<<<<< RESULT:\n%v", string(dr))

2
vendor/modules.txt vendored
View File

@ -62,7 +62,7 @@ github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/server
github.com/PuerkitoBio/goquery
# github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
github.com/StackExchange/wmi
# github.com/Telmate/proxmox-api-go v0.0.0-20200116224409-320525bf3340
# github.com/Telmate/proxmox-api-go v0.0.0-20200225212220-a29566462efd
github.com/Telmate/proxmox-api-go/proxmox
# github.com/agext/levenshtein v1.2.1
github.com/agext/levenshtein