Examples of AddHypervisorAnswer


Examples of org.apache.cloudstack.network.opendaylight.agent.responses.AddHypervisorAnswer

            NeutronNodesList<NeutronNodeWrapper> nodes = nodeActions.listAllNodes();
            if (nodes.getNodes() != null) {
                for (NeutronNodeWrapper nodeWrapper : nodes.getNodes()) {
                    NeutronNode node = nodeWrapper.getNode();
                    if (node.getId().equals(cmd.getHostId())) {
                        return new AddHypervisorAnswer(cmd, true, "Hypervisor already connected");
                    }
                }
            }

            // Not found in the existing node list, add it
            nodeActions.updateNeutronNodeV2("OVS", cmd.getHostId(), cmd.getIpAddress(), 6640);
        } catch (NeutronRestApiException e) {
            s_logger.error("Call to OpenDaylight failed", e);
            return new AddHypervisorAnswer(cmd, e);
        }
        return new AddHypervisorAnswer(cmd, true, "Hypervisor " + cmd.getHostId() + " added");
    }
View Full Code Here

Examples of org.apache.cloudstack.network.opendaylight.agent.responses.AddHypervisorAnswer

            throw new InsufficientVirtualNetworkCapcityException("No OpenDaylight Controller configured for this network", dest.getPod().getId());
        }
        OpenDaylightControllerVO controller = devices.get(0);

        AddHypervisorCommand addCmd = new AddHypervisorCommand(dest.getHost().getUuid(), dest.getHost().getPrivateIpAddress());
        AddHypervisorAnswer addAnswer = (AddHypervisorAnswer)agentManager.easySend(controller.getHostId(), addCmd);
        if (addAnswer == null || !addAnswer.getResult()) {
            s_logger.error("Failed to add " + dest.getHost().getName() + " as a node to the controller");
            throw new InsufficientVirtualNetworkCapcityException("Failed to add destination hypervisor to the OpenDaylight Controller", dest.getPod().getId());
        }

        ConfigurePortCommand cmd = new ConfigurePortCommand(UUID.fromString(nic.getUuid()), UUID.fromString(BroadcastDomainType.getValue(network.getBroadcastUri())), context
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.