Commit c161784e authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

cyclades ui: Always send network type in create request

type parameter is mandatory in private network creation requests.
parent 43b2d1dd
......@@ -1680,9 +1680,10 @@
}
};
if (type) {
params.network.type = type;
if (!type) {
throw "Network type cannot be empty";
}
params.network.type = type;
if (cidr) {
params.network.cidr = cidr;
}
......
......@@ -219,9 +219,7 @@
this.type_select.append($('<option value='+value+' class="subnet">'+name+'</option>'));
}, this);
this.disable_network_type = false;
if (_.keys(synnefo.config.network_available_types).length <= 1) {
this.disable_network_type = true;
this.type_select.closest(".form-field").hide();
}
......@@ -339,8 +337,6 @@
var subnet = null;
var type = this.type_select.val();
if (this.disable_network_type) { type = null };
if (dhcp) {
if (this.subnet_select.val() == "custom") {
subnet = this.subnet_custom.val();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment