Search in sources :

Example 1 with VMTemplateDao

use of com.cloud.storage.dao.VMTemplateDao in project cosmic by MissionCriticalCloud.

the class SshKeyToRouterRules method accept.

@Override
public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter router) throws ResourceUnavailableException {
    _router = router;
    final UserVmDao userVmDao = visitor.getVirtualNetworkApplianceFactory().getUserVmDao();
    _userVM = userVmDao.findById(_profile.getVirtualMachine().getId());
    userVmDao.loadDetails(_userVM);
    final NicDao nicDao = visitor.getVirtualNetworkApplianceFactory().getNicDao();
    _nicVo = nicDao.findById(_nic.getId());
    // for basic zone, send vm data/password information only to the router in the same pod
    final VMTemplateDao templateDao = visitor.getVirtualNetworkApplianceFactory().getTemplateDao();
    _template = templateDao.findByIdIncludingRemoved(_profile.getTemplateId());
    return visitor.visit(this);
}
Also used : NicDao(com.cloud.vm.dao.NicDao) VMTemplateDao(com.cloud.storage.dao.VMTemplateDao) UserVmDao(com.cloud.vm.dao.UserVmDao)

Example 2 with VMTemplateDao

use of com.cloud.storage.dao.VMTemplateDao in project cloudstack by apache.

the class SshKeyToRouterRules 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.getVirtualMachine().getId());
    userVmDao.loadDetails(_userVM);
    NicDao nicDao = visitor.getVirtualNetworkApplianceFactory().getNicDao();
    _nicVo = nicDao.findById(_nic.getId());
    // for basic zone, send vm data/password information only to the router in the same pod
    VMTemplateDao templateDao = visitor.getVirtualNetworkApplianceFactory().getTemplateDao();
    _template = templateDao.findByIdIncludingRemoved(_profile.getTemplateId());
    return visitor.visit(this);
}
Also used : NicDao(com.cloud.vm.dao.NicDao) VMTemplateDao(com.cloud.storage.dao.VMTemplateDao) UserVmDao(com.cloud.vm.dao.UserVmDao)

Aggregations

VMTemplateDao (com.cloud.storage.dao.VMTemplateDao)2 NicDao (com.cloud.vm.dao.NicDao)2 UserVmDao (com.cloud.vm.dao.UserVmDao)2