Brian O'Connor

Partially reverting BGP Route policy distribution and flow spec

commit: 46f36d24

This added a dependency on an application from drivers; this is
not allowed. This driver will need to be implemented by the
application.

Change-Id: I24263ea2c79d5c5dda5459ecc412e27ff13a9c42
...@@ -4,7 +4,6 @@ COMPILE_DEPS = [ ...@@ -4,7 +4,6 @@ COMPILE_DEPS = [
4 '//drivers/utilities:onos-drivers-utilities', 4 '//drivers/utilities:onos-drivers-utilities',
5 '//protocols/openflow/api:onos-protocols-openflow-api', 5 '//protocols/openflow/api:onos-protocols-openflow-api',
6 '//core/store/serializers:onos-core-serializers', 6 '//core/store/serializers:onos-core-serializers',
7 - '//apps/bgpflowspec/flowapi:onos-apps-bgpflowspec-flowapi',
8 ] 7 ]
9 8
10 TEST_DEPS = [ 9 TEST_DEPS = [
...@@ -29,6 +28,5 @@ onos_app ( ...@@ -29,6 +28,5 @@ onos_app (
29 ':onos-drivers-default', 28 ':onos-drivers-default',
30 '//lib:openflowj', 29 '//lib:openflowj',
31 '//protocols/openflow/api:onos-protocols-openflow-api', 30 '//protocols/openflow/api:onos-protocols-openflow-api',
32 - '//apps/bgpflowspec/flowapi:onos-apps-bgpflowspec-flowapi',
33 ] 31 ]
34 ) 32 )
......
...@@ -44,11 +44,6 @@ ...@@ -44,11 +44,6 @@
44 </dependency> 44 </dependency>
45 <dependency> 45 <dependency>
46 <groupId>org.onosproject</groupId> 46 <groupId>org.onosproject</groupId>
47 - <artifactId>onos-app-bgp-flowapi</artifactId>
48 - <version>${project.version}</version>
49 - </dependency>
50 - <dependency>
51 - <groupId>org.onosproject</groupId>
52 <artifactId>openflowj</artifactId> 47 <artifactId>openflowj</artifactId>
53 </dependency> 48 </dependency>
54 </dependencies> 49 </dependencies>
......
1 -/*
2 - * Copyright 2016-present 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.driver.extensions;
17 -
18 -import org.onlab.util.KryoNamespace;
19 -import org.onosproject.flowapi.ExtFlowContainer;
20 -import org.onosproject.net.flow.AbstractExtension;
21 -import org.onosproject.net.flow.criteria.ExtensionSelector;
22 -import org.onosproject.net.flow.criteria.ExtensionSelectorType;
23 -import java.util.Objects;
24 -
25 -import static com.google.common.base.MoreObjects.toStringHelper;
26 -
27 -/**
28 - * Implementation of extension selector for multi value.
29 - */
30 -public final class ExtMatchExtension extends AbstractExtension implements ExtensionSelector {
31 - private ExtFlowContainer container;
32 -
33 - private final KryoNamespace appKryo = new KryoNamespace.Builder().register(ExtMatchExtension.class).build();
34 -
35 - /**
36 - * Creates an object of ExtMatchExtension.
37 - */
38 - public ExtMatchExtension() {
39 - this.container = null;
40 - }
41 -
42 - /**
43 - * Returns the container.
44 - *
45 - * @return the container to match
46 - */
47 - public ExtFlowContainer container() {
48 - return container;
49 - }
50 -
51 - @Override
52 - public ExtensionSelectorType type() {
53 - return ExtensionSelectorType.ExtensionSelectorTypes.EXT_MATCH_FLOW_TYPE.type();
54 - }
55 -
56 - @Override
57 - public byte[] serialize() {
58 - return appKryo.serialize(container);
59 - }
60 -
61 - @Override
62 - public void deserialize(byte[] data) {
63 - container = ExtFlowContainer.of(appKryo.deserialize(data));
64 - }
65 -
66 - @Override
67 - public String toString() {
68 - return toStringHelper(type().toString())
69 - .add("container", container)
70 - .toString();
71 - }
72 -
73 - @Override
74 - public int hashCode() {
75 - return Objects.hash(type(), container);
76 - }
77 -
78 - @Override
79 - public boolean equals(Object obj) {
80 - if (this == obj) {
81 - return true;
82 - }
83 - if (obj instanceof ExtMatchExtension) {
84 - ExtMatchExtension that = (ExtMatchExtension) obj;
85 - return Objects.equals(container, that.container) &&
86 - Objects.equals(this.type(), that.type());
87 - }
88 - return false;
89 - }
90 -}
1 -/*
2 - * Copyright 2016-present 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.driver.extensions;
17 -
18 -import org.onosproject.net.behaviour.ExtensionSelectorResolver;
19 -import org.onosproject.net.driver.AbstractHandlerBehaviour;
20 -import org.onosproject.net.flow.criteria.ExtensionSelector;
21 -import org.onosproject.net.flow.criteria.ExtensionSelectorType;
22 -
23 -/**
24 - * Interpreter for bgp selector extensions.
25 - */
26 -public class MultiExtensionSelectorInterpreter
27 - extends AbstractHandlerBehaviour
28 - implements ExtensionSelectorResolver {
29 -
30 - @Override
31 - public ExtensionSelector getExtensionSelector(ExtensionSelectorType type) {
32 - if (type.equals(ExtensionSelectorType.ExtensionSelectorTypes.EXT_MATCH_FLOW_TYPE.type())) {
33 - return new ExtMatchExtension();
34 - }
35 - return null;
36 - }
37 -}
...@@ -141,11 +141,6 @@ ...@@ -141,11 +141,6 @@
141 <behaviour api="org.onosproject.net.behaviour.Pipeliner" 141 <behaviour api="org.onosproject.net.behaviour.Pipeliner"
142 impl="org.onosproject.driver.pipeline.OpenVSwitchPipeline"/> 142 impl="org.onosproject.driver.pipeline.OpenVSwitchPipeline"/>
143 </driver> 143 </driver>
144 - <driver name="l3Device" extends="default"
145 - manufacturer="" hwVersion="" swVersion="">
146 - <behaviour api="org.onosproject.net.behaviour.ExtensionSelectorResolver"
147 - impl="org.onosproject.driver.extensions.MultiExtensionSelectorInterpreter" />
148 - </driver>
149 <driver name="aos" extends="ofdpa" 144 <driver name="aos" extends="ofdpa"
150 manufacturer="Accton" hwVersion=".*" swVersion="1.*"> 145 manufacturer="Accton" hwVersion=".*" swVersion="1.*">
151 </driver> 146 </driver>
......