up modules and vendor dir

This commit is contained in:
Adrien Delorme 2019-04-12 12:27:32 +02:00
parent d2f036ec44
commit a81d5de034
2 changed files with 5 additions and 2 deletions

1
go.mod
View File

@ -7,6 +7,7 @@ require (
github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 // indirect
github.com/ChrisTrenkamp/goxpath v0.0.0-20170625215350-4fe035839290
github.com/NaverCloudPlatform/ncloud-sdk-go v0.0.0-20180110055012-c2e73f942591
github.com/Telmate/proxmox-api-go v0.0.0-20190410200643-f08824d5082d
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af // indirect
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f
github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd // indirect

View File

@ -393,14 +393,16 @@ func (c *Client) CreateQemuVm(node string, vmParams map[string]interface{}) (exi
resp, err = c.session.Post(url, nil, nil, &reqbody)
defer resp.Body.Close()
if err != nil {
// This might not work if we never got a body. We'll ignore errors in trying to read,
// but extract the body if possible to give any error information back in the exitStatus
b, _ := ioutil.ReadAll(resp.Body)
exitStatus = string(b)
return
return exitStatus, err
}
taskResponse, err := ResponseJSON(resp)
if err != nil {
return
return "", err
}
exitStatus, err = c.WaitForCompletion(taskResponse)
// Delete VM disks if the VM didn't create.