Marc De Leenheer

Working lambda treatment & selectors

...@@ -93,9 +93,9 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro ...@@ -93,9 +93,9 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
93 log.info("Starting optical network configuration process..."); 93 log.info("Starting optical network configuration process...");
94 log.info("Optical config file set to {}", configFileName); 94 log.info("Optical config file set to {}", configFileName);
95 95
96 - loadOpticalConfig(); 96 +// loadOpticalConfig();
97 - parseOpticalConfig(); 97 +// parseOpticalConfig();
98 - publishOpticalConfig(); 98 +// publishOpticalConfig();
99 } 99 }
100 100
101 @Deactivate 101 @Deactivate
......
...@@ -54,12 +54,17 @@ public class LambdaForwarding { ...@@ -54,12 +54,17 @@ public class LambdaForwarding {
54 public void activate() { 54 public void activate() {
55 appId = coreService.registerApplication("org.onlab.onos.fwd"); 55 appId = coreService.registerApplication("org.onlab.onos.fwd");
56 56
57 - deviceService.addListener(listener);
58 -
59 uglyMap.put(DeviceId.deviceId("of:0000ffffffffff01"), 1); 57 uglyMap.put(DeviceId.deviceId("of:0000ffffffffff01"), 1);
60 uglyMap.put(DeviceId.deviceId("of:0000ffffffffff02"), 2); 58 uglyMap.put(DeviceId.deviceId("of:0000ffffffffff02"), 2);
61 uglyMap.put(DeviceId.deviceId("of:0000ffffffffff03"), 3); 59 uglyMap.put(DeviceId.deviceId("of:0000ffffffffff03"), 3);
62 60
61 + deviceService.addListener(listener);
62 +
63 + for (Device d : deviceService.getDevices()) {
64 + pushRules(d);
65 + }
66 +
67 +
63 log.info("Started with Application ID {}", appId.id()); 68 log.info("Started with Application ID {}", appId.id());
64 } 69 }
65 70
...@@ -101,9 +106,6 @@ public class LambdaForwarding { ...@@ -101,9 +106,6 @@ public class LambdaForwarding {
101 break; 106 break;
102 default: 107 default:
103 } 108 }
104 - sbuilder.matchLambda((short) 25).matchInport(PortNumber.portNumber(5));
105 -
106 - tbuilder.setOutput(PortNumber.portNumber(5));
107 109
108 TrafficTreatment treatement = tbuilder.build(); 110 TrafficTreatment treatement = tbuilder.build();
109 TrafficSelector selector = sbuilder.build(); 111 TrafficSelector selector = sbuilder.build();
......
...@@ -143,6 +143,7 @@ public class FlowModBuilder { ...@@ -143,6 +143,7 @@ public class FlowModBuilder {
143 return new LinkedList<>(); 143 return new LinkedList<>();
144 case L0MODIFICATION: 144 case L0MODIFICATION:
145 acts.add(buildL0Modification(i)); 145 acts.add(buildL0Modification(i));
146 + break;
146 case L2MODIFICATION: 147 case L2MODIFICATION:
147 acts.add(buildL2Modification(i)); 148 acts.add(buildL2Modification(i));
148 break; 149 break;
......