Refactoring intent API.
diff --git a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java
index 529e60a..54aa9e5 100644
--- a/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java
+++ b/apps/sdnip/src/main/java/org/onlab/onos/sdnip/SdnIp.java
@@ -10,6 +10,8 @@
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
+import org.onlab.onos.ApplicationId;
+import org.onlab.onos.CoreService;
import org.onlab.onos.net.host.HostService;
import org.onlab.onos.net.intent.IntentService;
import org.onlab.onos.sdnip.bgp.BgpRouteEntry;
@@ -24,9 +26,14 @@
@Service
public class SdnIp implements SdnIpService {
+ private static final String SDN_ID_APP = "org.onlab.onos.sdnip";
+
private final Logger log = getLogger(getClass());
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected CoreService coreService;
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected IntentService intentService;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
@@ -46,10 +53,11 @@
InterfaceService interfaceService = new HostToInterfaceAdaptor(hostService);
- peerConnectivity = new PeerConnectivityManager(config, interfaceService, intentService);
+ ApplicationId appId = coreService.registerApplication(SDN_ID_APP);
+ peerConnectivity = new PeerConnectivityManager(appId, config, interfaceService, intentService);
peerConnectivity.start();
- router = new Router(intentService, hostService, config, interfaceService);
+ router = new Router(appId, intentService, hostService, config, interfaceService);
router.start();
bgpSessionManager = new BgpSessionManager(router);