Examples of UpdateLogicalSwitchPortCommand


Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

            if (answer.getResult()) {
                s_logger.warn("Existing Logical Switchport found for nic "
                        + nic.getName() + " with uuid "
                        + existingNicMap.getLogicalSwitchPortUuid());
                UpdateLogicalSwitchPortCommand cmd = new UpdateLogicalSwitchPortCommand(
                        existingNicMap.getLogicalSwitchPortUuid(), network
                        .getBroadcastUri().getSchemeSpecificPart(),
                        nicVO.getUuid(), context.getDomain().getName() + "-"
                                + context.getAccount().getAccountName(),
                                nic.getName());
View Full Code Here

Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

  public void testUpdateLogicalSwitchPortException() throws ConfigurationException, NiciraNvpApiException {
    _resource.configure("NiciraNvpResource", _parameters);
   
    doThrow(new NiciraNvpApiException()).when(_nvpApi).modifyLogicalSwitchPortAttachment((String) any(), (String) any(), (Attachment) any());
    UpdateLogicalSwitchPortAnswer dlspa = (UpdateLogicalSwitchPortAnswer) _resource.executeRequest(
        new UpdateLogicalSwitchPortCommand("aaaa","bbbb","cccc","owner","nicname"));
    assertFalse(dlspa.getResult());
  }
View Full Code Here

Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

    public void testUpdateLogicalSwitchPortException() throws ConfigurationException, NiciraNvpApiException {
        resource.configure("NiciraNvpResource", parameters);

        doThrow(new NiciraNvpApiException()).when(nvpApi).updateLogicalSwitchPortAttachment((String)any(), (String)any(), (Attachment)any());
        final UpdateLogicalSwitchPortAnswer dlspa =
            (UpdateLogicalSwitchPortAnswer)resource.executeRequest(new UpdateLogicalSwitchPortCommand("aaaa", "bbbb", "cccc", "owner", "nicname"));
        assertFalse(dlspa.getResult());
    }
View Full Code Here

Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

            FindLogicalSwitchPortCommand findCmd = new FindLogicalSwitchPortCommand(existingNicMap.getLogicalSwitchUuid(), existingNicMap.getLogicalSwitchPortUuid());
            FindLogicalSwitchPortAnswer answer = (FindLogicalSwitchPortAnswer)agentMgr.easySend(niciraNvpHost.getId(), findCmd);

            if (answer.getResult()) {
                s_logger.warn("Existing Logical Switchport found for nic " + nic.getName() + " with uuid " + existingNicMap.getLogicalSwitchPortUuid());
                UpdateLogicalSwitchPortCommand cmd =
                        new UpdateLogicalSwitchPortCommand(existingNicMap.getLogicalSwitchPortUuid(), BroadcastDomainType.getValue(network.getBroadcastUri()),
                                nicVO.getUuid(), context.getDomain().getName() + "-" + context.getAccount().getAccountName(), nic.getName());
                agentMgr.easySend(niciraNvpHost.getId(), cmd);
                return true;
            } else {
                s_logger.error("Stale entry found for nic " + nic.getName() + " with logical switchport uuid " + existingNicMap.getLogicalSwitchPortUuid());
View Full Code Here

Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

                existingNicMap.getLogicalSwitchPortUuid());
            FindLogicalSwitchPortAnswer answer = (FindLogicalSwitchPortAnswer) _agentMgr.easySend(niciraNvpHost.getId(), findCmd);
           
            if (answer.getResult()) {
              s_logger.warn("Existing Logical Switchport found for nic " + nic.getName() + " with uuid " + existingNicMap.getLogicalSwitchPortUuid());
              UpdateLogicalSwitchPortCommand cmd = new UpdateLogicalSwitchPortCommand(existingNicMap.getLogicalSwitchPortUuid(),
                  network.getBroadcastUri().getSchemeSpecificPart(), nicVO.getUuid(),
                      context.getDomain().getName() + "-" + context.getAccount().getAccountName(), nic.getName());
              _agentMgr.easySend(niciraNvpHost.getId(), cmd);
              return true;
            }
View Full Code Here

Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

            if (answer.getResult()) {
                s_logger.warn("Existing Logical Switchport found for nic "
                        + nic.getName() + " with uuid "
                        + existingNicMap.getLogicalSwitchPortUuid());
                UpdateLogicalSwitchPortCommand cmd = new UpdateLogicalSwitchPortCommand(
                        existingNicMap.getLogicalSwitchPortUuid(),
                        BroadcastDomainType.getValue(network.getBroadcastUri()),
                        nicVO.getUuid(), context.getDomain().getName() + "-"
                                + context.getAccount().getAccountName(),
                                nic.getName());
View Full Code Here

Examples of com.cloud.agent.api.UpdateLogicalSwitchPortCommand

    public void testUpdateLogicalSwitchPortException() throws ConfigurationException, NiciraNvpApiException {
        _resource.configure("NiciraNvpResource", _parameters);

        doThrow(new NiciraNvpApiException()).when(_nvpApi).modifyLogicalSwitchPortAttachment((String) any(), (String) any(), (Attachment) any());
        UpdateLogicalSwitchPortAnswer dlspa = (UpdateLogicalSwitchPortAnswer) _resource.executeRequest(
                new UpdateLogicalSwitchPortCommand("aaaa","bbbb","cccc","owner","nicname"));
        assertFalse(dlspa.getResult());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.