From 41aff9fb4a36bb237f7e38b4bfdb6ac762784e2e Mon Sep 17 00:00:00 2001 From: "Charles M.C. Chan" Date: Thu, 30 Apr 2015 00:34:41 +0800 Subject: [PATCH] Pass the selector/treatment set by CLI to the HostToHostIntent NOTE: During PathIntent compilation, the ethSrc and ethDst in the selector will be overridden by the MAC of the end-points. Also, an output action will be appended to the treatment. Change-Id: Ie2e621b91203a49237e7466b919abedceb3e697d --- .../org/onosproject/cli/net/AddHostToHostIntentCommand.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java index 17d9729a5c..cabf0b3a63 100644 --- a/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java @@ -20,6 +20,8 @@ import java.util.List; import org.apache.karaf.shell.commands.Argument; import org.apache.karaf.shell.commands.Command; import org.onosproject.net.HostId; +import org.onosproject.net.flow.TrafficSelector; +import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.intent.Constraint; import org.onosproject.net.intent.HostToHostIntent; import org.onosproject.net.intent.IntentService; @@ -46,6 +48,8 @@ public class AddHostToHostIntentCommand extends ConnectivityIntentCommand { HostId oneId = HostId.hostId(one); HostId twoId = HostId.hostId(two); + TrafficSelector selector = buildTrafficSelector(); + TrafficTreatment treatment = buildTrafficTreatment(); List constraints = buildConstraints(); HostToHostIntent intent = HostToHostIntent.builder() @@ -53,6 +57,8 @@ public class AddHostToHostIntentCommand extends ConnectivityIntentCommand { .key(key()) .one(oneId) .two(twoId) + .selector(selector) + .treatment(treatment) .constraints(constraints) .priority(priority()) .build();