From 2ed8c250d0f9c247a7bc1613e976d8393e7a5328 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Mon, 30 Jul 2012 16:42:40 -0700 Subject: [PATCH 1/3] S2S VPN: Update the supported crypto list We would support 3DES, AES128, AES192, AES256. --- utils/src/com/cloud/utils/net/NetUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/src/com/cloud/utils/net/NetUtils.java b/utils/src/com/cloud/utils/net/NetUtils.java index 8e35822fbd7..5676fda8be2 100755 --- a/utils/src/com/cloud/utils/net/NetUtils.java +++ b/utils/src/com/cloud/utils/net/NetUtils.java @@ -1120,7 +1120,7 @@ public class NetUtils { } String cipher = list[0]; String hash = list[1]; - if (!cipher.matches("3des|aes|aes128|aes256")) { + if (!cipher.matches("3des|aes128|aes192|aes256")) { return false; } if (!hash.matches("md5|sha1")) { From 2bbbb60d8f5761320088ee7b4f3dd24bfac3d14c Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 30 Jul 2012 18:00:13 -0700 Subject: [PATCH 2/3] cloudstack 3.0 UI - autoscale - populate autoscale dialog if it opens from an existing LB rule. --- ui/scripts/autoscaler.js | 133 ++++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 59 deletions(-) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 32f4bfaf7d8..19d3cba85f4 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -23,65 +23,80 @@ totalScaleUpCondition = 0; scaleDownData = []; totalScaleDownCondition = 0; - - var sampleData = null; - /* - var sampleData = { - templateNames: '58d3f4b2-e847-4f93-993d-1ab1505129b6', //(will set this value to dropdown) - serviceOfferingId: '4aa823f3-27ec-46af-9e07-b023d7a7a6f1', //(will set this value to dropdown) - minInstance: 1, - maxInstance: 10, - scaleUpPolicy: { - id: 12345, - duration: 1000, - conditions: [ - { - id: 1, - counterid: 'cpu', - relationaloperator: "GE", - threshold: 100 - }, - { - id: 2, - counterid: 'memory', - relationaloperator: "LT", - threshold: 200 - } - - ] - }, - scaleDownPolicy: { - id: 6789, - duration: 500, - conditions: [ - { - id: 1, - counterid: 'cpu', - relationaloperator: "LT", - threshold: 30 - }, - { - id: 2, - counterid: 'cpu', - relationaloperator: "LT", - threshold: 50 - } - - ] - }, - interval: 200, - quietTime: 300, - destroyVMgracePeriod: null, - securityGroups: null, // (will set this value to dropdown) - diskOfferingId: 'a21c9aa4-ef7e-41dd-91eb-70b2182816b0', // (will set this value to dropdown) - snmpCommunity: 1, - snmpPort: 225, - - isAdvanced: false // Set this to true if any advanced field data is present - }; - */ - - args.response.success({ data: sampleData }); + + if('multiRules' in args.context) { //from an existing LB + $.ajax({ + url: createURL('listAutoScaleVmGroups'), + data: { + lbruleid: args.context.multiRules[0].id + }, + success: function(json) { + var autoscaleVmGroup = json.listautoscalevmgroupsresponse.autoscalevmgroup[0]; + + $.ajax({ + url: createURL('listAutoScaleVmProfiles'), + data: { + id: autoscaleVmGroup.vmprofileid + }, + success: function(json) { + var autoscaleVmProfile = json.listautoscalevmprofilesresponse.autoscalevmprofile[0]; + + var scaleUpPolicy = { + id: autoscaleVmGroup.scaleuppolicies[0].id, + duration: autoscaleVmGroup.scaleuppolicies[0].duration, + conditions: [] + }; + $(autoscaleVmGroup.scaleuppolicies[0].conditions).each(function(){ + var condition = { + id: this.id, + counterid: this.counter.name, + relationaloperator: this.relationaloperator, + threshold: this.threshold + }; + scaleUpPolicy.conditions.push(condition); + }); + + var scaleDownPolicy = { + id: autoscaleVmGroup.scaledownpolicies[0].id, + duration: autoscaleVmGroup.scaledownpolicies[0].duration, + conditions: [] + }; + $(autoscaleVmGroup.scaledownpolicies[0].conditions).each(function(){ + var condition = { + id: this.id, + counterid: this.counter.name, + relationaloperator: this.relationaloperator, + threshold: this.threshold + }; + scaleDownPolicy.conditions.push(condition); + }); + + var sampleData = { + templateNames: autoscaleVmProfile.templateid, + serviceOfferingId: autoscaleVmProfile.serviceofferingid, + minInstance: autoscaleVmGroup.minmembers, + maxInstance: autoscaleVmGroup.maxmembers, + scaleUpPolicy: scaleUpPolicy, + scaleDownPolicy: scaleDownPolicy, + interval: autoscaleVmGroup.interval, + quietTime: autoscaleVmGroup.scaleuppolicies[0].quiettime, + destroyVMgracePeriod: autoscaleVmProfile.destroyvmgraceperiod, + securityGroups: null, //??? + diskOfferingId: null, //??? + snmpCommunity: autoscaleVmProfile.snmpcommunity, + snmpPort: autoscaleVmProfile.snmpport, + //isAdvanced: false // Set this to true if any advanced field data is present + }; + + args.response.success({ data: sampleData }); + } + }); + } + }); + } + else { //from a new LB + args.response.success({ data: null }); + } }, // -- From 849ac1be3f2b1c2631143121af647fe2853b221e Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 30 Jul 2012 18:49:23 -0700 Subject: [PATCH 3/3] cloudstack 3.0 UI - autoscale - set user dropdown when popping up autoscale dialog from an exisitng LB rule. --- ui/scripts/autoscaler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js index 19d3cba85f4..9e65e1aed70 100644 --- a/ui/scripts/autoscaler.js +++ b/ui/scripts/autoscaler.js @@ -85,6 +85,7 @@ diskOfferingId: null, //??? snmpCommunity: autoscaleVmProfile.snmpcommunity, snmpPort: autoscaleVmProfile.snmpport, + username: autoscaleVmProfile.autoscaleuserid //isAdvanced: false // Set this to true if any advanced field data is present };