@Test public void createHostconfigsDataForTest() { Hostconfig hc = HostconfigUtil.createHostconfigsDataFor(NODE_ID, new SocketInfo(PATH, PREFIX)); assertEquals(hc.getHostId(), NODE_ID.getValue()); assertEquals(hc.getHostType(), HOST_TYPE); assertTrue(hc.getConfig().contains(PATH)); assertTrue(hc.getConfig().contains(VHOSTUSER)); }
public static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) { Preconditions.checkNotNull(nodeId); Preconditions.checkNotNull(socketInfo); JsonObject odlL2 = new JsonObject(); odlL2.add("allowed_network_types", buildSupportedNetworkTypes()); odlL2.add("supported_vnic_types", buildSupportedVnicTypes(socketInfo)); return new HostconfigBuilder().setHostId(nodeId.getValue()) .setHostType(L2_HOST_TYPE) .setConfig(odlL2.toString()) .build(); }
HostconfigUtil { public static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) { Preconditions.checkNotNull(nodeId); Preconditions.checkNotNull(socketInfo); JsonObject odlL2 = new JsonObject(); odlL2.add("allowed_network_types", buildSupportedNetworkTypes()); odlL2.add("supported_vnic_types", buildSupportedVnicTypes(socketInfo)); return new HostconfigBuilder().setHostId(nodeId.getValue()) .setHostType(L2_HOST_TYPE) .setConfig(odlL2.toString()) .build(); } }
HostconfigUtil { public static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) { Preconditions.checkNotNull(nodeId); Preconditions.checkNotNull(socketInfo); JsonObject odlL2 = new JsonObject(); odlL2.add("allowed_network_types", buildSupportedNetworkTypes()); odlL2.add("supported_vnic_types", buildSupportedVnicTypes(socketInfo)); return new HostconfigBuilder().setHostId(nodeId.getValue()) .setHostType(L2_HOST_TYPE) .setConfig(odlL2.toString()) .build(); }  }
HostconfigUtil { public static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) { Preconditions.checkNotNull(nodeId); Preconditions.checkNotNull(socketInfo); JsonObject odlL2 = new JsonObject(); odlL2.add("allowed_network_types", buildSupportedNetworkTypes()); odlL2.add("supported_vnic_types", buildSupportedVnicTypes(socketInfo)); return new HostconfigBuilder().setHostId(nodeId.getValue()) .setHostType(L2_HOST_TYPE) .setConfig(odlL2.toString()) .build(); }  static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo); }
HostconfigUtil { public static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo) { Preconditions.checkNotNull(nodeId); Preconditions.checkNotNull(socketInfo); JsonObject odlL2 = new JsonObject(); odlL2.add("allowed_network_types", buildSupportedNetworkTypes()); odlL2.add("supported_vnic_types", buildSupportedVnicTypes(socketInfo)); return new HostconfigBuilder().setHostId(nodeId.getValue()) .setHostType(L2_HOST_TYPE) .setConfig(odlL2.toString()) .build(); }  static Hostconfig createHostconfigsDataFor(NodeId nodeId, SocketInfo socketInfo); static final String L2_HOST_TYPE; }