Package com.cloud.agent.api

Examples of com.cloud.agent.api.CreateLogicalSwitchPortCommand


        LogicalSwitchPort lsp = mock(LogicalSwitchPort.class);
        when(lsp.getUuid()).thenReturn("eeee");
        when(_nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort) any())).thenThrow(new NiciraNvpApiException());

        CreateLogicalSwitchPortCommand clspc = new CreateLogicalSwitchPortCommand("cccc", "dddd", "owner", "nicname");
        CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer) _resource.executeRequest(clspc);
        assertFalse(clspa.getResult());
    }
View Full Code Here


        when(lsp.getUuid()).thenReturn("eeee");
        when(_nvpApi.createLogicalSwitchPort(eq("cccc"), (LogicalSwitchPort) any())).thenReturn(lsp);
        doThrow(new NiciraNvpApiException()).when(_nvpApi).modifyLogicalSwitchPortAttachment((String)any(), (String)any(), (Attachment)any());


        CreateLogicalSwitchPortCommand clspc = new CreateLogicalSwitchPortCommand("cccc", "dddd", "owner", "nicname");
        CreateLogicalSwitchPortAnswer clspa = (CreateLogicalSwitchPortAnswer) _resource.executeRequest(clspc);
        assertFalse(clspa.getResult());
        verify(_nvpApi, atLeastOnce()).deleteLogicalSwitchPort((String) any()(String) any());
    }
View Full Code Here

                        + existingNicMap.getLogicalSwitchPortUuid());
                _niciraNvpNicMappingDao.remove(existingNicMap.getId());
            }
        }

        CreateLogicalSwitchPortCommand cmd = new CreateLogicalSwitchPortCommand(
                BroadcastDomainType.getValue(network.getBroadcastUri()),
                nicVO.getUuid(), context.getDomain().getName() + "-"
                        + context.getAccount().getAccountName(), nic.getName());
        CreateLogicalSwitchPortAnswer answer = (CreateLogicalSwitchPortAnswer)_agentMgr
                .easySend(niciraNvpHost.getId(), cmd);
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.CreateLogicalSwitchPortCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.