Skip to content

Commit

Permalink
B #5663: GOCA - fix vnet reserve method (#5664)
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Lafievre <[email protected]>
(cherry picked from commit 0b269ff)
  • Loading branch information
treywelsh authored and rsmontero committed Dec 14, 2021
1 parent 51632f5 commit b94dad5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/oca/go/src/goca/virtualnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b94dad5

Please sign in to comment.