|
253 | 253 | $('.setup-guest-traffic').removeClass('basic'); |
254 | 254 | $('.setup-guest-traffic').addClass('advanced'); |
255 | 255 |
|
256 | | - if(args.data["zone-isolation-mode"] == "VLAN") { |
| 256 | + if(args.data["zone-advanced-sg-enabled"] != "on") { |
257 | 257 | //skip the step if OVS tunnel manager is enabled |
258 | 258 | skipGuestTrafficStep = false; //reset it before ajax call |
259 | 259 | $.ajax({ |
|
276 | 276 | } |
277 | 277 | }); |
278 | 278 | } |
279 | | - else { //args.data["zone-isolation-mode"] == "SG" |
| 279 | + else { //args.data["zone-advanced-sg-enabled"] == "on" |
280 | 280 | skipGuestTrafficStep = true; |
281 | 281 | } |
282 | 282 | } |
|
309 | 309 | } |
310 | 310 | else { //args.data['network-model'] == 'Advanced' |
311 | 311 | args.$form.find('[rel=networkOfferingId]').hide(); |
312 | | - |
313 | | - if(args.data["zone-isolation-mode"] == "VLAN") |
| 312 | + |
| 313 | + if(args.data["zone-advanced-sg-enabled"] != "on") |
314 | 314 | args.$form.find('[rel=guestcidraddress]').show(); |
315 | | - else //args.data["zone-isolation-mode"] == "SG" |
| 315 | + else //args.data["zone-advanced-sg-enabled"] == "on |
316 | 316 | args.$form.find('[rel=guestcidraddress]').hide(); |
317 | 317 | } |
318 | 318 |
|
|
1264 | 1264 | var array1 = []; |
1265 | 1265 | var networkType = args.data.zone.networkType; //"Basic", "Advanced" |
1266 | 1266 | array1.push("&networktype=" + todb(networkType)); |
1267 | | - if(networkType == "Advanced") { |
1268 | | - |
1269 | | - |
1270 | | - if(args.data.zone.isolationMode != null) { |
1271 | | - if(args.data.zone.isolationMode == "VLAN") { |
1272 | | - array1.push("&securitygroupenabled=false"); |
1273 | | - |
1274 | | - if(args.data.zone.guestcidraddress != null && args.data.zone.guestcidraddress.length > 0) |
1275 | | - array1.push("&guestcidraddress=" + todb(args.data.zone.guestcidraddress)); |
1276 | | - } |
1277 | | - else { // args.data.zone.isolationMode == "SG" |
1278 | | - array1.push("&securitygroupenabled=true"); |
1279 | | - } |
1280 | | - } |
| 1267 | + if(networkType == "Advanced") { |
| 1268 | + if(args.data.zone.sgEnabled != true) { |
| 1269 | + array1.push("&securitygroupenabled=false"); |
| 1270 | + |
| 1271 | + if(args.data.zone.guestcidraddress != null && args.data.zone.guestcidraddress.length > 0) |
| 1272 | + array1.push("&guestcidraddress=" + todb(args.data.zone.guestcidraddress)); |
| 1273 | + } |
| 1274 | + else { // args.data.zone.sgEnabled == true |
| 1275 | + array1.push("&securitygroupenabled=true"); |
| 1276 | + } |
1281 | 1277 | } |
1282 | 1278 |
|
1283 | 1279 | array1.push("&name=" + todb(args.data.zone.name)); |
|
2457 | 2453 | array1.push("&forVirtualNetwork=true"); |
2458 | 2454 | } |
2459 | 2455 | else if(args.data.zone.networkType == "Advanced") { |
2460 | | - if(args.data.zone.isolationMode == "VLAN") { //VLAN |
| 2456 | + if(args.data.zone.sgEnabled != true) { |
2461 | 2457 | array1.push("&forVirtualNetwork=true"); |
2462 | 2458 | } |
2463 | | - else { //Security Group |
| 2459 | + else { //args.data.zone.sgEnabled == true |
2464 | 2460 | array1.push("&forVirtualNetwork=false"); |
2465 | 2461 | } |
2466 | 2462 | } |
|
0 commit comments