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

Bug #1022: Fix creation of leases with MAC in Vnetworks

(cherry picked from commit 5fea81a202e312c29b3a0315475510cf0860625f)
This commit is contained in:
Hector Sanjuan 2011-12-20 12:45:36 +01:00 committed by Ruben S. Montero
parent e3ede34250
commit d3bff8c94e

View File

@ -758,7 +758,12 @@ function setupCreateVNetDialog() {
//for each specified lease we prepare the JSON object
$.each(leases,function(){
leases_obj.push({"ip": $(this).val() });
var lease_str = $(this).val().split(",");
if (lease_str[1])
leases_obj.push({"ip": lease_str[0],
"mac": lease_str[1]});
else
leases_obj.push({"ip": lease_str[0] });
});
//and construct the final data for the request