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;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
@ -12,24 +10,13 @@ import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.StartupCommand;
|
||||
import com.cloud.agent.manager.AgentAttache;
|
||||
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.ConnectionException;
|
||||
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.Status.Event;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
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 })
|
||||
public class MockAgentManagerImpl implements AgentManager {
|
||||
@ -175,4 +162,10 @@ public class MockAgentManagerImpl implements AgentManager {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Answer sendToSSVM(Long dcId, Command cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -708,4 +708,10 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
||||
// TODO Auto-generated method stub
|
||||
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 })
|
||||
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
|
||||
public boolean deleteUserAccount(long accountId) {
|
||||
// TODO Auto-generated method stub
|
||||
@ -255,11 +249,6 @@ public class MockAccountManagerImpl implements Manager, AccountManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Account createAccount(String accountName, short accountType, Long domainId, String networkDomain) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] createApiKeyAndSecretKey(RegisterCmd cmd) {
|
||||
return null;
|
||||
@ -270,4 +259,17 @@ public class MockAccountManagerImpl implements Manager, AccountManager {
|
||||
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.VmStatsEntry;
|
||||
import com.cloud.agent.manager.Commands;
|
||||
import com.cloud.api.commands.AssignVMCmd;
|
||||
import com.cloud.api.commands.AttachVolumeCmd;
|
||||
import com.cloud.api.commands.CreateTemplateCmd;
|
||||
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.DetachVolumeCmd;
|
||||
import com.cloud.api.commands.ListVMsCmd;
|
||||
import com.cloud.api.commands.MoveUserVMCmd;
|
||||
import com.cloud.api.commands.RebootVMCmd;
|
||||
import com.cloud.api.commands.RecoverVMCmd;
|
||||
import com.cloud.api.commands.ResetVMPasswordCmd;
|
||||
import com.cloud.api.commands.RestoreVMCmd;
|
||||
import com.cloud.api.commands.StartVMCmd;
|
||||
import com.cloud.api.commands.UpdateVMCmd;
|
||||
import com.cloud.api.commands.UpgradeVMCmd;
|
||||
@ -38,6 +39,7 @@ import com.cloud.host.Host;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.server.Criteria;
|
||||
import com.cloud.storage.StoragePool;
|
||||
import com.cloud.storage.Volume;
|
||||
import com.cloud.template.VirtualMachineTemplate;
|
||||
import com.cloud.user.Account;
|
||||
@ -364,12 +366,6 @@ public class MockUserVmManagerImpl implements UserVmManager, UserVmService, Mana
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserVm moveVMToUser(MoveUserVMCmd moveUserVMCmd) throws ResourceAllocationException, ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VirtualMachine migrateVirtualMachine(Long vmId, Host destinationHost) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException,
|
||||
VirtualMachineMigrationException {
|
||||
@ -377,4 +373,22 @@ public class MockUserVmManagerImpl implements UserVmManager, UserVmService, Mana
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserVm moveVMToUser(AssignVMCmd moveUserVMCmd) throws ResourceAllocationException, ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
|
||||
// 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
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import com.cloud.network.NetworkVO;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.storage.DiskOfferingVO;
|
||||
import com.cloud.storage.StoragePool;
|
||||
import com.cloud.storage.VMTemplateVO;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.User;
|
||||
@ -199,7 +200,7 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public VMInstanceVO findById(long vmId) {
|
||||
public <T extends VMInstanceVO> T storageMigration(T vm, StoragePool storagePoolId) {
|
||||
// TODO Auto-generated method stub
|
||||
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>>>());
|
||||
_daoMap = new LinkedHashMap<String, ComponentInfo<GenericDao<?, ? extends Serializable>>>();
|
||||
_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>>();
|
||||
_factories = new HashMap<Class<?>, Class<?>>();
|
||||
_daoMap.putAll(_library.getDaos());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user