Search in sources :

Example 6 with DisassociateMacFromNetworkAnswer

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

the class BrocadeVcsResourceTest method testDisassociateMacFromNetworkApiException.

@Test
public void testDisassociateMacFromNetworkApiException() throws ConfigurationException, BrocadeVcsApiException {
    resource.configure("BrocadeVcsResource", parameters);
    when(api.disassociateMacFromNetwork(NETWORK_ID, MAC_ADDRESS_32)).thenThrow(new BrocadeVcsApiException());
    final DisassociateMacFromNetworkCommand cmd = new DisassociateMacFromNetworkCommand(NETWORK_ID, MAC_ADDRESS_64);
    final DisassociateMacFromNetworkAnswer answer = (DisassociateMacFromNetworkAnswer) resource.executeRequest(cmd);
    assertFalse(answer.getResult());
}
Also used : DisassociateMacFromNetworkCommand(com.cloud.agent.api.DisassociateMacFromNetworkCommand) BrocadeVcsApiException(com.cloud.network.brocade.BrocadeVcsApiException) DisassociateMacFromNetworkAnswer(com.cloud.agent.api.DisassociateMacFromNetworkAnswer) Test(org.junit.Test)

Aggregations

DisassociateMacFromNetworkAnswer (com.cloud.agent.api.DisassociateMacFromNetworkAnswer)6 Test (org.junit.Test)4 DisassociateMacFromNetworkCommand (com.cloud.agent.api.DisassociateMacFromNetworkCommand)3 HostVO (com.cloud.host.HostVO)3 BrocadeVcsDeviceVO (com.cloud.network.BrocadeVcsDeviceVO)3 BrocadeVcsApiException (com.cloud.network.brocade.BrocadeVcsApiException)2 NetworkVO (com.cloud.network.dao.NetworkVO)2 PhysicalNetworkVO (com.cloud.network.dao.PhysicalNetworkVO)2 NicProfile (com.cloud.vm.NicProfile)2 VirtualMachineProfile (com.cloud.vm.VirtualMachineProfile)2 ArrayList (java.util.ArrayList)1