Praseed Balakrishnan

Fixed learning optical links

...@@ -58,7 +58,7 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro ...@@ -58,7 +58,7 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
58 58
59 // TODO: fix hard coded file path later. 59 // TODO: fix hard coded file path later.
60 private static final String DEFAULT_CONFIG_FILE = 60 private static final String DEFAULT_CONFIG_FILE =
61 - "/opt/onos/config/demo-3-roadm-2-ps.json"; 61 + "config/demo-3-roadm-2-ps.json";
62 private String configFileName = DEFAULT_CONFIG_FILE; 62 private String configFileName = DEFAULT_CONFIG_FILE;
63 63
64 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) 64 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
...@@ -83,7 +83,8 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro ...@@ -83,7 +83,8 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
83 protected OpticalNetworkConfig opticalNetworkConfig; 83 protected OpticalNetworkConfig opticalNetworkConfig;
84 84
85 public OpticalConfigProvider() { 85 public OpticalConfigProvider() {
86 - super(new ProviderId("of", "org.onlab.onos.provider.opticalConfig", true)); 86 + super(new ProviderId("optical", "org.onlab.onos.provider" +
87 + ".opticalConfig"));
87 } 88 }
88 89
89 @Activate 90 @Activate
...@@ -238,7 +239,7 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro ...@@ -238,7 +239,7 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
238 while (iterWdmNode.hasNext()) { 239 while (iterWdmNode.hasNext()) {
239 Roadm value = iterWdmNode.next(); 240 Roadm value = iterWdmNode.next();
240 DeviceId did = deviceId("of:" + value.getNodeId().replace(":", "")); 241 DeviceId did = deviceId("of:" + value.getNodeId().replace(":", ""));
241 - ChassisId cid = new ChassisId(value.getNodeId()); 242 + ChassisId cid = new ChassisId();
242 DefaultAnnotations extendedAttributes = DefaultAnnotations.builder() 243 DefaultAnnotations extendedAttributes = DefaultAnnotations.builder()
243 .set(OPTICAL_ANNOTATION + "switchType", "ROADM") 244 .set(OPTICAL_ANNOTATION + "switchType", "ROADM")
244 .set(OPTICAL_ANNOTATION + "switchName", value.getName()) 245 .set(OPTICAL_ANNOTATION + "switchName", value.getName())
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
47 "nodeName1": "ROADM1", 47 "nodeName1": "ROADM1",
48 "nodeName2": "ROADM3", 48 "nodeName2": "ROADM3",
49 "numWaves": 80, 49 "numWaves": 80,
50 - "port1": 10, 50 + "port1": 20,
51 "port2": 30 51 "port2": 30
52 }, 52 },
53 "type": "wdmLink" 53 "type": "wdmLink"
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
63 "nodeName2": "ROADM2", 63 "nodeName2": "ROADM2",
64 "numWaves": 80, 64 "numWaves": 80,
65 "port1": 31, 65 "port1": 31,
66 - "port2": 20 66 + "port2": 21
67 }, 67 },
68 "type": "wdmLink" 68 "type": "wdmLink"
69 }, 69 },
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 "nodeName2": "ROADM1", 78 "nodeName2": "ROADM1",
79 "bandWidth": 100000, 79 "bandWidth": 100000,
80 "port1": 10, 80 "port1": 10,
81 - "port2": 11 81 + "port2": 10
82 }, 82 },
83 "type": "pktOptLink" 83 "type": "pktOptLink"
84 }, 84 },
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
92 "nodeName2": "ROADM2", 92 "nodeName2": "ROADM2",
93 "bandWidth": 100000, 93 "bandWidth": 100000,
94 "port1": 10, 94 "port1": 10,
95 - "port2": 21 95 + "port2": 11
96 }, 96 },
97 "type": "pktOptLink" 97 "type": "pktOptLink"
98 } 98 }
......