Search in sources :

Example 11 with AccountVO

use of com.cloud.user.AccountVO in project cloudstack by apache.

the class GlobalLoadBalancingRulesServiceImplTest method runCreateGlobalLoadBalancerRuleInvalidServiceType.

void runCreateGlobalLoadBalancerRuleInvalidServiceType() throws Exception {
    TransactionLegacy txn = TransactionLegacy.open("runCreateGlobalLoadBalancerRulePostiveTest");
    GlobalLoadBalancingRulesServiceImpl gslbServiceImpl = new GlobalLoadBalancingRulesServiceImpl();
    gslbServiceImpl._accountMgr = Mockito.mock(AccountManager.class);
    Account account = new AccountVO("testaccount", 1, "networkdomain", (short) 0, UUID.randomUUID().toString());
    when(gslbServiceImpl._accountMgr.getAccount(anyLong())).thenReturn(account);
    gslbServiceImpl._gslbRuleDao = Mockito.mock(GlobalLoadBalancerRuleDao.class);
    when(gslbServiceImpl._gslbRuleDao.persist(any(GlobalLoadBalancerRuleVO.class))).thenReturn(new GlobalLoadBalancerRuleVO());
    gslbServiceImpl._gslbLbMapDao = Mockito.mock(GlobalLoadBalancerLbRuleMapDao.class);
    gslbServiceImpl._regionDao = Mockito.mock(RegionDao.class);
    RegionVO region = new RegionVO();
    region.setGslbEnabled(true);
    when(gslbServiceImpl._regionDao.findById(anyInt())).thenReturn(region);
    gslbServiceImpl._rulesMgr = Mockito.mock(RulesManager.class);
    gslbServiceImpl._lbDao = Mockito.mock(LoadBalancerDao.class);
    gslbServiceImpl._networkDao = Mockito.mock(NetworkDao.class);
    gslbServiceImpl._globalConfigDao = Mockito.mock(ConfigurationDao.class);
    gslbServiceImpl._ipAddressDao = Mockito.mock(IPAddressDao.class);
    gslbServiceImpl._agentMgr = Mockito.mock(AgentManager.class);
    CreateGlobalLoadBalancerRuleCmd createCmd = new CreateGlobalLoadBalancerRuleCmdExtn();
    Class<?> _class = createCmd.getClass().getSuperclass();
    Field regionIdField = _class.getDeclaredField("regionId");
    regionIdField.setAccessible(true);
    regionIdField.set(createCmd, new Integer(1));
    Field algoField = _class.getDeclaredField("algorithm");
    algoField.setAccessible(true);
    algoField.set(createCmd, "roundrobin");
    Field stickyField = _class.getDeclaredField("stickyMethod");
    stickyField.setAccessible(true);
    stickyField.set(createCmd, "sourceip");
    Field nameField = _class.getDeclaredField("globalLoadBalancerRuleName");
    nameField.setAccessible(true);
    nameField.set(createCmd, "gslb-rule");
    Field descriptionField = _class.getDeclaredField("description");
    descriptionField.setAccessible(true);
    descriptionField.set(createCmd, "testing create gslb-rule");
    Field serviceDomainField = _class.getDeclaredField("serviceDomainName");
    serviceDomainField.setAccessible(true);
    serviceDomainField.set(createCmd, "gslb-rule-domain");
    Field serviceTypeField = _class.getDeclaredField("serviceType");
    serviceTypeField.setAccessible(true);
    serviceTypeField.set(createCmd, "invalidtcp");
    try {
        gslbServiceImpl.createGlobalLoadBalancerRule(createCmd);
    } catch (InvalidParameterValueException e) {
        Assert.assertTrue(e.getMessage().contains("Invalid service type"));
    }
}
Also used : Account(com.cloud.user.Account) ConfigurationDao(org.apache.cloudstack.framework.config.dao.ConfigurationDao) LoadBalancerDao(com.cloud.network.dao.LoadBalancerDao) AgentManager(com.cloud.agent.AgentManager) IPAddressDao(com.cloud.network.dao.IPAddressDao) RulesManager(com.cloud.network.rules.RulesManager) AccountVO(com.cloud.user.AccountVO) TransactionLegacy(com.cloud.utils.db.TransactionLegacy) Field(java.lang.reflect.Field) NetworkDao(com.cloud.network.dao.NetworkDao) CreateGlobalLoadBalancerRuleCmd(org.apache.cloudstack.api.command.user.region.ha.gslb.CreateGlobalLoadBalancerRuleCmd) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) RegionVO(org.apache.cloudstack.region.RegionVO) AccountManager(com.cloud.user.AccountManager) RegionDao(org.apache.cloudstack.region.dao.RegionDao)

Example 12 with AccountVO

use of com.cloud.user.AccountVO in project cloudstack by apache.

the class GlobalLoadBalancingRulesServiceImplTest method runRemoveFromGlobalLoadBalancerRuleTest.

void runRemoveFromGlobalLoadBalancerRuleTest() throws Exception {
    TransactionLegacy txn = TransactionLegacy.open("runRemoveFromGlobalLoadBalancerRuleTest");
    GlobalLoadBalancingRulesServiceImpl gslbServiceImpl = new GlobalLoadBalancingRulesServiceImpl();
    gslbServiceImpl._accountMgr = Mockito.mock(AccountManager.class);
    gslbServiceImpl._gslbRuleDao = Mockito.mock(GlobalLoadBalancerRuleDao.class);
    gslbServiceImpl._gslbLbMapDao = Mockito.mock(GlobalLoadBalancerLbRuleMapDao.class);
    gslbServiceImpl._regionDao = Mockito.mock(RegionDao.class);
    gslbServiceImpl._rulesMgr = Mockito.mock(RulesManager.class);
    gslbServiceImpl._lbDao = Mockito.mock(LoadBalancerDao.class);
    gslbServiceImpl._networkDao = Mockito.mock(NetworkDao.class);
    gslbServiceImpl._globalConfigDao = Mockito.mock(ConfigurationDao.class);
    gslbServiceImpl._ipAddressDao = Mockito.mock(IPAddressDao.class);
    gslbServiceImpl._agentMgr = Mockito.mock(AgentManager.class);
    List<GslbServiceProvider> mockGslbProviders = new ArrayList<GslbServiceProvider>();
    mockGslbProviders.add(Mockito.mock(GslbServiceProvider.class));
    gslbServiceImpl._gslbProviders = mockGslbProviders;
    RemoveFromGlobalLoadBalancerRuleCmd removeFromGslbCmd = new RemoveFromGlobalLoadBalancerRuleCmdExtn();
    Class<?> _class = removeFromGslbCmd.getClass().getSuperclass();
    Account account = new AccountVO("testaccount", 1, "networkdomain", (short) 0, UUID.randomUUID().toString());
    when(gslbServiceImpl._accountMgr.getAccount(anyLong())).thenReturn(account);
    Field gslbRuleId = _class.getDeclaredField("id");
    gslbRuleId.setAccessible(true);
    gslbRuleId.set(removeFromGslbCmd, new Long(1));
    GlobalLoadBalancerRuleVO gslbRule = new GlobalLoadBalancerRuleVO("test-gslb-rule", "test-gslb-rule", "test-domain", "roundrobin", "sourceip", "tcp", 1, 1, 1, GlobalLoadBalancerRule.State.Active);
    when(gslbServiceImpl._gslbRuleDao.findById(new Long(1))).thenReturn(gslbRule);
    LoadBalancerVO lbRule = new LoadBalancerVO();
    lbRule.setState(FirewallRule.State.Active);
    Field networkIdField = LoadBalancerVO.class.getSuperclass().getDeclaredField("networkId");
    networkIdField.setAccessible(true);
    networkIdField.set(lbRule, new Long(1));
    Field idField = LoadBalancerVO.class.getSuperclass().getDeclaredField("id");
    idField.setAccessible(true);
    idField.set(lbRule, new Long(1));
    Field sourceIpAddressId = LoadBalancerVO.class.getSuperclass().getDeclaredField("sourceIpAddressId");
    sourceIpAddressId.setAccessible(true);
    sourceIpAddressId.set(lbRule, new Long(1));
    when(gslbServiceImpl._lbDao.findById(new Long(1))).thenReturn(lbRule);
    Field lbRules = _class.getDeclaredField("loadBalancerRulesIds");
    lbRules.setAccessible(true);
    List<Long> lbRuleIds = new ArrayList<Long>();
    lbRuleIds.add(new Long(1));
    lbRules.set(removeFromGslbCmd, lbRuleIds);
    NetworkVO networkVo = new NetworkVO();
    Field dcID = NetworkVO.class.getDeclaredField("dataCenterId");
    dcID.setAccessible(true);
    dcID.set(networkVo, new Long(1));
    Field phyNetworkId = NetworkVO.class.getDeclaredField("physicalNetworkId");
    phyNetworkId.setAccessible(true);
    phyNetworkId.set(networkVo, new Long(200));
    when(gslbServiceImpl._networkDao.findById(new Long(1))).thenReturn(networkVo);
    GlobalLoadBalancerLbRuleMapVO gslbLbMap = new GlobalLoadBalancerLbRuleMapVO(1, 1, 1);
    List<GlobalLoadBalancerLbRuleMapVO> listSslbLbMap = new ArrayList<GlobalLoadBalancerLbRuleMapVO>();
    listSslbLbMap.add(gslbLbMap);
    when(gslbServiceImpl._gslbLbMapDao.listByGslbRuleId(new Long(1))).thenReturn(listSslbLbMap);
    when(gslbServiceImpl._gslbLbMapDao.findByGslbRuleIdAndLbRuleId(new Long(1), new Long(1))).thenReturn(gslbLbMap);
    IPAddressVO ip = new IPAddressVO(new Ip("10.1.1.1"), 1, 1, 1, true);
    when(gslbServiceImpl._ipAddressDao.findById(new Long(1))).thenReturn(ip);
    gslbServiceImpl.removeFromGlobalLoadBalancerRule(removeFromGslbCmd);
}
Also used : ConfigurationDao(org.apache.cloudstack.framework.config.dao.ConfigurationDao) Account(com.cloud.user.Account) LoadBalancerDao(com.cloud.network.dao.LoadBalancerDao) AgentManager(com.cloud.agent.AgentManager) RulesManager(com.cloud.network.rules.RulesManager) Ip(com.cloud.utils.net.Ip) ArrayList(java.util.ArrayList) LoadBalancerVO(com.cloud.network.dao.LoadBalancerVO) AccountVO(com.cloud.user.AccountVO) Field(java.lang.reflect.Field) NetworkVO(com.cloud.network.dao.NetworkVO) IPAddressDao(com.cloud.network.dao.IPAddressDao) RemoveFromGlobalLoadBalancerRuleCmd(org.apache.cloudstack.api.command.user.region.ha.gslb.RemoveFromGlobalLoadBalancerRuleCmd) TransactionLegacy(com.cloud.utils.db.TransactionLegacy) NetworkDao(com.cloud.network.dao.NetworkDao) Matchers.anyLong(org.mockito.Matchers.anyLong) AccountManager(com.cloud.user.AccountManager) IPAddressVO(com.cloud.network.dao.IPAddressVO) RegionDao(org.apache.cloudstack.region.dao.RegionDao)

Example 13 with AccountVO

use of com.cloud.user.AccountVO in project cloudstack by apache.

the class GlobalLoadBalancingRulesServiceImplTest method runCreateGlobalLoadBalancerRulePostiveTest.

void runCreateGlobalLoadBalancerRulePostiveTest() throws Exception {
    TransactionLegacy txn = TransactionLegacy.open("runCreateGlobalLoadBalancerRulePostiveTest");
    GlobalLoadBalancingRulesServiceImpl gslbServiceImpl = new GlobalLoadBalancingRulesServiceImpl();
    gslbServiceImpl._accountMgr = Mockito.mock(AccountManager.class);
    Account account = new AccountVO("testaccount", 1, "networkdomain", (short) 0, UUID.randomUUID().toString());
    when(gslbServiceImpl._accountMgr.getAccount(anyLong())).thenReturn(account);
    gslbServiceImpl._gslbRuleDao = Mockito.mock(GlobalLoadBalancerRuleDao.class);
    when(gslbServiceImpl._gslbRuleDao.persist(any(GlobalLoadBalancerRuleVO.class))).thenReturn(new GlobalLoadBalancerRuleVO());
    gslbServiceImpl._gslbLbMapDao = Mockito.mock(GlobalLoadBalancerLbRuleMapDao.class);
    gslbServiceImpl._regionDao = Mockito.mock(RegionDao.class);
    RegionVO region = new RegionVO();
    region.setGslbEnabled(true);
    when(gslbServiceImpl._regionDao.findById(anyInt())).thenReturn(region);
    gslbServiceImpl._rulesMgr = Mockito.mock(RulesManager.class);
    gslbServiceImpl._lbDao = Mockito.mock(LoadBalancerDao.class);
    gslbServiceImpl._networkDao = Mockito.mock(NetworkDao.class);
    gslbServiceImpl._globalConfigDao = Mockito.mock(ConfigurationDao.class);
    gslbServiceImpl._ipAddressDao = Mockito.mock(IPAddressDao.class);
    gslbServiceImpl._agentMgr = Mockito.mock(AgentManager.class);
    CreateGlobalLoadBalancerRuleCmd createCmd = new CreateGlobalLoadBalancerRuleCmdExtn();
    Class<?> _class = createCmd.getClass().getSuperclass();
    Field regionIdField = _class.getDeclaredField("regionId");
    regionIdField.setAccessible(true);
    regionIdField.set(createCmd, new Integer(1));
    Field algoField = _class.getDeclaredField("algorithm");
    algoField.setAccessible(true);
    algoField.set(createCmd, "roundrobin");
    Field stickyField = _class.getDeclaredField("stickyMethod");
    stickyField.setAccessible(true);
    stickyField.set(createCmd, "sourceip");
    Field nameField = _class.getDeclaredField("globalLoadBalancerRuleName");
    nameField.setAccessible(true);
    nameField.set(createCmd, "gslb-rule");
    Field descriptionField = _class.getDeclaredField("description");
    descriptionField.setAccessible(true);
    descriptionField.set(createCmd, "testing create gslb-rule");
    Field serviceDomainField = _class.getDeclaredField("serviceDomainName");
    serviceDomainField.setAccessible(true);
    serviceDomainField.set(createCmd, "gslb-rule-domain");
    Field serviceTypeField = _class.getDeclaredField("serviceType");
    serviceTypeField.setAccessible(true);
    serviceTypeField.set(createCmd, "tcp");
    try {
        gslbServiceImpl.createGlobalLoadBalancerRule(createCmd);
    } catch (Exception e) {
        s_logger.info("exception in testing runCreateGlobalLoadBalancerRulePostiveTest message: " + e.toString());
    }
}
Also used : Account(com.cloud.user.Account) ConfigurationDao(org.apache.cloudstack.framework.config.dao.ConfigurationDao) LoadBalancerDao(com.cloud.network.dao.LoadBalancerDao) AgentManager(com.cloud.agent.AgentManager) IPAddressDao(com.cloud.network.dao.IPAddressDao) RulesManager(com.cloud.network.rules.RulesManager) AccountVO(com.cloud.user.AccountVO) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) TransactionLegacy(com.cloud.utils.db.TransactionLegacy) Field(java.lang.reflect.Field) NetworkDao(com.cloud.network.dao.NetworkDao) CreateGlobalLoadBalancerRuleCmd(org.apache.cloudstack.api.command.user.region.ha.gslb.CreateGlobalLoadBalancerRuleCmd) RegionVO(org.apache.cloudstack.region.RegionVO) AccountManager(com.cloud.user.AccountManager) RegionDao(org.apache.cloudstack.region.dao.RegionDao)

Example 14 with AccountVO

use of com.cloud.user.AccountVO in project cloudstack by apache.

the class GlobalLoadBalancingRulesServiceImplTest method runDeleteGlobalLoadBalancerRuleTestWithLbRules.

void runDeleteGlobalLoadBalancerRuleTestWithLbRules() throws Exception {
    TransactionLegacy txn = TransactionLegacy.open("runDeleteGlobalLoadBalancerRuleTestWithLbRules");
    GlobalLoadBalancingRulesServiceImpl gslbServiceImpl = new GlobalLoadBalancingRulesServiceImpl();
    gslbServiceImpl._accountMgr = Mockito.mock(AccountManager.class);
    gslbServiceImpl._gslbRuleDao = Mockito.mock(GlobalLoadBalancerRuleDao.class);
    gslbServiceImpl._gslbLbMapDao = Mockito.mock(GlobalLoadBalancerLbRuleMapDao.class);
    gslbServiceImpl._regionDao = Mockito.mock(RegionDao.class);
    gslbServiceImpl._rulesMgr = Mockito.mock(RulesManager.class);
    gslbServiceImpl._lbDao = Mockito.mock(LoadBalancerDao.class);
    gslbServiceImpl._networkDao = Mockito.mock(NetworkDao.class);
    gslbServiceImpl._globalConfigDao = Mockito.mock(ConfigurationDao.class);
    gslbServiceImpl._ipAddressDao = Mockito.mock(IPAddressDao.class);
    gslbServiceImpl._agentMgr = Mockito.mock(AgentManager.class);
    DeleteGlobalLoadBalancerRuleCmd deleteCmd = new DeleteGlobalLoadBalancerRuleCmdExtn();
    Class<?> _class = deleteCmd.getClass().getSuperclass();
    Account account = new AccountVO("testaccount", 1, "networkdomain", (short) 0, UUID.randomUUID().toString());
    when(gslbServiceImpl._accountMgr.getAccount(anyLong())).thenReturn(account);
    Field gslbRuleId = _class.getDeclaredField("id");
    gslbRuleId.setAccessible(true);
    gslbRuleId.set(deleteCmd, new Long(1));
    GlobalLoadBalancerRuleVO gslbRule = new GlobalLoadBalancerRuleVO("test-gslb-rule", "test-gslb-rule", "test-domain", "roundrobin", "sourceip", "tcp", 1, 1, 1, GlobalLoadBalancerRule.State.Active);
    when(gslbServiceImpl._gslbRuleDao.findById(new Long(1))).thenReturn(gslbRule);
    GlobalLoadBalancerLbRuleMapVO gslbLmMap = new GlobalLoadBalancerLbRuleMapVO(1, 1, 1);
    List<GlobalLoadBalancerLbRuleMapVO> gslbLbMapVos = new ArrayList<GlobalLoadBalancerLbRuleMapVO>();
    gslbLbMapVos.add(gslbLmMap);
    when(gslbServiceImpl._gslbLbMapDao.listByGslbRuleId(new Long(1))).thenReturn(gslbLbMapVos);
    try {
        gslbServiceImpl.deleteGlobalLoadBalancerRule(deleteCmd);
        Assert.assertTrue(gslbRule.getState() == GlobalLoadBalancerRule.State.Revoke);
        Assert.assertTrue(gslbLmMap.isRevoke() == true);
    } catch (Exception e) {
        s_logger.info("exception in testing runDeleteGlobalLoadBalancerRuleTestWithLbRules. " + e.toString());
    }
}
Also used : ConfigurationDao(org.apache.cloudstack.framework.config.dao.ConfigurationDao) Account(com.cloud.user.Account) LoadBalancerDao(com.cloud.network.dao.LoadBalancerDao) AgentManager(com.cloud.agent.AgentManager) IPAddressDao(com.cloud.network.dao.IPAddressDao) RulesManager(com.cloud.network.rules.RulesManager) ArrayList(java.util.ArrayList) AccountVO(com.cloud.user.AccountVO) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) TransactionLegacy(com.cloud.utils.db.TransactionLegacy) Field(java.lang.reflect.Field) NetworkDao(com.cloud.network.dao.NetworkDao) Matchers.anyLong(org.mockito.Matchers.anyLong) DeleteGlobalLoadBalancerRuleCmd(org.apache.cloudstack.api.command.user.region.ha.gslb.DeleteGlobalLoadBalancerRuleCmd) AccountManager(com.cloud.user.AccountManager) RegionDao(org.apache.cloudstack.region.dao.RegionDao)

Example 15 with AccountVO

use of com.cloud.user.AccountVO in project cloudstack by apache.

the class GlobalLoadBalancingRulesServiceImplTest method runDeleteGlobalLoadBalancerRuleTestWithNoLbRules.

void runDeleteGlobalLoadBalancerRuleTestWithNoLbRules() throws Exception {
    TransactionLegacy txn = TransactionLegacy.open("runDeleteGlobalLoadBalancerRuleTestWithNoLbRules");
    GlobalLoadBalancingRulesServiceImpl gslbServiceImpl = new GlobalLoadBalancingRulesServiceImpl();
    gslbServiceImpl._accountMgr = Mockito.mock(AccountManager.class);
    gslbServiceImpl._gslbRuleDao = Mockito.mock(GlobalLoadBalancerRuleDao.class);
    gslbServiceImpl._gslbLbMapDao = Mockito.mock(GlobalLoadBalancerLbRuleMapDao.class);
    gslbServiceImpl._regionDao = Mockito.mock(RegionDao.class);
    gslbServiceImpl._rulesMgr = Mockito.mock(RulesManager.class);
    gslbServiceImpl._lbDao = Mockito.mock(LoadBalancerDao.class);
    gslbServiceImpl._networkDao = Mockito.mock(NetworkDao.class);
    gslbServiceImpl._globalConfigDao = Mockito.mock(ConfigurationDao.class);
    gslbServiceImpl._ipAddressDao = Mockito.mock(IPAddressDao.class);
    gslbServiceImpl._agentMgr = Mockito.mock(AgentManager.class);
    DeleteGlobalLoadBalancerRuleCmd deleteCmd = new DeleteGlobalLoadBalancerRuleCmdExtn();
    Class<?> _class = deleteCmd.getClass().getSuperclass();
    Account account = new AccountVO("testaccount", 1, "networkdomain", (short) 0, UUID.randomUUID().toString());
    when(gslbServiceImpl._accountMgr.getAccount(anyLong())).thenReturn(account);
    Field gslbRuleId = _class.getDeclaredField("id");
    gslbRuleId.setAccessible(true);
    gslbRuleId.set(deleteCmd, new Long(1));
    GlobalLoadBalancerRuleVO gslbRule = new GlobalLoadBalancerRuleVO("test-gslb-rule", "test-gslb-rule", "test-domain", "roundrobin", "sourceip", "tcp", 1, 1, 1, GlobalLoadBalancerRule.State.Active);
    when(gslbServiceImpl._gslbRuleDao.findById(new Long(1))).thenReturn(gslbRule);
    GlobalLoadBalancerLbRuleMapVO gslbLbMap = new GlobalLoadBalancerLbRuleMapVO();
    gslbLbMap.setGslbLoadBalancerId(1);
    gslbLbMap.setLoadBalancerId(1);
    List<GlobalLoadBalancerLbRuleMapVO> gslbLbMapList = new ArrayList<GlobalLoadBalancerLbRuleMapVO>();
    gslbLbMapList.add(gslbLbMap);
    when(gslbServiceImpl._gslbLbMapDao.listByGslbRuleId(new Long(1))).thenReturn(gslbLbMapList);
    try {
        gslbServiceImpl.deleteGlobalLoadBalancerRule(deleteCmd);
        Assert.assertTrue(gslbRule.getState() == GlobalLoadBalancerRule.State.Revoke);
    } catch (Exception e) {
        s_logger.info("exception in testing runDeleteGlobalLoadBalancerRuleTestWithNoLbRules. " + e.toString());
    }
}
Also used : ConfigurationDao(org.apache.cloudstack.framework.config.dao.ConfigurationDao) Account(com.cloud.user.Account) LoadBalancerDao(com.cloud.network.dao.LoadBalancerDao) AgentManager(com.cloud.agent.AgentManager) IPAddressDao(com.cloud.network.dao.IPAddressDao) RulesManager(com.cloud.network.rules.RulesManager) ArrayList(java.util.ArrayList) AccountVO(com.cloud.user.AccountVO) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) TransactionLegacy(com.cloud.utils.db.TransactionLegacy) Field(java.lang.reflect.Field) NetworkDao(com.cloud.network.dao.NetworkDao) Matchers.anyLong(org.mockito.Matchers.anyLong) DeleteGlobalLoadBalancerRuleCmd(org.apache.cloudstack.api.command.user.region.ha.gslb.DeleteGlobalLoadBalancerRuleCmd) AccountManager(com.cloud.user.AccountManager) RegionDao(org.apache.cloudstack.region.dao.RegionDao)

Aggregations

AccountVO (com.cloud.user.AccountVO)139 Account (com.cloud.user.Account)65 Test (org.junit.Test)52 UserVO (com.cloud.user.UserVO)44 Field (java.lang.reflect.Field)41 ArrayList (java.util.ArrayList)40 DomainVO (com.cloud.domain.DomainVO)32 AccountManager (com.cloud.user.AccountManager)27 Before (org.junit.Before)22 InvalidParameterValueException (com.cloud.exception.InvalidParameterValueException)21 TransactionLegacy (com.cloud.utils.db.TransactionLegacy)21 Date (java.util.Date)16 QuotaAccountVO (org.apache.cloudstack.quota.vo.QuotaAccountVO)16 DomainDao (com.cloud.domain.dao.DomainDao)14 SslCertDao (com.cloud.network.dao.SslCertDao)14 AgentManager (com.cloud.agent.AgentManager)13 IPAddressDao (com.cloud.network.dao.IPAddressDao)13 LoadBalancerDao (com.cloud.network.dao.LoadBalancerDao)13 NetworkDao (com.cloud.network.dao.NetworkDao)13 NetworkVO (com.cloud.network.dao.NetworkVO)13