Search in sources :

Example 6 with ReadyCommand

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

the class NiciraNvpRequestWrapperTest method testReadyCommandWrapper.

@Test
public void testReadyCommandWrapper() {
    final ReadyCommand command = new ReadyCommand();
    final NiciraNvpRequestWrapper wrapper = NiciraNvpRequestWrapper.getInstance();
    assertNotNull(wrapper);
    final Answer answer = wrapper.execute(command, niciraNvpResource);
    assertTrue(answer.getResult());
}
Also used : Answer(com.cloud.legacymodel.communication.answer.Answer) ReadyCommand(com.cloud.legacymodel.communication.command.ReadyCommand) Test(org.junit.Test)

Example 7 with ReadyCommand

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

the class NotAValidCommand method testReadyCommand.

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

Aggregations

ReadyCommand (com.cloud.legacymodel.communication.command.ReadyCommand)7 Answer (com.cloud.legacymodel.communication.answer.Answer)5 CloudRuntimeException (com.cloud.legacymodel.exceptions.CloudRuntimeException)3 ClosedChannelException (java.nio.channels.ClosedChannelException)3 Test (org.junit.Test)3 HostVO (com.cloud.host.HostVO)2 AgentControlAnswer (com.cloud.legacymodel.communication.answer.AgentControlAnswer)2 AttachAnswer (com.cloud.legacymodel.communication.answer.AttachAnswer)2 StartupAnswer (com.cloud.legacymodel.communication.answer.StartupAnswer)2 AgentUnavailableException (com.cloud.legacymodel.exceptions.AgentUnavailableException)2 ConnectionException (com.cloud.legacymodel.exceptions.ConnectionException)2 HypervisorVersionChangedException (com.cloud.legacymodel.exceptions.HypervisorVersionChangedException)2 NioConnectionException (com.cloud.legacymodel.exceptions.NioConnectionException)2 NoTransitionException (com.cloud.legacymodel.exceptions.NoTransitionException)2 OperationTimedoutException (com.cloud.legacymodel.exceptions.OperationTimedoutException)2 TaskExecutionException (com.cloud.legacymodel.exceptions.TaskExecutionException)2 UnsupportedVersionException (com.cloud.legacymodel.exceptions.UnsupportedVersionException)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 ConfigurationException (javax.naming.ConfigurationException)2 Listener (com.cloud.agent.Listener)1