mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-25 23:21:29 +03:00
Bug #1111: Improve constraints when creating a ranged virtual network.
This commit is contained in:
parent
7f485ad179
commit
22b888e2eb
@ -822,8 +822,8 @@ function setupCreateVNetDialog() {
|
||||
var ip_start = $('#ip_start',this).val();
|
||||
var ip_end = $('#ip_end',this).val();
|
||||
|
||||
if (!network_addr.length){
|
||||
notifyError(tr("Please provide a network address"));
|
||||
if (!(ip_start.length && ip_end.length) && !network_addr.length){
|
||||
notifyError(tr("There are missing network parameters"));
|
||||
return false;
|
||||
};
|
||||
|
||||
@ -832,11 +832,15 @@ function setupCreateVNetDialog() {
|
||||
"vnet" : {
|
||||
"type" : "RANGED",
|
||||
"bridge" : bridge,
|
||||
"network_mask" : network_mask,
|
||||
"network_address" : network_addr,
|
||||
"name" : name }
|
||||
};
|
||||
|
||||
if (network_addr.length)
|
||||
network_json["vnet"]["network_address"]=network_addr;
|
||||
|
||||
if (network_mask.length)
|
||||
network_json["vnet"]["network_mask"]=network_mask;
|
||||
|
||||
if (custom){
|
||||
if (ip_start.length)
|
||||
network_json["vnet"]["ip_start"] = ip_start;
|
||||
|
Loading…
Reference in New Issue
Block a user