Merge "Fix the network subnets check in create instance form"

This commit is contained in:
Zuul 2018-01-05 23:40:53 +00:00 committed by Gerrit Code Review
commit 7115655026

View File

@ -475,13 +475,13 @@
function onGetNetworks(data) {
model.neutronEnabled = true;
model.networks.length = 0;
if (data.data.items.length === 1) {
model.newInstanceSpec.networks.push(data.data.items[0]);
}
push.apply(model.networks,
data.data.items.filter(function(net) {
return net.subnets.length > 0;
}));
if (model.networks.length === 1) {
model.newInstanceSpec.networks.push(model.networks[0]);
}
return data;
}