Search in sources :

Example 6 with Condition

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

the class CreateConditionCmd method create.

// ///////////////////////////////////////////////////
// ///////////// API Implementation///////////////////
// ///////////////////////////////////////////////////
@Override
public void create() throws ResourceAllocationException {
    Condition condition = null;
    condition = _autoScaleService.createCondition(this);
    if (condition != null) {
        setEntityId(condition.getId());
        setEntityUuid(condition.getUuid());
    } else {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create condition.");
    }
}
Also used : Condition(com.cloud.network.as.Condition) ServerApiException(org.apache.cloudstack.api.ServerApiException)

Aggregations

Condition (com.cloud.network.as.Condition)6 ArrayList (java.util.ArrayList)3 AutoScalePolicy (com.cloud.network.as.AutoScalePolicy)2 AutoScaleVmProfile (com.cloud.network.as.AutoScaleVmProfile)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 ConditionResponse (org.apache.cloudstack.api.response.ConditionResponse)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 ServerApiException (org.apache.cloudstack.api.ServerApiException)1 ListResponse (org.apache.cloudstack.api.response.ListResponse)1