Search in sources :

Example 1 with CheckConsoleProxyLoadCommand

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

the class NotAValidCommand method testCheckConsoleProxyLoadCommand.

@Test
public void testCheckConsoleProxyLoadCommand() {
    final CheckConsoleProxyLoadCommand consoleProxyCommand = new CheckConsoleProxyLoadCommand();
    final CitrixRequestWrapper wrapper = CitrixRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(consoleProxyCommand, 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) CheckConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.CheckConsoleProxyLoadCommand) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 2 with CheckConsoleProxyLoadCommand

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

the class LibvirtComputingResourceTest method testCheckConsoleProxyLoadCommand.

@Test
public void testCheckConsoleProxyLoadCommand() {
    final long proxyVmId = 0l;
    final String proxyVmName = "host";
    final String proxyManagementIp = "127.0.0.1";
    final int proxyCmdPort = 0;
    final CheckConsoleProxyLoadCommand command = new CheckConsoleProxyLoadCommand(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) CheckConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.CheckConsoleProxyLoadCommand) Test(org.junit.Test)

Example 3 with CheckConsoleProxyLoadCommand

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

the class LibvirtCheckConsoleProxyLoadCommandWrapper method execute.

@Override
public Answer execute(final Command command, final AgentResource agentResource) {
    final CheckConsoleProxyLoadCommand cmd = (CheckConsoleProxyLoadCommand) 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 : CheckConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.CheckConsoleProxyLoadCommand)

Example 4 with CheckConsoleProxyLoadCommand

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

the class CitrixCheckConsoleProxyLoadCommandWrapper method execute.

@Override
public Answer execute(final Command command, final ServerResource serverResource) {
    final CheckConsoleProxyLoadCommand cmd = (CheckConsoleProxyLoadCommand) 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 : CheckConsoleProxyLoadCommand(com.cloud.legacymodel.communication.command.CheckConsoleProxyLoadCommand)

Aggregations

CheckConsoleProxyLoadCommand (com.cloud.legacymodel.communication.command.CheckConsoleProxyLoadCommand)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