Search in sources :

Example 6 with GroupAnswer

use of com.cloud.agent.api.routing.GroupAnswer in project cloudstack by apache.

the class VirtualRoutingResourceTest method testIpAssocVpcCommand.

@Test
public void testIpAssocVpcCommand() {
    final IpAssocVpcCommand cmd = generateIpAssocVpcCommand();
    _count = 0;
    final Answer answer = _resource.executeRequest(cmd);
    assertTrue(answer instanceof GroupAnswer);
    assertEquals(2, ((GroupAnswer) answer).getResults().length);
    assertTrue(answer.getResult());
}
Also used : GroupAnswer(com.cloud.agent.api.routing.GroupAnswer) Answer(com.cloud.agent.api.Answer) IpAssocVpcCommand(com.cloud.agent.api.routing.IpAssocVpcCommand) GroupAnswer(com.cloud.agent.api.routing.GroupAnswer) Test(org.junit.Test)

Example 7 with GroupAnswer

use of com.cloud.agent.api.routing.GroupAnswer in project cloudstack by apache.

the class VirtualRoutingResourceTest method testSetPortForwardingRulesVpcCommand.

@Test
public void testSetPortForwardingRulesVpcCommand() {
    final SetPortForwardingRulesVpcCommand cmd = generateSetPortForwardingRulesVpcCommand();
    // Reset rule check count
    _count = 0;
    final Answer answer = _resource.executeRequest(cmd);
    assertTrue(answer instanceof GroupAnswer);
    assertEquals(((GroupAnswer) answer).getResults().length, 2);
    assertTrue(answer.getResult());
}
Also used : GroupAnswer(com.cloud.agent.api.routing.GroupAnswer) Answer(com.cloud.agent.api.Answer) SetPortForwardingRulesVpcCommand(com.cloud.agent.api.routing.SetPortForwardingRulesVpcCommand) GroupAnswer(com.cloud.agent.api.routing.GroupAnswer) Test(org.junit.Test)

Aggregations

Answer (com.cloud.agent.api.Answer)7 GroupAnswer (com.cloud.agent.api.routing.GroupAnswer)7 Test (org.junit.Test)4 CheckRouterAnswer (com.cloud.agent.api.CheckRouterAnswer)3 CheckS2SVpnConnectionsAnswer (com.cloud.agent.api.CheckS2SVpnConnectionsAnswer)3 GetDomRVersionAnswer (com.cloud.agent.api.GetDomRVersionAnswer)3 GetRouterAlertsAnswer (com.cloud.agent.api.GetRouterAlertsAnswer)2 GetRouterMonitorResultsAnswer (com.cloud.agent.api.routing.GetRouterMonitorResultsAnswer)2 ExecutionResult (com.cloud.utils.ExecutionResult)2 ArrayList (java.util.ArrayList)2 AgentControlAnswer (com.cloud.agent.api.AgentControlAnswer)1 NetworkUsageAnswer (com.cloud.agent.api.NetworkUsageAnswer)1 IpAssocCommand (com.cloud.agent.api.routing.IpAssocCommand)1 IpAssocVpcCommand (com.cloud.agent.api.routing.IpAssocVpcCommand)1 SetMonitorServiceCommand (com.cloud.agent.api.routing.SetMonitorServiceCommand)1 SetPortForwardingRulesCommand (com.cloud.agent.api.routing.SetPortForwardingRulesCommand)1 SetPortForwardingRulesVpcCommand (com.cloud.agent.api.routing.SetPortForwardingRulesVpcCommand)1 AgentUnavailableException (com.cloud.exception.AgentUnavailableException)1 ConcurrentOperationException (com.cloud.exception.ConcurrentOperationException)1 ConnectionException (com.cloud.exception.ConnectionException)1