mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CS-16209,CS-16262:AutoScale server side changes for Supporting network element independent counter parameters in AutoScaleVmProfile
This commit is contained in:
parent
affc162556
commit
8d5c78e3d4
@ -186,8 +186,8 @@
|
||||
destroyVMgracePeriod: autoscaleVmProfile.destroyvmgraceperiod,
|
||||
securityGroups: securityGroups,
|
||||
diskOfferingId: diskOfferingId,
|
||||
snmpCommunity: autoscaleVmProfile.snmpcommunity,
|
||||
snmpPort: autoscaleVmProfile.snmpport,
|
||||
snmpCommunity: autoscaleVmProfile.counterparam.snmpcommunity,
|
||||
snmpPort: autoscaleVmProfile.counterparam.snmpport,
|
||||
username: autoscaleVmProfile.autoscaleuserid,
|
||||
context: {
|
||||
autoscaleVmGroup: autoscaleVmGroup,
|
||||
@ -1075,7 +1075,27 @@
|
||||
destroyvmgraceperiod: args.data.destroyVMgracePeriod,
|
||||
snmpcommunity: args.data.snmpCommunity,
|
||||
snmpport: args.data.snmpPort
|
||||
};
|
||||
};
|
||||
|
||||
var allParamNames=$.map(data,function(value,key){
|
||||
return key;
|
||||
});
|
||||
|
||||
var notParams =['zoneid','serviceofferingid','templateid','destroyvmgraceperiod'];
|
||||
var index=0;
|
||||
$(allParamNames).each(function() {
|
||||
var param='counterparam[' + index + ']';
|
||||
var name = this.toString();
|
||||
var value = data[name];
|
||||
if(!value || $.inArray(name,notParams) >-1 ) return true;
|
||||
data[param+ '.name']=name;
|
||||
data[param+ '.value']=value;
|
||||
index++;
|
||||
delete data[name];
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
if(args.data.username != null && args.data.username.length > 0) {
|
||||
$.extend(data, {
|
||||
@ -1138,7 +1158,29 @@
|
||||
destroyvmgraceperiod: args.data.destroyVMgracePeriod,
|
||||
snmpcommunity: args.data.snmpCommunity,
|
||||
snmpport: args.data.snmpPort
|
||||
};
|
||||
};
|
||||
|
||||
var allParamNames=$.map(data,function(value,key){
|
||||
return key;
|
||||
});
|
||||
|
||||
var notParams =['id','templateid','destroyvmgraceperiod'];
|
||||
var index=0;
|
||||
$(allParamNames).each(function() {
|
||||
var param='counterparam[' + index + ']';
|
||||
var name = this.toString();
|
||||
var value = data[name];
|
||||
if(!value || $.inArray(name,notParams) >-1 ) return true;
|
||||
data[param+ '.name']=name;
|
||||
data[param+ '.value']=value;
|
||||
index++;
|
||||
delete data[name];
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
if(args.data.username != null && args.data.username.length > 0) {
|
||||
$.extend(data, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user