- String[] nodePorts3 = {"3/1", "3/2", "3/3"};
- StringBuilder nodePortsJson3 = new StringBuilder();
- nodePortsJson3.append(nodePorts3[0] + "," + nodePorts3[1] + "," + nodePorts3[2]);
- StringBuilder nodePortsJson3_1 = new StringBuilder();
- nodePortsJson3_1.append(nodePortsJson3).append(",").append(nodePortsJson2);
+
+ /*
+ * Create the node connector string list for the two subnets as:
+ * portList2 = {"OF|1@OF|00:00:00:00:00:00:00:02", "OF|2@OF|00:00:00:00:00:00:00:02", "OF|3@OF|00:00:00:00:00:00:00:02", "OF|4@OF|00:00:00:00:00:00:00:02"};
+ * portList3 = {"OF|1@OF|00:00:00:00:00:00:00:03", "OF|2@OF|00:00:00:00:00:00:00:03", "OF|3@OF|00:00:00:00:00:00:00:03"};
+ */
+ Node node2 = new Node(Node.NodeIDType.OPENFLOW, 2L);
+ List<String> portList2 = new ArrayList<String>();
+ NodeConnector nc21 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)1, node2);
+ NodeConnector nc22 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)2, node2);
+ NodeConnector nc23 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)3, node2);
+ NodeConnector nc24 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)3, node2);
+ portList2.add(nc21.toString());
+ portList2.add(nc22.toString());
+ portList2.add(nc23.toString());
+ portList2.add(nc24.toString());
+
+ List<String> portList3 = new ArrayList<String>();
+ Node node3 = new Node(Node.NodeIDType.OPENFLOW, 3L);
+ NodeConnector nc31 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)1, node3);
+ NodeConnector nc32 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)2, node3);
+ NodeConnector nc33 = new NodeConnector(NodeConnector.NodeConnectorIDType.OPENFLOW, (short)3, node3);
+ portList3.add(nc31.toString());
+ portList3.add(nc32.toString());
+ portList3.add(nc33.toString());