mirror of https://github.com/apache/cloudstack.git
Fix broken compilation by new anget manager merge
This commit is contained in:
parent
cef30956e9
commit
21de281276
|
|
@ -687,13 +687,6 @@ public class HostVO implements Host {
|
|||
public Status getState() {
|
||||
return status;
|
||||
}
|
||||
|
||||
//FIXME: change the upper interface
|
||||
@Override
|
||||
public Long getHostId() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceState getResourceState() {
|
||||
|
|
|
|||
|
|
@ -51,17 +51,12 @@ public class OvmDiscoverer extends DiscovererBase implements Discoverer, Resourc
|
|||
_publicNetworkDevice = _params.get(Config.OvmPublicNetwork.key());
|
||||
_privateNetworkDevice = _params.get(Config.OvmPrivateNetwork.key());
|
||||
_guestNetworkDevice = _params.get(Config.OvmGuestNetwork.key());
|
||||
_resourceMgr.registerResourceStateAdapter(this.getClass().getSimpleName(), this);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected OvmDiscoverer() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
_resourceMgr.registerResourceStateAdapter(this.getClass().getSimpleName(), this);
|
||||
return super.configure(name, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stop() {
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@ import com.cloud.host.dao.HostDao;
|
|||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.utils.component.Inject;
|
||||
import com.cloud.vm.VMInstanceVO;
|
||||
import com.cloud.resource.ResourceManager;
|
||||
|
||||
@Local(value=FenceBuilder.class)
|
||||
public class OvmFencer implements FenceBuilder {
|
||||
private static final Logger s_logger = Logger.getLogger(OvmFencer.class);
|
||||
String _name;
|
||||
@Inject HostDao _hostDao;
|
||||
@Inject AgentManager _agentMgr;
|
||||
@Inject ResourceManager _resourceMgr;
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
|
|
@ -63,7 +64,7 @@ public class OvmFencer implements FenceBuilder {
|
|||
return null;
|
||||
}
|
||||
|
||||
List<HostVO> hosts = _hostDao.listByCluster(host.getClusterId());
|
||||
List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(host.getClusterId());
|
||||
FenceCommand fence = new FenceCommand(vm, host);
|
||||
|
||||
for (HostVO h : hosts) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ import com.cloud.host.Host;
|
|||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.network.dao.IPAddressDao;
|
||||
import com.cloud.resource.ResourceManager;
|
||||
import com.cloud.storage.StorageManager;
|
||||
import com.cloud.storage.StoragePoolVO;
|
||||
import com.cloud.storage.dao.StoragePoolDao;
|
||||
|
|
@ -100,7 +101,8 @@ public class AlertManagerImpl implements AlertManager {
|
|||
@Inject private IPAddressDao _publicIPAddressDao;
|
||||
@Inject private DataCenterIpAddressDao _privateIPAddressDao;
|
||||
@Inject private StoragePoolDao _storagePoolDao;
|
||||
@Inject private ConfigurationDao _configDao;
|
||||
@Inject private ConfigurationDao _configDao;
|
||||
@Inject private ResourceManager _resourceMgr;
|
||||
|
||||
private Timer _timer = null;
|
||||
private float _cpuOverProvisioningFactor = 1;
|
||||
|
|
@ -283,7 +285,7 @@ public class AlertManagerImpl implements AlertManager {
|
|||
|
||||
// Calculate CPU and RAM capacities
|
||||
// get all hosts...even if they are not in 'UP' state
|
||||
List<HostVO> hosts = _hostDao.listByType(Host.Type.Routing);
|
||||
List<HostVO> hosts = _resourceMgr.listAllHostsInAllZonesByType(Host.Type.Routing);
|
||||
for (HostVO host : hosts) {
|
||||
_capacityMgr.updateCapacityForHost(host);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||
|
||||
|
||||
@Override
|
||||
public boolean updateState(Status oldStatus, Event event, Status newStatus, Host vo, Long id) {
|
||||
public boolean updateState(Status oldStatus, Event event, Status newStatus, Host vo, Object data) {
|
||||
HostVO host = (HostVO) vo;
|
||||
long oldPingTime = host.getLastPinged();
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ import com.cloud.offering.NetworkOffering;
|
|||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.offerings.NetworkOfferingVO;
|
||||
import com.cloud.offerings.dao.NetworkOfferingDao;
|
||||
import com.cloud.resource.ResourceManager;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.service.dao.ServiceOfferingDao;
|
||||
import com.cloud.storage.StorageManager;
|
||||
|
|
@ -319,6 +320,8 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
UserVmDetailsDao _vmDetailsDao;
|
||||
@Inject
|
||||
ClusterDao _clusterDao;
|
||||
@Inject
|
||||
ResourceManager _resourceMgr;
|
||||
|
||||
int _routerRamSize;
|
||||
int _routerCpuMHz;
|
||||
|
|
@ -1028,7 +1031,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
continue;
|
||||
}
|
||||
|
||||
List<HostVO> hosts = _hostDao.listByCluster(cv.getId());
|
||||
List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(cv.getId());
|
||||
if (hosts == null || hosts.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,10 +177,6 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
|
|||
@Inject
|
||||
protected StoragePoolHostDao _storagePoolHostDao;
|
||||
@Inject
|
||||
protected StoragePoolDao _storagePoolDao;
|
||||
@Inject
|
||||
protected CapacityDao _capacityDao;
|
||||
@Inject
|
||||
protected HostDetailsDao _detailsDao;
|
||||
|
||||
protected long _nodeId = ManagementServerNode.getManagementServerId();
|
||||
|
|
|
|||
|
|
@ -3069,7 +3069,7 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
if(hostId != null){
|
||||
hosts.add(ApiDBUtils.findHostById(hostId));
|
||||
}else{
|
||||
hosts = _hostDao.listSecondaryStorageHosts(zoneId);
|
||||
hosts = _ssvmMgr.listSecondaryStorageHostsInOneZone(zoneId);
|
||||
}
|
||||
|
||||
CapacityVO capacity = new CapacityVO(hostId, zoneId, null, null, 0, 0, CapacityVO.CAPACITY_TYPE_SECONDARY_STORAGE);
|
||||
|
|
|
|||
|
|
@ -1596,8 +1596,8 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
|||
VMInstanceVO vm = info.vm;
|
||||
Command command = null;
|
||||
if (vm != null) {
|
||||
String host_guid = info.getHostUuid();
|
||||
Host host = _hostDao.findByGuid(host_guid);
|
||||
String hostGuid = info.getHostUuid();
|
||||
Host host = _resourceMgr.findHostByGuid(hostGuid);
|
||||
long hId = host.getId();
|
||||
|
||||
HypervisorGuru hvGuru = _hvGuruMgr.getGuru(vm.getHypervisorType());
|
||||
|
|
@ -1631,8 +1631,8 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
|||
hId = vm.getHostId() == null ? vm.getLastHostId() : vm.getHostId();
|
||||
} else {
|
||||
castedVm = info.vm;
|
||||
String host_guid = info.getHostUuid();
|
||||
Host host = _hostDao.findByGuid(host_guid);
|
||||
String hostGuid = info.getHostUuid();
|
||||
Host host = _resourceMgr.findHostByGuid(hostGuid);
|
||||
if (host == null) {
|
||||
infos.put(vm.getId(), info);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue