mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
removed unused method
This commit is contained in:
parent
c162c617c2
commit
e153ab461c
@ -27,7 +27,6 @@ import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.api.AgentControlAnswer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.ConsoleAccessAuthenticationAnswer;
|
||||
import com.cloud.agent.api.ConsoleAccessAuthenticationCommand;
|
||||
import com.cloud.agent.api.ConsoleProxyLoadReportCommand;
|
||||
@ -36,7 +35,6 @@ import com.cloud.agent.api.GetVncPortCommand;
|
||||
import com.cloud.agent.api.StartupCommand;
|
||||
import com.cloud.agent.api.StartupProxyCommand;
|
||||
import com.cloud.agent.api.StopAnswer;
|
||||
import com.cloud.agent.api.StopCommand;
|
||||
import com.cloud.agent.manager.Commands;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
@ -274,11 +272,6 @@ public class AgentBasedConsoleProxyManager implements ConsoleProxyManager, Virtu
|
||||
return _name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Command cleanup(ConsoleProxyVO vm, String vmName) {
|
||||
return new StopCommand(vm, vmName, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long convertToId(String vmName) {
|
||||
if (!VirtualMachineName.isValidConsoleProxyName(vmName, _instance)) {
|
||||
|
||||
@ -38,7 +38,6 @@ import org.apache.log4j.Logger;
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.api.AgentControlAnswer;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.ConsoleAccessAuthenticationAnswer;
|
||||
import com.cloud.agent.api.ConsoleAccessAuthenticationCommand;
|
||||
import com.cloud.agent.api.ConsoleProxyLoadReportCommand;
|
||||
@ -46,7 +45,6 @@ import com.cloud.agent.api.RebootCommand;
|
||||
import com.cloud.agent.api.StartupCommand;
|
||||
import com.cloud.agent.api.StartupProxyCommand;
|
||||
import com.cloud.agent.api.StopAnswer;
|
||||
import com.cloud.agent.api.StopCommand;
|
||||
import com.cloud.agent.api.check.CheckSshAnswer;
|
||||
import com.cloud.agent.api.check.CheckSshCommand;
|
||||
import com.cloud.agent.api.proxy.ConsoleProxyLoadAnswer;
|
||||
@ -1145,18 +1143,6 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Command cleanup(ConsoleProxyVO vm, String vmName) {
|
||||
if (vmName != null) {
|
||||
return new StopCommand(vm, vmName, VirtualMachineName.getVnet(vmName));
|
||||
} else if (vm != null) {
|
||||
ConsoleProxyVO vo = vm;
|
||||
return new StopCommand(vo, null);
|
||||
} else {
|
||||
throw new CloudRuntimeException("Shouldn't even be here!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long convertToId(String vmName) {
|
||||
if (!VirtualMachineName.isValidConsoleProxyName(vmName, _instance)) {
|
||||
|
||||
@ -35,13 +35,11 @@ import org.apache.log4j.Logger;
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.AgentManager.OnError;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.ModifySshKeysCommand;
|
||||
import com.cloud.agent.api.NetworkUsageAnswer;
|
||||
import com.cloud.agent.api.NetworkUsageCommand;
|
||||
import com.cloud.agent.api.RebootAnswer;
|
||||
import com.cloud.agent.api.StopAnswer;
|
||||
import com.cloud.agent.api.StopCommand;
|
||||
import com.cloud.agent.api.check.CheckSshAnswer;
|
||||
import com.cloud.agent.api.check.CheckSshCommand;
|
||||
import com.cloud.agent.api.routing.DhcpEntryCommand;
|
||||
@ -113,8 +111,6 @@ import com.cloud.network.dao.VpnUserDao;
|
||||
import com.cloud.network.lb.LoadBalancingRule;
|
||||
import com.cloud.network.lb.LoadBalancingRule.LbDestination;
|
||||
import com.cloud.network.lb.LoadBalancingRulesManager;
|
||||
import com.cloud.network.ovs.OvsNetworkManager;
|
||||
import com.cloud.network.ovs.OvsTunnelManager;
|
||||
import com.cloud.network.router.VirtualRouter.Role;
|
||||
import com.cloud.network.rules.FirewallRule;
|
||||
import com.cloud.network.rules.PortForwardingRule;
|
||||
@ -618,18 +614,6 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
protected VirtualNetworkApplianceManagerImpl() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Command cleanup(final DomainRouterVO vm, final String vmName) {
|
||||
if (vmName != null) {
|
||||
return new StopCommand(vm, vmName, VirtualMachineName.getVnet(vmName));
|
||||
} else if (vm != null) {
|
||||
final DomainRouterVO vo = vm;
|
||||
return new StopCommand(vo, null);
|
||||
} else {
|
||||
throw new CloudRuntimeException("Shouldn't even be here!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long convertToId(final String vmName) {
|
||||
if (!VirtualMachineName.isValidRouterName(vmName, _instance)) {
|
||||
|
||||
@ -34,13 +34,11 @@ import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.RebootCommand;
|
||||
import com.cloud.agent.api.SecStorageFirewallCfgCommand;
|
||||
import com.cloud.agent.api.SecStorageSetupCommand;
|
||||
import com.cloud.agent.api.StartupCommand;
|
||||
import com.cloud.agent.api.StopAnswer;
|
||||
import com.cloud.agent.api.StopCommand;
|
||||
import com.cloud.agent.api.check.CheckSshAnswer;
|
||||
import com.cloud.agent.api.check.CheckSshCommand;
|
||||
import com.cloud.agent.manager.Commands;
|
||||
@ -797,18 +795,6 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
protected SecondaryStorageManagerImpl() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Command cleanup(SecondaryStorageVmVO vm, String vmName) {
|
||||
if (vmName != null) {
|
||||
return new StopCommand(vm, vmName, VirtualMachineName.getVnet(vmName));
|
||||
} else if (vm != null) {
|
||||
SecondaryStorageVmVO vo = vm;
|
||||
return new StopCommand(vo, null);
|
||||
} else {
|
||||
throw new CloudRuntimeException("Shouldn't even be here!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long convertToId(String vmName) {
|
||||
if (!VirtualMachineName.isValidSystemVmName(vmName, _instance, "s")) {
|
||||
|
||||
@ -38,14 +38,12 @@ import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.AttachIsoCommand;
|
||||
import com.cloud.agent.api.AttachVolumeAnswer;
|
||||
import com.cloud.agent.api.AttachVolumeCommand;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.CreatePrivateTemplateFromSnapshotCommand;
|
||||
import com.cloud.agent.api.CreatePrivateTemplateFromVolumeCommand;
|
||||
import com.cloud.agent.api.GetVmStatsAnswer;
|
||||
import com.cloud.agent.api.GetVmStatsCommand;
|
||||
import com.cloud.agent.api.SnapshotCommand;
|
||||
import com.cloud.agent.api.StopAnswer;
|
||||
import com.cloud.agent.api.StopCommand;
|
||||
import com.cloud.agent.api.VmStatsEntry;
|
||||
import com.cloud.agent.api.storage.CreatePrivateTemplateAnswer;
|
||||
import com.cloud.agent.api.to.VolumeTO;
|
||||
@ -1094,17 +1092,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
||||
protected UserVmManagerImpl() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Command cleanup(UserVmVO vm, String vmName) {
|
||||
if (vmName != null) {
|
||||
return new StopCommand(vm, vmName, VirtualMachineName.getVnet(vmName));
|
||||
} else if (vm != null) {
|
||||
return new StopCommand(vm, null);
|
||||
} else {
|
||||
throw new CloudRuntimeException("Shouldn't even be here!");
|
||||
}
|
||||
}
|
||||
|
||||
public String getRandomPrivateTemplateName() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
*/
|
||||
package com.cloud.vm;
|
||||
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.StopAnswer;
|
||||
import com.cloud.agent.manager.Commands;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
@ -72,14 +71,4 @@ public interface VirtualMachineGuru<T extends VirtualMachine> {
|
||||
* @return id if the handler works for this vm and can parse id. null if not.
|
||||
*/
|
||||
Long convertToId(String vmName);
|
||||
|
||||
/**
|
||||
* Produce a cleanup command to be sent to the agent to cleanup anything
|
||||
* out of the ordinary.
|
||||
* @param vm vm to cleanup. It's possible this is null.
|
||||
* @param vmName name of the vm from the agent.
|
||||
* @return Command to clean it up. If not cleanup is needed, then return null.
|
||||
*/
|
||||
Command cleanup(T vm, String vmName);
|
||||
|
||||
}
|
||||
|
||||
@ -1041,7 +1041,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, StateLi
|
||||
|
||||
stateTransitTo(vm, Event.MigrationFailedOnSource, srcHostId);
|
||||
|
||||
Command cleanup = vmGuru.cleanup(vm, null);
|
||||
Command cleanup = cleanup(vm.getInstanceName());
|
||||
_agentMgr.easySend(dstHostId, cleanup);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user