mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +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,
 | 
			
		||||
@ -1077,6 +1077,26 @@
 | 
			
		||||
							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, {
 | 
			
		||||
							  autoscaleuserid: args.data.username
 | 
			
		||||
@ -1140,6 +1160,28 @@
 | 
			
		||||
							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, {
 | 
			
		||||
							  autoscaleuserid: args.data.username
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user