Search in sources :

Example 1 with WatchConsoleProxyLoadCommand

use of com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand in project cosmic by MissionCriticalCloud.

the class LibvirtComputingResourceTest method testWatchConsoleProxyLoadCommand.

@Test
public void testWatchConsoleProxyLoadCommand() {
    final int interval = 0;
    final long proxyVmId = 0l;
    final String proxyVmName = "host";
    final String proxyManagementIp = "127.0.0.1";
    final int proxyCmdPort = 0;
    final WatchConsoleProxyLoadCommand command = new WatchConsoleProxyLoadCommand(interval, proxyVmId, proxyVmName, proxyManagementIp, proxyCmdPort);
    final LibvirtRequestWrapper wrapper = LibvirtRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(command, this.libvirtComputingResource);
    assertFalse(answer.getResult());
}
Also used : Answer(com.cloud.legacymodel.communication.answer.Answer) CheckRouterAnswer(com.cloud.legacymodel.communication.answer.CheckRouterAnswer) AttachAnswer(com.cloud.legacymodel.communication.answer.AttachAnswer) LibvirtRequestWrapper(com.cloud.agent.resource.kvm.wrapper.LibvirtRequestWrapper) WatchConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand) Test(org.junit.Test)

Example 2 with WatchConsoleProxyLoadCommand

use of com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand in project cosmic by MissionCriticalCloud.

the class NotAValidCommand method testWatchConsoleProxyLoadCommand.

@Test
public void testWatchConsoleProxyLoadCommand() {
    final WatchConsoleProxyLoadCommand watchConsoleProxyCommand = new WatchConsoleProxyLoadCommand(0, 0, "", "", 0);
    final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(watchConsoleProxyCommand, this.citrixResourceBase);
    assertFalse(answer.getResult());
}
Also used : RebootAnswer(com.cloud.legacymodel.communication.answer.RebootAnswer) Answer(com.cloud.legacymodel.communication.answer.Answer) CreateAnswer(com.cloud.legacymodel.communication.answer.CreateAnswer) AttachAnswer(com.cloud.legacymodel.communication.answer.AttachAnswer) WatchConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 3 with WatchConsoleProxyLoadCommand

use of com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand in project cosmic by MissionCriticalCloud.

the class LibvirtWatchConsoleProxyLoadCommandWrapper method execute.

@Override
public Answer execute(final Command command, final AgentResource serverResource) {
    final WatchConsoleProxyLoadCommand cmd = (WatchConsoleProxyLoadCommand) command;
    final long proxyVmId = cmd.getProxyVmId();
    final String proxyVmName = cmd.getProxyVmName();
    final String proxyManagementIp = cmd.getProxyManagementIp();
    final int proxyCmdPort = cmd.getProxyCmdPort();
    return executeProxyLoadScan(cmd, proxyVmId, proxyVmName, proxyManagementIp, proxyCmdPort);
}
Also used : WatchConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand)

Example 4 with WatchConsoleProxyLoadCommand

use of com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand in project cosmic by MissionCriticalCloud.

the class CitrixWatchConsoleProxyLoadCommandWrapper method execute.

@Override
public Answer execute(final Command command, final ServerResource serverResource) {
    final WatchConsoleProxyLoadCommand cmd = (WatchConsoleProxyLoadCommand) command;
    final long proxyVmId = cmd.getProxyVmId();
    final String proxyVmName = cmd.getProxyVmName();
    final String proxyManagementIp = cmd.getProxyManagementIp();
    final int cmdPort = cmd.getProxyCmdPort();
    return executeProxyLoadScan(command, proxyVmId, proxyVmName, proxyManagementIp, cmdPort);
}
Also used : WatchConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand)

Aggregations

WatchConsoleProxyLoadCommand (com.cloud.legacymodel.communication.command.WatchConsoleProxyLoadCommand)4 Answer (com.cloud.legacymodel.communication.answer.Answer)2 AttachAnswer (com.cloud.legacymodel.communication.answer.AttachAnswer)2 Test (org.junit.Test)2 LibvirtRequestWrapper (com.cloud.agent.resource.kvm.wrapper.LibvirtRequestWrapper)1 CheckRouterAnswer (com.cloud.legacymodel.communication.answer.CheckRouterAnswer)1 CreateAnswer (com.cloud.legacymodel.communication.answer.CreateAnswer)1 RebootAnswer (com.cloud.legacymodel.communication.answer.RebootAnswer)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1