mirror of https://github.com/apache/cloudstack.git
Remove sendToSecStorage methods from agentManager to use EndPoint
instead.
This commit is contained in:
parent
0a976d5fd5
commit
5b76e4914c
|
|
@ -175,18 +175,6 @@ public class DirectAgentManagerSimpleImpl extends ManagerBase implements AgentMa
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendToSecStorage(HostVO ssHost, Command cmd, Listener listener) throws AgentUnavailableException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Answer sendToSecStorage(HostVO ssHost, Command cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean tapLoadingAgents(Long hostId, TapAgentsAction action) {
|
||||
|
|
|
|||
|
|
@ -137,10 +137,6 @@ public interface AgentManager extends Manager {
|
|||
|
||||
Answer sendTo(Long dcId, HypervisorType type, Command cmd);
|
||||
|
||||
void sendToSecStorage(HostVO ssHost, Command cmd, Listener listener) throws AgentUnavailableException;
|
||||
|
||||
Answer sendToSecStorage(HostVO ssHost, Command cmd);
|
||||
|
||||
|
||||
/* working as a lock while agent is being loaded */
|
||||
public boolean tapLoadingAgents(Long hostId, TapAgentsAction action);
|
||||
|
|
|
|||
|
|
@ -377,32 +377,6 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Answer sendToSecStorage(HostVO ssHost, Command cmd) {
|
||||
if( ssHost.getType() == Host.Type.LocalSecondaryStorage ) {
|
||||
return easySend(ssHost.getId(), cmd);
|
||||
} else if ( ssHost.getType() == Host.Type.SecondaryStorage) {
|
||||
return sendToSSVM(ssHost.getDataCenterId(), cmd);
|
||||
} else {
|
||||
String msg = "do not support Secondary Storage type " + ssHost.getType();
|
||||
s_logger.warn(msg);
|
||||
return new Answer(cmd, false, msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendToSecStorage(HostVO ssHost, Command cmd, Listener listener) throws AgentUnavailableException {
|
||||
if( ssHost.getType() == Host.Type.LocalSecondaryStorage ) {
|
||||
send(ssHost.getId(), new Commands(cmd), listener);
|
||||
} else if ( ssHost.getType() == Host.Type.SecondaryStorage) {
|
||||
sendToSSVM(ssHost.getDataCenterId(), cmd, listener);
|
||||
} else {
|
||||
String err = "do not support Secondary Storage type " + ssHost.getType();
|
||||
s_logger.warn(err);
|
||||
throw new CloudRuntimeException(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendToSSVM(final long dcId, final Command cmd, final Listener listener) throws AgentUnavailableException {
|
||||
List<HostVO> ssAHosts = _ssvmMgr.listUpAndConnectingSecondaryStorageVmHost(dcId);
|
||||
|
|
|
|||
|
|
@ -131,16 +131,6 @@ public class MockAgentManagerImpl extends ManagerBase implements AgentManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendToSecStorage(HostVO ssHost, Command cmd, Listener listener) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Answer sendToSecStorage(HostVO ssHost, Command cmd) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean tapLoadingAgents(Long hostId, TapAgentsAction action) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue