Brian O'Connor

CLI fixes and fixed a bug in OpenFlowRuleProvider

H2H Add command: updated to use unique id block
P2P Add command: unique id block, and added traffic selector ETH=0x0800
......@@ -27,7 +27,7 @@ public class AddHostToHostIntentCommand extends AbstractShellCommand {
required = true, multiValued = false)
String two = null;
private static long id = 1;
private static long id = 0x7870001;
@Override
protected void execute() {
......
......@@ -14,6 +14,7 @@ import org.onlab.onos.net.intent.Intent;
import org.onlab.onos.net.intent.IntentId;
import org.onlab.onos.net.intent.IntentService;
import org.onlab.onos.net.intent.PointToPointIntent;
import org.onlab.packet.Ethernet;
/**
* Installs point-to-point connectivity intents.
......@@ -32,7 +33,7 @@ public class AddPointToPointIntentCommand extends AbstractShellCommand {
required = true, multiValued = false)
String egressDeviceString = null;
private static long id = 1;
private static long id = 0x7470001;
@Override
protected void execute() {
......@@ -48,7 +49,9 @@ public class AddPointToPointIntentCommand extends AbstractShellCommand {
PortNumber.portNumber(getPortNumber(egressDeviceString));
ConnectPoint egress = new ConnectPoint(egressDeviceId, egressPortNumber);
TrafficSelector selector = DefaultTrafficSelector.builder().build();
TrafficSelector selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.build();
TrafficTreatment treatment = DefaultTrafficTreatment.builder().build();
Intent intent =
......
......@@ -344,7 +344,7 @@ public class OpenFlowRuleProvider extends AbstractProvider implements FlowRulePr
public void satisfyRequirement(Dpid dpid) {
log.warn("Satisfaction from switch {}", dpid);
sws.remove(controller.getSwitch(dpid));
sws.remove(dpid);
countDownLatch.countDown();
}
......