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 authored and Ruben S. Montero committed 2021-12-14 17:47:36 +01:00
1 parent 8844e94d62
commit 8fbf59ea53
1 file changed
+5 -1
+5 -1
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.