1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #5663: GOCA - fix vnet reserve method (#5664)

Signed-off-by: Pierre Lafievre <pierre.lafievre@iguanesolutions.com>
(cherry picked from commit 0b269ff792bbd28e4adca9f09d13e7baf7a258bd)
This commit is contained in:
Pierre Lafievre 2021-12-14 17:44:45 +01:00 committed by Ruben S. Montero
parent 8844e94d62
commit 8fbf59ea53
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -160,7 +160,11 @@ func (vc *VirtualNetworkController) UpdateAR(tpl string) error {
// * tpl: Template
func (vc *VirtualNetworkController) Reserve(tpl string) (int, error) {
response, err := vc.c.Client.Call("one.vn.reserve", vc.ID, tpl)
return response.BodyInt(), err
if err != nil {
return -1, err
}
return response.BodyInt(), nil
}
// FreeAR frees a reserved address range from a virtual network.