mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fixed up unit test
This commit is contained in:
parent
9ca379fc61
commit
ddbcd01f56
@ -1,8 +1,6 @@
|
|||||||
package com.cloud.agent;
|
package com.cloud.agent;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.ejb.Local;
|
import javax.ejb.Local;
|
||||||
import javax.naming.ConfigurationException;
|
import javax.naming.ConfigurationException;
|
||||||
@ -12,24 +10,13 @@ import com.cloud.agent.api.Command;
|
|||||||
import com.cloud.agent.api.StartupCommand;
|
import com.cloud.agent.api.StartupCommand;
|
||||||
import com.cloud.agent.manager.AgentAttache;
|
import com.cloud.agent.manager.AgentAttache;
|
||||||
import com.cloud.agent.manager.Commands;
|
import com.cloud.agent.manager.Commands;
|
||||||
import com.cloud.api.commands.UpdateHostPasswordCmd;
|
|
||||||
import com.cloud.dc.DataCenterVO;
|
|
||||||
import com.cloud.dc.HostPodVO;
|
|
||||||
import com.cloud.dc.PodCluster;
|
|
||||||
import com.cloud.exception.AgentUnavailableException;
|
import com.cloud.exception.AgentUnavailableException;
|
||||||
import com.cloud.exception.ConnectionException;
|
import com.cloud.exception.ConnectionException;
|
||||||
import com.cloud.exception.OperationTimedoutException;
|
import com.cloud.exception.OperationTimedoutException;
|
||||||
import com.cloud.host.Host;
|
|
||||||
import com.cloud.host.Host.Type;
|
|
||||||
import com.cloud.host.HostStats;
|
|
||||||
import com.cloud.host.HostVO;
|
import com.cloud.host.HostVO;
|
||||||
import com.cloud.host.Status.Event;
|
import com.cloud.host.Status.Event;
|
||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.resource.ServerResource;
|
import com.cloud.resource.ServerResource;
|
||||||
import com.cloud.service.ServiceOfferingVO;
|
|
||||||
import com.cloud.template.VirtualMachineTemplate;
|
|
||||||
import com.cloud.user.User;
|
|
||||||
import com.cloud.utils.Pair;
|
|
||||||
|
|
||||||
@Local(value = { AgentManager.class })
|
@Local(value = { AgentManager.class })
|
||||||
public class MockAgentManagerImpl implements AgentManager {
|
public class MockAgentManagerImpl implements AgentManager {
|
||||||
@ -133,46 +120,52 @@ public class MockAgentManagerImpl implements AgentManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean tapLoadingAgents(Long hostId, TapAgentsAction action) {
|
public boolean tapLoadingAgents(Long hostId, TapAgentsAction action) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AgentAttache handleDirectConnectAgent(HostVO host, StartupCommand[] cmds, ServerResource resource, boolean forRebalance) throws ConnectionException {
|
public AgentAttache handleDirectConnectAgent(HostVO host, StartupCommand[] cmds, ServerResource resource, boolean forRebalance) throws ConnectionException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean agentStatusTransitTo(HostVO host, Event e, long msId) {
|
public boolean agentStatusTransitTo(HostVO host, Event e, long msId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AgentAttache findAttache(long hostId) {
|
public AgentAttache findAttache(long hostId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pullAgentToMaintenance(long hostId) {
|
public void pullAgentToMaintenance(long hostId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disconnectWithoutInvestigation(long hostId, Event event) {
|
public void disconnectWithoutInvestigation(long hostId, Event event) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pullAgentOutMaintenance(long hostId) {
|
public void pullAgentOutMaintenance(long hostId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Answer sendToSSVM(Long dcId, Command cmd) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,7 +216,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void prepare(VirtualMachineProfile<? extends VMInstanceVO> profile, DeployDestination dest, ReservationContext context) throws InsufficientCapacityException, ConcurrentOperationException,
|
public void prepare(VirtualMachineProfile<? extends VMInstanceVO> profile, DeployDestination dest, ReservationContext context) throws InsufficientCapacityException, ConcurrentOperationException,
|
||||||
ResourceUnavailableException {
|
ResourceUnavailableException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
|
public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
|
||||||
InsufficientCapacityException {
|
InsufficientCapacityException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -315,7 +315,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network networkToAssociateWith) throws InsufficientCapacityException,
|
public boolean associateIpAddressListToAccount(long userId, long accountId, long zoneId, Long vlanId, Network networkToAssociateWith) throws InsufficientCapacityException,
|
||||||
ConcurrentOperationException, ResourceUnavailableException {
|
ConcurrentOperationException, ResourceUnavailableException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -570,17 +570,17 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean restartNetwork(RestartNetworkCmd cmd, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException,
|
public boolean restartNetwork(RestartNetworkCmd cmd, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException,
|
||||||
InsufficientCapacityException {
|
InsufficientCapacityException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getPodIdForVlan(long vlanDbId) {
|
public Long getPodIdForVlan(long vlanDbId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -708,4 +708,10 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getPhysicalNetworkId(Network network) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,12 +23,6 @@ import com.cloud.utils.component.Manager;
|
|||||||
@Local(value = { AccountManager.class, AccountService.class })
|
@Local(value = { AccountManager.class, AccountService.class })
|
||||||
public class MockAccountManagerImpl implements Manager, AccountManager {
|
public class MockAccountManagerImpl implements Manager, AccountManager {
|
||||||
|
|
||||||
@Override
|
|
||||||
public UserAccount createUserAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType, Long domainId, String networkDomain) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteUserAccount(long accountId) {
|
public boolean deleteUserAccount(long accountId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
@ -232,7 +226,7 @@ public class MockAccountManagerImpl implements Manager, AccountManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void logoutUser(Long userId) {
|
public void logoutUser(Long userId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -255,11 +249,6 @@ public class MockAccountManagerImpl implements Manager, AccountManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Account createAccount(String accountName, short accountType, Long domainId, String networkDomain) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] createApiKeyAndSecretKey(RegisterCmd cmd) {
|
public String[] createApiKeyAndSecretKey(RegisterCmd cmd) {
|
||||||
return null;
|
return null;
|
||||||
@ -270,4 +259,17 @@ public class MockAccountManagerImpl implements Manager, AccountManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserAccount createUserAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType, Long domainId, String networkDomain,
|
||||||
|
Map details) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Account createAccount(String accountName, short accountType, Long domainId, String networkDomain, Map details) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import javax.naming.ConfigurationException;
|
|||||||
import com.cloud.agent.api.StopAnswer;
|
import com.cloud.agent.api.StopAnswer;
|
||||||
import com.cloud.agent.api.VmStatsEntry;
|
import com.cloud.agent.api.VmStatsEntry;
|
||||||
import com.cloud.agent.manager.Commands;
|
import com.cloud.agent.manager.Commands;
|
||||||
|
import com.cloud.api.commands.AssignVMCmd;
|
||||||
import com.cloud.api.commands.AttachVolumeCmd;
|
import com.cloud.api.commands.AttachVolumeCmd;
|
||||||
import com.cloud.api.commands.CreateTemplateCmd;
|
import com.cloud.api.commands.CreateTemplateCmd;
|
||||||
import com.cloud.api.commands.CreateVMGroupCmd;
|
import com.cloud.api.commands.CreateVMGroupCmd;
|
||||||
@ -18,10 +19,10 @@ import com.cloud.api.commands.DeployVMCmd;
|
|||||||
import com.cloud.api.commands.DestroyVMCmd;
|
import com.cloud.api.commands.DestroyVMCmd;
|
||||||
import com.cloud.api.commands.DetachVolumeCmd;
|
import com.cloud.api.commands.DetachVolumeCmd;
|
||||||
import com.cloud.api.commands.ListVMsCmd;
|
import com.cloud.api.commands.ListVMsCmd;
|
||||||
import com.cloud.api.commands.MoveUserVMCmd;
|
|
||||||
import com.cloud.api.commands.RebootVMCmd;
|
import com.cloud.api.commands.RebootVMCmd;
|
||||||
import com.cloud.api.commands.RecoverVMCmd;
|
import com.cloud.api.commands.RecoverVMCmd;
|
||||||
import com.cloud.api.commands.ResetVMPasswordCmd;
|
import com.cloud.api.commands.ResetVMPasswordCmd;
|
||||||
|
import com.cloud.api.commands.RestoreVMCmd;
|
||||||
import com.cloud.api.commands.StartVMCmd;
|
import com.cloud.api.commands.StartVMCmd;
|
||||||
import com.cloud.api.commands.UpdateVMCmd;
|
import com.cloud.api.commands.UpdateVMCmd;
|
||||||
import com.cloud.api.commands.UpgradeVMCmd;
|
import com.cloud.api.commands.UpgradeVMCmd;
|
||||||
@ -38,6 +39,7 @@ import com.cloud.host.Host;
|
|||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.offering.ServiceOffering;
|
import com.cloud.offering.ServiceOffering;
|
||||||
import com.cloud.server.Criteria;
|
import com.cloud.server.Criteria;
|
||||||
|
import com.cloud.storage.StoragePool;
|
||||||
import com.cloud.storage.Volume;
|
import com.cloud.storage.Volume;
|
||||||
import com.cloud.template.VirtualMachineTemplate;
|
import com.cloud.template.VirtualMachineTemplate;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
@ -234,7 +236,7 @@ public class MockUserVmManagerImpl implements UserVmManager, UserVmService, Mana
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, ExecutionException, ConcurrentOperationException, ResourceUnavailableException,
|
public UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, ExecutionException, ConcurrentOperationException, ResourceUnavailableException,
|
||||||
InsufficientCapacityException, ResourceAllocationException {
|
InsufficientCapacityException, ResourceAllocationException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -327,7 +329,7 @@ public class MockUserVmManagerImpl implements UserVmManager, UserVmService, Mana
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserVm createVirtualMachine(DeployVMCmd cmd) throws InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException, StorageUnavailableException,
|
public UserVm createVirtualMachine(DeployVMCmd cmd) throws InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException, StorageUnavailableException,
|
||||||
ResourceAllocationException {
|
ResourceAllocationException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -365,14 +367,26 @@ public class MockUserVmManagerImpl implements UserVmManager, UserVmService, Mana
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserVm moveVMToUser(MoveUserVMCmd moveUserVMCmd) throws ResourceAllocationException, ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
|
public VirtualMachine migrateVirtualMachine(Long vmId, Host destinationHost) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException,
|
||||||
|
VirtualMachineMigrationException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VirtualMachine migrateVirtualMachine(Long vmId, Host destinationHost) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException,
|
public UserVm moveVMToUser(AssignVMCmd moveUserVMCmd) throws ResourceAllocationException, ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
|
||||||
VirtualMachineMigrationException {
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VirtualMachine vmStorageMigration(Long vmId, StoragePool destPool) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserVm restoreVM(RestoreVMCmd cmd) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import com.cloud.network.NetworkVO;
|
|||||||
import com.cloud.offering.ServiceOffering;
|
import com.cloud.offering.ServiceOffering;
|
||||||
import com.cloud.service.ServiceOfferingVO;
|
import com.cloud.service.ServiceOfferingVO;
|
||||||
import com.cloud.storage.DiskOfferingVO;
|
import com.cloud.storage.DiskOfferingVO;
|
||||||
|
import com.cloud.storage.StoragePool;
|
||||||
import com.cloud.storage.VMTemplateVO;
|
import com.cloud.storage.VMTemplateVO;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
import com.cloud.user.User;
|
import com.cloud.user.User;
|
||||||
@ -82,7 +83,7 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> boolean advanceStop(T vm, boolean forced, User caller, Account account) throws ResourceUnavailableException, OperationTimedoutException,
|
public <T extends VMInstanceVO> boolean advanceStop(T vm, boolean forced, User caller, Account account) throws ResourceUnavailableException, OperationTimedoutException,
|
||||||
ConcurrentOperationException {
|
ConcurrentOperationException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -113,7 +114,7 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> T migrate(T vm, long srcHostId, DeployDestination dest) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException,
|
public <T extends VMInstanceVO> T migrate(T vm, long srcHostId, DeployDestination dest) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException,
|
||||||
VirtualMachineMigrationException {
|
VirtualMachineMigrationException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -133,7 +134,7 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> T allocate(T vm, VMTemplateVO template, ServiceOfferingVO serviceOffering, Pair<? extends DiskOfferingVO, Long> rootDiskOffering,
|
public <T extends VMInstanceVO> T allocate(T vm, VMTemplateVO template, ServiceOfferingVO serviceOffering, Pair<? extends DiskOfferingVO, Long> rootDiskOffering,
|
||||||
List<Pair<DiskOfferingVO, Long>> dataDiskOfferings, List<Pair<NetworkVO, NicProfile>> networks, Map<Param, Object> params, DeploymentPlan plan, HypervisorType hyperType, Account owner)
|
List<Pair<DiskOfferingVO, Long>> dataDiskOfferings, List<Pair<NetworkVO, NicProfile>> networks, Map<Param, Object> params, DeploymentPlan plan, HypervisorType hyperType, Account owner)
|
||||||
throws InsufficientCapacityException {
|
throws InsufficientCapacityException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -160,21 +161,21 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> T start(T vm, Map<Param, Object> params, User caller, Account account, DeploymentPlan planToDeploy) throws InsufficientCapacityException,
|
public <T extends VMInstanceVO> T start(T vm, Map<Param, Object> params, User caller, Account account, DeploymentPlan planToDeploy) throws InsufficientCapacityException,
|
||||||
ResourceUnavailableException {
|
ResourceUnavailableException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> T advanceStart(T vm, Map<Param, Object> params, User caller, Account account) throws InsufficientCapacityException, ResourceUnavailableException,
|
public <T extends VMInstanceVO> T advanceStart(T vm, Map<Param, Object> params, User caller, Account account) throws InsufficientCapacityException, ResourceUnavailableException,
|
||||||
ConcurrentOperationException, OperationTimedoutException {
|
ConcurrentOperationException, OperationTimedoutException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> T advanceStart(T vm, Map<Param, Object> params, User caller, Account account, DeploymentPlan planToDeploy) throws InsufficientCapacityException,
|
public <T extends VMInstanceVO> T advanceStart(T vm, Map<Param, Object> params, User caller, Account account, DeploymentPlan planToDeploy) throws InsufficientCapacityException,
|
||||||
ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException {
|
ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -187,7 +188,7 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends VMInstanceVO> T advanceReboot(T vm, Map<Param, Object> params, User caller, Account account) throws InsufficientCapacityException, ResourceUnavailableException,
|
public <T extends VMInstanceVO> T advanceReboot(T vm, Map<Param, Object> params, User caller, Account account) throws InsufficientCapacityException, ResourceUnavailableException,
|
||||||
ConcurrentOperationException, OperationTimedoutException {
|
ConcurrentOperationException, OperationTimedoutException {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -198,10 +199,10 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VMInstanceVO findById(long vmId) {
|
public <T extends VMInstanceVO> T storageMigration(T vm, StoragePool storagePoolId) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,7 @@ public class MockComponentLocator extends ComponentLocator {
|
|||||||
Pair<XmlHandler, HashMap<String, List<ComponentInfo<Adapter>>>> result = new Pair<XmlHandler, HashMap<String, List<ComponentInfo<Adapter>>>>(new XmlHandler("fake"), new HashMap<String, List<ComponentInfo<Adapter>>>());
|
Pair<XmlHandler, HashMap<String, List<ComponentInfo<Adapter>>>> result = new Pair<XmlHandler, HashMap<String, List<ComponentInfo<Adapter>>>>(new XmlHandler("fake"), new HashMap<String, List<ComponentInfo<Adapter>>>());
|
||||||
_daoMap = new LinkedHashMap<String, ComponentInfo<GenericDao<?, ? extends Serializable>>>();
|
_daoMap = new LinkedHashMap<String, ComponentInfo<GenericDao<?, ? extends Serializable>>>();
|
||||||
_managerMap = new LinkedHashMap<String, ComponentInfo<Manager>>();
|
_managerMap = new LinkedHashMap<String, ComponentInfo<Manager>>();
|
||||||
_checkerMap = new HashMap<String, ComponentInfo<SystemIntegrityChecker>>();
|
_checkerMap = new LinkedHashMap<String, ComponentInfo<SystemIntegrityChecker>>();
|
||||||
_adapterMap = new HashMap<String, Adapters<? extends Adapter>>();
|
_adapterMap = new HashMap<String, Adapters<? extends Adapter>>();
|
||||||
_factories = new HashMap<Class<?>, Class<?>>();
|
_factories = new HashMap<Class<?>, Class<?>>();
|
||||||
_daoMap.putAll(_library.getDaos());
|
_daoMap.putAll(_library.getDaos());
|
||||||
@ -86,7 +86,7 @@ public class MockComponentLocator extends ComponentLocator {
|
|||||||
s_callbackFilter = new DatabaseCallbackFilter();
|
s_callbackFilter = new DatabaseCallbackFilter();
|
||||||
s_interceptors.clear();
|
s_interceptors.clear();
|
||||||
if (interceptors != null) {
|
if (interceptors != null) {
|
||||||
resetInterceptors(interceptors);
|
resetInterceptors(interceptors);
|
||||||
}
|
}
|
||||||
s_tl.set(this);
|
s_tl.set(this);
|
||||||
parse("fake file");
|
parse("fake file");
|
||||||
@ -116,7 +116,7 @@ public class MockComponentLocator extends ComponentLocator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, ComponentInfo<PluggableService>> getPluggableServices() {
|
public Map<String, ComponentInfo<PluggableService>> getPluggableServices() {
|
||||||
return _pluggableServices;
|
return _pluggableServices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user