Skip to content

Commit db255b3

Browse files
author
Jessica Wang
committed
bug 13665: Quick Install wizard - pick the network offering that has SecurityGroups service (but no LB, StaticNat). Enable SecurityGroups provider before creating a guest work. [reviewed-by: Brian]
1 parent 4b5586c commit db255b3

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

ui/scripts/installWizard.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,21 +252,26 @@
252252
var services = $.map(networkOffering.service, function(service) {
253253
return service.name;
254254
});
255-
256-
return $.inArray('SecurityGroup', services) == -1;
255+
256+
//pick the network offering including SecurityGroup, but excluding Lb and StaticNat. (bug 13665)
257+
return (($.inArray('SecurityGroup', services) != -1) && ($.inArray('Lb', services) == -1) && ($.inArray('StaticNat', services) == -1)) ;
257258
}
258-
)[0];
259+
)[0];
259260
}
260261
});
261-
262+
262263
cloudStack.zoneWizard.action($.extend(true, {}, args, {
263264
// Plug in hard-coded values specific to quick install
264265
data: {
265266
zone: {
266267
networkType: 'Basic',
267268
domain: 1,
268269
networkOfferingId: selectedNetworkOffering.id
269-
}
270+
},
271+
pluginFrom: {
272+
name: 'installWizard',
273+
selectedNetworkOfferingHavingSG: true
274+
}
270275
},
271276
response: {
272277
success: function(args) {

ui/scripts/zoneWizard.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,10 @@
14231423
$("body").stopTime(updateNetworkServiceProviderTimer);
14241424
if (result.jobstatus == 1) {
14251425
//alert("Virtual Router Provider is enabled");
1426-
1426+
1427+
if(args.data.pluginFrom != null && args.data.pluginFrom.name == "installWizard") {
1428+
selectedNetworkOfferingHavingSG = args.data.pluginFrom.selectedNetworkOfferingHavingSG;
1429+
}
14271430
if(selectedNetworkOfferingHavingSG == true) { //need to Enable security group provider first
14281431
// get network service provider ID of Security Group
14291432
var securityGroupProviderId;

0 commit comments

Comments
 (0)