[Launch Instance Fix] Security Group Nova Net
When nova networking is enabled, the input to security groups needs to be by name. When neutron, it needs to be by id. This solves that issues. Change-Id: If32671af90facd16e60caa33ed84ba7c9796ad11 Closes-Bug: #1445235
This commit is contained in:
parent
4dcb0c0cd4
commit
b7de0333b1
@ -109,6 +109,7 @@
|
||||
volume: null
|
||||
},
|
||||
networks: [],
|
||||
neutronEnabled: false,
|
||||
novaLimits: {},
|
||||
profiles: [],
|
||||
securityGroups: [],
|
||||
@ -319,7 +320,11 @@
|
||||
// pull out the ids from the security groups objects
|
||||
var security_group_ids = [];
|
||||
finalSpec.security_groups.forEach(function(securityGroup){
|
||||
security_group_ids.push(securityGroup.id);
|
||||
if(model.neutronEnabled) {
|
||||
security_group_ids.push(securityGroup.id);
|
||||
} else {
|
||||
security_group_ids.push(securityGroup.name);
|
||||
}
|
||||
});
|
||||
finalSpec.security_groups = security_group_ids;
|
||||
}
|
||||
@ -331,6 +336,7 @@
|
||||
}
|
||||
|
||||
function onGetNetworks(data) {
|
||||
model.neutronEnabled = true;
|
||||
model.networks.length = 0;
|
||||
push.apply(model.networks, data.data.items);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user