Committed by
Brian O'Connor
Initial implementation: The init extended flow rule and store interface APIs
The APIs are for supporting service data to install on network devices. This is related to JIRA ticket ID ONOS-869. Updated API code and added implementation code files. Modified API for supporting payload abstruction, and added routing mechanism for pushing flow rules to devices. Added more javadoc, and fixed some minor issues. Updated javadoc, removed unnecessary method, and test code. Change-Id: I105defc92a9e01b30601fcb56a9dafa086d4adc0
Showing
16 changed files
with
566 additions
and
4 deletions
... | @@ -172,7 +172,6 @@ public class DefaultFlowRule implements FlowRule { | ... | @@ -172,7 +172,6 @@ public class DefaultFlowRule implements FlowRule { |
172 | return treatment; | 172 | return treatment; |
173 | } | 173 | } |
174 | 174 | ||
175 | - | ||
176 | @Override | 175 | @Override |
177 | /* | 176 | /* |
178 | * The priority and statistics can change on a given treatment and selector | 177 | * The priority and statistics can change on a given treatment and selector | ... | ... |
... | @@ -25,7 +25,7 @@ import java.util.Set; | ... | @@ -25,7 +25,7 @@ import java.util.Set; |
25 | public class FlowRuleBatchRequest { | 25 | public class FlowRuleBatchRequest { |
26 | 26 | ||
27 | /** | 27 | /** |
28 | - * This id is used to cary to id of the original | 28 | + * This id is used to carry to id of the original |
29 | * FlowOperations and track where this batch operation | 29 | * FlowOperations and track where this batch operation |
30 | * came from. The id is unique cluster wide. | 30 | * came from. The id is unique cluster wide. |
31 | */ | 31 | */ |
... | @@ -37,8 +37,6 @@ public class FlowRuleBatchRequest { | ... | @@ -37,8 +37,6 @@ public class FlowRuleBatchRequest { |
37 | public FlowRuleBatchRequest(long batchId, Set<FlowRuleBatchEntry> ops) { | 37 | public FlowRuleBatchRequest(long batchId, Set<FlowRuleBatchEntry> ops) { |
38 | this.batchId = batchId; | 38 | this.batchId = batchId; |
39 | this.ops = Collections.unmodifiableSet(ops); | 39 | this.ops = Collections.unmodifiableSet(ops); |
40 | - | ||
41 | - | ||
42 | } | 40 | } |
43 | 41 | ||
44 | public Set<FlowRuleBatchEntry> ops() { | 42 | public Set<FlowRuleBatchEntry> ops() { | ... | ... |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import org.onosproject.core.ApplicationId; | ||
19 | +import org.onosproject.core.DefaultGroupId; | ||
20 | +import org.onosproject.core.GroupId; | ||
21 | +import org.onosproject.net.DeviceId; | ||
22 | +import org.onosproject.net.flow.DefaultFlowRule; | ||
23 | +import org.onosproject.net.flow.FlowRule; | ||
24 | +import org.onosproject.net.flow.TrafficSelector; | ||
25 | +import org.onosproject.net.flow.TrafficTreatment; | ||
26 | + | ||
27 | +import java.util.Objects; | ||
28 | + | ||
29 | +import static com.google.common.base.MoreObjects.toStringHelper; | ||
30 | + | ||
31 | +/** | ||
32 | + * Experimental extension to the flow rule subsystem; still under development. | ||
33 | + * A temporary flow rule extend implementation, It will cover current onos flow rule and other flow extension. | ||
34 | + */ | ||
35 | +public class DefaultFlowRuleExt | ||
36 | + extends DefaultFlowRule implements FlowRuleExt { | ||
37 | + | ||
38 | + private FlowEntryExtension flowEntryExtension; | ||
39 | + | ||
40 | + public DefaultFlowRuleExt(DeviceId deviceId, TrafficSelector selector, | ||
41 | + TrafficTreatment treatment, int priority, long flowId, | ||
42 | + int timeout, boolean permanent) { | ||
43 | + super(deviceId, selector, treatment, priority, flowId, timeout, permanent); | ||
44 | + } | ||
45 | + | ||
46 | + public DefaultFlowRuleExt(DeviceId deviceId, TrafficSelector selector, | ||
47 | + TrafficTreatment treatment, int priority, ApplicationId appId, | ||
48 | + int timeout, boolean permanent) { | ||
49 | + this(deviceId, selector, treatment, priority, appId, new DefaultGroupId(0), | ||
50 | + timeout, permanent); | ||
51 | + } | ||
52 | + | ||
53 | + public DefaultFlowRuleExt(DeviceId deviceId, TrafficSelector selector, | ||
54 | + TrafficTreatment treatment, int priority, ApplicationId appId, | ||
55 | + GroupId groupId, int timeout, boolean permanent) { | ||
56 | + super(deviceId, selector, treatment, priority, appId, groupId, timeout, permanent); | ||
57 | + } | ||
58 | + | ||
59 | + public DefaultFlowRuleExt(FlowRule rule) { | ||
60 | + super(rule); | ||
61 | + } | ||
62 | + | ||
63 | + public DefaultFlowRuleExt(ApplicationId appId, DeviceId deviceId, FlowEntryExtension data) { | ||
64 | + this(deviceId, null, null, FlowRule.MIN_PRIORITY, appId, 0, false); | ||
65 | + this.flowEntryExtension = data; | ||
66 | + } | ||
67 | + | ||
68 | + @Override | ||
69 | + public FlowEntryExtension getFlowEntryExt() { | ||
70 | + return this.flowEntryExtension; | ||
71 | + } | ||
72 | + | ||
73 | + @Override | ||
74 | + public int hashCode() { | ||
75 | + return 31 * super.hashCode() + Objects.hash(flowEntryExtension); | ||
76 | + } | ||
77 | + | ||
78 | + public int hash() { | ||
79 | + return 31 * super.hashCode() + Objects.hash(flowEntryExtension); | ||
80 | + } | ||
81 | + | ||
82 | + @Override | ||
83 | + public boolean equals(Object obj) { | ||
84 | + if (this == obj) { | ||
85 | + return true; | ||
86 | + } | ||
87 | + if (obj == null || getClass() != obj.getClass()) { | ||
88 | + return false; | ||
89 | + } | ||
90 | + if (!super.equals(obj)) { | ||
91 | + return false; | ||
92 | + } | ||
93 | + final DefaultFlowRuleExt other = (DefaultFlowRuleExt) obj; | ||
94 | + return Objects.equals(this.flowEntryExtension, other.flowEntryExtension); | ||
95 | + } | ||
96 | + | ||
97 | + @Override | ||
98 | + public String toString() { | ||
99 | + return toStringHelper(this) | ||
100 | + // TODO there might be a better way to grab super's string | ||
101 | + .add("id", Long.toHexString(id().value())) | ||
102 | + .add("deviceId", deviceId()) | ||
103 | + .add("priority", priority()) | ||
104 | + .add("selector", selector().criteria()) | ||
105 | + .add("treatment", treatment() == null ? "N/A" : treatment().instructions()) | ||
106 | + //.add("created", created) | ||
107 | + .add("flowEntryExtension", flowEntryExtension) | ||
108 | + .toString(); | ||
109 | + } | ||
110 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import java.nio.ByteBuffer; | ||
19 | +import java.util.Objects; | ||
20 | + | ||
21 | +/** | ||
22 | + * Experimental extension to the flow rule subsystem; still under development. | ||
23 | + * Represents a generic abstraction of the service data. User app can customize whatever it needs to install on devices. | ||
24 | + */ | ||
25 | +public class DownStreamFlowEntry implements FlowEntryExtension { | ||
26 | + | ||
27 | + /** | ||
28 | + * temporarily only have byte stream, but it will be extract more abstract information from it later. | ||
29 | + */ | ||
30 | + private final ByteBuffer payload; | ||
31 | + | ||
32 | + public DownStreamFlowEntry(ByteBuffer data) { | ||
33 | + this.payload = data; | ||
34 | + } | ||
35 | + | ||
36 | + /** | ||
37 | + * Get the payload of flowExtension. | ||
38 | + * | ||
39 | + * @return the byte steam value of payload. | ||
40 | + */ | ||
41 | +// @Override | ||
42 | +// public ByteBuffer getPayload() { | ||
43 | + // TODO Auto-generated method stub | ||
44 | +// return payload; | ||
45 | +// } | ||
46 | + | ||
47 | + /** | ||
48 | + * Returns a hash code value for the object. | ||
49 | + * It use payload as parameter to hash. | ||
50 | + * | ||
51 | + * @return a hash code value for this object. | ||
52 | + */ | ||
53 | + @Override | ||
54 | + public int hashCode() { | ||
55 | + return Objects.hash(payload); | ||
56 | + } | ||
57 | + | ||
58 | + /** | ||
59 | + * Indicates whether some other object is "equal to" this one. | ||
60 | + * | ||
61 | + * @param obj the reference object with which to compare. | ||
62 | + * @return {@code true} if this object is the same as the obj | ||
63 | + * argument; {@code false} otherwise. | ||
64 | + */ | ||
65 | + @Override | ||
66 | + public boolean equals(Object obj) { | ||
67 | + if (obj instanceof DownStreamFlowEntry) { | ||
68 | + DownStreamFlowEntry packet = (DownStreamFlowEntry) obj; | ||
69 | + return Objects.equals(this.payload, packet.payload); | ||
70 | + } else { | ||
71 | + return false; | ||
72 | + } | ||
73 | + } | ||
74 | + | ||
75 | + /** | ||
76 | + * Returns a string representation of the object. | ||
77 | + * | ||
78 | + * @return a string representation of the object. | ||
79 | + */ | ||
80 | + @Override | ||
81 | + public String toString() { | ||
82 | + String obj = new String(payload.array()); | ||
83 | + return obj; | ||
84 | + } | ||
85 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | + | ||
19 | +/** | ||
20 | + * Experimental extension to the flow rule subsystem; still under development. | ||
21 | + * Represents a generic abstraction of the service data. User app can customize whatever it needs to install on devices. | ||
22 | + */ | ||
23 | +public interface FlowEntryExtension { | ||
24 | + // some abstraction of the service data, like length, type, etc, will be added here later | ||
25 | + | ||
26 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import com.google.common.base.MoreObjects; | ||
19 | +import org.onosproject.net.flow.CompletedBatchOperation; | ||
20 | +import org.onosproject.net.flow.FlowRule; | ||
21 | + | ||
22 | +import java.util.Set; | ||
23 | + | ||
24 | +/** | ||
25 | + * Experimental extension to the flow rule subsystem; still under development. | ||
26 | + * <p> | ||
27 | + * Representation of a completed flow rule batch operation. | ||
28 | + * </p> | ||
29 | + */ | ||
30 | +//TODO explain the purpose of this class beyond FlowRuleProvider | ||
31 | +public class FlowExtCompletedOperation extends CompletedBatchOperation { | ||
32 | + // the batchId is provided by application, once one flow rule of this batch failed | ||
33 | + // all the batch should withdraw | ||
34 | + private final long batchId; | ||
35 | + | ||
36 | + public FlowExtCompletedOperation(long batchId, boolean success, Set<FlowRule> failures) { | ||
37 | + super(success, failures, null); | ||
38 | + this.batchId = batchId; | ||
39 | + } | ||
40 | + | ||
41 | + /** | ||
42 | + * Returns the BatchId of this BatchOperation. | ||
43 | + * | ||
44 | + * @return the number of Batch | ||
45 | + */ | ||
46 | + public long getBatchId() { | ||
47 | + return batchId; | ||
48 | + } | ||
49 | + | ||
50 | + /** | ||
51 | + * Returns a string representation of the object. | ||
52 | + * | ||
53 | + * @return a string representation of the object. | ||
54 | + */ | ||
55 | + @Override | ||
56 | + public String toString() { | ||
57 | + return MoreObjects.toStringHelper(getClass()) | ||
58 | + .add("success?", isSuccess()) | ||
59 | + .add("failedItems", failedIds()) | ||
60 | + .toString(); | ||
61 | + } | ||
62 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import org.onosproject.net.flow.FlowRule; | ||
19 | + | ||
20 | +/** | ||
21 | + * Experimental extension to the flow rule subsystem; still under development. | ||
22 | + * <p> | ||
23 | + * FlowRule extended for current FlowRule API. | ||
24 | + * </p> | ||
25 | + */ | ||
26 | +public interface FlowRuleExt extends FlowRule { | ||
27 | + /** | ||
28 | + * Get the flow entry extension. | ||
29 | + * | ||
30 | + * @return FlowEntryExtension value. | ||
31 | + */ | ||
32 | + FlowEntryExtension getFlowEntryExt(); | ||
33 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import org.onosproject.net.flow.FlowRuleBatchEvent; | ||
19 | +import org.onosproject.net.flow.FlowRuleBatchRequest; | ||
20 | + | ||
21 | +import java.util.concurrent.Future; | ||
22 | + | ||
23 | +/** | ||
24 | + * Experimental extension to the flow rule subsystem; still under development. | ||
25 | + * Represents a router-like mechanism which is in charge of sending flow rule to master; | ||
26 | + * <p> | ||
27 | + * The Router is in charge of sending flow rule to master; | ||
28 | + * the core component of routing-like mechanism. | ||
29 | + * </p> | ||
30 | + */ | ||
31 | +public interface FlowRuleExtRouter { | ||
32 | + | ||
33 | + /** | ||
34 | + * apply the sub batch of flow extension rules. | ||
35 | + * | ||
36 | + * @param batchOperation batch of flow rules. | ||
37 | + * A batch can contain flow rules for a single device only. | ||
38 | + * @return Future response indicating success/failure of the batch operation | ||
39 | + * all the way down to the device. | ||
40 | + */ | ||
41 | + Future<FlowExtCompletedOperation> applySubBatch(FlowRuleBatchRequest batchOperation); | ||
42 | + | ||
43 | + /** | ||
44 | + * Invoked on the completion of a storeBatch operation. | ||
45 | + * | ||
46 | + * @param event flow rule batch event | ||
47 | + */ | ||
48 | + void batchOperationComplete(FlowRuleBatchEvent event); | ||
49 | + | ||
50 | + /** | ||
51 | + * Register the listener to monitor Router, | ||
52 | + * The Router find master to send downStream. | ||
53 | + * | ||
54 | + * @param listener the listener to register | ||
55 | + */ | ||
56 | + public void addListener(FlowRuleExtRouterListener listener); | ||
57 | + | ||
58 | + /** | ||
59 | + * Remove the listener of Router. | ||
60 | + * | ||
61 | + * @param listener the listener to remove | ||
62 | + */ | ||
63 | + public void removeListener(FlowRuleExtRouterListener listener); | ||
64 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import org.onosproject.net.flow.FlowRuleBatchEvent; | ||
19 | + | ||
20 | +/** | ||
21 | + * Experimental extension to the flow rule subsystem; still under development. | ||
22 | + * The monitor module of the router. | ||
23 | + * <p> | ||
24 | + * The monitor module of router. | ||
25 | + * </p> | ||
26 | + */ | ||
27 | +public interface FlowRuleExtRouterListener { | ||
28 | + | ||
29 | + /** | ||
30 | + * Notify monitor the router has down its work. | ||
31 | + * | ||
32 | + * @param event the event to notify | ||
33 | + */ | ||
34 | + void notify(FlowRuleBatchEvent event); | ||
35 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.net.flowext; | ||
17 | + | ||
18 | +import org.onosproject.net.flow.FlowRuleBatchRequest; | ||
19 | +import org.onosproject.net.flow.FlowRuleService; | ||
20 | + | ||
21 | +import java.util.concurrent.Future; | ||
22 | + | ||
23 | +/** | ||
24 | + * Experimental extension to the flow rule subsystem; still under development. | ||
25 | + * Service for injecting extended flow rules into the environment. | ||
26 | + * This service just send the packet downstream. It won't store the | ||
27 | + * flowRuleExtension in cache. | ||
28 | + */ | ||
29 | +public interface FlowRuleExtService extends FlowRuleService { | ||
30 | + /** | ||
31 | + * Applies a batch operation of FlowRules. | ||
32 | + * this batch can be divided into many sub-batch by deviceId, and application | ||
33 | + * gives a batchId, it means once one flowRule apply failed, all flow rules should | ||
34 | + * withdraw. | ||
35 | + * | ||
36 | + * @param batch batch operation to apply | ||
37 | + * @return future indicating the state of the batch operation | ||
38 | + */ | ||
39 | + Future<FlowExtCompletedOperation> applyBatch(FlowRuleBatchRequest batch); | ||
40 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | + | ||
17 | +/** | ||
18 | + * Experimental extension to the flow rule subsystem; still under development. | ||
19 | + * <p> | ||
20 | + * This package is an extension for the current ONOS flow rule API. | ||
21 | + * Its main purpose is to support external applications to push service data to network elements. | ||
22 | + * The service data could be any kind of service related data or commands required for corresponding service | ||
23 | + * setup and other operations as defined by application and its communicating device. | ||
24 | + * </p> | ||
25 | + */ | ||
26 | +package org.onosproject.net.flowext; |
This diff is collapsed. Click to expand it.
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | + | ||
17 | +/** | ||
18 | + * Experimental extension to the flow rule subsystem; still under development. | ||
19 | + * <p> | ||
20 | + * This package is an extension for the current ONOS flow rule subsystem. | ||
21 | + * Its main purpose is to support external applications to push service data to network elements. | ||
22 | + * The service data could be any kind of service related data or commands required for corresponding service | ||
23 | + * setup and other operations as defined by application and its communicating device. | ||
24 | + * </p> | ||
25 | + */ | ||
26 | +package org.onosproject.net.flowext.impl; |
core/store/dist/src/main/java/org/onosproject/store/flowext/impl/DefaultFlowRuleExtRouter.java
0 → 100644
This diff is collapsed. Click to expand it.
core/store/dist/src/main/java/org/onosproject/store/flowext/impl/FlowExtRouterMessageSubjects.java
0 → 100644
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +package org.onosproject.store.flowext.impl; | ||
17 | + | ||
18 | +import org.onosproject.store.cluster.messaging.MessageSubject; | ||
19 | + | ||
20 | +/** | ||
21 | + * Experimental extension to the flow rule subsystem; still under development. | ||
22 | + * MessageSubjects used by DefaultFlowRuleExtRouter peer-peer communication. | ||
23 | + */ | ||
24 | +public final class FlowExtRouterMessageSubjects { | ||
25 | + private FlowExtRouterMessageSubjects() { | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * The subject of routing extended flow to specified device. | ||
30 | + */ | ||
31 | + public static final MessageSubject APPLY_EXTEND_FLOWS | ||
32 | + = new MessageSubject("peer-forward-apply-batch-extension"); | ||
33 | +} |
1 | +/* | ||
2 | + * Copyright 2015 Open Networking Laboratory | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | + | ||
17 | +/** | ||
18 | + * Experimental extension to the flow rule subsystem; still under development. | ||
19 | + * <p> | ||
20 | + * Implementation of the distributed flow extension rule router using p2p synchronization | ||
21 | + * protocol. The Router is the core component of routing flow rules to specified device. | ||
22 | + * This package is still experimental at this point in time. | ||
23 | + * </p> | ||
24 | + */ | ||
25 | +package org.onosproject.store.flowext.impl; |
-
Please register or login to post a comment