@Test public void testBuildOvsdbTerminationPointAugmentation() { OvsdbBridgeAugmentationBuilder bridgeAugmentationBuilder = new OvsdbBridgeAugmentationBuilder(); bridgeAugmentationBuilder.setBridgeName(new OvsdbBridgeName("bridgeName")); List<Options> expectedOptions = new ArrayList<>(); OvsdbHelper.setOption(expectedOptions, "optionKey", "optionValue"); OvsdbTerminationPointAugmentation augmentation = OvsdbHelper.buildOvsdbTerminationPointAugmentation( bridgeAugmentationBuilder.build(), expectedOptions, abstractTunnelType); assertNotNull(augmentation); assertEquals(TUNNEL_PREFIX + "bridgeName", augmentation.getName()); assertEquals(1, augmentation.getOptions().size()); Options option = augmentation.getOptions().get(0); assertNotNull(option); assertEquals("optionKey", option.getOption()); assertEquals("optionValue", option.getValue()); assertEquals(InterfaceTypeVxlan.class, augmentation.getInterfaceType()); }
public static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation( OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType) { OvsdbTerminationPointAugmentationBuilder ovsdbTpBuilder = new OvsdbTerminationPointAugmentationBuilder(); ovsdbTpBuilder.setName(generateTpName(bridge, tunnelType)); ovsdbTpBuilder.setOptions(options); ovsdbTpBuilder.setInterfaceType(InterfaceTypeVxlan.class); return ovsdbTpBuilder.build(); }
OvsdbHelper { public static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation( OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType) { OvsdbTerminationPointAugmentationBuilder ovsdbTpBuilder = new OvsdbTerminationPointAugmentationBuilder(); ovsdbTpBuilder.setName(generateTpName(bridge, tunnelType)); ovsdbTpBuilder.setOptions(options); ovsdbTpBuilder.setInterfaceType(InterfaceTypeVxlan.class); return ovsdbTpBuilder.build(); } }
OvsdbHelper { public static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation( OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType) { OvsdbTerminationPointAugmentationBuilder ovsdbTpBuilder = new OvsdbTerminationPointAugmentationBuilder(); ovsdbTpBuilder.setName(generateTpName(bridge, tunnelType)); ovsdbTpBuilder.setOptions(options); ovsdbTpBuilder.setInterfaceType(InterfaceTypeVxlan.class); return ovsdbTpBuilder.build(); }  }
OvsdbHelper { public static OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation( OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType) { OvsdbTerminationPointAugmentationBuilder ovsdbTpBuilder = new OvsdbTerminationPointAugmentationBuilder(); ovsdbTpBuilder.setName(generateTpName(bridge, tunnelType)); ovsdbTpBuilder.setOptions(options); ovsdbTpBuilder.setInterfaceType(InterfaceTypeVxlan.class); return ovsdbTpBuilder.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 OvsdbTerminationPointAugmentation buildOvsdbTerminationPointAugmentation( OvsdbBridgeAugmentation bridge, List<Options> options, AbstractTunnelType tunnelType) { OvsdbTerminationPointAugmentationBuilder ovsdbTpBuilder = new OvsdbTerminationPointAugmentationBuilder(); ovsdbTpBuilder.setName(generateTpName(bridge, tunnelType)); ovsdbTpBuilder.setOptions(options); ovsdbTpBuilder.setInterfaceType(InterfaceTypeVxlan.class); return ovsdbTpBuilder.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);  }