Skip to content

Commit b94dad5

Browse files
treywelshrsmontero
authored andcommitted
B #5663: GOCA - fix vnet reserve method (#5664)
Signed-off-by: Pierre Lafievre <[email protected]> (cherry picked from commit 0b269ff)
1 parent 51632f5 commit b94dad5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/oca/go/src/goca/virtualnetwork.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ func (vc *VirtualNetworkController) UpdateAR(tpl string) error {
160160
// * tpl: Template
161161
func (vc *VirtualNetworkController) Reserve(tpl string) (int, error) {
162162
response, err := vc.c.Client.Call("one.vn.reserve", vc.ID, tpl)
163-
return response.BodyInt(), err
163+
if err != nil {
164+
return -1, err
165+
}
166+
167+
return response.BodyInt(), nil
164168
}
165169

166170
// FreeAR frees a reserved address range from a virtual network.

0 commit comments

Comments
 (0)