Search in sources :

Example 6 with AutoScaleVmProfile

use of com.cloud.network.as.AutoScaleVmProfile in project cloudstack by apache.

the class ListAutoScaleVmProfilesCmd method execute.

@Override
public void execute() {
    List<? extends AutoScaleVmProfile> autoScaleProfiles = _autoScaleService.listAutoScaleVmProfiles(this);
    ListResponse<AutoScaleVmProfileResponse> response = new ListResponse<AutoScaleVmProfileResponse>();
    List<AutoScaleVmProfileResponse> responses = new ArrayList<AutoScaleVmProfileResponse>();
    if (autoScaleProfiles != null) {
        for (AutoScaleVmProfile autoScaleVmProfile : autoScaleProfiles) {
            AutoScaleVmProfileResponse autoScaleVmProfileResponse = _responseGenerator.createAutoScaleVmProfileResponse(autoScaleVmProfile);
            autoScaleVmProfileResponse.setObjectName("autoscalevmprofile");
            responses.add(autoScaleVmProfileResponse);
        }
    }
    response.setResponses(responses);
    response.setResponseName(getCommandName());
    setResponseObject(response);
}
Also used : AutoScaleVmProfile(com.cloud.network.as.AutoScaleVmProfile) ListResponse(org.apache.cloudstack.api.response.ListResponse) AutoScaleVmProfileResponse(org.apache.cloudstack.api.response.AutoScaleVmProfileResponse) ArrayList(java.util.ArrayList)

Aggregations

AutoScaleVmProfile (com.cloud.network.as.AutoScaleVmProfile)6 ArrayList (java.util.ArrayList)3 AutoScaleVmProfileResponse (org.apache.cloudstack.api.response.AutoScaleVmProfileResponse)3 AutoScalePolicy (com.cloud.network.as.AutoScalePolicy)2 Condition (com.cloud.network.as.Condition)2 Counter (com.cloud.network.as.Counter)2 LbAutoScalePolicy (com.cloud.network.lb.LoadBalancingRule.LbAutoScalePolicy)2 LbAutoScaleVmGroup (com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmGroup)2 LbAutoScaleVmProfile (com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmProfile)2 LbCondition (com.cloud.network.lb.LoadBalancingRule.LbCondition)2 ServerApiException (org.apache.cloudstack.api.ServerApiException)2 DataCenter (com.cloud.dc.DataCenter)1 InvalidParameterValueException (com.cloud.exception.InvalidParameterValueException)1 AutoScalePolicyConditionMapVO (com.cloud.network.as.AutoScalePolicyConditionMapVO)1 AutoScaleVmGroup (com.cloud.network.as.AutoScaleVmGroup)1 AutoScaleVmGroupPolicyMapVO (com.cloud.network.as.AutoScaleVmGroupPolicyMapVO)1 NetworkVO (com.cloud.network.dao.NetworkVO)1 User (com.cloud.user.User)1 ListResponse (org.apache.cloudstack.api.response.ListResponse)1