1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

B #3580: Returns the ID of the new reserved vnet (#3581)

Signed-off-by: Jean-Philippe Fourès <jean.philippe.foures@gmail.com>
This commit is contained in:
Jean-Philippe Fourès 2019-09-24 14:54:35 +02:00 committed by Ruben S. Montero
parent bf43ae24de
commit af200b1d3e

View File

@ -156,11 +156,11 @@ func (vc *VirtualNetworkController) UpdateAR(tpl string) error {
return err
}
// Reserve reserve network addresses.
// Reserve reserve network addresses. It returns the Reserved Virtual Network ID
// * tpl: Template
func (vc *VirtualNetworkController) Reserve(tpl string) error {
_, err := vc.c.Client.Call("one.vn.reserve", vc.ID, tpl)
return err
func (vc *VirtualNetworkController) Reserve(tpl string) (int, error) {
response, err := vc.c.Client.Call("one.vn.reserve", vc.ID, tpl)
return response.BodyInt(), err
}
// FreeAR frees a reserved address range from a virtual network.