Search in sources :

Example 11 with UserVmDao

use of com.cloud.vm.dao.UserVmDao in project cloudstack by apache.

the class PasswordToRouterRules method accept.

@Override
public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter router) throws ResourceUnavailableException {
    _router = router;
    UserVmDao userVmDao = visitor.getVirtualNetworkApplianceFactory().getUserVmDao();
    userVmDao.loadDetails((UserVmVO) profile.getVirtualMachine());
    // for basic zone, send vm data/password information only to the router in the same pod
    NicDao nicDao = visitor.getVirtualNetworkApplianceFactory().getNicDao();
    nicVo = nicDao.findById(nic.getId());
    return visitor.visit(this);
}
Also used : NicDao(com.cloud.vm.dao.NicDao) UserVmDao(com.cloud.vm.dao.UserVmDao)

Example 12 with UserVmDao

use of com.cloud.vm.dao.UserVmDao in project cloudstack by apache.

the class DhcpEntryRules method accept.

@Override
public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter router) throws ResourceUnavailableException {
    _router = router;
    UserVmDao userVmDao = visitor.getVirtualNetworkApplianceFactory().getUserVmDao();
    _userVM = userVmDao.findById(_profile.getId());
    userVmDao.loadDetails(_userVM);
    NicDao nicDao = visitor.getVirtualNetworkApplianceFactory().getNicDao();
    _nicVo = nicDao.findById(_nic.getId());
    return visitor.visit(this);
}
Also used : NicDao(com.cloud.vm.dao.NicDao) UserVmDao(com.cloud.vm.dao.UserVmDao)

Aggregations

UserVmDao (com.cloud.vm.dao.UserVmDao)12 NicDao (com.cloud.vm.dao.NicDao)6 Test (org.junit.Test)6 UserVmVO (com.cloud.vm.UserVmVO)4 ArrayList (java.util.ArrayList)4 Matchers.anyString (org.mockito.Matchers.anyString)4 LoadBalancerDao (com.cloud.network.dao.LoadBalancerDao)3 LoadBalancerVMMapDao (com.cloud.network.dao.LoadBalancerVMMapDao)3 LoadBalancerVO (com.cloud.network.dao.LoadBalancerVO)3 NetworkVO (com.cloud.network.dao.NetworkVO)3 NicVO (com.cloud.vm.NicVO)3 VMInstanceVO (com.cloud.vm.VMInstanceVO)3 IOException (java.io.IOException)3 HashMap (java.util.HashMap)3 List (java.util.List)3 ApiConnector (net.juniper.contrail.api.ApiConnector)3 ApiConnectorMock (net.juniper.contrail.api.ApiConnectorMock)3 ContrailManagerImpl (org.apache.cloudstack.network.contrail.management.ContrailManagerImpl)3 Matchers.anyLong (org.mockito.Matchers.anyLong)3 NetworkDao (com.cloud.network.dao.NetworkDao)2