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 @@ ...@@ -106,6 +106,14 @@
106 <scope>test</scope> 106 <scope>test</scope>
107 </dependency> 107 </dependency>
108 108
109 + <dependency>
110 + <groupId>org.onosproject</groupId>
111 + <artifactId>onos-api</artifactId>
112 + <version>${project.version}</version>
113 + <scope>test</scope>
114 + <classifier>tests</classifier>
115 + </dependency>
116 +
109 </dependencies> 117 </dependencies>
110 118
111 </project> 119 </project>
......
1 /* 1 /*
2 - * Copyright 2014 Open Networking Laboratory 2 + * Copyright 2016 Open Networking Laboratory
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.sdnip.cli; 16 +package org.onosproject.routing.cli;
17 17
18 import org.apache.karaf.shell.commands.Argument; 18 import org.apache.karaf.shell.commands.Argument;
19 import org.apache.karaf.shell.commands.Command; 19 import org.apache.karaf.shell.commands.Command;
......
1 /* 1 /*
2 - * Copyright 2014-2015 Open Networking Laboratory 2 + * Copyright 2016 Open Networking Laboratory
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.sdnip; 16 +
17 +package org.onosproject.routing.impl;
17 18
18 import org.apache.felix.scr.annotations.Activate; 19 import org.apache.felix.scr.annotations.Activate;
19 import org.apache.felix.scr.annotations.Component; 20 import org.apache.felix.scr.annotations.Component;
...@@ -30,6 +31,7 @@ import org.onosproject.core.CoreService; ...@@ -30,6 +31,7 @@ import org.onosproject.core.CoreService;
30 import org.onosproject.net.intent.Intent; 31 import org.onosproject.net.intent.Intent;
31 import org.onosproject.net.intent.IntentService; 32 import org.onosproject.net.intent.IntentService;
32 import org.onosproject.net.intent.IntentState; 33 import org.onosproject.net.intent.IntentState;
34 +import org.onosproject.net.intent.IntentUtils;
33 import org.onosproject.net.intent.Key; 35 import org.onosproject.net.intent.Key;
34 import org.onosproject.routing.IntentSynchronizationAdminService; 36 import org.onosproject.routing.IntentSynchronizationAdminService;
35 import org.onosproject.routing.IntentSynchronizationService; 37 import org.onosproject.routing.IntentSynchronizationService;
...@@ -45,8 +47,6 @@ import java.util.Objects; ...@@ -45,8 +47,6 @@ import java.util.Objects;
45 import java.util.concurrent.ConcurrentHashMap; 47 import java.util.concurrent.ConcurrentHashMap;
46 import java.util.concurrent.ExecutorService; 48 import java.util.concurrent.ExecutorService;
47 49
48 -import org.onosproject.net.intent.IntentUtils;
49 -
50 import static java.util.concurrent.Executors.newSingleThreadExecutor; 50 import static java.util.concurrent.Executors.newSingleThreadExecutor;
51 import static org.onlab.util.Tools.groupedThreads; 51 import static org.onlab.util.Tools.groupedThreads;
52 52
...@@ -54,7 +54,7 @@ import static org.onlab.util.Tools.groupedThreads; ...@@ -54,7 +54,7 @@ import static org.onlab.util.Tools.groupedThreads;
54 * Synchronizes intents between an in-memory intent store and the IntentService. 54 * Synchronizes intents between an in-memory intent store and the IntentService.
55 */ 55 */
56 @Service 56 @Service
57 -@Component(immediate = true) 57 +@Component(immediate = false)
58 public class IntentSynchronizer implements IntentSynchronizationService, 58 public class IntentSynchronizer implements IntentSynchronizationService,
59 IntentSynchronizationAdminService { 59 IntentSynchronizationAdminService {
60 60
......
...@@ -34,5 +34,8 @@ ...@@ -34,5 +34,8 @@
34 <command> 34 <command>
35 <action class="org.onosproject.routing.cli.BgpSpeakersListCommand"/> 35 <action class="org.onosproject.routing.cli.BgpSpeakersListCommand"/>
36 </command> 36 </command>
37 + <command>
38 + <action class="org.onosproject.routing.cli.PrimaryChangeCommand"/>
39 + </command>
37 </command-bundle> 40 </command-bundle>
38 </blueprint> 41 </blueprint>
......
1 /* 1 /*
2 - * Copyright 2014-2015 Open Networking Laboratory 2 + * Copyright 2016 Open Networking Laboratory
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.sdnip; 16 +package org.onosproject.routing.impl;
17 17
18 import com.google.common.collect.Sets; 18 import com.google.common.collect.Sets;
19 import com.google.common.util.concurrent.MoreExecutors; 19 import com.google.common.util.concurrent.MoreExecutors;
...@@ -68,7 +68,7 @@ import static org.junit.Assert.assertThat; ...@@ -68,7 +68,7 @@ import static org.junit.Assert.assertThat;
68 * This class tests the intent synchronization function in the 68 * This class tests the intent synchronization function in the
69 * IntentSynchronizer class. 69 * IntentSynchronizer class.
70 */ 70 */
71 -public class IntentSyncTest extends AbstractIntentTest { 71 +public class IntentSynchronizerTest extends AbstractIntentTest {
72 72
73 private IntentService intentService; 73 private IntentService intentService;
74 74
...@@ -400,7 +400,6 @@ public class IntentSyncTest extends AbstractIntentTest { ...@@ -400,7 +400,6 @@ public class IntentSyncTest extends AbstractIntentTest {
400 .treatment(treatmentBuilder.build()) 400 .treatment(treatmentBuilder.build())
401 .ingressPoints(ingressPoints) 401 .ingressPoints(ingressPoints)
402 .egressPoint(egressPoint) 402 .egressPoint(egressPoint)
403 - .constraints(SdnIpFib.CONSTRAINTS)
404 .build(); 403 .build();
405 return intent; 404 return intent;
406 } 405 }
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
17 17
18 <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0"> 18 <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
19 <command> 19 <command>
20 - <action class="org.onosproject.sdnip.cli.PrimaryChangeCommand"/>
21 - </command>
22 - <command>
23 <action class="org.onosproject.sdnip.cli.AddSpeakerCommand"/> 20 <action class="org.onosproject.sdnip.cli.AddSpeakerCommand"/>
24 </command> 21 </command>
25 <command> 22 <command>
......