Search in sources :

Example 1 with UpdateLoadBalancerRuleCmd

use of org.apache.cloudstack.api.command.user.loadbalancer.UpdateLoadBalancerRuleCmd in project cloudstack by apache.

the class UpdateLoadBalancerTest method setUp.

@Before
public void setUp() {
    _lbMgr._accountMgr = new MockAccountManagerImpl();
    _lbMgr._autoScaleVmGroupDao = Mockito.mock(AutoScaleVmGroupDao.class);
    _lbMgr._networkDao = netDao;
    _lbMgr._networkModel = netModel;
    _lbMgr._lb2healthcheckDao = Mockito.mock(LBHealthCheckPolicyDao.class);
    _lbMgr._lb2stickinesspoliciesDao = Mockito.mock(LBStickinessPolicyDao.class);
    _lbMgr._lb2VmMapDao = Mockito.mock(LoadBalancerVMMapDao.class);
    _lbMgr._lbCertMapDao = Mockito.mock(LoadBalancerCertMapDao.class);
    _lbMgr._lbDao = lbDao;
    _lbMgr._lbProviders = new ArrayList<LoadBalancingServiceProvider>();
    _lbMgr._lbProviders.add(lbServiceProvider);
    updateLbRuleCmd = new UpdateLoadBalancerRuleCmd();
    AccountVO account = new AccountVO(accountName, domainId, "networkDomain", Account.ACCOUNT_TYPE_NORMAL, "uuid");
    UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString(), User.Source.UNKNOWN);
    CallContext.register(user, account);
}
Also used : LBHealthCheckPolicyDao(com.cloud.network.dao.LBHealthCheckPolicyDao) UserVO(com.cloud.user.UserVO) LoadBalancerCertMapDao(com.cloud.network.dao.LoadBalancerCertMapDao) LoadBalancerVMMapDao(com.cloud.network.dao.LoadBalancerVMMapDao) UpdateLoadBalancerRuleCmd(org.apache.cloudstack.api.command.user.loadbalancer.UpdateLoadBalancerRuleCmd) LoadBalancingServiceProvider(com.cloud.network.element.LoadBalancingServiceProvider) AutoScaleVmGroupDao(com.cloud.network.as.dao.AutoScaleVmGroupDao) LBStickinessPolicyDao(com.cloud.network.dao.LBStickinessPolicyDao) AccountVO(com.cloud.user.AccountVO) MockAccountManagerImpl(com.cloud.user.MockAccountManagerImpl) Before(org.junit.Before)

Aggregations

AutoScaleVmGroupDao (com.cloud.network.as.dao.AutoScaleVmGroupDao)1 LBHealthCheckPolicyDao (com.cloud.network.dao.LBHealthCheckPolicyDao)1 LBStickinessPolicyDao (com.cloud.network.dao.LBStickinessPolicyDao)1 LoadBalancerCertMapDao (com.cloud.network.dao.LoadBalancerCertMapDao)1 LoadBalancerVMMapDao (com.cloud.network.dao.LoadBalancerVMMapDao)1 LoadBalancingServiceProvider (com.cloud.network.element.LoadBalancingServiceProvider)1 AccountVO (com.cloud.user.AccountVO)1 MockAccountManagerImpl (com.cloud.user.MockAccountManagerImpl)1 UserVO (com.cloud.user.UserVO)1 UpdateLoadBalancerRuleCmd (org.apache.cloudstack.api.command.user.loadbalancer.UpdateLoadBalancerRuleCmd)1 Before (org.junit.Before)1