@Test public void testGetNode() { NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setKey(new NodeKey(new NodeId("nodeId"))); TerminationPointBuilder tpBuilder = new TerminationPointBuilder(); tpBuilder.setKey(new TerminationPointKey(new TpId("tpId"))); OvsdbBridgeAugmentationBuilder augmentationBuilder = new OvsdbBridgeAugmentationBuilder(); augmentationBuilder.setBridgeName(new OvsdbBridgeName("bridgeName")); Node node = OvsdbHelper.getNode(nodeBuilder.build(), Collections.singletonList(tpBuilder.build()), augmentationBuilder.build()); assertNotNull(node); assertEquals("nodeId", node.getKey().getNodeId().getValue()); assertEquals(1, node.getTerminationPoint().size()); TerminationPoint terminationPoint = node.getTerminationPoint().get(0); assertNotNull(terminationPoint); assertEquals("tpId", terminationPoint.getKey().getTpId().getValue()); assertEquals("bridgeName", node.getAugmentation(OvsdbBridgeAugmentation.class).getBridgeName().getValue()); }
public static Node getNode(Node node, List<TerminationPoint> tps, OvsdbBridgeAugmentation ovsdbBridgeAugmentation) { NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setKey(node.getKey()); nodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, ovsdbBridgeAugmentation); nodeBuilder.setTerminationPoint(tps); return nodeBuilder.build(); }
OvsdbHelper { public static Node getNode(Node node, List<TerminationPoint> tps, OvsdbBridgeAugmentation ovsdbBridgeAugmentation) { NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setKey(node.getKey()); nodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, ovsdbBridgeAugmentation); nodeBuilder.setTerminationPoint(tps); return nodeBuilder.build(); } }
OvsdbHelper { public static Node getNode(Node node, List<TerminationPoint> tps, OvsdbBridgeAugmentation ovsdbBridgeAugmentation) { NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setKey(node.getKey()); nodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, ovsdbBridgeAugmentation); nodeBuilder.setTerminationPoint(tps); return nodeBuilder.build(); }  }
OvsdbHelper { public static Node getNode(Node node, List<TerminationPoint> tps, OvsdbBridgeAugmentation ovsdbBridgeAugmentation) { NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setKey(node.getKey()); nodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, ovsdbBridgeAugmentation); nodeBuilder.setTerminationPoint(tps); return nodeBuilder.build(); }  static OvsdbBridgeAugmentation getOvsdbBridgeFromTerminationPoint(
            InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid, DataBroker dataBroker); static Node getNodeFromBridgeRef(OvsdbBridgeRef bridgeRef, DataBroker dataBroker); static OvsdbTerminationPointAugmentation getOvsdbTerminationPoint(
            InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid, DataBroker dataBroker); static Node getNode(Node node, List<TerminationPoint> tps,
            OvsdbBridgeAugmentation ovsdbBridgeAugmentation); static OvsdbBridgeAugmentation buildOvsdbBridgeAugmentation(OvsdbBridgeAugmentation bridge,
            OvsdbNodeAugmentation ovsdbNode); static List<TerminationPoint> buildTerminationPoints(OvsdbBridgeAugmentation bridge,
            OvsdbTerminationPointAugmentation ovsdbTp, AbstractTunnelType tunnelType); static String generateTpName(OvsdbBridgeAugmentation bridge, AbstractTunnelType tunnelType); static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation(
            OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType); static void setOption(List<Options> options, String key, String value); static IpAddress getManagerIp(OvsdbNodeAugmentation ovsdbNode); static IpAddress getNodeIp(OvsdbNodeAugmentation ovsdbNode); static List<ControllerEntry> buildControllerEntries(IpAddress ip); static OvsdbNodeAugmentation getManagerNode(OvsdbBridgeAugmentation bridge, DataBroker dataBroker); static Node getTopologyNode(InstanceIdentifier<Node> nodeIid, DataBroker dataBroker); static void createTunnelPort(InstanceIdentifier<Node> nodeIid,
            Node node, AbstractTunnelType tunnelType, DataBroker dataBroker); }
OvsdbHelper { public static Node getNode(Node node, List<TerminationPoint> tps, OvsdbBridgeAugmentation ovsdbBridgeAugmentation) { NodeBuilder nodeBuilder = new NodeBuilder(); nodeBuilder.setKey(node.getKey()); nodeBuilder.addAugmentation(OvsdbBridgeAugmentation.class, ovsdbBridgeAugmentation); nodeBuilder.setTerminationPoint(tps); return nodeBuilder.build(); }  static OvsdbBridgeAugmentation getOvsdbBridgeFromTerminationPoint(
            InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid, DataBroker dataBroker); static Node getNodeFromBridgeRef(OvsdbBridgeRef bridgeRef, DataBroker dataBroker); static OvsdbTerminationPointAugmentation getOvsdbTerminationPoint(
            InstanceIdentifier<OvsdbTerminationPointAugmentation> tpIid, DataBroker dataBroker); static Node getNode(Node node, List<TerminationPoint> tps,
            OvsdbBridgeAugmentation ovsdbBridgeAugmentation); static OvsdbBridgeAugmentation buildOvsdbBridgeAugmentation(OvsdbBridgeAugmentation bridge,
            OvsdbNodeAugmentation ovsdbNode); static List<TerminationPoint> buildTerminationPoints(OvsdbBridgeAugmentation bridge,
            OvsdbTerminationPointAugmentation ovsdbTp, AbstractTunnelType tunnelType); static String generateTpName(OvsdbBridgeAugmentation bridge, AbstractTunnelType tunnelType); static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation(
            OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType); static void setOption(List<Options> options, String key, String value); static IpAddress getManagerIp(OvsdbNodeAugmentation ovsdbNode); static IpAddress getNodeIp(OvsdbNodeAugmentation ovsdbNode); static List<ControllerEntry> buildControllerEntries(IpAddress ip); static OvsdbNodeAugmentation getManagerNode(OvsdbBridgeAugmentation bridge, DataBroker dataBroker); static Node getTopologyNode(InstanceIdentifier<Node> nodeIid, DataBroker dataBroker); static void createTunnelPort(InstanceIdentifier<Node> nodeIid,
            Node node, AbstractTunnelType tunnelType, DataBroker dataBroker);  }