Search in sources :

Example 6 with DeleteLogicalSwitchPortCommand

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

the class NiciraNvpResourceTest method testDeleteLogicalSwitchPortException.

@Test
public void testDeleteLogicalSwitchPortException() throws ConfigurationException, NiciraNvpApiException {
    resource.configure("NiciraNvpResource", parameters);
    doThrow(new NiciraNvpApiException()).when(nvpApi).deleteLogicalSwitchPort((String) any(), (String) any());
    final DeleteLogicalSwitchPortAnswer dlspa = (DeleteLogicalSwitchPortAnswer) resource.executeRequest(new DeleteLogicalSwitchPortCommand("aaaa", "bbbb"));
    assertFalse(dlspa.getResult());
}
Also used : DeleteLogicalSwitchPortCommand(com.cloud.agent.api.DeleteLogicalSwitchPortCommand) DeleteLogicalSwitchPortAnswer(com.cloud.agent.api.DeleteLogicalSwitchPortAnswer) NiciraNvpApiException(com.cloud.network.nicira.NiciraNvpApiException) Test(org.junit.Test)

Aggregations

DeleteLogicalSwitchPortCommand (com.cloud.agent.api.DeleteLogicalSwitchPortCommand)6 DeleteLogicalSwitchPortAnswer (com.cloud.agent.api.DeleteLogicalSwitchPortAnswer)4 NiciraNvpApiException (com.cloud.network.nicira.NiciraNvpApiException)4 Test (org.junit.Test)4 Answer (com.cloud.agent.api.Answer)2 HostVO (com.cloud.host.HostVO)2 NiciraNvpDeviceVO (com.cloud.network.NiciraNvpDeviceVO)2 NiciraNvpNicMappingVO (com.cloud.network.NiciraNvpNicMappingVO)2 NiciraNvpApi (com.cloud.network.nicira.NiciraNvpApi)2 NicVO (com.cloud.vm.NicVO)2