Jonathan Hart
Committed by Gerrit Code Review

Move IntentSynchronizer to routing bundle.

This allows it to be used separately from SDNIP.

Change-Id: I45358666aa32763cb4bcac8f1c0a4025c6b76863
......@@ -106,6 +106,14 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-api</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
</dependencies>
</project>
......
/*
* Copyright 2014 Open Networking Laboratory
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.sdnip.cli;
package org.onosproject.routing.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
......
/*
* Copyright 2014-2015 Open Networking Laboratory
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.sdnip;
package org.onosproject.routing.impl;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
......@@ -30,6 +31,7 @@ import org.onosproject.core.CoreService;
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.IntentService;
import org.onosproject.net.intent.IntentState;
import org.onosproject.net.intent.IntentUtils;
import org.onosproject.net.intent.Key;
import org.onosproject.routing.IntentSynchronizationAdminService;
import org.onosproject.routing.IntentSynchronizationService;
......@@ -45,8 +47,6 @@ import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import org.onosproject.net.intent.IntentUtils;
import static java.util.concurrent.Executors.newSingleThreadExecutor;
import static org.onlab.util.Tools.groupedThreads;
......@@ -54,7 +54,7 @@ import static org.onlab.util.Tools.groupedThreads;
* Synchronizes intents between an in-memory intent store and the IntentService.
*/
@Service
@Component(immediate = true)
@Component(immediate = false)
public class IntentSynchronizer implements IntentSynchronizationService,
IntentSynchronizationAdminService {
......
......@@ -34,5 +34,8 @@
<command>
<action class="org.onosproject.routing.cli.BgpSpeakersListCommand"/>
</command>
<command>
<action class="org.onosproject.routing.cli.PrimaryChangeCommand"/>
</command>
</command-bundle>
</blueprint>
......
/*
* Copyright 2014-2015 Open Networking Laboratory
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.sdnip;
package org.onosproject.routing.impl;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.MoreExecutors;
......@@ -68,7 +68,7 @@ import static org.junit.Assert.assertThat;
* This class tests the intent synchronization function in the
* IntentSynchronizer class.
*/
public class IntentSyncTest extends AbstractIntentTest {
public class IntentSynchronizerTest extends AbstractIntentTest {
private IntentService intentService;
......@@ -400,7 +400,6 @@ public class IntentSyncTest extends AbstractIntentTest {
.treatment(treatmentBuilder.build())
.ingressPoints(ingressPoints)
.egressPoint(egressPoint)
.constraints(SdnIpFib.CONSTRAINTS)
.build();
return intent;
}
......
......@@ -17,9 +17,6 @@
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command>
<action class="org.onosproject.sdnip.cli.PrimaryChangeCommand"/>
</command>
<command>
<action class="org.onosproject.sdnip.cli.AddSpeakerCommand"/>
</command>
<command>
......