Move routing from incubator to a separate app
Change-Id: I961d10af99c572b1f8d9b3d37c6f52dd04422007
diff --git a/apps/bgprouter/BUCK b/apps/bgprouter/BUCK
index 211ae7a..ac93991 100644
--- a/apps/bgprouter/BUCK
+++ b/apps/bgprouter/BUCK
@@ -20,5 +20,5 @@
url = 'http://onosproject.org',
description = 'BGP router application.',
included_bundles = BUNDLES,
- required_apps = [ 'org.onosproject.fibinstaller' ],
+ required_apps = [ 'org.onosproject.fibinstaller', 'org.onosproject.route-service' ],
)
diff --git a/apps/dhcprelay/BUCK b/apps/dhcprelay/BUCK
index ab78c6d..7ff6889 100644
--- a/apps/dhcprelay/BUCK
+++ b/apps/dhcprelay/BUCK
@@ -2,14 +2,14 @@
'//lib:CORE_DEPS',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli',
- '//incubator/api:onos-incubator-api',
- '//core/store/serializers:onos-core-serializers'
+ '//core/store/serializers:onos-core-serializers',
+ '//apps/route-service/api:onos-apps-route-service-api',
]
TEST_DEPS = [
- '//lib:TEST_ADAPTERS',
+ '//lib:TEST',
+ '//apps/route-service/api:onos-apps-route-service-api-tests',
'//core/api:onos-api-tests',
- '//incubator/api:onos-incubator-api-tests',
]
osgi_jar_with_tests (
@@ -23,4 +23,5 @@
category = 'Utility',
url = 'http://onosproject.org',
description = 'DHCP Relay Agent Application.',
+ required_apps = [ 'org.onosproject.route-service' ],
)
diff --git a/apps/dhcprelay/pom.xml b/apps/dhcprelay/pom.xml
index 752de52..b3d879e 100644
--- a/apps/dhcprelay/pom.xml
+++ b/apps/dhcprelay/pom.xml
@@ -61,7 +61,7 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onlab-junit</artifactId>
@@ -114,5 +114,10 @@
<artifactId>onos-cli</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
index 4475f54..e8f56d1 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
+++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
@@ -40,8 +40,8 @@
import org.onosproject.dhcprelay.store.DhcpRelayStore;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteStore;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteStore;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Host;
import org.onosproject.net.HostId;
diff --git a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java b/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java
index 72b4d84..cab0908 100644
--- a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java
+++ b/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java
@@ -45,8 +45,8 @@
import org.onosproject.dhcprelay.store.DhcpRelayStoreEvent;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceServiceAdapter;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteStoreAdapter;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteStoreAdapter;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DefaultHost;
import org.onosproject.net.Host;
diff --git a/apps/evpnopenflow/BUCK b/apps/evpnopenflow/BUCK
index 6554cc7..a244b1f 100755
--- a/apps/evpnopenflow/BUCK
+++ b/apps/evpnopenflow/BUCK
@@ -6,6 +6,7 @@
'//core/store/serializers:onos-core-serializers',
'//apps/gluon:onos-apps-gluon',
'//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+ '//apps/route-service/api:onos-apps-route-service-api',
]
TEST_DEPS = [
@@ -24,4 +25,5 @@
url = 'http://onosproject.org',
description = 'Ethernet VPN (EVPN) introduces a new model for Ethernet services delivery.' +
'It enables integrated Layer 2 service over Ethernet with multihoming.',
+ required_apps = [ 'org.onosproject.route-service' ],
)
diff --git a/apps/evpnopenflow/pom.xml b/apps/evpnopenflow/pom.xml
index aa4aab7..02a5baa 100755
--- a/apps/evpnopenflow/pom.xml
+++ b/apps/evpnopenflow/pom.xml
@@ -105,5 +105,10 @@
<artifactId>onos-app-vtn-rsc</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/apps/evpnopenflow/src/main/java/org/onosproject/evpnopenflow/rsc/vpninstance/impl/VpnInstanceManager.java b/apps/evpnopenflow/src/main/java/org/onosproject/evpnopenflow/rsc/vpninstance/impl/VpnInstanceManager.java
index 361bad4..e0ec5a9 100755
--- a/apps/evpnopenflow/src/main/java/org/onosproject/evpnopenflow/rsc/vpninstance/impl/VpnInstanceManager.java
+++ b/apps/evpnopenflow/src/main/java/org/onosproject/evpnopenflow/rsc/vpninstance/impl/VpnInstanceManager.java
@@ -34,7 +34,7 @@
import org.onosproject.evpnopenflow.rsc.vpnafconfig.VpnAfConfigService;
import org.onosproject.evpnopenflow.rsc.vpninstance.VpnInstanceService;
import org.onosproject.incubator.net.routing.EvpnInstanceName;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.RouteAdminService;
import org.onosproject.incubator.net.routing.RouteDistinguisher;
import org.onosproject.incubator.net.routing.VpnRouteTarget;
import org.onosproject.store.serializers.KryoNamespaces;
@@ -287,4 +287,4 @@
vpnInstanceMap.put(id, vpnInstance);
return Collections.unmodifiableCollection(vpnInstanceMap.values());
}
-}
\ No newline at end of file
+}
diff --git a/apps/pim/BUCK b/apps/pim/BUCK
index 1126966..607978e 100644
--- a/apps/pim/BUCK
+++ b/apps/pim/BUCK
@@ -4,6 +4,7 @@
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-apps-routing-api',
+ '//apps/route-service/api:onos-apps-route-service-api',
]
BUNDLES = [
@@ -23,4 +24,5 @@
url = 'http://onosproject.org',
description = 'Protocol independent multicast emulation.',
included_bundles = BUNDLES,
+ required_apps = [ 'org.onosproject.route-service' ],
)
diff --git a/apps/pim/pom.xml b/apps/pim/pom.xml
index b62dc0b..4ceef0e 100644
--- a/apps/pim/pom.xml
+++ b/apps/pim/pom.xml
@@ -85,6 +85,11 @@
<artifactId>org.apache.felix.scr.annotations</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceManager.java b/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceManager.java
index 13d6da3..3c75c93 100644
--- a/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceManager.java
+++ b/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceManager.java
@@ -28,8 +28,8 @@
import org.onosproject.net.intf.InterfaceEvent;
import org.onosproject.net.intf.InterfaceListener;
import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteService;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Host;
import org.onosproject.net.config.ConfigFactory;
diff --git a/apps/pom.xml b/apps/pom.xml
index bdefb5e..0fd13fc 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -89,8 +89,9 @@
<module>yang</module>
<module>openroadm</module>
<module>netconf/client</module>
- <module>gluon</module>
+ <module>gluon</module>
<module>evpnopenflow</module>
+ <module>route-service</module>
</modules>
<properties>
diff --git a/apps/reactive-routing/BUCK b/apps/reactive-routing/BUCK
index 9728498..6e81b7a 100644
--- a/apps/reactive-routing/BUCK
+++ b/apps/reactive-routing/BUCK
@@ -4,6 +4,7 @@
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-apps-routing-api',
'//apps/intentsync:onos-apps-intentsync',
+ '//apps/route-service/api:onos-apps-route-service-api',
]
osgi_jar (
@@ -15,5 +16,5 @@
category = 'Traffic Steering',
url = 'http://onosproject.org',
description = 'SDN-IP reactive routing application.',
- required_apps = [ 'org.onosproject.intentsynchronizer', 'org.onosproject.sdnip' ],
+ required_apps = [ 'org.onosproject.intentsynchronizer', 'org.onosproject.sdnip', 'org.onosproject.route-service'],
)
diff --git a/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/ReactiveRoutingConfiguration.java b/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/ReactiveRoutingConfiguration.java
index b6145ad..904867d 100644
--- a/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/ReactiveRoutingConfiguration.java
+++ b/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/ReactiveRoutingConfiguration.java
@@ -51,7 +51,7 @@
import java.util.Set;
import java.util.stream.Collectors;
-import static org.onosproject.incubator.net.routing.RouteTools.createBinaryString;
+import static org.onosproject.routeservice.RouteTools.createBinaryString;
/**
* Reactive routing configuration manager.
diff --git a/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/SdnIpReactiveRouting.java b/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/SdnIpReactiveRouting.java
index 38917ed..5b6ad9c 100644
--- a/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/SdnIpReactiveRouting.java
+++ b/apps/reactive-routing/src/main/java/org/onosproject/reactive/routing/SdnIpReactiveRouting.java
@@ -33,8 +33,8 @@
import org.onosproject.core.CoreService;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteService;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Host;
import org.onosproject.net.flow.DefaultTrafficSelector;
diff --git a/apps/route-service/BUCK b/apps/route-service/BUCK
new file mode 100644
index 0000000..bf6ff33
--- /dev/null
+++ b/apps/route-service/BUCK
@@ -0,0 +1,11 @@
+BUNDLES = [
+ '//apps/route-service/api:onos-apps-route-service-api',
+ '//apps/route-service/app:onos-apps-route-service-app',
+]
+
+onos_app (
+ title = 'Route Service Server App',
+ category = 'Utility',
+ url = 'http://onosproject.org',
+ included_bundles = BUNDLES,
+)
diff --git a/apps/route-service/api/BUCK b/apps/route-service/api/BUCK
new file mode 100644
index 0000000..68eeacf
--- /dev/null
+++ b/apps/route-service/api/BUCK
@@ -0,0 +1,13 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+]
+
+TEST_DEPS = [
+ '//lib:TEST',
+ '//core/api:onos-api-tests',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+)
diff --git a/apps/route-service/api/pom.xml b/apps/route-service/api/pom.xml
new file mode 100644
index 0000000..f136855
--- /dev/null
+++ b/apps/route-service/api/pom.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>onos-app-route-service</artifactId>
+ <groupId>org.onosproject</groupId>
+ <version>1.11.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>onos-app-route-service-api</artifactId>
+ <packaging>bundle</packaging>
+
+ <url>http://onosproject.org</url>
+
+ <description>Route Service Application API</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onlab-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-core-serializers</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-incubator-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-api</artifactId>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+
+</project>
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/InternalRouteEvent.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/InternalRouteEvent.java
similarity index 96%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/InternalRouteEvent.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/InternalRouteEvent.java
index f32100c..899e54f 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/InternalRouteEvent.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/InternalRouteEvent.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onosproject.event.AbstractEvent;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/NextHopData.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/NextHopData.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/NextHopData.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/NextHopData.java
index d00727e..f3b7da7 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/NextHopData.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/NextHopData.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.MacAddress;
import org.onosproject.net.ConnectPoint;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/ResolvedRoute.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java
similarity index 98%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/ResolvedRoute.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java
index 49b1cb8..828827d 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/ResolvedRoute.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/Route.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/Route.java
similarity index 98%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/Route.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/Route.java
index 845adea..f542252 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/Route.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/Route.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteAdminService.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteAdminService.java
similarity index 95%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteAdminService.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteAdminService.java
index 86a18a9..8886169 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteAdminService.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteAdminService.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import java.util.Collection;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteConfig.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteConfig.java
index 839f394..cc77b59 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteConfig.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteConfig.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.ImmutableSet;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteEvent.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteEvent.java
similarity index 98%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteEvent.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteEvent.java
index 42015b7..0428beb 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteEvent.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteEvent.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.joda.time.LocalDateTime;
import org.onosproject.event.AbstractEvent;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteInfo.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteInfo.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteInfo.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteInfo.java
index 43cae90..0969162 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteInfo.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteInfo.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import com.google.common.annotations.Beta;
import org.onlab.packet.IpPrefix;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteListener.java
similarity index 93%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteListener.java
index d4d4c12..063f335 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteListener.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onosproject.event.EventListener;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteService.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteService.java
index b4766b7..c626e47 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteService.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteService.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.IpAddress;
import org.onosproject.event.ListenerService;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteSet.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteSet.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteSet.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteSet.java
index 207be54..f464e5d 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteSet.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteSet.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import com.google.common.collect.ImmutableSet;
import org.onlab.packet.IpPrefix;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java
index 67d1678..6866762 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStore.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import com.google.common.annotations.Beta;
import org.onlab.packet.IpAddress;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStoreDelegate.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStoreDelegate.java
similarity index 93%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStoreDelegate.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStoreDelegate.java
index 9bb3092..e9c5b00 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteStoreDelegate.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStoreDelegate.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onosproject.store.StoreDelegate;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteTableId.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteTableId.java
similarity index 96%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteTableId.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteTableId.java
index 785a815..b522e6c 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteTableId.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteTableId.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import java.util.Objects;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteTools.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteTools.java
similarity index 96%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteTools.java
rename to apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteTools.java
index eee406b..5264719 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteTools.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteTools.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.IpPrefix;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/package-info.java
similarity index 75%
copy from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
copy to apps/route-service/api/src/main/java/org/onosproject/routeservice/package-info.java
index d4d4c12..5bfe5ba 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/package-info.java
@@ -14,12 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
-
-import org.onosproject.event.EventListener;
-
/**
- * Listener for route events.
+ * Unicast routing service.
*/
-public interface RouteListener extends EventListener<RouteEvent> {
-}
+package org.onosproject.routeservice;
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteConfigTest.java b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteConfigTest.java
similarity index 98%
rename from incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteConfigTest.java
rename to apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteConfigTest.java
index 8e1cbe3..1e48420 100644
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteConfigTest.java
+++ b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteConfigTest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -78,4 +78,4 @@
public void onApply(Config config) {
}
}
-}
\ No newline at end of file
+}
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteServiceAdapter.java b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteServiceAdapter.java
similarity index 96%
rename from incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteServiceAdapter.java
rename to apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteServiceAdapter.java
index 0a2dd8f..1d6ec19 100644
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteServiceAdapter.java
+++ b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteServiceAdapter.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.IpAddress;
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteStoreAdapter.java b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java
similarity index 96%
rename from incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteStoreAdapter.java
rename to apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java
index 5e9347b..bf9e527 100644
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/routing/RouteStoreAdapter.java
+++ b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
+package org.onosproject.routeservice;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
diff --git a/incubator/api/src/test/resources/route-config.json b/apps/route-service/api/src/test/resources/route-config.json
similarity index 100%
rename from incubator/api/src/test/resources/route-config.json
rename to apps/route-service/api/src/test/resources/route-config.json
diff --git a/apps/route-service/app/BUCK b/apps/route-service/app/BUCK
new file mode 100644
index 0000000..289fddc
--- /dev/null
+++ b/apps/route-service/app/BUCK
@@ -0,0 +1,19 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:concurrent-trees',
+ '//core/store/serializers:onos-core-serializers',
+ '//apps/route-service/api:onos-apps-route-service-api',
+ '//cli:onos-cli',
+ '//lib:org.apache.karaf.shell.console',
+]
+
+TEST_DEPS = [
+ '//lib:TEST',
+ '//apps/route-service/api:onos-apps-route-service-api-tests',
+ '//core/api:onos-api-tests',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+)
diff --git a/apps/route-service/app/app.xml b/apps/route-service/app/app.xml
new file mode 100644
index 0000000..a561826
--- /dev/null
+++ b/apps/route-service/app/app.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<app name="org.onosproject.routeservice" origin="ON.Lab" version="${project.version}"
+ category="Utility" url="http://onosproject.org" title="Route Service App"
+ featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
+ features="${project.artifactId}">
+ <description>${project.description}</description>
+ <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
+ <artifact>mvn:${project.groupId}/onos-app-route-service-api/${project.version}</artifact>
+</app>
diff --git a/apps/route-service/app/features.xml b/apps/route-service/app/features.xml
new file mode 100644
index 0000000..4cc99bd
--- /dev/null
+++ b/apps/route-service/app/features.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
+ <feature name="${project.artifactId}" version="${project.version}"
+ description="${project.description}">
+ <feature>onos-api</feature>
+ <bundle>mvn:${project.groupId}/onos-app-route-service-api/${project.version}</bundle>
+ <bundle>mvn:${project.groupId}/onos-app-route-service/${project.version}</bundle>
+ </feature>
+</features>
diff --git a/apps/route-service/app/pom.xml b/apps/route-service/app/pom.xml
new file mode 100644
index 0000000..9428fb2
--- /dev/null
+++ b/apps/route-service/app/pom.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>onos-app-route-service</artifactId>
+ <groupId>org.onosproject</groupId>
+ <version>1.11.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>onos-app-route-service-app</artifactId>
+ <packaging>bundle</packaging>
+
+ <url>http://onosproject.org</url>
+
+ <description>Route Service Application</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onlab-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-core-serializers</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-incubator-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-cli</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-api</artifactId>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.googlecode.concurrent-trees</groupId>
+ <artifactId>concurrent-trees</artifactId>
+ <version>2.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>5.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+
+</project>
diff --git a/cli/src/main/java/org/onosproject/cli/net/RouteAddCommand.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteAddCommand.java
similarity index 91%
rename from cli/src/main/java/org/onosproject/cli/net/RouteAddCommand.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteAddCommand.java
index 3d2234b..1810a07 100644
--- a/cli/src/main/java/org/onosproject/cli/net/RouteAddCommand.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteAddCommand.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package org.onosproject.cli.net;
+package org.onosproject.routeservice.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onosproject.cli.AbstractShellCommand;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
import java.util.Collections;
diff --git a/cli/src/main/java/org/onosproject/cli/net/RouteRemoveCommand.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteRemoveCommand.java
similarity index 91%
rename from cli/src/main/java/org/onosproject/cli/net/RouteRemoveCommand.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteRemoveCommand.java
index 5299eee..9fef2ec 100644
--- a/cli/src/main/java/org/onosproject/cli/net/RouteRemoveCommand.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteRemoveCommand.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package org.onosproject.cli.net;
+package org.onosproject.routeservice.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onosproject.cli.AbstractShellCommand;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
import java.util.Collections;
diff --git a/cli/src/main/java/org/onosproject/cli/net/RouteStoreCommand.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteStoreCommand.java
similarity index 92%
rename from cli/src/main/java/org/onosproject/cli/net/RouteStoreCommand.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteStoreCommand.java
index 288b29f..2aefbf7 100644
--- a/cli/src/main/java/org/onosproject/cli/net/RouteStoreCommand.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RouteStoreCommand.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.cli.net;
+package org.onosproject.routeservice.cli;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
-import org.onosproject.incubator.net.routing.RouteStore;
+import org.onosproject.routeservice.RouteStore;
/**
* Command to show the current route store implementation.
@@ -31,4 +31,4 @@
RouteStore routeStore = AbstractShellCommand.get(RouteStore.class);
print(routeStore.name());
}
-}
\ No newline at end of file
+}
diff --git a/cli/src/main/java/org/onosproject/cli/net/RoutesListCommand.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RoutesListCommand.java
similarity index 93%
rename from cli/src/main/java/org/onosproject/cli/net/RoutesListCommand.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RoutesListCommand.java
index ce4e2d7..9c7eae0 100644
--- a/cli/src/main/java/org/onosproject/cli/net/RoutesListCommand.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/RoutesListCommand.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.cli.net;
+package org.onosproject.routeservice.cli;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -21,10 +21,10 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.RouteInfo;
-import org.onosproject.incubator.net.routing.RouteService;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.RouteInfo;
+import org.onosproject.routeservice.RouteService;
+import org.onosproject.routeservice.RouteTableId;
import java.util.Collection;
import java.util.Comparator;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/package-info.java
similarity index 75%
copy from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
copy to apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/package-info.java
index d4d4c12..3880e5b 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/cli/package-info.java
@@ -14,12 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
-
-import org.onosproject.event.EventListener;
-
/**
- * Listener for route events.
+ * Implementation of route service.
*/
-public interface RouteListener extends EventListener<RouteEvent> {
-}
+package org.onosproject.routeservice.cli;
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ConfigurationRouteSource.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ConfigurationRouteSource.java
similarity index 94%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ConfigurationRouteSource.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ConfigurationRouteSource.java
index e41410f..eb6733f 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ConfigurationRouteSource.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ConfigurationRouteSource.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
@@ -22,9 +22,9 @@
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.onosproject.core.ApplicationId;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
-import org.onosproject.incubator.net.routing.RouteConfig;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
+import org.onosproject.routeservice.RouteConfig;
import org.onosproject.net.config.ConfigFactory;
import org.onosproject.net.config.NetworkConfigEvent;
import org.onosproject.net.config.NetworkConfigListener;
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/DefaultResolvedRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java
similarity index 95%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/DefaultResolvedRouteStore.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java
index 41eda3b..34aeaa7 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/DefaultResolvedRouteStore.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -26,9 +26,9 @@
import org.onlab.packet.IpPrefix;
import org.onlab.util.GuavaCollectors;
import org.onlab.util.Tools;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteTableId;
import java.util.Collection;
import java.util.Collections;
@@ -37,7 +37,7 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import static org.onosproject.incubator.net.routing.RouteTools.createBinaryString;
+import static org.onosproject.routeservice.RouteTools.createBinaryString;
/**
* Stores routes that have been resolved.
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ListenerQueue.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ListenerQueue.java
similarity index 90%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ListenerQueue.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ListenerQueue.java
index d7f9ac7..93e80d5 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ListenerQueue.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ListenerQueue.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
-import org.onosproject.incubator.net.routing.RouteEvent;
+import org.onosproject.routeservice.RouteEvent;
/**
* Queues updates for a route listener to ensure they are received in the
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ResolvedRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ResolvedRouteStore.java
similarity index 91%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ResolvedRouteStore.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ResolvedRouteStore.java
index 234abfa..a6db108 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/ResolvedRouteStore.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/ResolvedRouteStore.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteTableId;
import java.util.Collection;
import java.util.Optional;
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java
similarity index 93%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java
index a6935c0..e5db364 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteManager.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
@@ -25,18 +25,18 @@
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onosproject.cluster.ClusterService;
-import org.onosproject.incubator.net.routing.InternalRouteEvent;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteInfo;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.net.routing.RouteService;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteStore;
-import org.onosproject.incubator.net.routing.RouteStoreDelegate;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.InternalRouteEvent;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteInfo;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.RouteService;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteStore;
+import org.onosproject.routeservice.RouteStoreDelegate;
+import org.onosproject.routeservice.RouteTableId;
import org.onosproject.net.Host;
import org.onosproject.net.host.HostEvent;
import org.onosproject.net.host.HostListener;
@@ -138,7 +138,7 @@
.map(resolvedRouteStore::getRoutes)
.flatMap(Collection::stream)
.map(route -> new RouteEvent(RouteEvent.Type.ROUTE_ADDED, route,
- resolvedRouteStore.getAllRoutes(route.prefix())))
+ resolvedRouteStore.getAllRoutes(route.prefix())))
.forEach(l::post);
listeners.put(listener, l);
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteMonitor.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java
similarity index 94%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteMonitor.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java
index 262a20e..24d2aff 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/routing/impl/RouteMonitor.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
import org.onosproject.cluster.ClusterEvent;
import org.onosproject.cluster.ClusterEventListener;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.NodeId;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.DistributedPrimitive;
import org.onosproject.store.service.Serializer;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/package-info.java
similarity index 75%
copy from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
copy to apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/package-info.java
index d4d4c12..037bde4 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/package-info.java
@@ -14,12 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
-
-import org.onosproject.event.EventListener;
-
/**
- * Listener for route events.
+ * Implementation of route service.
*/
-public interface RouteListener extends EventListener<RouteEvent> {
-}
+package org.onosproject.routeservice.impl;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DefaultRouteTable.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java
similarity index 94%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DefaultRouteTable.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java
index f3ad7ea..d42a05a 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DefaultRouteTable.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package org.onosproject.incubator.store.routing.impl;
+package org.onosproject.routeservice.store;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onlab.util.KryoNamespace;
-import org.onosproject.incubator.net.routing.InternalRouteEvent;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteStoreDelegate;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.InternalRouteEvent;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteStoreDelegate;
+import org.onosproject.routeservice.RouteTableId;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.ConsistentMap;
import org.onosproject.store.service.DistributedPrimitive;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java
similarity index 93%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java
index 703b165..feacb82 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/DistributedRouteStore.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-package org.onosproject.incubator.store.routing.impl;
+package org.onosproject.routeservice.store;
import com.google.common.collect.ImmutableSet;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onlab.util.KryoNamespace;
-import org.onosproject.incubator.net.routing.InternalRouteEvent;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteStore;
-import org.onosproject.incubator.net.routing.RouteStoreDelegate;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.InternalRouteEvent;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteStore;
+import org.onosproject.routeservice.RouteStoreDelegate;
+import org.onosproject.routeservice.RouteTableId;
import org.onosproject.store.AbstractStore;
import org.onosproject.store.service.DistributedSet;
import org.onosproject.store.service.Serializer;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/EmptyRouteTable.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java
similarity index 88%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/EmptyRouteTable.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java
index 5c6419b..3786675 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/EmptyRouteTable.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.onosproject.incubator.store.routing.impl;
+package org.onosproject.routeservice.store;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteTableId;
import java.util.Collection;
import java.util.Collections;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java
similarity index 90%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java
index b8bbfda..7884783 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.store.routing.impl;
+package org.onosproject.routeservice.store;
import com.googlecode.concurrenttrees.common.KeyValuePair;
import com.googlecode.concurrenttrees.radix.node.concrete.DefaultByteArrayNodeFactory;
@@ -22,12 +22,13 @@
import com.googlecode.concurrenttrees.radixinverted.InvertedRadixTree;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
-import org.onosproject.incubator.net.routing.InternalRouteEvent;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteStore;
-import org.onosproject.incubator.net.routing.RouteStoreDelegate;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.InternalRouteEvent;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteStore;
+import org.onosproject.routeservice.RouteStoreDelegate;
+import org.onosproject.routeservice.RouteTableId;
+import org.onosproject.routeservice.RouteTools;
import org.onosproject.store.AbstractStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,7 +44,6 @@
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.onosproject.incubator.net.routing.RouteTools.createBinaryString;
/**
* Route store based on in-memory storage.
@@ -150,7 +150,7 @@
return;
}
- routeTable.put(createBinaryString(route.prefix()), route);
+ routeTable.put(RouteTools.createBinaryString(route.prefix()), route);
notifyDelegate(new InternalRouteEvent(
InternalRouteEvent.Type.ROUTE_ADDED, singletonRouteSet(route)));
@@ -165,7 +165,7 @@
public void remove(Route route) {
synchronized (this) {
Route removed = routes.remove(route.prefix());
- routeTable.remove(createBinaryString(route.prefix()));
+ routeTable.remove(RouteTools.createBinaryString(route.prefix()));
if (removed != null) {
notifyDelegate(new InternalRouteEvent(
@@ -228,7 +228,7 @@
*/
public Route longestPrefixMatch(IpAddress ip) {
Iterable<Route> prefixes =
- routeTable.getValuesForKeysPrefixing(createBinaryString(ip.toIpPrefix()));
+ routeTable.getValuesForKeysPrefixing(RouteTools.createBinaryString(ip.toIpPrefix()));
Iterator<Route> it = prefixes.iterator();
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/RouteStoreImpl.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java
similarity index 92%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/RouteStoreImpl.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java
index d5b19bd..5c18b54 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/RouteStoreImpl.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.store.routing.impl;
+package org.onosproject.routeservice.store;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
@@ -27,12 +27,12 @@
import org.onlab.packet.IpPrefix;
import org.onlab.util.Tools;
import org.onosproject.cfg.ComponentConfigService;
-import org.onosproject.incubator.net.routing.InternalRouteEvent;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteStore;
-import org.onosproject.incubator.net.routing.RouteStoreDelegate;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.InternalRouteEvent;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteStore;
+import org.onosproject.routeservice.RouteStoreDelegate;
+import org.onosproject.routeservice.RouteTableId;
import org.onosproject.store.AbstractStore;
import org.onosproject.store.service.StorageService;
import org.osgi.service.component.ComponentContext;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/RouteTable.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java
similarity index 89%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/RouteTable.java
rename to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java
index f09fb8c..fbe32c0 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/RouteTable.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.onosproject.incubator.store.routing.impl;
+package org.onosproject.routeservice.store;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteSet;
-import org.onosproject.incubator.net.routing.RouteTableId;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteSet;
+import org.onosproject.routeservice.RouteTableId;
import java.util.Collection;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/package-info.java
similarity index 75%
copy from incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
copy to apps/route-service/app/src/main/java/org/onosproject/routeservice/store/package-info.java
index d4d4c12..fbf31a3 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/routing/RouteListener.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/package-info.java
@@ -14,12 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing;
-
-import org.onosproject.event.EventListener;
-
/**
- * Listener for route events.
+ * Implementation of the unicast routing service.
*/
-public interface RouteListener extends EventListener<RouteEvent> {
-}
+package org.onosproject.routeservice.store;
diff --git a/apps/route-service/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/route-service/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
new file mode 100644
index 0000000..a020c3b
--- /dev/null
+++ b/apps/route-service/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -0,0 +1,35 @@
+<!--
+ ~ Copyright 2014-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+
+ <command>
+ <action class="org.onosproject.routeservice.cli.RoutesListCommand"/>
+ </command>
+ <command>
+ <action class="org.onosproject.routeservice.cli.RouteAddCommand"/>
+ </command>
+ <command>
+ <action class="org.onosproject.routeservice.cli.RouteRemoveCommand"/>
+ </command>
+ <command>
+ <action class="org.onosproject.routeservice.cli.RouteStoreCommand"/>
+ </command>
+
+ </command-bundle>
+
+</blueprint>
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java b/apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java
similarity index 97%
rename from incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java
rename to apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java
index 7ab3044..8febe68 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/routing/impl/RouteManagerTest.java
+++ b/apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package org.onosproject.incubator.net.routing.impl;
+package org.onosproject.routeservice.impl;
-import com.google.common.collect.Sets;
+import java.util.Collections;
+
import org.junit.Before;
import org.junit.Test;
import org.onlab.packet.Ip4Address;
@@ -27,12 +28,12 @@
import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.store.LocalRouteStore;
import org.onosproject.cluster.ClusterService;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.store.routing.impl.LocalRouteStore;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DefaultHost;
import org.onosproject.net.DeviceId;
@@ -48,7 +49,7 @@
import org.onosproject.store.service.StorageService;
import org.onosproject.store.service.WorkQueue;
-import java.util.Collections;
+import com.google.common.collect.Sets;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.anyString;
diff --git a/apps/route-service/pom.xml b/apps/route-service/pom.xml
new file mode 100644
index 0000000..d9383df
--- /dev/null
+++ b/apps/route-service/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright 2015-present Open Networking Foundation
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-apps</artifactId>
+ <version>1.11.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>onos-app-route-service</artifactId>
+ <packaging>pom</packaging>
+
+ <description>Route Service Application</description>
+
+ <modules>
+ <module>api</module>
+ <module>app</module>
+ </modules>
+
+</project>
diff --git a/apps/routing/common/BUCK b/apps/routing/common/BUCK
index 8483685..38167dc 100644
--- a/apps/routing/common/BUCK
+++ b/apps/routing/common/BUCK
@@ -5,6 +5,7 @@
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-apps-routing-api',
+ '//apps/route-service/api:onos-apps-route-service-api',
'//core/common:onos-core-common',
]
diff --git a/apps/routing/common/pom.xml b/apps/routing/common/pom.xml
index c87bba2..47840c9 100644
--- a/apps/routing/common/pom.xml
+++ b/apps/routing/common/pom.xml
@@ -86,6 +86,11 @@
<artifactId>concurrent-trees</artifactId>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpRouteSelector.java b/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpRouteSelector.java
index cc4a578..259ae3c 100644
--- a/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpRouteSelector.java
+++ b/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpRouteSelector.java
@@ -18,7 +18,7 @@
import org.onlab.packet.IpPrefix;
import org.onosproject.cluster.ClusterService;
-import org.onosproject.incubator.net.routing.Route;
+import org.onosproject.routeservice.Route;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpSessionManager.java b/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpSessionManager.java
index 7d2875f..a2521ba 100644
--- a/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpSessionManager.java
+++ b/apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpSessionManager.java
@@ -38,8 +38,8 @@
import org.onlab.packet.Ip6Prefix;
import org.onlab.packet.IpPrefix;
import org.onosproject.cluster.ClusterService;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/apps/routing/common/src/test/java/org/onosproject/routing/bgp/BgpSessionManagerTest.java b/apps/routing/common/src/test/java/org/onosproject/routing/bgp/BgpSessionManagerTest.java
index 7fbbefb..7d3414d 100644
--- a/apps/routing/common/src/test/java/org/onosproject/routing/bgp/BgpSessionManagerTest.java
+++ b/apps/routing/common/src/test/java/org/onosproject/routing/bgp/BgpSessionManagerTest.java
@@ -38,7 +38,7 @@
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.DefaultControllerNode;
import org.onosproject.cluster.NodeId;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.RouteAdminService;
import org.osgi.service.component.ComponentContext;
import java.net.InetAddress;
diff --git a/apps/routing/fibinstaller/BUCK b/apps/routing/fibinstaller/BUCK
index b77e51b..ee7bf98 100644
--- a/apps/routing/fibinstaller/BUCK
+++ b/apps/routing/fibinstaller/BUCK
@@ -2,12 +2,14 @@
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-apps-routing-api',
+ '//apps/route-service/api:onos-apps-route-service-api',
]
TEST_DEPS = [
'//lib:TEST_ADAPTERS',
'//incubator/api:onos-incubator-api-tests',
'//apps/routing-api:onos-apps-routing-api-tests',
+ '//apps/route-service/api:onos-apps-route-service-api-tests',
]
osgi_jar_with_tests (
@@ -27,4 +29,5 @@
url = 'http://onosproject.org',
description = 'Installs routing rules into switches',
included_bundles = BUNDLES,
+ required_apps = [ 'org.onosproject.route-service' ],
)
diff --git a/apps/routing/fibinstaller/pom.xml b/apps/routing/fibinstaller/pom.xml
index f9f7f4b..91213f7 100644
--- a/apps/routing/fibinstaller/pom.xml
+++ b/apps/routing/fibinstaller/pom.xml
@@ -26,6 +26,13 @@
<artifactId>onos-apps-routing-fibinstaller</artifactId>
<packaging>bundle</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
</project>
diff --git a/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java b/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java
index 65d35e2..e5e74c7 100644
--- a/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java
+++ b/apps/routing/fibinstaller/src/main/java/org/onosproject/routing/fibinstaller/FibInstaller.java
@@ -39,11 +39,11 @@
import org.onosproject.incubator.net.config.basics.McastConfig;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.net.routing.RouteService;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.RouteService;
import org.onosproject.net.DeviceId;
import org.onosproject.net.config.ConfigFactory;
import org.onosproject.net.config.NetworkConfigEvent;
diff --git a/apps/routing/fibinstaller/src/test/java/org/onosproject/routing/fibinstaller/FibInstallerTest.java b/apps/routing/fibinstaller/src/test/java/org/onosproject/routing/fibinstaller/FibInstallerTest.java
index 32cfd59..d591d6d 100644
--- a/apps/routing/fibinstaller/src/test/java/org/onosproject/routing/fibinstaller/FibInstallerTest.java
+++ b/apps/routing/fibinstaller/src/test/java/org/onosproject/routing/fibinstaller/FibInstallerTest.java
@@ -35,11 +35,11 @@
import org.onosproject.net.intf.InterfaceListener;
import org.onosproject.net.intf.InterfaceService;
import org.onosproject.net.intf.InterfaceServiceAdapter;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.net.routing.RouteServiceAdapter;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.RouteServiceAdapter;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.PortNumber;
diff --git a/apps/routing/fpm/BUCK b/apps/routing/fpm/BUCK
index a4396f7..7ea89b9 100644
--- a/apps/routing/fpm/BUCK
+++ b/apps/routing/fpm/BUCK
@@ -4,6 +4,7 @@
'//cli:onos-cli',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-apps-routing-api',
+ '//apps/route-service/api:onos-apps-route-service-api',
'//core/store/serializers:onos-core-serializers',
]
@@ -29,4 +30,5 @@
url = 'http://onosproject.org',
description = 'Receives routes from external routing daemon over FPM protocol',
included_bundles = BUNDLES,
+ required_apps = [ 'org.onosproject.route-service' ],
)
diff --git a/apps/routing/fpm/pom.xml b/apps/routing/fpm/pom.xml
index 972297f..37c81d8 100644
--- a/apps/routing/fpm/pom.xml
+++ b/apps/routing/fpm/pom.xml
@@ -49,6 +49,11 @@
<artifactId>onos-core-serializers</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/apps/routing/fpm/src/main/java/org/onosproject/routing/fpm/FpmManager.java b/apps/routing/fpm/src/main/java/org/onosproject/routing/fpm/FpmManager.java
index fee01e8..178b489 100644
--- a/apps/routing/fpm/src/main/java/org/onosproject/routing/fpm/FpmManager.java
+++ b/apps/routing/fpm/src/main/java/org/onosproject/routing/fpm/FpmManager.java
@@ -44,8 +44,8 @@
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.NodeId;
import org.onosproject.core.CoreService;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteAdminService;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteAdminService;
import org.onosproject.routing.fpm.protocol.FpmHeader;
import org.onosproject.routing.fpm.protocol.Netlink;
import org.onosproject.routing.fpm.protocol.RouteAttribute;
diff --git a/apps/sdnip/BUCK b/apps/sdnip/BUCK
index 0067e19..08f02a4 100644
--- a/apps/sdnip/BUCK
+++ b/apps/sdnip/BUCK
@@ -2,6 +2,7 @@
'//lib:CORE_DEPS',
'//incubator/api:onos-incubator-api',
'//apps/routing-api:onos-apps-routing-api',
+ '//apps/route-service/api:onos-apps-route-service-api',
'//apps/intentsync:onos-apps-intentsync',
'//lib:org.apache.karaf.shell.console',
'//cli:onos-cli'
@@ -15,8 +16,8 @@
TEST_DEPS = [
'//lib:TEST_ADAPTERS',
- '//incubator/api:onos-incubator-api-tests',
'//apps/routing-api:onos-apps-routing-api-tests',
+ '//apps/route-service/api:onos-apps-route-service-api-tests',
]
osgi_jar_with_tests (
@@ -30,5 +31,5 @@
url = 'http://onosproject.org',
included_bundles = BUNDLES,
description = 'SDN-IP peering application',
- required_apps = [ 'org.onosproject.intentsynchronizer' ],
+ required_apps = [ 'org.onosproject.intentsynchronizer', 'org.onosproject.route-service' ],
)
diff --git a/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java b/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java
index 8488924..9a4369e 100644
--- a/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java
+++ b/apps/sdnip/src/main/java/org/onosproject/sdnip/SdnIpFib.java
@@ -34,10 +34,10 @@
import org.onosproject.net.intf.InterfaceEvent;
import org.onosproject.net.intf.InterfaceListener;
import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.net.routing.RouteService;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.RouteService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.EncapsulationType;
import org.onosproject.net.FilteredConnectPoint;
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java
index d50aebc..8a5868a 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java
@@ -37,11 +37,11 @@
import org.onosproject.net.intf.InterfaceListener;
import org.onosproject.net.intf.InterfaceService;
import org.onosproject.net.intf.InterfaceServiceAdapter;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.Route;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.net.routing.RouteServiceAdapter;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.RouteServiceAdapter;
import org.onosproject.intentsync.IntentSynchronizationService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
diff --git a/apps/segmentrouting/BUCK b/apps/segmentrouting/BUCK
index 3f4e968..d068897 100644
--- a/apps/segmentrouting/BUCK
+++ b/apps/segmentrouting/BUCK
@@ -6,6 +6,7 @@
'//core/store/serializers:onos-core-serializers',
'//incubator/api:onos-incubator-api',
'//utils/rest:onlab-rest',
+ '//apps/route-service/api:onos-apps-route-service-api',
]
BUNDLES = [
@@ -29,4 +30,5 @@
url = 'http://onosproject.org',
included_bundles = BUNDLES,
description = 'Segment routing application.',
+ required_apps = [ 'org.onosproject.route-service' ],
)
diff --git a/apps/segmentrouting/pom.xml b/apps/segmentrouting/pom.xml
index c37c80a..50149a0 100644
--- a/apps/segmentrouting/pom.xml
+++ b/apps/segmentrouting/pom.xml
@@ -107,6 +107,11 @@
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-app-route-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
index 9402af5..017e7b0 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
@@ -29,7 +29,7 @@
import org.onlab.packet.ndp.NeighborSolicitation;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageType;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
+import org.onosproject.routeservice.ResolvedRoute;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.flow.DefaultTrafficTreatment;
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RouteHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RouteHandler.java
index 3f7b8ad..c82b39b 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RouteHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RouteHandler.java
@@ -22,8 +22,8 @@
import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
-import org.onosproject.incubator.net.routing.ResolvedRoute;
-import org.onosproject.incubator.net.routing.RouteEvent;
+import org.onosproject.routeservice.ResolvedRoute;
+import org.onosproject.routeservice.RouteEvent;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.slf4j.Logger;
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 1f63502..0d1d68b 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -40,9 +40,9 @@
import org.onosproject.incubator.net.config.basics.McastConfig;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.incubator.net.routing.RouteEvent;
-import org.onosproject.incubator.net.routing.RouteListener;
-import org.onosproject.incubator.net.routing.RouteService;
+import org.onosproject.routeservice.RouteEvent;
+import org.onosproject.routeservice.RouteListener;
+import org.onosproject.routeservice.RouteService;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.mastership.MastershipService;
import org.onosproject.net.ConnectPoint;
diff --git a/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 55e4750..8034a40 100644
--- a/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/cli/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -565,19 +565,6 @@
</command>
<command>
- <action class="org.onosproject.cli.net.RoutesListCommand"/>
- </command>
- <command>
- <action class="org.onosproject.cli.net.RouteAddCommand"/>
- </command>
- <command>
- <action class="org.onosproject.cli.net.RouteRemoveCommand"/>
- </command>
- <command>
- <action class="org.onosproject.cli.net.RouteStoreCommand"/>
- </command>
-
- <command>
<action class="org.onosproject.cli.net.GlobalLabelCommand"/>
</command>
<command>
diff --git a/modules.defs b/modules.defs
index 616bf2b..fa8cba2 100644
--- a/modules.defs
+++ b/modules.defs
@@ -210,6 +210,7 @@
'//apps/artemis:onos-apps-artemis-oar',
'//apps/gluon:onos-apps-gluon-oar',
'//apps/evpnopenflow:onos-apps-evpnopenflow-oar',
+ '//apps/route-service:onos-apps-route-service-oar',
]
PROTOCOL_APPS = [
diff --git a/tools/build/publish-target-list b/tools/build/publish-target-list
index c20196f..a57b888 100644
--- a/tools/build/publish-target-list
+++ b/tools/build/publish-target-list
@@ -3,6 +3,7 @@
//apps/optical-model:onos-apps-optical-model
//apps/restconf/api:onos-apps-restconf-api
//apps/routing-api:onos-apps-routing-api
+ //apps/route-service/api:onos-apps-route-service-api
//cli:onos-cli
//core/api:onos-api
//core/common:onos-core-common