blob: eced43e1d8e7d0f97375e591ea520358c5fb05e1 [file] [log] [blame]
Alex Yashchuk4caa8e82017-12-08 17:40:05 +02001/*
2 * Copyright 2017 Open Networking Foundation
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
17package org.onosproject.driver.pipeline;
18
19import org.onosproject.net.behaviour.PipelinerContext;
20import org.onosproject.net.flow.FlowRule;
21import org.onosproject.net.flowobjective.ForwardingObjective;
22import org.onosproject.driver.pipeline.ofdpa.Ofdpa3Pipeline;
23import java.util.Collection;
24
pier9469f3e2019-04-17 17:05:08 +020025import static org.onosproject.driver.pipeline.ofdpa.OfdpaPipelineUtility.ACL_TABLE;
26
Alex Yashchuk4caa8e82017-12-08 17:40:05 +020027public class XpliantPipeline extends Ofdpa3Pipeline {
28
29 @Override
30 protected void initDriverId() {
31 driverId = coreService.registerApplication(
32 "org.onosproject.driver.XpliantPipeline");
33 }
34
35 @Override
36 protected void initGroupHander(PipelinerContext context) {
pier9ada4192020-03-20 11:00:38 +010037 // Terminate internal references
38 // We are terminating the references here
39 // because when the device is offline the apps
40 // are still sending flowobjectives
41 if (groupHandler != null) {
42 groupHandler.terminate();
43 }
Alex Yashchuk4caa8e82017-12-08 17:40:05 +020044 groupHandler = new XpliantGroupHandler();
45 groupHandler.init(deviceId, context);
46 }
47
48 @Override
49 protected Collection<FlowRule> processEthTypeSpecific(ForwardingObjective fwd) {
50 return processEthTypeSpecificInternal(fwd, true, ACL_TABLE);
51 }
52
53 @Override
54 public boolean requireMplsPop() {
55 return false;
56 }
57
58 @Override
59 public boolean requireMplsBosMatch() {
60 return false;
61 }
62
63 @Override
64 public boolean requireMplsTtlModification() {
65 return false;
66 }
Harshada Chaundkar77958a52019-08-05 15:33:30 +000067
68 @Override
69 protected boolean requireEthType() {
70 return false;
71 }
Alex Yashchuk4caa8e82017-12-08 17:40:05 +020072}