diff --git a/apps/dhcprelay/BUCK b/apps/dhcprelay/BUCK
new file mode 100644
index 0000000..903a23a
--- /dev/null
+++ b/apps/dhcprelay/BUCK
@@ -0,0 +1,14 @@
+BUNDLES = [
+    '//apps/dhcprelay/web:onos-apps-dhcprelay-web',
+    '//apps/dhcprelay/app:onos-apps-dhcprelay-app',
+]
+
+onos_app (
+    app_name = 'org.onosproject.dhcprelay',
+    title = 'DHCP Relay Agent',
+    category = 'Utility',
+    url = 'http://onosproject.org',
+    description = 'DHCP Relay Agent Application.',
+    required_apps = [ 'org.onosproject.route-service' ],
+    included_bundles = BUNDLES,
+)
diff --git a/apps/dhcprelay/BUILD b/apps/dhcprelay/BUILD
index 5d9a3ca..c444b1a 100644
--- a/apps/dhcprelay/BUILD
+++ b/apps/dhcprelay/BUILD
@@ -1,25 +1,8 @@
-COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
-    "//core/store/serializers:onos-core-serializers",
-    "//apps/route-service/api:onos-apps-route-service-api",
-    "//apps/routing/fpm/api:onos-apps-routing-fpm-api",
-]
-
-TEST_DEPS = TEST + [
-    "//apps/route-service/api:onos-apps-route-service-api-tests",
-    "//core/api:onos-api-tests",
-]
-
 BUNDLES = [
-    "//apps/dhcprelay:onos-apps-dhcprelay",
-    "//apps/routing/fpm/api:onos-apps-routing-fpm-api",
+    "//apps/dhcprelay/web:onos-apps-dhcprelay-web",
+    "//apps/dhcprelay/app:onos-apps-dhcprelay-app",
 ]
 
-osgi_jar_with_tests(
-    karaf_command_packages = ["org.onosproject.dhcprelay.cli"],
-    test_deps = TEST_DEPS,
-    deps = COMPILE_DEPS,
-)
-
 onos_app(
     app_name = "org.onosproject.dhcprelay",
     category = "Utility",
diff --git a/apps/dhcprelay/app/BUCK b/apps/dhcprelay/app/BUCK
new file mode 100644
index 0000000..d698297
--- /dev/null
+++ b/apps/dhcprelay/app/BUCK
@@ -0,0 +1,21 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:JACKSON',
+    '//lib:KRYO',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+    '//core/store/serializers:onos-core-serializers',
+    '//apps/route-service/api:onos-apps-route-service-api',
+    '//apps/routing/fpm/api:onos-apps-routing-fpm-api',
+]
+
+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/dhcprelay/app/BUILD b/apps/dhcprelay/app/BUILD
new file mode 100644
index 0000000..811ed84
--- /dev/null
+++ b/apps/dhcprelay/app/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/route-service/api:onos-apps-route-service-api",
+    "//apps/routing/fpm/api:onos-apps-routing-fpm-api",
+]
+
+TEST_DEPS = TEST + [
+    "//apps/route-service/api:onos-apps-route-service-api-tests",
+    "//core/api:onos-api-tests",
+]
+
+osgi_jar_with_tests(
+    karaf_command_packages = ["org.onosproject.dhcprelay.cli"],
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
similarity index 99%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
index 515db1f..e70be90 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
+++ b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java
@@ -881,7 +881,11 @@
                     // Sets relay agent IP
                     int effectiveRelayAgentIp = relayAgentIp != null ?
                             relayAgentIp.toInt() : clientInterfaceIp.toInt();
+                    Ip4Address effectiveRealRealyAgentIP = relayAgentIp != null ?
+                            relayAgentIp : clientInterfaceIp;
                     dhcpPacket.setGatewayIPAddress(effectiveRelayAgentIp);
+                    ipv4Packet.setSourceAddress(effectiveRealRealyAgentIP.toInt());
+                    log.debug("Source IP address set as relay agent IP with value: {}", effectiveRealRealyAgentIP);
                 }
             }
 
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerUtil.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerUtil.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerUtil.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerUtil.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerImpl.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerUtil.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerUtil.java
similarity index 98%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerUtil.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerUtil.java
index 9b3097e..5d07993 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerUtil.java
+++ b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp6HandlerUtil.java
@@ -568,12 +568,15 @@
                 ipv6Packet.setDestinationAddress(serverInfo.getDhcpServerIp6().get().toOctets());
             }
             if (isRelayAgentIpFromCfgEmpty(serverInfo, receivedFromDevice)) {
-                dhcp6Relay.setLinkAddress(relayAgentIp.toOctets());
                 log.debug("indirect connection: relayAgentIp NOT availale from config file! Use dynamic. {}",
                         HexString.toHexString(relayAgentIp.toOctets(), ":"));
+                serverIpFacing = relayAgentIp;
             } else {
-                dhcp6Relay.setLinkAddress(serverInfo.getRelayAgentIp6(receivedFromDevice).get().toOctets());
+                serverIpFacing = serverInfo.getRelayAgentIp6(receivedFromDevice).get();
             }
+            log.debug("Source IP address set as relay agent IP with value: {}", serverIpFacing);
+            dhcp6Relay.setLinkAddress(serverIpFacing.toOctets());
+            ipv6Packet.setSourceAddress(serverIpFacing.toOctets());
         }
         // peer address: address of the client or relay agent from which the message to be relayed was received.
         dhcp6Relay.setPeerAddress(peerAddress);
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/InternalPacket.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/InternalPacket.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/InternalPacket.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/InternalPacket.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpHandler.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/DhcpHandler.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpHandler.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/DhcpHandler.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpRelayService.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/DhcpRelayService.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpRelayService.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/DhcpRelayService.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpServerInfo.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/DhcpServerInfo.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpServerInfo.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/DhcpServerInfo.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/package-info.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/package-info.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/package-info.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/api/package-info.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmAddCommand.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmAddCommand.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmAddCommand.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmAddCommand.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmDeleteCommand.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmDeleteCommand.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmDeleteCommand.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmDeleteCommand.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmRoutesCommand.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmRoutesCommand.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmRoutesCommand.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpFpmRoutesCommand.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayAggCountersCommand.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCounterCompleter.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCounterCompleter.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCounterCompleter.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCounterCompleter.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayResetCompleter.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayResetCompleter.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayResetCompleter.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayResetCompleter.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/package-info.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/package-info.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/package-info.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/cli/package-info.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DefaultDhcpRelayConfig.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/DefaultDhcpRelayConfig.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DefaultDhcpRelayConfig.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/DefaultDhcpRelayConfig.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/EnableDhcpFpmConfig.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/EnableDhcpFpmConfig.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/EnableDhcpFpmConfig.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/EnableDhcpFpmConfig.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfig.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfig.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfig.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfig.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/IndirectDhcpRelayConfig.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/IndirectDhcpRelayConfig.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/IndirectDhcpRelayConfig.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/IndirectDhcpRelayConfig.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/package-info.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/package-info.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/package-info.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/config/package-info.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/package-info.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/package-info.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/package-info.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/package-info.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmPrefixStore.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmPrefixStore.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmPrefixStore.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmPrefixStore.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmRecord.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmRecord.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmRecord.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpFpmRecord.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCounters.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCounters.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCounters.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCounters.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCountersStore.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCountersStore.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCountersStore.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayCountersStore.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStore.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStore.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStore.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStore.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStoreEvent.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStoreEvent.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStoreEvent.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DhcpRelayStoreEvent.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayCountersStore.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayCountersStore.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayCountersStore.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayCountersStore.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStore.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStore.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStore.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStore.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DistributedFpmPrefixStore.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DistributedFpmPrefixStore.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DistributedFpmPrefixStore.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/DistributedFpmPrefixStore.java
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/package-info.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/package-info.java
similarity index 100%
rename from apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/package-info.java
rename to apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/store/package-info.java
diff --git a/apps/dhcprelay/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/dhcprelay/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
similarity index 100%
rename from apps/dhcprelay/src/main/resources/OSGI-INF/blueprint/shell-config.xml
rename to apps/dhcprelay/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
diff --git a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java b/apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java
similarity index 100%
rename from apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java
rename to apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/DhcpRelayManagerTest.java
diff --git a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/config/DhcpRelayConfigTest.java b/apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/config/DhcpRelayConfigTest.java
similarity index 100%
rename from apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/config/DhcpRelayConfigTest.java
rename to apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/config/DhcpRelayConfigTest.java
diff --git a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfigTest.java b/apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfigTest.java
similarity index 100%
rename from apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfigTest.java
rename to apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/config/IgnoreDhcpConfigTest.java
diff --git a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/store/DhcpRecordTest.java b/apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/store/DhcpRecordTest.java
similarity index 100%
rename from apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/store/DhcpRecordTest.java
rename to apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/store/DhcpRecordTest.java
diff --git a/apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStoreTest.java b/apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStoreTest.java
similarity index 100%
rename from apps/dhcprelay/src/test/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStoreTest.java
rename to apps/dhcprelay/app/src/test/java/org/onosproject/dhcprelay/store/DistributedDhcpRelayStoreTest.java
diff --git a/apps/dhcprelay/src/test/resources/dhcp-relay.json b/apps/dhcprelay/app/src/test/resources/dhcp-relay.json
similarity index 100%
rename from apps/dhcprelay/src/test/resources/dhcp-relay.json
rename to apps/dhcprelay/app/src/test/resources/dhcp-relay.json
diff --git a/apps/dhcprelay/src/test/resources/invalid-dhcp-relay.json b/apps/dhcprelay/app/src/test/resources/invalid-dhcp-relay.json
similarity index 100%
rename from apps/dhcprelay/src/test/resources/invalid-dhcp-relay.json
rename to apps/dhcprelay/app/src/test/resources/invalid-dhcp-relay.json
diff --git a/apps/dhcprelay/web/BUCK b/apps/dhcprelay/web/BUCK
new file mode 100644
index 0000000..d173841
--- /dev/null
+++ b/apps/dhcprelay/web/BUCK
@@ -0,0 +1,23 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:JACKSON',
+    '//lib:KRYO',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+    '//utils/rest:onlab-rest',
+    '//lib:javax.ws.rs-api',
+    '//lib:jersey-server',
+    '//core/store/serializers:onos-core-serializers',
+    '//apps/route-service/api:onos-apps-route-service-api',
+    '//apps/dhcprelay/app:onos-apps-dhcprelay-app',
+    '//apps/routing/fpm/api:onos-apps-routing-fpm-api',
+]
+
+osgi_jar (
+   deps = COMPILE_DEPS,
+   web_context = '/onos/v1/dhcprelay',
+   api_title = 'DHCPRelay App',
+   api_version = '1.0',
+   api_description = 'REST API for DHCPRelay',
+   api_package = 'org.onosproject.dhcprelay.rest',
+)
\ No newline at end of file
diff --git a/apps/dhcprelay/web/BUILD b/apps/dhcprelay/web/BUILD
new file mode 100644
index 0000000..1bdee49
--- /dev/null
+++ b/apps/dhcprelay/web/BUILD
@@ -0,0 +1,16 @@
+COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + REST + CLI + [
+    "@jersey_server//jar",
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/route-service/api:onos-apps-route-service-api",
+    "//apps/dhcprelay/app:onos-apps-dhcprelay-app",
+    "//apps/routing/fpm/api:onos-apps-routing-fpm-api",
+]
+
+osgi_jar(
+    api_description = "REST API for DHCPRelay",
+    api_package = "org.onosproject.dhcprelay.rest",
+    api_title = "REST API for DHCPRelay Agent Application",
+    api_version = "1.0",
+    web_context = "/onos/v1/dhcprelay",
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java b/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/DhcpRelayWebApplication.java
similarity index 72%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java
copy to apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/DhcpRelayWebApplication.java
index d82de73..180394a 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java
+++ b/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/DhcpRelayWebApplication.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -14,19 +14,18 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.dhcprelay.rest;
 
 import org.onlab.rest.AbstractWebApplication;
 
 import java.util.Set;
 
 /**
- * SIMPLE_FABRIC REST API web application.
+ * DHCP Relay Web application.
  */
-public class SimpleFabricWebApplication extends AbstractWebApplication {
+public class DhcpRelayWebApplication extends AbstractWebApplication {
     @Override
     public Set<Class<?>> getClasses() {
-        return getClasses(SimpleFabricWebResource.class);
+        return getClasses(DhcpRelayWebResource.class);
     }
 }
-
diff --git a/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/DhcpRelayWebResource.java b/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/DhcpRelayWebResource.java
new file mode 100644
index 0000000..9338a4b
--- /dev/null
+++ b/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/DhcpRelayWebResource.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2018-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.
+ *
+ */
+
+package org.onosproject.dhcprelay.rest;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onosproject.dhcprelay.api.DhcpRelayService;
+import org.onosproject.rest.AbstractWebResource;
+import org.onosproject.routeservice.Route;
+import org.onosproject.routeservice.RouteStore;
+import org.onosproject.routing.fpm.api.FpmRecord;
+import org.slf4j.Logger;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+import java.io.IOException;
+import java.util.Optional;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * DHCP Relay agent REST API.
+ */
+@Path("fpm-delete")
+public class DhcpRelayWebResource extends AbstractWebResource {
+    private static final Logger LOG = getLogger(DhcpRelayWebResource.class);
+
+    /**
+     * Deletes the fpm route from fpm record.
+     * Corresponding route from the route store
+     *
+     * @param prefix IpPrefix
+     * @return 204 NO CONTENT
+     * @throws IOException to signify bad request
+     */
+    @DELETE
+    @Path("{prefix}")
+    public Response dhcpFpmDelete(@PathParam("prefix") String prefix) {
+        DhcpRelayService dhcpRelayService = get(DhcpRelayService.class);
+        RouteStore routeStore = get(RouteStore.class);
+
+        try {
+            // removes fpm route from fpm record
+            Optional<FpmRecord> fpmRecord = dhcpRelayService.removeFpmRecord(IpPrefix.valueOf(prefix));
+            if (fpmRecord.isPresent()) {
+                IpAddress nextHop = fpmRecord.get().nextHop();
+                Route route = new Route(Route.Source.DHCP, IpPrefix.valueOf(prefix), nextHop);
+                // removes DHCP route from route store
+                routeStore.removeRoute(route);
+            } else {
+                LOG.warn("fpmRecord is not present");
+            }
+        } catch (IllegalArgumentException ex) {
+            throw new IllegalArgumentException(ex);
+        }
+
+        return Response.noContent().build();
+    }
+
+}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/package-info.java
similarity index 73%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
copy to apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/package-info.java
index 726d578..959a884 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/dhcprelay/web/src/main/java/org/onosproject/dhcprelay/rest/package-info.java
@@ -13,13 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
-
-import org.onosproject.event.EventListener;
 
 /**
- * Entity capable of receiving alarm related events.
+ * DHCP Relay agent REST API.
  */
-public interface SimpleFabricListener extends EventListener<SimpleFabricEvent> {
-}
-
+package org.onosproject.dhcprelay.rest;
diff --git a/apps/simplefabric/src/main/webapp/WEB-INF/web.xml b/apps/dhcprelay/web/src/main/webapp/WEB-INF/web.xml
similarity index 81%
copy from apps/simplefabric/src/main/webapp/WEB-INF/web.xml
copy to apps/dhcprelay/web/src/main/webapp/WEB-INF/web.xml
index e136671..0322a40 100644
--- a/apps/simplefabric/src/main/webapp/WEB-INF/web.xml
+++ b/apps/dhcprelay/web/src/main/webapp/WEB-INF/web.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright 2017-present Open Networking Foundation
+  ~ Copyright 2018-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.
@@ -14,11 +14,12 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
          id="ONOS" version="2.5">
-    <display-name>Simple Fabric application REST API</display-name>
+    <display-name>DHCPRELAY REST API v1.0</display-name>
 
     <security-constraint>
         <web-resource-collection>
@@ -27,13 +28,11 @@
         </web-resource-collection>
         <auth-constraint>
             <role-name>admin</role-name>
-            <role-name>viewer</role-name>
         </auth-constraint>
     </security-constraint>
 
     <security-role>
         <role-name>admin</role-name>
-        <role-name>viewer</role-name>
     </security-role>
 
     <login-config>
@@ -46,7 +45,7 @@
         <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
         <init-param>
             <param-name>javax.ws.rs.Application</param-name>
-            <param-value>org.onosproject.simplefabric.SimpleFabricWebApplication</param-value>
+            <param-value>org.onosproject.dhcprelay.rest.DhcpRelayWebApplication</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
@@ -55,5 +54,4 @@
         <servlet-name>JAX-RS Service</servlet-name>
         <url-pattern>/*</url-pattern>
     </servlet-mapping>
-
 </web-app>
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java
index e1d1889..166e8e3 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java
@@ -16,10 +16,10 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.ConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.OwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.Node;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.Topology;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.ConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.OwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.Node;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.Topology;
 
 /**
  * Util class to create TapiXXXRef class instances using classes auto-generated by onos-yang-tool compiler.
@@ -59,8 +59,8 @@
      * @return cep reference instance
      */
     public static TapiCepRef create(ConnectionEndPoint cep) {
-        return TapiCepRef.create(cep.topologyId().toString(), cep.nodeId().toString(),
-                cep.ownedNodeEdgePointId().toString(), cep.connectionEndPointId().toString());
+        return TapiCepRef.create(cep.topologyUuid().toString(), cep.nodeUuid().toString(),
+                                 cep.nodeEdgePointUuid().toString(), cep.connectionEndPointUuid().toString());
     }
 
 }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepHandler.java
index b49de0c..9bc872f 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepHandler.java
@@ -16,16 +16,17 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.ceplist.DefaultConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectionendpoint.DefaultParentNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.DefaultOwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.OwnedNodeEdgePointKeys;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.DefaultNode;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.NodeKeys;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.TopologyKeys;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.ceplist.DefaultConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectionendpoint.DefaultParentNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.DefaultOwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.OwnedNodeEdgePointKeys;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.DefaultNode;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.NodeKeys;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.TopologyKeys;
 import org.onosproject.yang.model.ModelObjectId;
 
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -77,6 +78,7 @@
 
         return ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultTopologyContext.class)
                 .addChild(DefaultTopology.class, topologyKey)
                 .addChild(DefaultNode.class, nodeKey)
                 .addChild(DefaultOwnedNodeEdgePoint.class, nepKey)
@@ -104,10 +106,10 @@
         checkNotNull(nepUuid);
 
         DefaultParentNodeEdgePoint parentNep = new DefaultParentNodeEdgePoint();
-        parentNep.topologyId(topologyUuid);
-        parentNep.nodeId(nodeUuid);
-        parentNep.ownedNodeEdgePointId(nepUuid);
-        obj.addToParentNodeEdgePoint(parentNep);
+        parentNep.topologyUuid(topologyUuid);
+        parentNep.nodeUuid(nodeUuid);
+        parentNep.nodeEdgePointUuid(nepUuid);
+        obj.parentNodeEdgePoint(parentNep);
 
         return this;
     }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepRefHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepRefHandler.java
index 38acd75..266ea1a 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepRefHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCepRefHandler.java
@@ -16,10 +16,10 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.ceplist.ConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.DefaultConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectionendpoint.ParentNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.ceplist.ConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.DefaultConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectionendpoint.ParentNodeEdgePoint;
 import org.onosproject.yang.model.ModelObjectId;
 
 /**
@@ -37,7 +37,7 @@
 
     @Override
     protected Uuid getIdDetail() {
-        return (Uuid) obj.connectionEndPointId();
+        return (Uuid) obj.connectionEndPointUuid();
     }
 
     @Override
@@ -49,19 +49,19 @@
     }
 
     public TapiCepRefHandler setCep(TapiCepRef cepRef) {
-        obj.topologyId(cepRef.getTopologyId());
-        obj.nodeId(cepRef.getNodeId());
-        obj.ownedNodeEdgePointId(cepRef.getNepId());
-        obj.connectionEndPointId(cepRef.getCepId());
+        obj.topologyUuid(cepRef.getTopologyId());
+        obj.nodeUuid(cepRef.getNodeId());
+        obj.nodeEdgePointUuid(cepRef.getNepId());
+        obj.connectionEndPointUuid(cepRef.getCepId());
         return this;
     }
 
     public TapiCepRefHandler setCep(ConnectionEndPoint cep) {
-        obj.connectionEndPointId(cep.uuid());
-        ParentNodeEdgePoint parentNep = cep.parentNodeEdgePoint().get(0);
-        obj.topologyId(parentNep.topologyId());
-        obj.nodeId(parentNep.nodeId());
-        obj.ownedNodeEdgePointId(parentNep.ownedNodeEdgePointId());
+        obj.connectionEndPointUuid(cep.uuid());
+        ParentNodeEdgePoint parentNep = cep.parentNodeEdgePoint();
+        obj.topologyUuid(parentNep.topologyUuid());
+        obj.nodeUuid(parentNep.nodeUuid());
+        obj.nodeEdgePointUuid(parentNep.nodeEdgePointUuid());
         return this;
     }
 }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java
index 6e3b729..044e2c7 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java
@@ -19,15 +19,16 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.ConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.DefaultConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.DefaultLowerConnection;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.DefaultRoute;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.LowerConnection;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectionKeys;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.DefaultConnection;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.ConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.DefaultConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.DefaultLowerConnection;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.DefaultRoute;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.LowerConnection;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.ConnectionKeys;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnection;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.augmentedtapicommoncontext.DefaultConnectivityContext;
 import org.onosproject.yang.model.DefaultModelObjectData;
 import org.onosproject.yang.model.ModelObjectData;
 import org.onosproject.yang.model.ModelObjectId;
@@ -61,7 +62,10 @@
 
     @Override
     public ModelObjectId getParentModelObjectId() {
-        return ModelObjectId.builder().addChild(DefaultContext.class).build();
+        return ModelObjectId.builder()
+                .addChild(DefaultContext.class)
+                .addChild(DefaultConnectivityContext.class)
+                .build();
     }
 
     @Override
@@ -74,6 +78,7 @@
 
         ModelObjectId mId = ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultConnectivityContext.class)
                 .addChild(DefaultConnection.class, key)
                 .build();
 
@@ -90,7 +95,7 @@
 
     public TapiConnectionHandler addLowerConnection(DefaultConnection connection) {
         DefaultLowerConnection lowerConnection = new DefaultLowerConnection();
-        lowerConnection.connectionId(connection.uuid());
+        lowerConnection.connectionUuid(connection.uuid());
         obj.addToLowerConnection(lowerConnection);
         return this;
     }
@@ -108,7 +113,7 @@
 
         try {
             return obj.lowerConnection().stream()
-                    .map(LowerConnection::connectionId)
+                    .map(LowerConnection::connectionUuid)
                     .map(id -> {
                         TapiConnectionHandler handler = new TapiConnectionHandler();
                         handler.setId(Uuid.fromString(id.toString()));
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityContextHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityContextHandler.java
new file mode 100644
index 0000000..a1084e9
--- /dev/null
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityContextHandler.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.odtn.utils.tapi;
+
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.DefaultAugmentedTapiCommonContext;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.augmentedtapicommoncontext.DefaultConnectivityContext;
+import org.onosproject.yang.model.ModelObjectId;
+
+/**
+ * Utility class to deal with TAPI Augmented Connectivity Context with DCS.
+ */
+public final class TapiConnectivityContextHandler extends TapiObjectHandler<DefaultConnectivityContext> {
+
+    private TapiConnectivityContextHandler() {
+        obj = new DefaultConnectivityContext();
+    }
+
+    public static TapiConnectivityContextHandler create() {
+        return new TapiConnectivityContextHandler();
+    }
+
+    @Override
+    protected Uuid getIdDetail() {
+        // The target yang object of this class is container, so no need to handle Id.
+        return null;
+    }
+
+    @Override
+    protected void setIdDetail(Uuid uuid) {
+        // The target yang object of this class is container, so no need to handle Id.
+    }
+
+    @Override
+    public ModelObjectId getParentModelObjectId() {
+        DefaultAugmentedTapiCommonContext context = new DefaultAugmentedTapiCommonContext();
+        context.connectivityContext(obj);
+
+        return ModelObjectId.builder()
+                .addChild(DefaultContext.class).build();
+    }
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityServiceHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityServiceHandler.java
index 89ac48e..c32558c 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityServiceHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectivityServiceHandler.java
@@ -16,12 +16,13 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectivityServiceKeys;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivityservice.DefaultConnection;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivityservice.EndPoint;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.ConnectivityServiceKeys;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivityservice.DefaultConnection;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivityservice.EndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.augmentedtapicommoncontext.DefaultConnectivityContext;
 import org.onosproject.yang.model.DefaultModelObjectData;
 import org.onosproject.yang.model.ModelObjectData;
 import org.onosproject.yang.model.ModelObjectId;
@@ -55,7 +56,10 @@
 
     @Override
     public ModelObjectId getParentModelObjectId() {
-        return ModelObjectId.builder().addChild(DefaultContext.class).build();
+        return ModelObjectId.builder()
+                .addChild(DefaultContext.class)
+                .addChild(DefaultConnectivityContext.class)
+                .build();
     }
 
     @Override
@@ -68,6 +72,7 @@
 
         ModelObjectId mId = ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultConnectivityContext.class)
                 .addChild(DefaultConnectivityService.class, key)
                 .build();
 
@@ -84,7 +89,7 @@
 
     public TapiConnectivityServiceHandler addConnection(Uuid connectionUuid) {
         DefaultConnection connection = new DefaultConnection();
-        connection.connectionId(connectionUuid.toString());
+        connection.connectionUuid(connectionUuid.toString());
         obj.addToConnection(connection);
         return this;
     }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiContextHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiContextHandler.java
index ff8e24d..68e3978 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiContextHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiContextHandler.java
@@ -19,11 +19,11 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.context.DefaultAugmentedTapiCommonContext;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.DefaultAugmentedTapiCommonContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
 import org.onosproject.yang.model.DefaultModelObjectData;
 import org.onosproject.yang.model.ModelObjectData;
 import org.onosproject.yang.model.ModelObjectId;
@@ -43,11 +43,13 @@
 
     @Override
     protected Uuid getIdDetail() {
+        // The target yang object of this class is container, so no need to handle Id.
         return null;
     }
 
     @Override
     protected void setIdDetail(Uuid uuid) {
+        // The target yang object of this class is container, so no need to handle Id.
     }
 
     @Override
@@ -74,7 +76,7 @@
 
         DefaultAugmentedTapiCommonContext augmentedContext = obj.augmentation(DefaultAugmentedTapiCommonContext.class);
         try {
-            return augmentedContext.connectivityService().stream()
+            return augmentedContext.connectivityContext().connectivityService().stream()
                     .map(connectivityService -> {
                         TapiConnectivityServiceHandler handler = TapiConnectivityServiceHandler.create();
                         handler.setModelObject((DefaultConnectivityService) connectivityService);
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityInputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityInputHandler.java
index 1a182b8..e58de7d 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityInputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityInputHandler.java
@@ -19,9 +19,9 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.createconnectivityservice.CreateConnectivityServiceInput;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.createconnectivityservice.DefaultCreateConnectivityServiceInput;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.createconnectivityservice.createconnectivityserviceinput.EndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.createconnectivityservice.CreateConnectivityServiceInput;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.createconnectivityservice.DefaultCreateConnectivityServiceInput;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.createconnectivityservice.createconnectivityserviceinput.EndPoint;
 
 /**
  * Utility class to deal with TAPI RPC input with DCS.
@@ -39,7 +39,7 @@
 
     public List<String> getSips() {
         return getEndPoints().stream()
-                .map(ep -> ep.serviceInterfacePoint().serviceInterfacePointId().toString())
+                .map(ep -> ep.serviceInterfacePoint().serviceInterfacePointUuid().toString())
                 .collect(Collectors.toList());
     }
 
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityOutputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityOutputHandler.java
index f503072..beb92b2 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityOutputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiCreateConnectivityOutputHandler.java
@@ -16,9 +16,9 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.createconnectivityservice.DefaultCreateConnectivityServiceOutput;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.createconnectivityservice.createconnectivityserviceoutput.DefaultService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.ConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.createconnectivityservice.DefaultCreateConnectivityServiceOutput;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.createconnectivityservice.createconnectivityserviceoutput.DefaultService;
 
 /**
  * Utility class to deal with TAPI RPC output with DCS.
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityInputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityInputHandler.java
index 75d854e..256dea0 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityInputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityInputHandler.java
@@ -17,8 +17,8 @@
 package org.onosproject.odtn.utils.tapi;
 
 import java.util.UUID;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.deleteconnectivityservice.DefaultDeleteConnectivityServiceInput;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.deleteconnectivityservice.DefaultDeleteConnectivityServiceInput;
 
 /**
  * Utility class to deal with TAPI RPC input with DCS.
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityOutputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityOutputHandler.java
deleted file mode 100644
index 34186a4..0000000
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiDeleteConnectivityOutputHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2018-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.
- */
-
-package org.onosproject.odtn.utils.tapi;
-
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.deleteconnectivityservice.DefaultDeleteConnectivityServiceOutput;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.deleteconnectivityservice.deleteconnectivityserviceoutput.DefaultService;
-
-/**
- * Utility class to deal with TAPI RPC output with DCS.
- */
-public final class TapiDeleteConnectivityOutputHandler
-        extends TapiRpcOutputHandler<DefaultDeleteConnectivityServiceOutput> {
-
-    private TapiDeleteConnectivityOutputHandler() {
-        obj = new DefaultDeleteConnectivityServiceOutput();
-    }
-
-    public static TapiDeleteConnectivityOutputHandler create() {
-        return new TapiDeleteConnectivityOutputHandler();
-    }
-
-    public TapiDeleteConnectivityOutputHandler addService(ConnectivityService res) {
-        log.info("Output service: {}", res);
-        DefaultService rpcOutputService = new DefaultService();
-        rpcOutputService.uuid(res.uuid());
-        obj.service(rpcOutputService);
-        return this;
-    }
-
-}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsInputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsInputHandler.java
index ca01812..3af0594 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsInputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsInputHandler.java
@@ -17,8 +17,8 @@
 package org.onosproject.odtn.utils.tapi;
 
 import java.util.UUID;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.getconnectivityservicedetails.DefaultGetConnectivityServiceDetailsInput;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.getconnectivityservicedetails.DefaultGetConnectivityServiceDetailsInput;
 
 /**
  * Utility class to deal with TAPI RPC input with DCS.
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsOutputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsOutputHandler.java
index 1d7b02d..1495b41 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsOutputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityDetailsOutputHandler.java
@@ -16,9 +16,9 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.getconnectivityservicedetails.DefaultGetConnectivityServiceDetailsOutput;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.getconnectivityservicedetails.getconnectivityservicedetailsoutput.DefaultService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.ConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.getconnectivityservicedetails.DefaultGetConnectivityServiceDetailsOutput;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.getconnectivityservicedetails.getconnectivityservicedetailsoutput.DefaultService;
 
 /**
  * Utility class to deal with TAPI RPC output with DCS.
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityListOutputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityListOutputHandler.java
index 99bc678..19b8a33 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityListOutputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetConnectivityListOutputHandler.java
@@ -16,9 +16,9 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.getconnectivityservicelist.DefaultGetConnectivityServiceListOutput;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.getconnectivityservicelist.getconnectivityservicelistoutput.DefaultService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.ConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.getconnectivityservicelist.DefaultGetConnectivityServiceListOutput;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.getconnectivityservicelist.getconnectivityservicelistoutput.DefaultService;
 
 /**
  * Utility class to deal with TAPI RPC output with DCS.
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetSipListOutputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetSipListOutputHandler.java
index 95143d6..8c9f8e5 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetSipListOutputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGetSipListOutputHandler.java
@@ -16,10 +16,10 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.getserviceinterfacepointlist.DefaultGetServiceInterfacePointListOutput;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.getserviceinterfacepointlist.getserviceinterfacepointlistoutput.DefaultSip;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.getserviceinterfacepointlist.getserviceinterfacepointlistoutput.Sip;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.getserviceinterfacepointlist.DefaultGetServiceInterfacePointListOutput;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.getserviceinterfacepointlist.getserviceinterfacepointlistoutput.DefaultSip;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.getserviceinterfacepointlist.getserviceinterfacepointlistoutput.Sip;
 
 /**
  * Utility class to deal with TAPI RPC output with DCS.
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGlobalClassUtil.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGlobalClassUtil.java
index 016ea2c..ce5e7b5 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGlobalClassUtil.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiGlobalClassUtil.java
@@ -16,9 +16,9 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.globalclass.DefaultName;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.globalclass.Name;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.globalclass.DefaultName;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.globalclass.Name;
 import org.onosproject.yang.model.ModelObject;
 
 import java.lang.reflect.InvocationTargetException;
@@ -128,4 +128,4 @@
             log.error("Exception thrown", e);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLinkHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLinkHandler.java
index 2af1cb1..88cb480 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLinkHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLinkHandler.java
@@ -16,12 +16,13 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.link.DefaultNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.DefaultLink;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.TopologyKeys;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.link.DefaultNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.DefaultLink;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.TopologyKeys;
 import org.onosproject.yang.model.ModelObjectId;
 
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -62,6 +63,7 @@
         topologyKey.uuid(topologyUuid);
         return ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultTopologyContext.class)
                 .addChild(DefaultTopology.class, topologyKey)
                 .build();
     }
@@ -73,9 +75,9 @@
 
     public TapiLinkHandler addNep(TapiNepRef nepRef) {
         DefaultNodeEdgePoint nep = new DefaultNodeEdgePoint();
-        nep.topologyId(nepRef.getTopologyId());
-        nep.nodeId(nepRef.getNodeId());
-        nep.ownedNodeEdgePointId(nepRef.getNepId());
+        nep.topologyUuid(nepRef.getTopologyId());
+        nep.nodeUuid(nepRef.getNodeId());
+        nep.nodeEdgePointUuid(nepRef.getNepId());
         obj.addToNodeEdgePoint(nep);
         return this;
     }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLocalClassUtil.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLocalClassUtil.java
index 7ff0a2b..4a95eeb 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLocalClassUtil.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiLocalClassUtil.java
@@ -20,8 +20,8 @@
 import java.lang.reflect.Method;
 import java.util.Map;
 import java.util.Map.Entry;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.globalclass.DefaultName;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.globalclass.Name;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.globalclass.DefaultName;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.globalclass.Name;
 import org.onosproject.yang.model.ModelObject;
 import org.slf4j.Logger;
 
@@ -125,4 +125,4 @@
             log.error("Exception thrown", e);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepHandler.java
index 2934b3e..32f7091 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepHandler.java
@@ -26,18 +26,20 @@
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.setUuid;
 
 import org.onosproject.net.Port;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
 
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.ceplist.DefaultConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.ceplist.DefaultConnectionEndPoint;
 
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.context.topology.node.ownednodeedgepoint.DefaultAugmentedTapiTopologyOwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.DefaultOwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.nodeedgepoint.DefaultMappedServiceInterfacePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.DefaultNode;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.NodeKeys;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.TopologyKeys;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.topologycontext.topology.node.ownednodeedgepoint.DefaultAugmentedTapiTopologyOwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.topologycontext.topology.node.ownednodeedgepoint.augmentedtapitopologyownednodeedgepoint.DefaultCepList;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.DefaultOwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.nodeedgepoint.DefaultMappedServiceInterfacePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.DefaultNode;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.NodeKeys;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.TopologyKeys;
 import org.onosproject.yang.model.ModelObjectId;
 
 /**
@@ -80,6 +82,7 @@
 
         return ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultTopologyContext.class)
                 .addChild(DefaultTopology.class, topologyKey)
                 .addChild(DefaultNode.class, nodeKey)
                 .build();
@@ -111,16 +114,21 @@
 
     public TapiNepHandler addSip(Uuid sipUuid) {
         DefaultMappedServiceInterfacePoint mappedSip = new DefaultMappedServiceInterfacePoint();
-        mappedSip.serviceInterfacePointId(sipUuid);
+        mappedSip.serviceInterfacePointUuid(sipUuid);
         obj.addToMappedServiceInterfacePoint(mappedSip);
         return this;
     }
 
     public TapiNepHandler addCep(DefaultConnectionEndPoint cep) {
+
+        DefaultCepList cepList = new DefaultCepList();
+        cepList.addToConnectionEndPoint(cep);
+
         DefaultAugmentedTapiTopologyOwnedNodeEdgePoint augmentNep =
                 new DefaultAugmentedTapiTopologyOwnedNodeEdgePoint();
-        augmentNep.addToConnectionEndPoint(cep);
+        augmentNep.cepList(cepList);
         obj.addAugmentation(augmentNep);
+
         return this;
     }
 
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeHandler.java
index 1d897ad..9928f14 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeHandler.java
@@ -25,12 +25,13 @@
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.setUuid;
 
 import org.onosproject.net.DeviceId;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.OwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.DefaultNode;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.TopologyKeys;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.OwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.DefaultNode;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.TopologyKeys;
 import org.onosproject.yang.model.ModelObjectId;
 
 /**
@@ -67,6 +68,7 @@
         topologyKey.uuid(topologyUuid);
         return ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultTopologyContext.class)
                 .addChild(DefaultTopology.class, topologyKey)
                 .build();
     }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java
index 71cd256..465cd34 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java
@@ -112,4 +112,4 @@
     }
 
 
-}
\ No newline at end of file
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiObjectHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiObjectHandler.java
index 4acaf47..040982f 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiObjectHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiObjectHandler.java
@@ -23,7 +23,7 @@
 import org.onosproject.config.DynamicConfigService;
 import org.onosproject.config.FailedException;
 import org.onosproject.config.Filter;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
 import org.onosproject.yang.model.DataNode;
 import org.onosproject.yang.model.DefaultModelObjectData;
 import org.onosproject.yang.model.DefaultResourceData;
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRouteHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRouteHandler.java
index 7482979..3d7c964 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRouteHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRouteHandler.java
@@ -16,13 +16,14 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.DefaultRoute;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectionKeys;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.DefaultConnection;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.route.ConnectionEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.route.DefaultConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connection.DefaultRoute;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.ConnectionKeys;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnection;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.augmentedtapicommoncontext.DefaultConnectivityContext;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.route.ConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.route.DefaultConnectionEndPoint;
 import org.onosproject.yang.model.ModelObjectId;
 
 import static org.onosproject.odtn.utils.tapi.TapiLocalClassUtil.getLocalId;
@@ -61,16 +62,17 @@
 
         return ModelObjectId.builder()
                 .addChild(DefaultContext.class)
+                .addChild(DefaultConnectivityContext.class)
                 .addChild(DefaultConnection.class, connectionKeys)
                 .build();
     }
 
     public TapiRouteHandler addCep(TapiCepRef cepRef) {
         DefaultConnectionEndPoint cep = new DefaultConnectionEndPoint();
-        cep.topologyId(cepRef.getTopologyId());
-        cep.nodeId(cepRef.getNodeId());
-        cep.ownedNodeEdgePointId(cepRef.getNepId());
-        cep.connectionEndPointId(cepRef.getCepId());
+        cep.topologyUuid(cepRef.getTopologyId());
+        cep.nodeUuid(cepRef.getNodeId());
+        cep.nodeEdgePointUuid(cepRef.getNepId());
+        cep.connectionEndPointUuid(cepRef.getCepId());
 
         obj.addToConnectionEndPoint(cep);
         return this;
@@ -78,14 +80,14 @@
 
     public TapiCepRef getRouteStart() {
         ConnectionEndPoint cep = obj.connectionEndPoint().get(0);
-        return TapiCepRef.create(cep.topologyId().toString(), cep.nodeId().toString(),
-                cep.ownedNodeEdgePointId().toString(), cep.connectionEndPointId().toString());
+        return TapiCepRef.create(cep.topologyUuid().toString(), cep.nodeUuid().toString(),
+                cep.nodeEdgePointUuid().toString(), cep.connectionEndPointUuid().toString());
     }
 
     public TapiCepRef getRouteEnd() {
         ConnectionEndPoint cep = obj.connectionEndPoint().get(obj.connectionEndPoint().size() - 1);
-        return TapiCepRef.create(cep.topologyId().toString(), cep.nodeId().toString(),
-                cep.ownedNodeEdgePointId().toString(), cep.connectionEndPointId().toString());
+        return TapiCepRef.create(cep.topologyUuid().toString(), cep.nodeUuid().toString(),
+                cep.nodeEdgePointUuid().toString(), cep.connectionEndPointUuid().toString());
     }
 
     public TapiRouteHandler setConnectionId(Uuid connectionId) {
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcInputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcInputHandler.java
index 9112f34..d034f3e 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcInputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcInputHandler.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
 import org.onosproject.yang.model.ModelObject;
 import org.onosproject.yang.model.ModelObjectId;
 import org.onosproject.yang.model.RpcInput;
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcOutputHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcOutputHandler.java
index aa2c890..aaf48aa 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcOutputHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiRpcOutputHandler.java
@@ -16,7 +16,7 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
 import org.onosproject.yang.model.ModelObject;
 import org.onosproject.yang.model.ModelObjectId;
 
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSepHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSepHandler.java
index 35e01e0..ef80b82 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSepHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSepHandler.java
@@ -16,9 +16,9 @@
 
 package org.onosproject.odtn.utils.tapi;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivityservice.DefaultEndPoint;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivityserviceendpoint.DefaultServiceInterfacePoint;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivityservice.DefaultEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivityserviceendpoint.DefaultServiceInterfacePoint;
 import org.onosproject.yang.model.ModelObjectId;
 
 import static org.onosproject.odtn.utils.tapi.TapiLocalClassUtil.getLocalId;
@@ -55,7 +55,7 @@
 
     public TapiSepHandler setSip(String sipId) {
         DefaultServiceInterfacePoint sip = new DefaultServiceInterfacePoint();
-        sip.serviceInterfacePointId(sipId);
+        sip.serviceInterfacePointUuid(sipId);
         obj.serviceInterfacePoint(sip);
         return this;
     }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSipHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSipHandler.java
index 34b3896..367122e 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSipHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiSipHandler.java
@@ -22,16 +22,16 @@
 
 import org.onosproject.net.Port;
 import org.onosproject.odtn.behaviour.OdtnDeviceDescriptionDiscovery;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.LayerProtocolName;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.LayerProtocolName;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
 
 import static org.onosproject.odtn.behaviour.OdtnDeviceDescriptionDiscovery.PORT_TYPE;
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.addNameList;
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.getUuid;
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.setUuid;
-import static org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.layerprotocolname.LayerProtocolNameEnum.DSR;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.tapicontext.DefaultServiceInterfacePoint;
+import static org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.layerprotocolname.LayerProtocolNameEnum.DSR;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.tapicontext.DefaultServiceInterfacePoint;
 import org.onosproject.yang.model.ModelObjectId;
 
 /**
@@ -90,7 +90,7 @@
         Map<String, String> kvs = new HashMap<>();
         kvs.put(ONOS_CP, cp.toString());
         addNameList(obj, kvs);
-        obj.addToLayerProtocolName(LayerProtocolName.of(DSR));
+        obj.layerProtocolName(LayerProtocolName.of(DSR));
         return this;
     }
 
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyContextHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyContextHandler.java
new file mode 100644
index 0000000..30d7e09
--- /dev/null
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyContextHandler.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.odtn.utils.tapi;
+
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.DefaultAugmentedTapiCommonContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.model.ModelObjectId;
+
+/**
+ * Utility class to deal with TAPI Augmented Topology Context with DCS.
+ */
+public final class TapiTopologyContextHandler extends TapiObjectHandler<DefaultTopologyContext> {
+
+    private TapiTopologyContextHandler() {
+        obj = new DefaultTopologyContext();
+    }
+
+    public static TapiTopologyContextHandler create() {
+        return new TapiTopologyContextHandler();
+    }
+
+    @Override
+    protected Uuid getIdDetail() {
+        // The target yang object of this class is container, so no need to handle Id.
+        return null;
+    }
+
+    @Override
+    protected void setIdDetail(Uuid uuid) {
+        // The target yang object of this class is container, so no need to handle Id.
+    }
+
+    @Override
+    public ModelObjectId getParentModelObjectId() {
+        DefaultAugmentedTapiCommonContext context = new DefaultAugmentedTapiCommonContext();
+        context.topologyContext(obj);
+
+        return ModelObjectId.builder()
+                .addChild(DefaultContext.class).build();
+    }
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyHandler.java
index 2d81e80..6ef0417 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiTopologyHandler.java
@@ -19,10 +19,10 @@
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.getUuid;
 import static org.onosproject.odtn.utils.tapi.TapiGlobalClassUtil.setUuid;
 
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.context.DefaultAugmentedTapiCommonContext;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
 import org.onosproject.yang.model.ModelObjectId;
 
 /**
@@ -51,9 +51,10 @@
 
     @Override
     public ModelObjectId getParentModelObjectId() {
-        DefaultAugmentedTapiCommonContext topologyContext = new DefaultAugmentedTapiCommonContext();
-        topologyContext.addToTopology(obj);
 
-        return ModelObjectId.builder().addChild(DefaultContext.class).build();
+        return ModelObjectId.builder()
+                .addChild(DefaultContext.class)
+                .addChild(DefaultTopologyContext.class)
+                .build();
     }
 }
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/package-info.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/package-info.java
index 8d71ec1..fcb1c29 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/package-info.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/package-info.java
@@ -17,4 +17,4 @@
 /**
  * Utilities to deal with onos-yang-tools TAPI objects.
  */
-package org.onosproject.odtn.utils.tapi;
\ No newline at end of file
+package org.onosproject.odtn.utils.tapi;
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnDcsModelCheckCommand.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnDcsModelCheckCommand.java
index feb12e4..bf7db2f 100644
--- a/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnDcsModelCheckCommand.java
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnDcsModelCheckCommand.java
@@ -27,7 +27,7 @@
 import static org.onosproject.odtn.utils.YangToolUtil.toCompositeData;
 import static org.onosproject.odtn.utils.YangToolUtil.toResourceData;
 import static org.onosproject.odtn.utils.YangToolUtil.toXmlCompositeStream;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
 import org.onosproject.yang.model.DataNode;
 import org.onosproject.yang.model.DefaultModelObjectData;
 import org.onosproject.yang.model.InnerModelObject;
@@ -76,4 +76,4 @@
         CharSequence strNode = toCharSequence(toXmlCompositeStream(toCompositeData(toResourceData(empty, all))));
         printlog("XML:\n{}", XmlString.prettifyXml(strNode));
     }
-}
\ No newline at end of file
+}
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnTapiHandlersTestCommand.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnTapiHandlersTestCommand.java
new file mode 100644
index 0000000..72d1a54
--- /dev/null
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/cli/impl/OdtnTapiHandlersTestCommand.java
@@ -0,0 +1,287 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.odtn.cli.impl;
+
+import org.apache.karaf.shell.api.action.Command;
+import org.onlab.util.XmlString;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.config.DynamicConfigService;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.PortNumber;
+import org.onosproject.odtn.utils.tapi.TapiCepHandler;
+import org.onosproject.odtn.utils.tapi.TapiCepRefHandler;
+import org.onosproject.odtn.utils.tapi.TapiConnectionHandler;
+import org.onosproject.odtn.utils.tapi.TapiConnectivityContextHandler;
+import org.onosproject.odtn.utils.tapi.TapiConnectivityServiceHandler;
+import org.onosproject.odtn.utils.tapi.TapiContextHandler;
+import org.onosproject.odtn.utils.tapi.TapiNepHandler;
+import org.onosproject.odtn.utils.tapi.TapiNodeHandler;
+import org.onosproject.odtn.utils.tapi.TapiSepHandler;
+import org.onosproject.odtn.utils.tapi.TapiSipHandler;
+import org.onosproject.odtn.utils.tapi.TapiTopologyContextHandler;
+import org.onosproject.odtn.utils.tapi.TapiTopologyHandler;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.tapicontext.DefaultServiceInterfacePoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnection;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivityservice.DefaultEndPoint;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.augmentedtapicommoncontext.DefaultConnectivityContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.DefaultOwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.DefaultNode;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.model.Augmentable;
+import org.onosproject.yang.model.DataNode;
+import org.onosproject.yang.model.ModelConverter;
+import org.onosproject.yang.model.ResourceId;
+import org.slf4j.Logger;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.regex.Pattern;
+
+import static org.onosproject.odtn.utils.YangToolUtil.*;
+import static org.slf4j.LoggerFactory.getLogger;
+
+@Command(scope = "onos", name = "odtn-tapi-handlers-test")
+public class OdtnTapiHandlersTestCommand extends AbstractShellCommand {
+
+    private static final Logger log = getLogger(OdtnDcsModelCheckCommand.class);
+    private DynamicConfigService dcs;
+    private ModelConverter modelConverter;
+    private TapiContextHandler contextHandler;
+
+    @Override
+    public void doExecute() {
+        dcs = get(DynamicConfigService.class);
+        modelConverter = get(ModelConverter.class);
+
+        setupTapiContext();
+        DataNode data = contextHandler.getDataNode();
+
+        ResourceId empty = ResourceId.builder().build();
+        CharSequence strNode = toCharSequence(toXmlCompositeStream(toCompositeData(toResourceData(empty, data))));
+        StringBuilder exp = loadXml("/test-tapi-context.xml");
+
+        if (XmlString.prettifyXml(strNode).toString().contentEquals(exp)) {
+            log.info("result: ok");
+        } else {
+            log.info("result: failed");
+        }
+    }
+
+    private void printlog(String format, Object... objs) {
+        print(format.replaceAll(Pattern.quote("{}"), "%s"), objs);
+        log.info(format, objs);
+    }
+
+    private static StringBuilder loadXml(final String fileName) {
+
+        InputStream inputStream = OdtnTapiHandlersTestCommand.class.getResourceAsStream(fileName);
+        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+        StringBuilder result = new StringBuilder();
+        try {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                result.append(line).append("\n");
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+    private void setupTapiContext() {
+
+        DeviceId did1 = DeviceId.deviceId("netconf:127.0.0.1:11001");
+        DeviceId did2 = DeviceId.deviceId("netconf:127.0.0.1:11002");
+
+        ConnectPoint cp11 = new ConnectPoint(did1, PortNumber.portNumber(1, "TRANSCEIVER"));
+        ConnectPoint cp12 = new ConnectPoint(did1, PortNumber.portNumber(2, "TRANSCEIVER"));
+        ConnectPoint cp21 = new ConnectPoint(did2, PortNumber.portNumber(1, "TRANSCEIVER"));
+        ConnectPoint cp22 = new ConnectPoint(did2, PortNumber.portNumber(2, "TRANSCEIVER"));
+
+        // context
+        contextHandler = TapiContextHandler.create();
+        DefaultContext context = contextHandler.getModelObject();
+
+        // context augmentation
+        Augmentable augmentableContext = context;
+
+        // context augmentation with topologyContext
+        org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context
+                .DefaultAugmentedTapiCommonContext augmentedTopologyContext
+                = new org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology
+                .context.DefaultAugmentedTapiCommonContext();
+        augmentableContext.addAugmentation(augmentedTopologyContext);
+
+        // context augmentation with connectivityServiceContext
+        org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context
+                .DefaultAugmentedTapiCommonContext augmentedConnectivityContext
+                = new org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity
+                .context.DefaultAugmentedTapiCommonContext();
+        augmentableContext.addAugmentation(augmentedConnectivityContext);
+
+        // topology context
+        DefaultTopologyContext topologyContext = TapiTopologyContextHandler.create().getModelObject();
+        augmentedTopologyContext.topologyContext(topologyContext);
+
+        // topology
+        TapiTopologyHandler topologyHandler = TapiTopologyHandler.create();
+        topologyHandler.setId(Uuid.of("00000000-0000-0000-0000-000000000001"));
+        DefaultTopology topology = topologyHandler.getModelObject();
+        topologyContext.addToTopology(topology);
+
+        // nodes
+        TapiNodeHandler nodeHandler1 = TapiNodeHandler.create();
+        nodeHandler1.setId(Uuid.of("00000000-0000-0000-0001-000000000001"));
+        DefaultNode node1 = nodeHandler1.setTopologyUuid(topology.uuid())
+                .setDeviceId(did1)
+                .getModelObject();
+        topology.addToNode(node1);
+
+        TapiNodeHandler nodeHandler2 = TapiNodeHandler.create();
+        nodeHandler2.setId(Uuid.of("00000000-0000-0000-0001-000000000002"));
+        DefaultNode node2 = nodeHandler2.setTopologyUuid(topology.uuid())
+                .setDeviceId(did2)
+                .getModelObject();
+        topology.addToNode(node2);
+
+        // sips
+        TapiSipHandler sipHandler1 = TapiSipHandler.create();
+        sipHandler1.setId(Uuid.of("00000000-0000-0000-0002-000000000001"));
+        DefaultServiceInterfacePoint sip1 = sipHandler1.setConnectPoint(cp11)
+                .getModelObject();
+        context.addToServiceInterfacePoint(sip1);
+
+        TapiSipHandler sipHandler2 = TapiSipHandler.create();
+        sipHandler2.setId(Uuid.of("00000000-0000-0000-0002-000000000002"));
+        DefaultServiceInterfacePoint sip2 = sipHandler2.setConnectPoint(cp21)
+                .getModelObject();
+        context.addToServiceInterfacePoint(sip2);
+
+        // neps
+        TapiNepHandler nepHandler11 = TapiNepHandler.create();
+        nepHandler11.setId(Uuid.of("00000000-0000-0000-0003-000000000011"));
+        DefaultOwnedNodeEdgePoint nep11 = nepHandler11
+                .setTopologyUuid(topology.uuid())
+                .setNodeUuid(node1.uuid())
+                .setConnectPoint(cp11)
+                .addSip(sip1.uuid())
+                .getModelObject();
+        nodeHandler1.addNep(nep11);
+
+        TapiNepHandler nepHandler12 = TapiNepHandler.create();
+        nepHandler12.setId(Uuid.of("00000000-0000-0000-0003-000000000012"));
+        DefaultOwnedNodeEdgePoint nep12 = nepHandler12
+                .setTopologyUuid(topology.uuid())
+                .setNodeUuid(node1.uuid())
+                .setConnectPoint(cp12)
+                .getModelObject();
+        nodeHandler1.addNep(nep12);
+
+        TapiNepHandler nepHandler21 = TapiNepHandler.create();
+        nepHandler21.setId(Uuid.of("00000000-0000-0000-0003-000000000021"));
+        DefaultOwnedNodeEdgePoint nep21 = nepHandler21
+                .setTopologyUuid(topology.uuid())
+                .setNodeUuid(node2.uuid())
+                .setConnectPoint(cp21)
+                .addSip(sip2.uuid())
+                .getModelObject();
+        nodeHandler2.addNep(nep21);
+
+        TapiNepHandler nepHandler22 = TapiNepHandler.create();
+        nepHandler22.setId(Uuid.of("00000000-0000-0000-0003-000000000022"));
+        DefaultOwnedNodeEdgePoint nep22 = nepHandler22
+                .setTopologyUuid(topology.uuid())
+                .setNodeUuid(node2.uuid())
+                .setConnectPoint(cp22)
+                .getModelObject();
+        nodeHandler2.addNep(nep22);
+
+        // connectivity context
+        DefaultConnectivityContext connectivityContext = TapiConnectivityContextHandler.create().getModelObject();
+        augmentedConnectivityContext.connectivityContext(connectivityContext);
+
+        // connectivityService
+        TapiConnectivityServiceHandler connectivityServiceHandler = TapiConnectivityServiceHandler.create();
+        connectivityServiceHandler.setId(Uuid.of("00000000-0000-0000-0004-000000000001"));
+        DefaultConnectivityService connectivityService = connectivityServiceHandler.getModelObject();
+        connectivityContext.addToConnectivityService(connectivityService);
+
+        // connection
+        TapiConnectionHandler connectionHandler = TapiConnectionHandler.create();
+        connectionHandler.setId(Uuid.of("00000000-0000-0000-0005-000000000001"));
+        DefaultConnection connection1 = connectionHandler.getModelObject();
+        connectivityServiceHandler.addConnection(connection1.uuid());
+        connectivityContext.addToConnection(connection1);
+
+
+        // seps
+        TapiSepHandler sepHandler1 = TapiSepHandler.create();
+        sepHandler1.setId(Uuid.of("00000000-0000-0000-0006-000000000001"));
+        DefaultEndPoint sep1 = sepHandler1.getModelObject();
+        connectivityServiceHandler.addSep(sep1);
+
+        TapiSepHandler sepHandler2 = TapiSepHandler.create();
+        sepHandler2.setId(Uuid.of("00000000-0000-0000-0006-000000000002"));
+        DefaultEndPoint sep2 = sepHandler2.getModelObject();
+        connectivityServiceHandler.addSep(sep2);
+
+        // ceps
+        TapiCepHandler cepHandler11 = TapiCepHandler.create();
+        cepHandler11.setId(Uuid.of("00000000-0000-0000-0007-000000000011"));
+        org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity
+                .ceplist.DefaultConnectionEndPoint
+                cep11 = cepHandler11
+                .setTopologyUuid(topology.uuid())
+                .setNodeUuid(node1.uuid())
+                .setNepUuid(nep11.uuid())
+                .setParentNep()
+                .getModelObject();
+        nepHandler11.addCep(cep11);
+        org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity
+                .connection.DefaultConnectionEndPoint
+                cepRef11 = TapiCepRefHandler.create()
+                .setCep(cep11)
+                .getModelObject();
+        connectionHandler.addCep(cepRef11);
+
+        TapiCepHandler cepHandler21 = TapiCepHandler.create();
+        cepHandler21.setId(Uuid.of("00000000-0000-0000-0007-000000000021"));
+        org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity
+                .ceplist.DefaultConnectionEndPoint
+                cep21 = cepHandler21
+                .setTopologyUuid(topology.uuid())
+                .setNodeUuid(node1.uuid())
+                .setNepUuid(nep21.uuid())
+                .setParentNep()
+                .getModelObject();
+        nepHandler21.addCep(cep21);
+        org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity
+                .connection.DefaultConnectionEndPoint
+                cepRef21 = TapiCepRefHandler.create()
+                .setCep(cep21)
+                .getModelObject();
+        connectionHandler.addCep(cepRef21);
+
+    }
+}
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiCommonRpc.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiCommonRpc.java
index 315e10c..0d42ca0 100644
--- a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiCommonRpc.java
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiCommonRpc.java
@@ -19,8 +19,8 @@
 import org.onosproject.config.DynamicConfigService;
 import org.onosproject.odtn.TapiResolver;
 import org.onosproject.odtn.utils.tapi.TapiGetSipListOutputHandler;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.TapiCommonService;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.TapiCommonService;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
 import org.onosproject.yang.model.ModelConverter;
 import org.onosproject.yang.model.RpcInput;
 import org.onosproject.yang.model.RpcOutput;
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiConnectivityRpc.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiConnectivityRpc.java
index 2598781..a55c16b 100644
--- a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiConnectivityRpc.java
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiConnectivityRpc.java
@@ -27,16 +27,15 @@
 import org.onosproject.odtn.utils.tapi.TapiCreateConnectivityInputHandler;
 import org.onosproject.odtn.utils.tapi.TapiCreateConnectivityOutputHandler;
 import org.onosproject.odtn.utils.tapi.TapiDeleteConnectivityInputHandler;
-import org.onosproject.odtn.utils.tapi.TapiDeleteConnectivityOutputHandler;
 import org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsInputHandler;
 import org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsOutputHandler;
 import org.onosproject.odtn.utils.tapi.TapiGetConnectivityListOutputHandler;
 import org.onosproject.odtn.utils.tapi.TapiNepRef;
 import org.onosproject.odtn.utils.tapi.TapiObjectHandler;
 import org.onosproject.odtn.utils.tapi.TapiSepHandler;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.TapiConnectivityService;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.TapiConnectivityService;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.connectivitycontext.DefaultConnectivityService;
 import org.onosproject.yang.model.ModelConverter;
 import org.onosproject.yang.model.RpcInput;
 import org.onosproject.yang.model.RpcOutput;
@@ -139,17 +138,14 @@
 
             service.connection().stream().forEach(connection -> {
                 TapiConnectionHandler connectionHandler = TapiConnectionHandler.create();
-                connectionHandler.setId(Uuid.fromString(connection.connectionId().toString()));
+                connectionHandler.setId(Uuid.fromString(connection.connectionUuid().toString()));
                 DcsBasedTapiConnectionManager manager = DcsBasedTapiConnectionManager.create();
                 manager.deleteConnection(connectionHandler);
                 manager.apply();
             });
             serviceHandler.remove();
 
-            TapiDeleteConnectivityOutputHandler output = TapiDeleteConnectivityOutputHandler.create()
-                    .addService(serviceHandler.getModelObject());
-
-            return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, output.getDataNode());
+            return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, null);
         } catch (Throwable e) {
             log.error("Error:", e);
             return new RpcOutput(RpcOutput.Status.RPC_FAILURE, null);
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducer.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducer.java
index 4adc3d2..40e606a 100644
--- a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducer.java
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducer.java
@@ -30,11 +30,11 @@
 import org.onosproject.odtn.utils.tapi.DcsBasedTapiObjectRefFactory;
 import org.onosproject.odtn.utils.tapi.TapiNepRef;
 import org.onosproject.odtn.utils.tapi.TapiNodeRef;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.globalclass.Name;
-import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.context.topology.node.ownednodeedgepoint.DefaultAugmentedTapiTopologyOwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.context.DefaultAugmentedTapiCommonContext;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.Topology;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.globalclass.Name;
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20181016.tapiconnectivity.context.topologycontext.topology.node.ownednodeedgepoint.DefaultAugmentedTapiTopologyOwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.DefaultAugmentedTapiCommonContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.Topology;
 import org.onosproject.yang.model.DataNode;
 import org.onosproject.yang.model.DefaultModelObjectData;
 import org.onosproject.yang.model.DefaultResourceData;
@@ -114,7 +114,7 @@
     private List<TapiNodeRef> getNodes(DefaultContext context) {
         DefaultAugmentedTapiCommonContext topologyContext
                 = context.augmentation(DefaultAugmentedTapiCommonContext.class);
-        Topology topology = topologyContext.topology().get(0);
+        Topology topology = topologyContext.topologyContext().topology().get(0);
 
         if (topology.node() == null) {
             return Collections.emptyList();
@@ -142,7 +142,7 @@
     private List<TapiNepRef> getNeps(DefaultContext context) {
         DefaultAugmentedTapiCommonContext topologyContext
                 = context.augmentation(DefaultAugmentedTapiCommonContext.class);
-        Topology topology = topologyContext.topology().get(0);
+        Topology topology = topologyContext.topologyContext().topology().get(0);
 
         if (topology.node() == null) {
             return Collections.emptyList();
@@ -169,15 +169,15 @@
                                         if (nep.mappedServiceInterfacePoint() != null) {
                                             nep.mappedServiceInterfacePoint().stream()
                                                     .forEach(sip -> {
-                                                        nepRef.setSipId(sip.serviceInterfacePointId().toString());
+                                                        nepRef.setSipId(sip.serviceInterfacePointUuid().toString());
                                                     });
                                         }
 
                                         DefaultAugmentedTapiTopologyOwnedNodeEdgePoint augmentNep =
                                                 nep.augmentation(DefaultAugmentedTapiTopologyOwnedNodeEdgePoint.class);
                                         try {
-                                            if (augmentNep.connectionEndPoint() != null) {
-                                                List<String> cepIds = augmentNep.connectionEndPoint().stream()
+                                            if (augmentNep.cepList().connectionEndPoint() != null) {
+                                                List<String> cepIds = augmentNep.cepList().connectionEndPoint().stream()
                                                         .map(cep -> cep.uuid().toString()).collect(Collectors.toList());
                                                 nepRef.setCepIds(cepIds);
                                             }
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiTopologyManager.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiTopologyManager.java
index 585e282..c5fd719 100644
--- a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiTopologyManager.java
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/DcsBasedTapiTopologyManager.java
@@ -24,6 +24,7 @@
 import org.onosproject.net.Port;
 import org.onosproject.odtn.TapiResolver;
 import org.onosproject.odtn.TapiTopologyManager;
+import org.onosproject.odtn.utils.tapi.TapiConnectivityContextHandler;
 import org.onosproject.odtn.utils.tapi.TapiCepHandler;
 import org.onosproject.odtn.utils.tapi.TapiContextHandler;
 import org.onosproject.odtn.utils.tapi.TapiLinkHandler;
@@ -32,10 +33,11 @@
 import org.onosproject.odtn.utils.tapi.TapiNodeHandler;
 import org.onosproject.odtn.utils.tapi.TapiNodeRef;
 import org.onosproject.odtn.utils.tapi.TapiSipHandler;
+import org.onosproject.odtn.utils.tapi.TapiTopologyContextHandler;
 import org.onosproject.odtn.utils.tapi.TapiTopologyHandler;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.Uuid;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.Uuid;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
 import org.onosproject.yang.model.ModelConverter;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
@@ -70,6 +72,7 @@
     public void activate() {
         initDcsTapiContext();
         initDcsTapiTopology();
+        initDcsTapiConnectivityContext();
         log.info("Started");
     }
 
@@ -167,13 +170,26 @@
     }
 
     /**
-     * Add Tapi Topology to Dcs store.
+     * Add Tapi TopologyContext and Topology to Dcs store.
      *
      * Assumed there is only one topology for ODTN Phase 1.0
      */
     private void initDcsTapiTopology() {
+        TapiTopologyContextHandler topologyContextHandler = TapiTopologyContextHandler.create();
+        topologyContextHandler.add();
         TapiTopologyHandler topologyHandler = TapiTopologyHandler.create();
-        topology = topologyHandler.getModelObject();
         topologyHandler.add();
+        topology = topologyHandler.getModelObject();
     }
+
+    /**
+     * Add Tapi ConnectivityContext to Dcs store.
+     *
+     * Assumed there is only one topology for ODTN Phase 1.0
+     */
+    private void initDcsTapiConnectivityContext() {
+        TapiConnectivityContextHandler connectivityContextHandler = TapiConnectivityContextHandler.create();
+        connectivityContextHandler.add();
+    }
+
 }
diff --git a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/package-info.java b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/package-info.java
index b75ad48..9dc4dad 100644
--- a/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/package-info.java
+++ b/apps/odtn/service/src/main/java/org/onosproject/odtn/internal/package-info.java
@@ -17,4 +17,4 @@
 /**
  * Package to place ODTN internal implementations.
  */
-package org.onosproject.odtn.internal;
\ No newline at end of file
+package org.onosproject.odtn.internal;
diff --git a/apps/odtn/service/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/odtn/service/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index a2c2c6e..953a71e 100644
--- a/apps/odtn/service/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/apps/odtn/service/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -34,6 +34,10 @@
             <action class="org.onosproject.odtn.cli.impl.OdtnDcsModelCheckCommand"/>
         </command>
 
+        <command>
+            <action class="org.onosproject.odtn.cli.impl.OdtnTapiHandlersTestCommand"/>
+        </command>
+
     </command-bundle>
 
     <bean id="deviceIdCompleter" class="org.onosproject.cli.net.DeviceIdCompleter"/>
diff --git a/apps/odtn/service/src/main/resources/test-tapi-context.xml b/apps/odtn/service/src/main/resources/test-tapi-context.xml
new file mode 100644
index 0000000..b56f488
--- /dev/null
+++ b/apps/odtn/service/src/main/resources/test-tapi-context.xml
@@ -0,0 +1,120 @@
+<context xmlns="urn:onf:otcc:yang:tapi-common">
+  <topology-context xmlns="urn:onf:otcc:yang:tapi-topology">
+    <topology>
+      <uuid>00000000-0000-0000-0000-000000000001</uuid>
+      <node>
+        <uuid>00000000-0000-0000-0001-000000000001</uuid>
+        <owned-node-edge-point>
+          <uuid>00000000-0000-0000-0003-000000000011</uuid>
+          <cep-list xmlns="urn:onf:otcc:yang:tapi-connectivity">
+            <connection-end-point>
+              <uuid>00000000-0000-0000-0007-000000000011</uuid>
+              <parent-node-edge-point>
+                <node-edge-point-uuid>00000000-0000-0000-0003-000000000011</node-edge-point-uuid>
+                <node-uuid>00000000-0000-0000-0001-000000000001</node-uuid>
+                <topology-uuid>00000000-0000-0000-0000-000000000001</topology-uuid>
+              </parent-node-edge-point>
+            </connection-end-point>
+          </cep-list>
+          <mapped-service-interface-point>
+            <service-interface-point-uuid>00000000-0000-0000-0002-000000000001</service-interface-point-uuid>
+          </mapped-service-interface-point>
+          <name>
+            <value-name>onos-cp</value-name>
+            <value>netconf:127.0.0.1:11001/[TRANSCEIVER](1)</value>
+          </name>
+        </owned-node-edge-point>
+        <owned-node-edge-point>
+          <uuid>00000000-0000-0000-0003-000000000012</uuid>
+          <name>
+            <value-name>onos-cp</value-name>
+            <value>netconf:127.0.0.1:11001/[TRANSCEIVER](2)</value>
+          </name>
+        </owned-node-edge-point>
+        <name>
+          <value-name>device-id</value-name>
+          <value>netconf:127.0.0.1:11001</value>
+        </name>
+      </node>
+      <node>
+        <uuid>00000000-0000-0000-0001-000000000002</uuid>
+        <owned-node-edge-point>
+          <uuid>00000000-0000-0000-0003-000000000021</uuid>
+          <cep-list xmlns="urn:onf:otcc:yang:tapi-connectivity">
+            <connection-end-point>
+              <uuid>00000000-0000-0000-0007-000000000021</uuid>
+              <parent-node-edge-point>
+                <node-edge-point-uuid>00000000-0000-0000-0003-000000000021</node-edge-point-uuid>
+                <node-uuid>00000000-0000-0000-0001-000000000001</node-uuid>
+                <topology-uuid>00000000-0000-0000-0000-000000000001</topology-uuid>
+              </parent-node-edge-point>
+            </connection-end-point>
+          </cep-list>
+          <mapped-service-interface-point>
+            <service-interface-point-uuid>00000000-0000-0000-0002-000000000002</service-interface-point-uuid>
+          </mapped-service-interface-point>
+          <name>
+            <value-name>onos-cp</value-name>
+            <value>netconf:127.0.0.1:11002/[TRANSCEIVER](1)</value>
+          </name>
+        </owned-node-edge-point>
+        <owned-node-edge-point>
+          <uuid>00000000-0000-0000-0003-000000000022</uuid>
+          <name>
+            <value-name>onos-cp</value-name>
+            <value>netconf:127.0.0.1:11002/[TRANSCEIVER](2)</value>
+          </name>
+        </owned-node-edge-point>
+        <name>
+          <value-name>device-id</value-name>
+          <value>netconf:127.0.0.1:11002</value>
+        </name>
+      </node>
+    </topology>
+  </topology-context>
+  <connectivity-context xmlns="urn:onf:otcc:yang:tapi-connectivity">
+    <connectivity-service>
+      <uuid>00000000-0000-0000-0004-000000000001</uuid>
+      <end-point>
+        <local-id>00000000-0000-0000-0006-000000000001</local-id>
+      </end-point>
+      <end-point>
+        <local-id>00000000-0000-0000-0006-000000000002</local-id>
+      </end-point>
+      <connection>
+        <connection-uuid>00000000-0000-0000-0005-000000000001</connection-uuid>
+      </connection>
+    </connectivity-service>
+    <connection>
+      <uuid>00000000-0000-0000-0005-000000000001</uuid>
+      <connection-end-point>
+        <connection-end-point-uuid>00000000-0000-0000-0007-000000000011</connection-end-point-uuid>
+        <node-edge-point-uuid>00000000-0000-0000-0003-000000000011</node-edge-point-uuid>
+        <node-uuid>00000000-0000-0000-0001-000000000001</node-uuid>
+        <topology-uuid>00000000-0000-0000-0000-000000000001</topology-uuid>
+      </connection-end-point>
+      <connection-end-point>
+        <connection-end-point-uuid>00000000-0000-0000-0007-000000000021</connection-end-point-uuid>
+        <node-edge-point-uuid>00000000-0000-0000-0003-000000000021</node-edge-point-uuid>
+        <node-uuid>00000000-0000-0000-0001-000000000001</node-uuid>
+        <topology-uuid>00000000-0000-0000-0000-000000000001</topology-uuid>
+      </connection-end-point>
+    </connection>
+  </connectivity-context>
+  <service-interface-point>
+    <layer-protocol-name>DSR</layer-protocol-name>
+    <uuid>00000000-0000-0000-0002-000000000001</uuid>
+    <name>
+      <value-name>onos-cp</value-name>
+      <value>netconf:127.0.0.1:11001/[TRANSCEIVER](1)</value>
+    </name>
+  </service-interface-point>
+  <service-interface-point>
+    <layer-protocol-name>DSR</layer-protocol-name>
+    <uuid>00000000-0000-0000-0002-000000000002</uuid>
+    <name>
+      <value-name>onos-cp</value-name>
+      <value>netconf:127.0.0.1:11002/[TRANSCEIVER](1)</value>
+    </name>
+  </service-interface-point>
+</context>
\ No newline at end of file
diff --git a/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducerTest.java b/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducerTest.java
index bfc45c7..64278fe 100644
--- a/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducerTest.java
+++ b/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DcsBasedTapiDataProducerTest.java
@@ -31,13 +31,15 @@
 import org.onosproject.odtn.utils.tapi.TapiNodeHandler;
 import org.onosproject.odtn.utils.tapi.TapiNodeRef;
 import org.onosproject.odtn.utils.tapi.TapiSipHandler;
+import org.onosproject.odtn.utils.tapi.TapiTopologyContextHandler;
 import org.onosproject.odtn.utils.tapi.TapiTopologyHandler;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.DefaultContext;
-import org.onosproject.yang.gen.v1.tapicommon.rev20180307.tapicommon.tapicontext.DefaultServiceInterfacePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.context.DefaultAugmentedTapiCommonContext;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.DefaultOwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.DefaultNode;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.DefaultTopology;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.DefaultContext;
+import org.onosproject.yang.gen.v1.tapicommon.rev20181016.tapicommon.tapicontext.DefaultServiceInterfacePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.DefaultAugmentedTapiCommonContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.context.augmentedtapicommoncontext.DefaultTopologyContext;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.node.DefaultOwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topology.DefaultNode;
+import org.onosproject.yang.gen.v1.tapitopology.rev20181016.tapitopology.topologycontext.DefaultTopology;
 import org.onosproject.yang.model.Augmentable;
 
 import static org.easymock.EasyMock.expectLastCall;
@@ -73,10 +75,14 @@
         context = new DefaultContext();
 
         topology = TapiTopologyHandler.create().getModelObject();
-        DefaultAugmentedTapiCommonContext topologyContext = new DefaultAugmentedTapiCommonContext();
-        topologyContext.addToTopology(topology);
+        DefaultTopologyContext topologyContext = TapiTopologyContextHandler.create().getModelObject();
+
+        DefaultAugmentedTapiCommonContext augmentedTopologyContext = new DefaultAugmentedTapiCommonContext();
         Augmentable augmentableContext = context;
-        augmentableContext.addAugmentation(topologyContext);
+        augmentableContext.addAugmentation(augmentedTopologyContext);
+
+        augmentedTopologyContext.topologyContext(topologyContext);
+        topologyContext.addToTopology(topology);
 
         node1 = TapiNodeHandler.create()
                 .setTopologyUuid(topology.uuid())
@@ -236,4 +242,4 @@
         verify(mockResolver);
     }
 
-}
\ No newline at end of file
+}
diff --git a/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DefaultTapiResolverTest.java b/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DefaultTapiResolverTest.java
index 5fcad14..6e4dd3a 100644
--- a/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DefaultTapiResolverTest.java
+++ b/apps/odtn/service/src/test/java/org/onosproject/odtn/internal/DefaultTapiResolverTest.java
@@ -192,4 +192,4 @@
         assertThat(tapiResolver.getNepRefs(filter), is(exp));
     }
 
-}
\ No newline at end of file
+}
diff --git a/apps/odtn/service/src/test/resources/create-connectivity.json b/apps/odtn/service/src/test/resources/create-connectivity.json
index 283de56..35798f4 100644
--- a/apps/odtn/service/src/test/resources/create-connectivity.json
+++ b/apps/odtn/service/src/test/resources/create-connectivity.json
@@ -5,79 +5,30 @@
             {
                 "layer-protocol-name" : "DSR",
                 "service-interface-point": {
-                    "service-interface-point-id" : "00000000-0000-4200-0001-110000000000"
+                    "service-interface-point-uuid" : "00000001-0000-0000-0000-000000000001"
                 },
                 "capacity" : {
                 },
                 "direction" : "BIDIRECTIONAL",
                 "role" : "UNKNOWN",
-                "protection-role" : "WORK",
-                "local-id": "00000000-0000-4100-0001-110000000000",
-                "name" : [
-                        {
-                            "value-name" : "port",
-                            "value" : "1"
-                        },
-                        {
-                            "value-name" : "transponder",
-                            "value" : "TRNP_A"
-                        },
-                        {
-                            "value-name" : "onos-index",
-                            "value" : "1"
-                        },
-                        {
-                            "value-name" : "test-driver",
-                            "value" : "driver"
-                        }
-                ],
-                "administrative-state" : "UNLOCKED",
-                "operational-state" : "ENABLED",
-                "lifecycle-state" : "INSTALLED"
+                "protection-role" : "WORK"
             }
             ,
             {
                 "layer-protocol-name" : "DSR",
                 "service-interface-point": {
-                    "service-interface-point-id" : "00000000-0000-4200-0001-210000000000"
+                    "service-interface-point-uuid" : "00000001-0000-0000-0000-000000000002"
                 },
                 "capacity" : {
                 },
                 "direction" : "BIDIRECTIONAL",
                 "role" : "UNKNOWN",
-                "protection-role" : "WORK",
-                "local-id": "00000000-0000-4100-0001-210000000000",
-                "name" : [
-                        {
-                            "value-name" : "port",
-                            "value" : "1"
-                        },
-                        {
-                            "value-name" : "transponder",
-                            "value" : "TRNP_B"
-                        },
-                        {
-                            "value-name" : "onos-index",
-                            "value" : "1"
-                        },
-                        {
-                            "value-name" : "test-driver",
-                            "value" : "driver"
-                        }
-                ],
-                "administrative-state" : "UNLOCKED",
-                "operational-state" : "ENABLED",
-                "lifecycle-state" : "INSTALLED"
+                "protection-role" : "WORK"
             }
         ],
-
         "conn-constraint" : {},
-
         "topo-constraint" : {},
-
-        "resilience-constraint" : [ ],
-
-        "state" : "operational-state"
+        "resilience-constraint" : [ ]
     }
 }
 
diff --git a/apps/odtn/service/src/test/resources/delete-connectivity.json b/apps/odtn/service/src/test/resources/delete-connectivity.json
new file mode 100644
index 0000000..850c18f
--- /dev/null
+++ b/apps/odtn/service/src/test/resources/delete-connectivity.json
@@ -0,0 +1,6 @@
+{
+  "tapi-connectivity:input":
+  {
+    "service-id-or-name" : "00000002-0000-0000-0000-000000000001"
+  }
+}
\ No newline at end of file
diff --git a/apps/odtn/service/src/test/resources/nbi-tapi-sample.json b/apps/odtn/service/src/test/resources/nbi-tapi-sample.json
deleted file mode 100644
index 4578336..0000000
--- a/apps/odtn/service/src/test/resources/nbi-tapi-sample.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "tapi-common:context": {
-    "service-interface-point": [
-      {
-        "uuid": "9F759964-2410-44AF-8522-4FCE2C3ED464",
-        "layer-protocol-name": ["DSR"],
-        "name": [
-          {
-            "value-name": "port",
-            "value": "1"
-          },
-          {
-            "value-name": "transponder",
-            "value": "TRPN_A"
-          }
-        ]
-      },
-      {
-        "uuid": "FBDDC006-8913-4509-BA71-485CFAC89567",
-        "layer-protocol-name": ["DSR"],
-        "name": [
-          {
-            "value-name": "port",
-            "value": "1"
-          },
-          {
-            "value-name": "transponder",
-            "value": "TRPN_B"
-          }
-        ]
-      }
-    ],
-
-    "tapi-connectivity:connectivity-service": [
-      {
-        "uuid" : "D0BF25C8-B20C-49C3-9030-1C5AEC993E44",
-        "end-point": [
-          {
-            "local-id" : "TRPN_A-1",
-            "layer-protocol-name": "DSR",
-            "service-interface-point": {
-                "service-interface-point-id" : "9F759964-2410-44AF-8522-4FCE2C3ED464"
-            }
-          },
-          {
-            "local-id" : "TRPN_B-1",
-            "layer-protocol-name": "DSR",
-            "service-interface-point": {
-                "service-interface-point-id" : "FBDDC006-8913-4509-BA71-485CFAC89567"
-            }
-          }
-        ]
-      }
-    ]
-  }
-}
diff --git a/apps/odtn/service/src/test/resources/post-nbi-tapi-rpc b/apps/odtn/service/src/test/resources/post-nbi-tapi-rpc
deleted file mode 100644
index 45bdb17..0000000
--- a/apps/odtn/service/src/test/resources/post-nbi-tapi-rpc
+++ /dev/null
@@ -1 +0,0 @@
-curl -X POST http://localhost:8181/onos/restconf/operations/tapi-connectivity:create-connectivity-service -H 'cache-control: no-cache' -H 'content-type: application/json' -d @create-connectivity.json
diff --git a/apps/odtn/service/src/test/resources/post-nbi-tapi-sample b/apps/odtn/service/src/test/resources/post-nbi-tapi-sample
deleted file mode 100644
index ffdd3d9..0000000
--- a/apps/odtn/service/src/test/resources/post-nbi-tapi-sample
+++ /dev/null
@@ -1,2 +0,0 @@
-curl -X POST http://localhost:8181/onos/restconf/data -H 'cache-control: no-cache' -H 'content-type: application/json' -d @nbi-tapi-sample.json
-
diff --git a/apps/odtn/service/src/test/resources/post-tapi-rpc-create-connectivity-service b/apps/odtn/service/src/test/resources/post-tapi-rpc-create-connectivity-service
new file mode 100644
index 0000000..8f3409d
--- /dev/null
+++ b/apps/odtn/service/src/test/resources/post-tapi-rpc-create-connectivity-service
@@ -0,0 +1 @@
+curl -X POST http://localhost:8181/onos/restconf/operations/tapi-connectivity:create-connectivity-service -H 'cache-control: no-cache' -H 'content-type: application/json' -H 'Basic a2FyYWY6a2FyYWY=' -d @create-connectivity.json
diff --git a/apps/odtn/service/src/test/resources/post-tapi-rpc-delete-connectivity-service b/apps/odtn/service/src/test/resources/post-tapi-rpc-delete-connectivity-service
new file mode 100644
index 0000000..b45296e
--- /dev/null
+++ b/apps/odtn/service/src/test/resources/post-tapi-rpc-delete-connectivity-service
@@ -0,0 +1 @@
+curl -X POST http://localhost:8181/onos/restconf/operations/tapi-connectivity:delete-connectivity-service -H 'cache-control: no-cache' -H 'content-type: application/json' -H 'Basic a2FyYWY6a2FyYWY=' -d @delete-connectivity.json
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSecurityGroupHandler.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSecurityGroupHandler.java
index e9577bf..863e40a 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSecurityGroupHandler.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSecurityGroupHandler.java
@@ -123,6 +123,8 @@
 
     private final Logger log = getLogger(getClass());
 
+    private static final int VM_IP_PREFIX = 32;
+
     /** Apply OpenStack security group rule for VM traffic. */
     private boolean useSecurityGroup = USE_SECURITY_GROUP_DEFAULT;
 
@@ -360,28 +362,32 @@
             return;
         }
 
-        selectors.forEach(selector -> {
-            osFlowRuleService.setRule(appId,
-                    instPort.deviceId(),
-                    selector,
-                    DefaultTrafficTreatment.builder().transition(JUMP_TABLE).build(),
-                    PRIORITY_ACL_RULE,
-                    ACL_TABLE,
-                    install);
-        });
+        selectors.forEach(selector ->
+                osFlowRuleService.setRule(appId,
+                instPort.deviceId(),
+                selector,
+                DefaultTrafficTreatment.builder().transition(JUMP_TABLE).build(),
+                PRIORITY_ACL_RULE,
+                ACL_TABLE,
+                install));
     }
 
     /**
      * Sets connection tracking rule using OVS extension commands.
-     * It is not so graceful, but I don't want to make it more general because it is going to be used
-     * only here. The following is the usage of the function.
+     * It is not so graceful, but I don't want to make it more general because
+     * it is going to be used only here.
+     * The following is the usage of the function.
      *
      * @param deviceId Device ID
-     * @param ctState ctState: please use RulePopulatorUtil.computeCtStateFlag() to build the value
-     * @param ctMask crMask: please use RulePopulatorUtil.computeCtMaskFlag() to build the value
+     * @param ctState ctState: please use RulePopulatorUtil.computeCtStateFlag()
+     *                to build the value
+     * @param ctMask crMask: please use RulePopulatorUtil.computeCtMaskFlag()
+     *               to build the value
      * @param commit CT_COMMIT for commit action, CT_NO_COMMIT otherwise
-     * @param recircTable table number for recirculation after CT actions. CT_NO_RECIRC with no recirculation
-     * @param action Additional actions. ACTION_DROP, ACTION_NONE, GOTO_XXX_TABLE are supported.
+     * @param recircTable table number for recirculation after CT actions.
+     *                    CT_NO_RECIRC with no recirculation
+     * @param action Additional actions. ACTION_DROP, ACTION_NONE,
+     *               GOTO_XXX_TABLE are supported.
      * @param priority priority value for the rule
      * @param install true for insertion, false for removal
      */
@@ -446,7 +452,8 @@
      * @param sgId security group id
      * @return set of ip addresses
      */
-    private Set<InstancePort> getRemoteInstPorts(String tenantId, String sgId, boolean install) {
+    private Set<InstancePort> getRemoteInstPorts(String tenantId,
+                                                 String sgId, boolean install) {
         Set<InstancePort> remoteInstPorts;
 
         Set<Port> removedPorts = Sets.newConcurrentHashSet();
@@ -469,7 +476,7 @@
                                                 Ip4Address vmIp,
                                                 IpPrefix remoteIp,
                                                 Port port) {
-        if (remoteIp != null && remoteIp.equals(IpPrefix.valueOf(vmIp, 32))) {
+        if (remoteIp != null && remoteIp.equals(IpPrefix.valueOf(vmIp, VM_IP_PREFIX))) {
             // do nothing if the remote IP is my IP
             return null;
         }
@@ -484,25 +491,24 @@
             Map<TpPort, TpPort> portRangeMatchMap =
                     buildPortRangeMatches(sgRule.getPortRangeMin(),
                     sgRule.getPortRangeMax());
-            portRangeMatchMap.entrySet().forEach(entry -> {
+            portRangeMatchMap.forEach((key, value) -> {
 
-                        if (sgRule.getProtocol().toUpperCase().equals(PROTO_TCP)) {
-                            if (sgRule.getDirection().toUpperCase().equals(EGRESS)) {
-                                sBuilder.matchTcpSrcMasked(entry.getKey(), entry.getValue());
-                            } else {
-                                sBuilder.matchTcpDstMasked(entry.getKey(), entry.getValue());
-                            }
-                        } else if (sgRule.getProtocol().toUpperCase().equals(PROTO_UDP)) {
-                            if (sgRule.getDirection().toUpperCase().equals(EGRESS)) {
-                                sBuilder.matchUdpSrcMasked(entry.getKey(), entry.getValue());
-                            } else {
-                                sBuilder.matchUdpDstMasked(entry.getKey(), entry.getValue());
-                            }
-                        }
-
-                        selectorSet.add(sBuilder.build());
+                if (sgRule.getProtocol().toUpperCase().equals(PROTO_TCP)) {
+                    if (sgRule.getDirection().toUpperCase().equals(EGRESS)) {
+                        sBuilder.matchTcpSrcMasked(key, value);
+                    } else {
+                        sBuilder.matchTcpDstMasked(key, value);
                     }
-            );
+                } else if (sgRule.getProtocol().toUpperCase().equals(PROTO_UDP)) {
+                    if (sgRule.getDirection().toUpperCase().equals(EGRESS)) {
+                        sBuilder.matchUdpSrcMasked(key, value);
+                    } else {
+                        sBuilder.matchUdpDstMasked(key, value);
+                    }
+                }
+
+                selectorSet.add(sBuilder.build());
+            });
         } else {
             selectorSet.add(sBuilder.build());
         }
@@ -541,9 +547,9 @@
                                      String direction,
                                      Ip4Address vmIp) {
         if (direction.toUpperCase().equals(EGRESS)) {
-            sBuilder.matchIPSrc(IpPrefix.valueOf(vmIp, 32));
+            sBuilder.matchIPSrc(IpPrefix.valueOf(vmIp, VM_IP_PREFIX));
         } else {
-            sBuilder.matchIPDst(IpPrefix.valueOf(vmIp, 32));
+            sBuilder.matchIPDst(IpPrefix.valueOf(vmIp, VM_IP_PREFIX));
         }
     }
 
@@ -660,21 +666,21 @@
     }
 
     private int binLower(String binStr, int bits) {
-        String outBin = binStr.substring(0, 16 - bits);
+        StringBuilder outBin = new StringBuilder(binStr.substring(0, 16 - bits));
         for (int i = 0; i < bits; i++) {
-            outBin += "0";
+            outBin.append("0");
         }
 
-        return Integer.parseInt(outBin, 2);
+        return Integer.parseInt(outBin.toString(), 2);
     }
 
     private int binHigher(String binStr, int bits) {
-        String outBin = binStr.substring(0, 16 - bits);
+        StringBuilder outBin = new StringBuilder(binStr.substring(0, 16 - bits));
         for (int i = 0; i < bits; i++) {
-            outBin += "1";
+            outBin.append("1");
         }
 
-        return Integer.parseInt(outBin, 2);
+        return Integer.parseInt(outBin.toString(), 2);
     }
 
     private int testMasks(String binStr, int start, int end) {
@@ -743,11 +749,8 @@
 
         @Override
         public boolean isRelevant(InstancePortEvent event) {
-            InstancePort instPort = event.subject();
-            if (!useSecurityGroup) {
-                return false;
-            }
-            return mastershipService.isLocalMaster(instPort.deviceId());
+            return useSecurityGroup &&
+                    mastershipService.isLocalMaster(event.subject().deviceId());
         }
 
         @Override
@@ -782,10 +785,9 @@
             log.debug("Instance port detected/updated MAC:{} IP:{}",
                     instPort.macAddress(),
                     instPort.ipAddress());
-            eventExecutor.execute(() -> {
-                setSecurityGroupRules(instPort,
-                        osNetService.port(event.subject().portId()), true);
-            });
+            eventExecutor.execute(() ->
+                    setSecurityGroupRules(instPort,
+                            osNetService.port(event.subject().portId()), true));
         }
     }
 
@@ -822,21 +824,27 @@
         }
     }
 
-    private class InternalOpenstackNetworkListener implements OpenstackNetworkListener {
+    private class InternalOpenstackNetworkListener
+                                            implements OpenstackNetworkListener {
 
         @Override
         public boolean isRelevant(OpenstackNetworkEvent event) {
             if (event.port() == null || Strings.isNullOrEmpty(event.port().getId())) {
                 return false;
             }
+
             if (event.securityGroupId() == null ||
                     securityGroupService.securityGroup(event.securityGroupId()) == null) {
                 return false;
             }
-            if (instancePortService.instancePort(event.port().getId()) == null) {
+
+            InstancePort instPort = instancePortService.instancePort(event.port().getId());
+
+            if (instPort == null) {
                 return false;
             }
-            return useSecurityGroup;
+
+            return useSecurityGroup && mastershipService.isLocalMaster(instPort.deviceId());
         }
 
         @Override
@@ -872,7 +880,8 @@
         }
     }
 
-    private class InternalSecurityGroupListener implements OpenstackSecurityGroupListener {
+    private class InternalSecurityGroupListener
+                                    implements OpenstackSecurityGroupListener {
 
         @Override
         public boolean isRelevant(OpenstackSecurityGroupEvent event) {
@@ -888,20 +897,20 @@
         public void event(OpenstackSecurityGroupEvent event) {
             switch (event.type()) {
                 case OPENSTACK_SECURITY_GROUP_RULE_CREATED:
-                    SecurityGroupRule securityGroupRuleToAdd = event.securityGroupRule();
+                    SecurityGroupRule sgRuleToAdd = event.securityGroupRule();
                     eventExecutor.execute(() -> {
-                        securityGroupRuleAdded(securityGroupRuleToAdd);
+                        securityGroupRuleAdded(sgRuleToAdd);
                         log.info("Applied new security group rule {} to ports",
-                                securityGroupRuleToAdd.getId());
+                                sgRuleToAdd.getId());
                     });
                     break;
 
                 case OPENSTACK_SECURITY_GROUP_RULE_REMOVED:
-                    SecurityGroupRule securityGroupRuleToRemove = event.securityGroupRule();
+                    SecurityGroupRule sgRuleToRemove = event.securityGroupRule();
                     eventExecutor.execute(() -> {
-                        securityGroupRuleRemoved(securityGroupRuleToRemove);
+                        securityGroupRuleRemoved(sgRuleToRemove);
                         log.info("Removed security group rule {} from ports",
-                                securityGroupRuleToRemove.getId());
+                                sgRuleToRemove.getId());
                     });
                     break;
                 case OPENSTACK_SECURITY_GROUP_REMOVED:
diff --git a/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackEastWestProbeCommand.java b/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackEastWestProbeCommand.java
index 943290b..8d4ac94 100644
--- a/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackEastWestProbeCommand.java
+++ b/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackEastWestProbeCommand.java
@@ -34,8 +34,11 @@
 
 import java.util.Optional;
 import java.util.Set;
+import java.util.concurrent.ExecutorService;
 import java.util.stream.Collectors;
 
+import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
+import static org.onlab.util.Tools.groupedThreads;
 import static org.onosproject.openstacknetworking.api.InstancePort.State.ACTIVE;
 import static org.onosproject.openstacknode.api.OpenstackNode.NodeType.COMPUTE;
 
@@ -61,6 +64,9 @@
             required = false, multiValued = true)
     private String[] vmIps = null;
 
+    private final ExecutorService probeExecutor = newSingleThreadScheduledExecutor(
+            groupedThreads(this.getClass().getSimpleName(), "probe-handler", log));
+
     @Override
     protected void doExecute() {
         OpenstackTroubleshootService tsService = get(OpenstackTroubleshootService.class);
@@ -144,7 +150,8 @@
             dstIps.stream()
                     .filter(ip -> instPort(instPortService, ip) != null)
                     .map(ip -> instPort(instPortService, ip))
-                    .forEach(port -> printReachability(tsService.probeEastWest(srcPort, port)));
+                    .forEach(port -> probeExecutor.execute(() ->
+                            printReachability(tsService.probeEastWest(srcPort, port))));
         }
     }
 
diff --git a/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackNorthSouthProbeCommand.java b/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackNorthSouthProbeCommand.java
index edef1c2..32c32c0 100644
--- a/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackNorthSouthProbeCommand.java
+++ b/apps/openstacktroubleshoot/app/src/main/java/org/onosproject/openstacktroubleshoot/cli/OpenstackNorthSouthProbeCommand.java
@@ -32,7 +32,10 @@
 import org.onosproject.openstacktroubleshoot.api.Reachability;
 
 import java.util.Set;
+import java.util.concurrent.ExecutorService;
 
+import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
+import static org.onlab.util.Tools.groupedThreads;
 import static org.onosproject.openstacknetworking.api.InstancePort.State.ACTIVE;
 import static org.onosproject.openstacknode.api.OpenstackNode.NodeType.GATEWAY;
 
@@ -58,6 +61,9 @@
             required = false, multiValued = true)
     private String[] vmIps = null;
 
+    private final ExecutorService probeExecutor = newSingleThreadScheduledExecutor(
+            groupedThreads(this.getClass().getSimpleName(), "probe-handler", log));
+
     @Override
     protected void doExecute() {
         OpenstackTroubleshootService tsService = get(OpenstackTroubleshootService.class);
@@ -108,7 +114,8 @@
             }
 
             printHeader();
-            ports.forEach(port -> printReachability(tsService.probeNorthSouth(port)));
+            ports.forEach(port -> probeExecutor.execute(() ->
+                    printReachability(tsService.probeNorthSouth(port))));
         }
     }
 
diff --git a/apps/simplefabric/BUCK b/apps/simplefabric/BUCK
new file mode 100644
index 0000000..e181a98
--- /dev/null
+++ b/apps/simplefabric/BUCK
@@ -0,0 +1,13 @@
+BUNDLES = [
+    '//apps/simplefabric/api:onos-apps-simplefabric-api',
+    '//apps/simplefabric/app:onos-apps-simplefabric-app',
+]
+
+onos_app (
+    title = 'SONA SimpleFabric',
+    category = 'Traffic Engineering',
+    url = 'http://onosproject.org',
+    included_bundles = BUNDLES,
+    description = 'SONA Simple Fabric Application',
+    required_apps = [ 'org.onosproject.openflow-base', 'org.onosproject.lldpprovider', 'org.onosproject.hostprovider' ],
+)
\ No newline at end of file
diff --git a/apps/simplefabric/BUILD b/apps/simplefabric/BUILD
index 007b701..3fabae0 100644
--- a/apps/simplefabric/BUILD
+++ b/apps/simplefabric/BUILD
@@ -1,27 +1,17 @@
-COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + REST + [
-    "@concurrent_trees//jar",
-]
-
 BUNDLES = [
-    "//apps/simplefabric:onos-apps-simplefabric",
+    "//apps/simplefabric/api:onos-apps-simplefabric-api",
+    "//apps/simplefabric/app:onos-apps-simplefabric-app",
 ]
 
-osgi_jar_with_tests(
-    karaf_command_packages = ["org.onosproject.simplefabric"],
-    test_deps = TEST_ADAPTERS,
-    web_context = "/onos/v1/simplefabric",
-    deps = COMPILE_DEPS,
-)
-
 onos_app(
     category = "Traffic Engineering",
-    description = "Simple Fabric application",
+    description = "SONA Simple Fabric Application",
     included_bundles = BUNDLES,
     required_apps = [
         "org.onosproject.openflow-base",
         "org.onosproject.lldpprovider",
         "org.onosproject.hostprovider",
     ],
-    title = "SimpleFabric",
+    title = "SONA SimpleFabric",
     url = "http://onosproject.org",
 )
diff --git a/apps/simplefabric/api/BUCK b/apps/simplefabric/api/BUCK
new file mode 100644
index 0000000..520bddf
--- /dev/null
+++ b/apps/simplefabric/api/BUCK
@@ -0,0 +1,16 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+]
+
+TEST_DEPS = [
+    '//lib:TEST_ADAPTERS',
+    '//core/api:onos-api-tests',
+    '//core/common:onos-core-common-tests',
+]
+
+osgi_jar_with_tests (
+    deps = COMPILE_DEPS,
+    test_deps = TEST_DEPS,
+)
diff --git a/apps/simplefabric/api/BUILD b/apps/simplefabric/api/BUILD
new file mode 100644
index 0000000..b22d9f6
--- /dev/null
+++ b/apps/simplefabric/api/BUILD
@@ -0,0 +1,11 @@
+COMPILE_DEPS = CORE_DEPS + CLI
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//core/api:onos-api-tests",
+    "//core/common:onos-core-common-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/Constants.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/Constants.java
new file mode 100644
index 0000000..703e01b
--- /dev/null
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/Constants.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.api;
+
+/**
+ * Provides constants used in simple fabric services.
+ */
+public final class Constants {
+
+    private Constants() {
+    }
+
+    // App symbols
+    public static final String APP_ID = "org.onosproject.simplefabric";
+    public static final String FORWARDING_APP_ID = "org.onosproject.simplefabric.forwarding";
+    public static final String ROUTING_APP_ID = "org.onosproject.simplefabric.routing";
+
+    // Priority for l2NetworkRouting: L2NETWORK_UNICAST or L2NETWORK_BROADCAST
+    public static final int PRI_L2NETWORK_UNICAST = 601;
+    public static final int PRI_L2NETWORK_BROADCAST = 600;
+
+    // Reactive Routing within Local Subnets
+    // ASSUME: local subnets NEVER overlaps each other
+    public static final int PRI_REACTIVE_LOCAL_FORWARD = 501;
+    public static final int PRI_REACTIVE_LOCAL_INTERCEPT = 500;
+    // Reactive Routing for Border Routes with local subnet
+    // Priority: REACTIVE_BROUTE_BASE + routeIpPrefix * REACTIVE_BROUTE_STEP
+    //           + REACTIVE_BROUTE_FORWARD or REACTIVE_BROUTE_INTERCEPT
+    public static final int PRI_REACTIVE_BORDER_BASE = 100;
+    public static final int PRI_REACTIVE_BORDER_STEP = 2;
+    public static final int PRI_REACTIVE_BORDER_FORWARD = 1;
+    public static final int PRI_REACTIVE_BORDER_INTERCEPT = 0;
+
+    // Simple fabric event related timers
+    public static final long IDLE_INTERVAL_MSEC = 5000;
+
+    // Feature control parameters
+    public static final boolean ALLOW_IPV6 = false;
+    public static final boolean ALLOW_ETH_ADDRESS_SELECTOR = true;
+    public static final boolean REACTIVE_SINGLE_TO_SINGLE = false;
+    public static final boolean REACTIVE_ALLOW_LINK_CP = false;  // MUST BE false (yjlee, 2017-10-18)
+    public static final boolean REACTIVE_HASHED_PATH_SELECTION = false;
+    public static final boolean REACTIVE_MATCH_IP_PROTO = false;
+}
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricNetwork.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricNetwork.java
new file mode 100644
index 0000000..bae189d
--- /dev/null
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricNetwork.java
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.api;
+
+import org.onlab.packet.VlanId;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.Host;
+import org.onosproject.net.HostId;
+import org.onosproject.net.intf.Interface;
+
+import java.util.Set;
+
+/**
+ * Interface of fabric network.
+ */
+public interface FabricNetwork {
+
+    /**
+     * Gets DefaultFabricNetwork name.
+     *
+     * @return the name of DefaultFabricNetwork
+     */
+    String name();
+
+    /**
+     * Gets DefaultFabricNetwork interfaceNames.
+     *
+     * @return the interfaceNames of DefaultFabricNetwork
+     */
+    Set<String> interfaceNames();
+
+    /**
+     * Gets DefaultFabricNetwork encapsulation type.
+     *
+     * @return the encapsulation type of DefaultFabricNetwork
+     */
+    EncapsulationType encapsulation();
+
+    /**
+     * Gets DefaultFabricNetwork forward flag.
+     *
+     * @return the forward flag of DefaultFabricNetwork
+     */
+    boolean isForward();
+
+    /**
+     * Gets DefaultFabricNetwork broadcast flag.
+     *
+     * @return the broadcast flag of DefaultFabricNetwork
+     */
+    boolean isBroadcast();
+
+    /**
+     * Gets DefaultFabricNetwork interfaces.
+     *
+     * @return the interfaces of DefaultFabricNetwork
+     */
+    Set<Interface> interfaces();
+
+    /**
+     * Gets DefaultFabricNetwork hosts.
+     *
+     * @return the hosts of DefaultFabricNetwork
+     */
+    Set<HostId> hostIds();
+
+    /**
+     * Gets DefaultFabricNetwork isDirty flag.
+     *
+     * @return the isDirty flag of DefaultFabricNetwork
+     */
+    boolean isDirty();
+
+    /**
+     * Checks if the interface is of DefaultFabricNetwork.
+     *
+     * @param iface the interface to be checked
+     * @return true if DefaultFabricNetwork contains the interface
+     */
+    boolean contains(Interface iface);
+
+    /**
+     * Checks if the ConnectPoint and Vlan is of DefaultFabricNetwork.
+     *
+     * @param port the ConnectPoint to be checked
+     * @param vlanId the VlanId of the ConnectPoint to be checked
+     * @return true if DefaultFabricNetwork contains the interface of the ConnnectPoint and VlanId
+     */
+    boolean contains(ConnectPoint port, VlanId vlanId);
+
+    /**
+     * Checks if the DeviceId is of DefaultFabricNetwork.
+     *
+     * @param deviceId the DeviceId to be checked
+     * @return true if DefaultFabricNetwork contains any interface of the DeviceId
+     */
+    boolean contains(DeviceId deviceId);
+
+    /**
+     * Adds interface to DefaultFabricNetwork.
+     *
+     * @param iface the Interface to be added
+     */
+    void addInterface(Interface iface);
+
+    /**
+     * Adds host to DefaultFabricNetwork.
+     *
+     * @param host the Host to be added
+     */
+    void addHost(Host host);
+
+    /**
+     * Sets DefaultFabricNetwork isDirty flag.
+     *
+     * @param newDirty the isDirty flag to be set
+     */
+    void setDirty(boolean newDirty);
+
+    /**
+     * Builder of FabricNetwork.
+     */
+    interface Builder {
+
+        /**
+         * Returns FabricNetwork builder with supplied network name.
+         *
+         * @param name network name
+         * @return FabricNetwork instance builder
+         */
+        Builder name(String name);
+
+        /**
+         * Returns FabricNetwork builder with supplied interface names.
+         *
+         * @param interfaceNames interface names
+         * @return FabricNetwork instance builder
+         */
+        Builder interfaceNames(Set<String> interfaceNames);
+
+        /**
+         * Returns FabricNetwork builder with supplied encapsulation type.
+         *
+         * @param encapsulation encapsulation type
+         * @return FabricNetwork instance builder
+         */
+        Builder encapsulation(EncapsulationType encapsulation);
+
+        /**
+         * Returns FabricNetwork builder with supplied forward flag.
+         *
+         * @param forward forward flag
+         * @return FabricNetwork instance builder
+         */
+        Builder forward(boolean forward);
+
+        /**
+         * Returns FabricNetwork builder with supplied broadcast flag.
+         *
+         * @param broadcast broadcast flag
+         * @return FabricNetwork instance builder
+         */
+        Builder broadcast(boolean broadcast);
+
+        /**
+         * Builds an immutable FabricNetwork instance.
+         *
+         * @return FabricNetwork instance
+         */
+        FabricNetwork build();
+    }
+}
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricRoute.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricRoute.java
new file mode 100644
index 0000000..f12260a
--- /dev/null
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricRoute.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2018-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.
+ */
+package org.onosproject.simplefabric.api;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onosproject.cluster.NodeId;
+
+/**
+ * Interface of fabric route.
+ */
+public interface FabricRoute {
+
+    /**
+     * Source of the route.
+     */
+    enum Source {
+        /**
+         * Route came from the iBGP route source.
+         */
+        BGP,
+
+        /**
+         * Route came from the FPM route source.
+         */
+        FPM,
+
+        /**
+         * Route can from the static route source.
+         */
+        STATIC,
+
+        /**
+         * Route source was not defined.
+         */
+        UNDEFINED
+    }
+
+    /**
+     * Returns the route source.
+     *
+     * @return route source
+     */
+    Source source();
+
+    /**
+     * Returns the IP prefix of the route.
+     *
+     * @return IP prefix
+     */
+    IpPrefix prefix();
+
+    /**
+     * Returns the next hop IP address.
+     *
+     * @return next hop
+     */
+    IpAddress nextHop();
+
+    /**
+     * Returns the ONOS node the route was sourced from.
+     *
+     * @return ONOS node ID
+     */
+    NodeId sourceNode();
+
+    /**
+     * Builder of FabricRoute.
+     */
+    interface Builder {
+
+        /**
+         * Returns FabricRoute builder with supplied source.
+         *
+         * @param source source of route
+         * @return FabricRoute instance builder
+         */
+        Builder source(Source source);
+
+        /**
+         * Returns FabricRoute builder with supplied IP prefix.
+         *
+         * @param prefix IP prefix
+         * @return FabricRoute instance builder
+         */
+        Builder prefix(IpPrefix prefix);
+
+        /**
+         * Returns Fabric builder with supplied next hop.
+         *
+         * @param nextHop next hop
+         * @return FabricRoute instance builder
+         */
+        Builder nextHop(IpAddress nextHop);
+
+        /**
+         * Returns Fabric builder with supplied source node identifier.
+         *
+         * @param sourceNode source node identifier
+         * @return FabricRoute instance builder
+         */
+        Builder sourceNode(NodeId sourceNode);
+
+        /**
+         * Builds an immutable FabricRoute instance.
+         *
+         * @return FabricRoute instance
+         */
+        FabricRoute build();
+    }
+}
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricSubnet.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricSubnet.java
new file mode 100644
index 0000000..ca56946
--- /dev/null
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/FabricSubnet.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.api;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onlab.packet.MacAddress;
+import org.onosproject.net.EncapsulationType;
+
+/**
+ * Interface of FabricSubnet.
+ */
+public interface FabricSubnet {
+
+    /**
+     * Gets the IP subnet of the IP subnet entry.
+     *
+     * @return the IP subnet
+     */
+    IpPrefix prefix();
+
+    /**
+     * Gets the virtual gateway IP address of the IP subnet entry.
+     *
+     * @return the virtual gateway IP address
+     */
+    IpAddress gatewayIp();
+
+    /**
+     * Gets the virtual gateway Mac address of the IP subnet entry.
+     *
+     * @return the virtuai gateway Mac address
+     */
+    MacAddress gatewayMac();
+
+    /**
+     * Gets the encapsulation type of IP subnet entry.
+     *
+     * @return the encapsulation type
+     */
+    EncapsulationType encapsulation();
+
+    /**
+     * Gets the network name.
+     *
+     * @return the network name
+     */
+    String networkName();
+
+    /**
+     * Tests whether the IP version of this entry is IPv4.
+     *
+     * @return true if the IP version of this entry is IPv4, otherwise false.
+     */
+    boolean isIp4();
+
+    /**
+     * Tests whether the IP version of this entry is IPv6.
+     *
+     * @return true if the IP version of this entry is IPv6, otherwise false.
+     */
+    boolean isIp6();
+
+    /**
+     * Builder of Ip Subnet.
+     */
+    interface Builder {
+
+        /**
+         * Returns FabricSubnet builder with supplied IpPrefix.
+         *
+         * @param ipPrefix IP prefix
+         * @return FabricSubnet instance builder
+         */
+        Builder prefix(IpPrefix ipPrefix);
+
+        /**
+         * Returns FabricSubnet builder with supplied gatewayIp.
+         *
+         * @param gatewayIp gateway IP
+         * @return FabricSubnet instance builder
+         */
+        Builder gatewayIp(IpAddress gatewayIp);
+
+        /**
+         * Returns FabricSubnet builder with supplied gatewayMac.
+         *
+         * @param gatewayMac gateway MAC
+         * @return FabricSubnet instance builder
+         */
+        Builder gatewayMac(MacAddress gatewayMac);
+
+        /**
+         * Returns FabricSubnet builder with supplied encapsulation type.
+         *
+         * @param encapsulation encapsulation type
+         * @return FabricSubnet instance builder
+         */
+        Builder encapsulation(EncapsulationType encapsulation);
+
+        /**
+         * Returns FabricSubnet builder with supplied network name.
+         *
+         * @param networkName network name
+         * @return FabricSubnet instance builder
+         */
+        Builder networkName(String networkName);
+
+        /**
+         * Builds an immutable FabricSubnet instance.
+         *
+         * @return FabricSubnet instance
+         */
+        FabricSubnet build();
+    }
+}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricEvent.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricEvent.java
similarity index 95%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricEvent.java
rename to apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricEvent.java
index cac1276..aac465b 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricEvent.java
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricEvent.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.api;
 
 import org.onosproject.event.AbstractEvent;
 
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricListener.java
similarity index 88%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
rename to apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricListener.java
index 726d578..25bf529 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricListener.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.api;
 
 import org.onosproject.event.EventListener;
 
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java
new file mode 100644
index 0000000..33b9c5e
--- /dev/null
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2018-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.
+ */
+package org.onosproject.simplefabric.api;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.event.ListenerService;
+import org.onosproject.net.intf.Interface;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.Host;
+
+import java.io.OutputStream;
+import java.util.Set;
+import java.util.Collection;
+
+/**
+ * Provides information about the routing configuration.
+ */
+public interface SimpleFabricService
+        extends ListenerService<SimpleFabricEvent, SimpleFabricListener> {
+
+    /**
+     * Gets appId.
+     *
+     * @return appId of simple fabric app
+     */
+    ApplicationId appId();
+
+    /**
+     * Gets all the fabric networks.
+     *
+     * @return all the fabric networks
+     */
+    Collection<FabricNetwork> fabricNetworks();
+
+    /**
+     * Retrieves the entire set of fabricSubnets configuration.
+     *
+     * @return all the fabricSubnets
+     */
+    Set<FabricSubnet> defaultFabricSubnets();
+
+    /**
+     * Retrieves the entire set of static routes to outer networks.
+     *
+     * @return the set of static routes to outer networks.
+     */
+    Set<FabricRoute> fabricRoutes();
+
+    /**
+     * Evaluates whether a MAC is of virtual gateway MAC addresses.
+     *
+     * @param mac the MAC address to evaluate
+     * @return true if the mac is of any virtual gateway MAC address of fabricSubnets
+     */
+    boolean isVirtualGatewayMac(MacAddress mac);
+
+    /**
+     * Evaluates whether an interface belongs to fabric network or not.
+     *
+     * @param intf the interface to evaluate
+     * @return true if the interface belongs to fabric network, otherwise false
+     */
+    boolean isFabricNetworkInterface(Interface intf);
+
+    /**
+     * Finds virtual gateway MAC address for local subnet virtual gateway IP.
+     *
+     * @param ip the IP to check for virtual gateway IP
+     * @return MAC address of virtual gateway
+     */
+    MacAddress vMacForIp(IpAddress ip);
+
+    /**
+     * Finds the L2 fabric network with given port and vlanId.
+     *
+     * @param port the port to be matched
+     * @param vlanId the vlanId to be matched
+     * @return the L2 Network for specific port and vlanId or null
+     */
+    FabricNetwork fabricNetwork(ConnectPoint port, VlanId vlanId);
+
+    /**
+     * Finds the fabric network by its name.
+     *
+     * @param name the name to be matched
+     * @return the fabric network
+     */
+    FabricNetwork fabricNetwork(String name);
+
+    /**
+     * Finds the FabricSubnet which contains the given IP address.
+     *
+     * @param ipAddress the IP address to be matched
+     * @return the FabricSubnet
+     */
+    FabricSubnet fabricSubnet(IpAddress ipAddress);
+
+    /**
+     * Finds the FabricRoute which contains the given IP address.
+     *
+     * @param ipAddress the IP address to be matched
+     * @return the FabricRoute
+     */
+    FabricRoute fabricRoute(IpAddress ipAddress);
+
+    /**
+     * Finds the network interface which associated with the host.
+     *
+     * @param host the host
+     * @return the interface associated with the host
+     */
+    Interface hostInterface(Host host);
+
+    /**
+     * Sends neighbour query (ARP or NDP) to find host location.
+     *
+     * @param ip the IP address to resolve
+     * @return true if request MAC packets are emitted, false otherwise
+     */
+    boolean requestMac(IpAddress ip);
+
+    /**
+     * Sends dump event to all SimpleFabricListeners to dump info on the subject.
+     *
+     * @param subject the subject to dump
+     * @param out the output stream to dump
+     */
+    void dumpToStream(String subject, OutputStream out);
+
+    /**
+     * Triggers to send refresh notification to all sub modules.
+     */
+    void triggerRefresh();
+
+    /**
+     * Triggers to send flush notification to all sub modules.
+     */
+    void triggerFlush();
+}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/package-info.java
similarity index 67%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
copy to apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/package-info.java
index 726d578..a11519f 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,13 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
-
-import org.onosproject.event.EventListener;
 
 /**
- * Entity capable of receiving alarm related events.
+ * Simple fabric API package.
  */
-public interface SimpleFabricListener extends EventListener<SimpleFabricEvent> {
-}
-
+package org.onosproject.simplefabric.api;
\ No newline at end of file
diff --git a/apps/simplefabric/app/BUCK b/apps/simplefabric/app/BUCK
new file mode 100644
index 0000000..6aefd2c
--- /dev/null
+++ b/apps/simplefabric/app/BUCK
@@ -0,0 +1,24 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:JACKSON',
+    '//lib:concurrent-trees',
+    '//lib:javax.ws.rs-api',
+    '//lib:org.apache.karaf.shell.console',
+    '//cli:onos-cli',
+    '//utils/rest:onlab-rest',
+    '//apps/simplefabric/api:onos-apps-simplefabric-api',
+]
+
+TEST_DEPS = [
+    '//lib:TEST_ADAPTERS',
+]
+
+osgi_jar_with_tests (
+    api_description = 'REST API for Simple Fabric',
+    api_package = 'org.onosproject.simplefabric.web',
+    api_title = 'Simple Fabric API',
+    api_version = '1.0',
+    deps = COMPILE_DEPS,
+    test_deps = TEST_DEPS,
+    web_context = '/onos/v1/simplefabric',
+)
\ No newline at end of file
diff --git a/apps/simplefabric/app/BUILD b/apps/simplefabric/app/BUILD
new file mode 100644
index 0000000..69d12f7
--- /dev/null
+++ b/apps/simplefabric/app/BUILD
@@ -0,0 +1,21 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + CLI + REST + [
+    "//apps/simplefabric/api:onos-apps-simplefabric-api",
+    "@concurrent_trees//jar",
+]
+
+TEST_DEPS = TEST_ADAPTERS + TEST_REST + [
+    "//core/api:onos-api-tests",
+    "//core/common:onos-core-common-tests",
+    "//web/api:onos-rest-tests",
+]
+
+osgi_jar_with_tests(
+    api_description = "REST API for Simple Fabric",
+    api_package = "org.onosproject.simplefabric.web",
+    api_title = "Simple Fabric API",
+    api_version = "1.0",
+    karaf_command_packages = ["org.onosproject.simplefabric.cli"],
+    test_deps = TEST_DEPS,
+    web_context = "/onos/v1/simplefabric",
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/simplefabric/app.xml b/apps/simplefabric/app/app.xml
similarity index 100%
rename from apps/simplefabric/app.xml
rename to apps/simplefabric/app/app.xml
diff --git a/apps/simplefabric/features.xml b/apps/simplefabric/app/features.xml
similarity index 100%
rename from apps/simplefabric/features.xml
rename to apps/simplefabric/app/features.xml
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricCommand.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommand.java
similarity index 93%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricCommand.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommand.java
index 8d88f08..3271e8d 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricCommand.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,13 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.cli;
 
 import org.apache.karaf.shell.api.action.Argument;
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.Completion;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.simplefabric.api.SimpleFabricService;
 
 /**
  * CLI to interact with the SIMPLE_FABRIC application.
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricCommandCompleter.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommandCompleter.java
similarity index 93%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricCommandCompleter.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommandCompleter.java
index 43d79d8..a643539 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricCommandCompleter.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommandCompleter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.cli;
 
 import com.google.common.collect.Lists;
 import org.apache.karaf.shell.api.action.lifecycle.Service;
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/package-info.java
similarity index 67%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
copy to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/package-info.java
index 726d578..1a92219 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,13 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
-
-import org.onosproject.event.EventListener;
 
 /**
- * Entity capable of receiving alarm related events.
+ * Simple fabric CLI package.
  */
-public interface SimpleFabricListener extends EventListener<SimpleFabricEvent> {
-}
-
+package org.onosproject.simplefabric.cli;
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricNetwork.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricNetwork.java
new file mode 100644
index 0000000..386a345
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricNetwork.java
@@ -0,0 +1,316 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.impl;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import org.onlab.packet.VlanId;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.Host;
+import org.onosproject.net.HostId;
+import org.onosproject.net.intf.Interface;
+import org.onosproject.simplefabric.api.FabricNetwork;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Set;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_ETH_ADDRESS_SELECTOR;
+
+
+/**
+ * Class stores a DefaultFabricNetwork information.
+ */
+public final class DefaultFabricNetwork implements FabricNetwork {
+
+    private static final String NOT_NULL_MSG = "FabricNetwork % cannot be null";
+
+    private final String name;
+    private final Set<String> interfaceNames;
+    private final EncapsulationType encapsulation;
+    private boolean forward;
+    private boolean broadcast;
+
+    /* status variables */
+    private final Set<Interface> interfaces;
+    private final Set<HostId> hostIds;
+    private boolean dirty;
+
+    /**
+     * Constructs a DefaultFabricNetwork instance.
+     *
+     * @param name              fabric name name
+     * @param interfaceNames    a collection of  interface names
+     * @param encapsulation     encapsulation type
+     * @param forward           flag for forward intents to be installed or not
+     * @param broadcast         flag for broadcast intents to be installed or not
+     */
+    private DefaultFabricNetwork(String name, Collection<String> interfaceNames,
+                                 EncapsulationType encapsulation,
+                                 boolean forward, boolean broadcast) {
+        this.name = name;
+        this.interfaceNames = Sets.newHashSet();
+
+        if (interfaceNames != null) {
+            this.interfaceNames.addAll(interfaceNames);
+        }
+
+        this.encapsulation = encapsulation;
+        this.forward = (ALLOW_ETH_ADDRESS_SELECTOR) && forward;
+        this.broadcast = (ALLOW_ETH_ADDRESS_SELECTOR) && broadcast;
+        this.interfaces = Sets.newHashSet();
+        this.hostIds = Sets.newHashSet();
+        this.dirty = false;
+    }
+
+    /**
+     * Constructs a DefaultFabricNetwork instance.
+     *
+     * @param name              fabric network name
+     * @param encapsulation     encapsulation type
+     */
+    private DefaultFabricNetwork(String name, EncapsulationType encapsulation) {
+        this.name = name;
+        this.interfaceNames = Sets.newHashSet();
+        this.encapsulation = encapsulation;
+        this.forward = ALLOW_ETH_ADDRESS_SELECTOR;
+        this.broadcast = ALLOW_ETH_ADDRESS_SELECTOR;
+        this.interfaces = Sets.newHashSet();
+        this.hostIds = Sets.newHashSet();
+        this.dirty = false;
+    }
+
+    /**
+     * Creates a DefaultFabricNetwork data by given name.
+     * The encapsulation type of the DefaultFabricNetwork will be NONE.
+     *
+     * @param name              fabric network name
+     * @return DefaultFabricNetwork instance
+     */
+    public static FabricNetwork of(String name) {
+        Objects.requireNonNull(name);
+        return new DefaultFabricNetwork(name, EncapsulationType.NONE);
+    }
+
+    /**
+     * Creates a copy of DefaultFabricNetwork instance.
+     *
+     * @param fabricNetwork DefaultFabricNetwork instance
+     * @return the copy of the DefaultFabricNetwork instance
+     */
+    public static FabricNetwork of(FabricNetwork fabricNetwork) {
+        Objects.requireNonNull(fabricNetwork);
+        DefaultFabricNetwork fabricNetworkCopy =
+                new DefaultFabricNetwork(fabricNetwork.name(), fabricNetwork.encapsulation());
+        fabricNetworkCopy.interfaceNames.addAll(fabricNetwork.interfaceNames());
+        fabricNetworkCopy.forward = (ALLOW_ETH_ADDRESS_SELECTOR) && fabricNetwork.isForward();
+        fabricNetworkCopy.broadcast = (ALLOW_ETH_ADDRESS_SELECTOR) && fabricNetwork.isBroadcast();
+        fabricNetworkCopy.interfaces.addAll(fabricNetwork.interfaces());
+        fabricNetworkCopy.hostIds.addAll(fabricNetwork.hostIds());
+        fabricNetworkCopy.setDirty(fabricNetwork.isDirty());
+        return fabricNetworkCopy;
+    }
+
+    // field queries
+
+    @Override
+    public String name() {
+        return name;
+    }
+
+    @Override
+    public Set<String> interfaceNames() {
+        return ImmutableSet.copyOf(interfaceNames);
+    }
+
+    @Override
+    public EncapsulationType encapsulation() {
+        return encapsulation;
+    }
+
+    @Override
+    public boolean isForward() {
+        return forward;
+    }
+
+    @Override
+    public boolean isBroadcast() {
+        return broadcast;
+    }
+
+    @Override
+    public Set<Interface> interfaces() {
+        return ImmutableSet.copyOf(interfaces);
+    }
+
+    @Override
+    public Set<HostId> hostIds() {
+        return ImmutableSet.copyOf(hostIds);
+    }
+
+    @Override
+    public boolean isDirty() {
+        return dirty;
+    }
+
+    @Override
+    public boolean contains(Interface iface) {
+        return interfaces.contains(iface);
+    }
+
+    @Override
+    public boolean contains(ConnectPoint port, VlanId vlanId) {
+        for (Interface iface : interfaces) {
+            if (iface.connectPoint().equals(port) && iface.vlan().equals(vlanId)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public boolean contains(DeviceId deviceId) {
+        for (Interface iface : interfaces) {
+            if (iface.connectPoint().deviceId().equals(deviceId)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void addInterface(Interface iface) {
+        Objects.requireNonNull(iface);
+        if (interfaces.add(iface)) {
+            setDirty(true);
+        }
+    }
+
+    @Override
+    public void addHost(Host host) {
+        Objects.requireNonNull(host);
+        if (hostIds.add(host.id())) {
+            setDirty(true);
+        }
+    }
+
+    @Override
+    public void setDirty(boolean newDirty) {
+        dirty = newDirty;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .add("name", name)
+                .add("interfaceNames", interfaceNames)
+                .add("encapsulation", encapsulation)
+                .add("forward", forward)
+                .add("broadcast", broadcast)
+                .add("interfaces", interfaces)
+                .add("hostIds", hostIds)
+                .add("isDirty", dirty)
+                .toString();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof DefaultFabricNetwork)) {
+            return false;
+        }
+        DefaultFabricNetwork other = (DefaultFabricNetwork) obj;
+        return Objects.equals(other.name, this.name)
+                && Objects.equals(other.interfaceNames, this.interfaceNames)
+                && Objects.equals(other.encapsulation, this.encapsulation)
+                && Objects.equals(other.forward, this.forward)
+                && Objects.equals(other.broadcast, this.broadcast)
+                && Objects.equals(other.interfaces, this.interfaces)
+                && Objects.equals(other.hostIds, this.hostIds);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(name, interfaces, encapsulation, forward, broadcast);
+    }
+
+    /**
+     * Returns new builder instance.
+     *
+     * @return fabric network builder
+     */
+    public static DefaultFabricNetworkBuilder builder() {
+        return new DefaultFabricNetworkBuilder();
+    }
+
+    /**
+     * A builder class for fabric network.
+     */
+    public static final class DefaultFabricNetworkBuilder implements Builder {
+        private String name;
+        private Set<String> interfaceNames;
+        private EncapsulationType encapsulation;
+        private boolean forward;
+        private boolean broadcast;
+
+        private DefaultFabricNetworkBuilder() {
+        }
+
+        @Override
+        public Builder name(String name) {
+            this.name = name;
+            return this;
+        }
+
+        @Override
+        public Builder interfaceNames(Set<String> interfaceNames) {
+            this.interfaceNames = interfaceNames;
+            return this;
+        }
+
+        @Override
+        public Builder encapsulation(EncapsulationType encapsulation) {
+            this.encapsulation = encapsulation;
+            return this;
+        }
+
+        @Override
+        public Builder forward(boolean forward) {
+            this.forward = forward;
+            return this;
+        }
+
+        @Override
+        public Builder broadcast(boolean broadcast) {
+            this.broadcast = broadcast;
+            return this;
+        }
+
+        @Override
+        public FabricNetwork build() {
+            checkArgument(name != null, NOT_NULL_MSG, "name");
+            return new DefaultFabricNetwork(name, interfaceNames,
+                    encapsulation, forward, broadcast);
+        }
+    }
+}
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricRoute.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricRoute.java
new file mode 100644
index 0000000..6b9a132
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricRoute.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.impl;
+
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onosproject.cluster.NodeId;
+import org.onosproject.simplefabric.api.FabricRoute;
+
+import java.util.Objects;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Represents a route.
+ */
+public final class DefaultFabricRoute implements FabricRoute {
+
+    private static final String VERSION_MISMATCH =
+            "Prefix and next hop must be in the same address family";
+
+    private static final NodeId UNDEFINED = new NodeId("-");
+
+    private final Source source;
+    private final IpPrefix prefix;
+    private final IpAddress nextHop;
+    private final NodeId sourceNode;
+
+    /**
+     * Creates a route.
+     *
+     * @param source route source
+     * @param prefix IP prefix
+     * @param nextHop next hop IP address
+     */
+    private DefaultFabricRoute(Source source, IpPrefix prefix, IpAddress nextHop) {
+        this(source, prefix, nextHop, UNDEFINED);
+    }
+
+    /**
+     * Creates a route.
+     *
+     * @param source route source
+     * @param prefix IP prefix
+     * @param nextHop next hop IP address
+     * @param sourceNode ONOS node the route was sourced from
+     */
+    private DefaultFabricRoute(Source source, IpPrefix prefix,
+                              IpAddress nextHop, NodeId sourceNode) {
+        this.source = checkNotNull(source);
+        this.prefix = prefix;
+        this.nextHop = nextHop;
+        this.sourceNode = checkNotNull(sourceNode);
+    }
+
+    @Override
+    public Source source() {
+        return source;
+    }
+
+    @Override
+    public IpPrefix prefix() {
+        return prefix;
+    }
+
+    @Override
+    public IpAddress nextHop() {
+        return nextHop;
+    }
+
+    @Override
+    public NodeId sourceNode() {
+        return sourceNode;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(prefix, nextHop);
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+
+        if (!(other instanceof DefaultFabricRoute)) {
+            return false;
+        }
+
+        DefaultFabricRoute that = (DefaultFabricRoute) other;
+
+        return Objects.equals(this.prefix, that.prefix) &&
+                Objects.equals(this.nextHop, that.nextHop);
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("prefix", prefix)
+                .add("nextHop", nextHop)
+                .toString();
+    }
+
+    /**
+     * Returns new builder instance.
+     *
+     * @return fabric route builder
+     */
+    public static DefaultFabricRouteBuilder builder() {
+        return new DefaultFabricRouteBuilder();
+    }
+
+    /**
+     * A builder class for fabric route.
+     */
+    public static final class DefaultFabricRouteBuilder implements Builder {
+        private Source source;
+        private IpPrefix prefix;
+        private IpAddress nextHop;
+        private NodeId sourceNode;
+
+        private DefaultFabricRouteBuilder() {
+        }
+
+        @Override
+        public Builder source(Source source) {
+            this.source = source;
+            return this;
+        }
+
+        @Override
+        public Builder prefix(IpPrefix prefix) {
+            this.prefix = prefix;
+            return this;
+        }
+
+        @Override
+        public Builder nextHop(IpAddress nextHop) {
+            this.nextHop = nextHop;
+            return this;
+        }
+
+        @Override
+        public Builder sourceNode(NodeId sourceNode) {
+            this.sourceNode = sourceNode;
+            return this;
+        }
+
+        @Override
+        public FabricRoute build() {
+
+            checkNotNull(prefix);
+            checkNotNull(nextHop);
+            checkArgument(prefix.version().equals(nextHop.version()), VERSION_MISMATCH);
+
+            if (sourceNode != null) {
+                return new DefaultFabricRoute(source, prefix, nextHop, sourceNode);
+            } else {
+                return new DefaultFabricRoute(source, prefix, nextHop);
+            }
+        }
+    }
+}
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricSubnet.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricSubnet.java
new file mode 100644
index 0000000..b7fec47
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/DefaultFabricSubnet.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2018-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.
+ */
+package org.onosproject.simplefabric.impl;
+
+import com.google.common.base.MoreObjects;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onlab.packet.MacAddress;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.simplefabric.api.FabricSubnet;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+/**
+ * Configuration details for an ip subnet entry.
+ */
+public final class DefaultFabricSubnet implements FabricSubnet {
+
+    private static final String NOT_NULL_MSG = "FabricSubnet % cannot be null";
+
+    private final IpPrefix prefix;
+    private final IpAddress gatewayIp;
+    private final MacAddress gatewayMac;
+    private EncapsulationType encapsulation;
+    private final String networkName;
+
+    /**
+     * Creates a new subnet entry.
+     *
+     * @param prefix  an ip subnet
+     * @param gatewayIp IP of the virtual gateway
+     * @param gatewayMac MacAddress of the virtual gateway
+     * @param encapsulation encapsulation type
+     * @param networkName network name
+     */
+    private DefaultFabricSubnet(IpPrefix prefix, IpAddress gatewayIp,
+                                MacAddress gatewayMac, EncapsulationType encapsulation,
+                                String networkName) {
+        this.prefix = prefix;
+        this.gatewayIp = gatewayIp;
+        this.gatewayMac = gatewayMac;
+        this.encapsulation = encapsulation;
+        this.networkName = networkName;
+    }
+
+    @Override
+    public IpPrefix prefix() {
+        return prefix;
+    }
+
+    @Override
+    public IpAddress gatewayIp() {
+        return gatewayIp;
+    }
+
+    @Override
+    public MacAddress gatewayMac() {
+        return gatewayMac;
+    }
+
+    @Override
+    public EncapsulationType encapsulation() {
+        return encapsulation;
+    }
+
+    @Override
+    public String networkName() {
+        return networkName;
+    }
+
+    @Override
+    public boolean isIp4() {
+        return prefix.isIp4();
+    }
+
+    @Override
+    public boolean isIp6() {
+        return prefix.isIp6();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(prefix, gatewayIp, gatewayMac, encapsulation, networkName);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof DefaultFabricSubnet)) {
+            return false;
+        }
+        DefaultFabricSubnet that = (DefaultFabricSubnet) obj;
+        return Objects.equals(this.prefix, that.prefix)
+                && Objects.equals(this.gatewayIp, that.gatewayIp)
+                && Objects.equals(this.gatewayMac, that.gatewayMac)
+                && Objects.equals(this.encapsulation, that.encapsulation)
+                && Objects.equals(this.networkName, that.networkName);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .add("prefix", prefix)
+                .add("gatewayIp", gatewayIp)
+                .add("gatewayMac", gatewayMac)
+                .add("encapsulation", encapsulation)
+                .add("networkName", networkName)
+                .toString();
+    }
+
+    /**
+     * Returns new builder instance.
+     *
+     * @return fabric IP subnet builder
+     */
+    public static DefaultSubnetBuilder builder() {
+        return new DefaultSubnetBuilder();
+    }
+
+    /**
+     * A builder class for Ip Subnet.
+     */
+    public static final class DefaultSubnetBuilder implements Builder {
+        private IpPrefix prefix;
+        private IpAddress gatewayIp;
+        private MacAddress gatewayMac;
+        private EncapsulationType encapsulation;
+        private String networkName;
+
+        private DefaultSubnetBuilder() {
+        }
+
+        @Override
+        public Builder prefix(IpPrefix prefix) {
+            this.prefix = prefix;
+            return this;
+        }
+
+        @Override
+        public Builder gatewayIp(IpAddress gatewayIp) {
+            this.gatewayIp = gatewayIp;
+            return this;
+        }
+
+        @Override
+        public Builder gatewayMac(MacAddress gatewayMac) {
+            this.gatewayMac = gatewayMac;
+            return this;
+        }
+
+        @Override
+        public Builder encapsulation(EncapsulationType encapsulation) {
+            this.encapsulation = encapsulation;
+            return this;
+        }
+
+        @Override
+        public Builder networkName(String networkName) {
+            this.networkName = networkName;
+            return this;
+        }
+
+        @Override
+        public FabricSubnet build() {
+            checkArgument(prefix != null, NOT_NULL_MSG, "prefix");
+            checkArgument(gatewayIp != null, NOT_NULL_MSG, "gatewayIp");
+            checkArgument(gatewayMac != null, NOT_NULL_MSG, "gatewayMac");
+            checkArgument(networkName != null, NOT_NULL_MSG, "name");
+
+            if (this.encapsulation == null) {
+                encapsulation = EncapsulationType.NONE;
+            }
+
+            return new DefaultFabricSubnet(prefix, gatewayIp, gatewayMac,
+                    encapsulation, networkName);
+        }
+    }
+}
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricConfig.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricConfig.java
new file mode 100644
index 0000000..1d4b97c
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricConfig.java
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.impl;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.collect.Sets;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onlab.packet.MacAddress;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.config.Config;
+import org.onosproject.simplefabric.api.FabricNetwork;
+import org.onosproject.simplefabric.api.FabricRoute;
+import org.onosproject.simplefabric.api.FabricSubnet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Set;
+
+/**
+ * Configuration object for prefix config.
+ */
+public class SimpleFabricConfig extends Config<ApplicationId> {
+    public static final String KEY = "simpleFabric";
+
+    private static final String FABRIC_NETWORKS = "fabricNetworks";
+    private static final String NAME = "name";
+    private static final String INTERFACES = "interfaces";
+    private static final String ENCAPSULATION = "encapsulation";
+    private static final String IS_FORWARD = "isForward";
+    private static final String IS_BROADCAST = "isBroadcast";
+
+    private static final String FABRIC_SUBNETS = "fabricSubnets";
+    private static final String PREFIX = "prefix";
+    private static final String GATEWAY_IP = "gatewayIp";
+    private static final String GATEWAY_MAC = "gatewayMac";
+    private static final String NETWORK_NAME = "networkName";
+
+    private static final String FABRIC_ROUTES = "fabricRoutes";
+    private static final String NEXT_HOP = "nextHop";
+
+    private static final String NONE_ENCAPSULATION = "NONE";
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    /**
+     * Returns all fabric networks in this configuration.
+     *
+     * @return a set of fabric networks
+     */
+    public Set<FabricNetwork> fabricNetworks() {
+        Set<FabricNetwork> fabricNetworks = Sets.newHashSet();
+        JsonNode fabricNetworkNodes = object.get(FABRIC_NETWORKS);
+        if (fabricNetworkNodes == null) {
+            return fabricNetworks;
+        }
+
+        fabricNetworkNodes.forEach(jsonNode -> {
+            Set<String> ifaces = Sets.newHashSet();
+            JsonNode fabricNetworkIfaces = jsonNode.path(INTERFACES);
+            if (fabricNetworkIfaces == null) {
+                log.warn("Fabric network interfaces cannot find {}; skip: jsonNode={}", INTERFACES, jsonNode);
+            } else if (!fabricNetworkIfaces.toString().isEmpty()) {
+                fabricNetworkIfaces.forEach(ifacesNode -> ifaces.add(ifacesNode.asText()));
+            }
+            String encapsulation = NONE_ENCAPSULATION;   // NONE or VLAN
+            if (jsonNode.hasNonNull(ENCAPSULATION)) {
+                encapsulation = jsonNode.get(ENCAPSULATION).asText();
+            }
+            boolean isForward = true;
+            if (jsonNode.hasNonNull(IS_FORWARD)) {
+                isForward = jsonNode.get(IS_FORWARD).asBoolean();
+            }
+            boolean isBroadcast = true;
+            if (jsonNode.hasNonNull(IS_BROADCAST)) {
+                isBroadcast = jsonNode.get(IS_BROADCAST).asBoolean();
+            }
+            try {
+                fabricNetworks.add(DefaultFabricNetwork.builder()
+                                    .name(jsonNode.get(NAME).asText())
+                                    .interfaceNames(ifaces)
+                                    .encapsulation(EncapsulationType.enumFromString(encapsulation))
+                                    .forward(isForward)
+                                    .broadcast(isBroadcast)
+                                    .build());
+            } catch (Exception e) {
+                log.warn("Fabric network parse failed; skip: jsonNode={}", jsonNode);
+            }
+        });
+        return fabricNetworks;
+    }
+
+    /**
+     * Gets the set of configured local subnets.
+     *
+     * @return a set of subnets
+     */
+    public Set<FabricSubnet> fabricSubnets() {
+        Set<FabricSubnet> subnets = Sets.newHashSet();
+        JsonNode subnetsNode = object.get(FABRIC_SUBNETS);
+        if (subnetsNode == null) {
+            log.warn("FabricSubnets is null!");
+            return subnets;
+        }
+
+        subnetsNode.forEach(jsonNode -> {
+            String encapsulation = NONE_ENCAPSULATION;   // NONE or VLAN
+            if (jsonNode.hasNonNull(ENCAPSULATION)) {
+                encapsulation = jsonNode.get(ENCAPSULATION).asText();
+            }
+            try {
+                subnets.add(DefaultFabricSubnet.builder()
+                            .prefix(IpPrefix.valueOf(jsonNode.get(PREFIX).asText()))
+                            .gatewayIp(IpAddress.valueOf(jsonNode.get(GATEWAY_IP).asText()))
+                            .gatewayMac(MacAddress.valueOf(jsonNode.get(GATEWAY_MAC).asText()))
+                            .encapsulation(EncapsulationType.enumFromString(encapsulation))
+                            .networkName(jsonNode.get(NETWORK_NAME).asText())
+                            .build());
+            } catch (Exception e) {
+                log.warn("Fabric subnet parse failed; skip: jsonNode={}", jsonNode);
+            }
+        });
+
+        return subnets;
+    }
+
+    /**
+     * Returns all routes in this configuration.
+     *
+     * @return a set of routes.
+     */
+    public Set<FabricRoute> fabricRoutes() {
+        Set<FabricRoute> routes = Sets.newHashSet();
+
+        JsonNode routesNode = object.get(FABRIC_ROUTES);
+        if (routesNode == null) {
+            return routes;
+        }
+
+        routesNode.forEach(jsonNode -> {
+            try {
+                routes.add(DefaultFabricRoute.builder()
+                        .source(FabricRoute.Source.STATIC)
+                        .prefix(IpPrefix.valueOf(jsonNode.path(PREFIX).asText()))
+                        .nextHop(IpAddress.valueOf(jsonNode.path(NEXT_HOP).asText()))
+                        .build());
+            } catch (IllegalArgumentException e) {
+                log.warn("Fabric router parse error; skip: jsonNode={}", jsonNode);
+            }
+        });
+
+        return routes;
+    }
+}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricForwarding.java
similarity index 74%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricForwarding.java
index c8ecdd7..48fdf34 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricForwarding.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -29,7 +29,6 @@
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.net.intf.Interface;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.EncapsulationType;
 import org.onosproject.net.FilteredConnectPoint;
@@ -46,19 +45,28 @@
 import org.onosproject.net.intent.SinglePointToMultiPointIntent;
 import org.onosproject.net.intent.constraint.EncapsulationConstraint;
 import org.onosproject.net.intent.constraint.PartialFailureConstraint;
+import org.onosproject.net.intf.Interface;
+import org.onosproject.simplefabric.api.FabricNetwork;
+import org.onosproject.simplefabric.api.SimpleFabricEvent;
+import org.onosproject.simplefabric.api.SimpleFabricListener;
+import org.onosproject.simplefabric.api.SimpleFabricService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Set;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Objects;
 import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
 import java.util.stream.Collectors;
 
+import static org.onosproject.simplefabric.api.Constants.FORWARDING_APP_ID;
+import static org.onosproject.simplefabric.api.Constants.PRI_L2NETWORK_BROADCAST;
+import static org.onosproject.simplefabric.api.Constants.PRI_L2NETWORK_UNICAST;
+
 
 /**
  * An implementation of L2NetworkOperationService.
@@ -66,13 +74,13 @@
  * application.
  */
 @Component(immediate = true, enabled = false)
-public class SimpleFabricL2Forward {
+public class SimpleFabricForwarding {
 
     public static final String BROADCAST = "BCAST";
     public static final String UNICAST = "UNI";
 
     private final Logger log = LoggerFactory.getLogger(getClass());
-    protected ApplicationId l2ForwardAppId;
+    protected ApplicationId appId;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
     protected CoreService coreService;
@@ -97,20 +105,20 @@
 
     @Activate
     public void activate() {
-        l2ForwardAppId = coreService.registerApplication(simpleFabric.L2FORWARD_APP_ID);
-        log.info("simple fabric l2 forwaring starting with l2net app id {}", l2ForwardAppId.toString());
+        appId = coreService.registerApplication(FORWARDING_APP_ID);
+        log.info("simple fabric forwarding starting with l2net app id {}", appId.toString());
 
         simpleFabric.addListener(simpleFabricListener);
 
         refresh();
         checkIntentsPurge();
 
-        log.info("simple fabric l2forward started");
+        log.info("simple fabric forwarding started");
     }
 
     @Deactivate
     public void deactivate() {
-        log.info("simple fabric l2forward stopping");
+        log.info("simple fabric forwarding stopping");
 
         simpleFabric.removeListener(simpleFabricListener);
 
@@ -133,26 +141,27 @@
         //bctIntentsMap.clear();
         //uniIntentsMap.clear();
 
-        log.info("simple fabric l2forward stopped");
+        log.info("simple fabric forwarding stopped");
     }
 
     private void refresh() {
-        log.debug("simple fabric l2forward refresh");
+        log.debug("simple fabric forwarding refresh");
 
         Map<Key, SinglePointToMultiPointIntent> newBctIntentsMap = Maps.newConcurrentMap();
         Map<Key, MultiPointToSinglePointIntent> newUniIntentsMap = Maps.newConcurrentMap();
 
-        for (L2Network l2Network : simpleFabric.getL2Networks()) {
-            // scans all l2network regardless of dirty flag
-            // if l2Network.l2Forward == false or number of interfaces() < 2, no Intents generated
-            for (SinglePointToMultiPointIntent intent : buildBrcIntents(l2Network)) {
+        for (FabricNetwork fabricNetwork : simpleFabric.fabricNetworks()) {
+            // scans all l2network regardless of isDirty flag
+            // if fabricNetwork.isForward == false or number of interfaces() < 2, no Intents generated
+            for (SinglePointToMultiPointIntent intent : buildBrcIntents(fabricNetwork)) {
                 newBctIntentsMap.put(intent.key(), intent);
             }
-            for (MultiPointToSinglePointIntent intent : buildUniIntents(l2Network, hostsFromL2Network(l2Network))) {
+            for (MultiPointToSinglePointIntent intent :
+                    buildUniIntents(fabricNetwork, hostsFromL2Network(fabricNetwork))) {
                 newUniIntentsMap.put(intent.key(), intent);
             }
-            if (l2Network.dirty()) {
-                l2Network.setDirty(false);
+            if (fabricNetwork.isDirty()) {
+                fabricNetwork.setDirty(false);
             }
         }
 
@@ -160,7 +169,8 @@
         for (SinglePointToMultiPointIntent intent : bctIntentsMap.values()) {
             SinglePointToMultiPointIntent newIntent = newBctIntentsMap.get(intent.key());
             if (newIntent == null) {
-                log.info("simple fabric l2forward withdraw broadcast intent: {}", intent.key().toString());
+                log.info("simple fabric forwarding withdraw broadcast intent: {}",
+                        intent.key().toString());
                 toBePurgedIntentKeys.add(intent.key());
                 intentService.withdraw(intent);
                 bctUpdated = true;
@@ -174,7 +184,8 @@
                     !oldIntent.selector().equals(intent.selector()) ||
                     !oldIntent.treatment().equals(intent.treatment()) ||
                     !oldIntent.constraints().equals(intent.constraints())) {
-                log.info("simple fabric l2forward submit broadcast intent: {}", intent.key().toString());
+                log.info("simple fabric forwarding submit broadcast intent: {}",
+                        intent.key().toString());
                 toBePurgedIntentKeys.remove(intent.key());
                 intentService.submit(intent);
                 bctUpdated = true;
@@ -185,7 +196,8 @@
         for (MultiPointToSinglePointIntent intent : uniIntentsMap.values()) {
             MultiPointToSinglePointIntent newIntent = newUniIntentsMap.get(intent.key());
             if (newIntent == null) {
-                log.info("simple fabric l2forward withdraw unicast intent: {}", intent.key().toString());
+                log.info("simple fabric forwarding withdraw unicast intent: {}",
+                        intent.key().toString());
                 toBePurgedIntentKeys.add(intent.key());
                 intentService.withdraw(intent);
                 uniUpdated = true;
@@ -199,7 +211,8 @@
                     !oldIntent.selector().equals(intent.selector()) ||
                     !oldIntent.treatment().equals(intent.treatment()) ||
                     !oldIntent.constraints().equals(intent.constraints())) {
-                log.info("simple fabric l2forward submit unicast intent: {}", intent.key().toString());
+                log.info("simple fabric forwarding submit unicast intent: {}",
+                        intent.key().toString());
                 toBePurgedIntentKeys.remove(intent.key());
                 intentService.submit(intent);
                 uniUpdated = true;
@@ -221,13 +234,14 @@
             for (Key key : toBePurgedIntentKeys) {
                 Intent intentToPurge = intentService.getIntent(key);
                 if (intentToPurge == null) {
-                    log.info("simple fabric l2forward purged intent: key={}", key.toString());
+                    log.info("simple fabric forwarding purged intent: key={}", key.toString());
                     purgedKeys.add(key);
                 } else {
                     switch (intentService.getIntentState(key)) {
                     case FAILED:
                     case WITHDRAWN:
-                        log.info("simple fabric l2forward try to purge intent: key={}", key.toString());
+                        log.info("simple fabric forwarding try to purge intent: key={}",
+                                key.toString());
                         intentService.purge(intentToPurge);
                         break;
                     case INSTALL_REQ:
@@ -235,7 +249,7 @@
                     case INSTALLING:
                     case RECOMPILING:
                     case COMPILING:
-                        log.warn("simple fabric l2forward withdraw intent to purge: key={}", key);
+                        log.warn("simple fabric forwarding withdraw intent to purge: key={}", key);
                         intentService.withdraw(intentToPurge);
                         break;
                     case WITHDRAW_REQ:
@@ -254,21 +268,21 @@
 
     // Generates Unicast Intents and broadcast Intents for the L2 Network.
 
-    private Set<Intent> generateL2NetworkIntents(L2Network l2Network) {
+    private Set<Intent> generateL2NetworkIntents(FabricNetwork fabricNetwork) {
         return new ImmutableSet.Builder<Intent>()
-                .addAll(buildBrcIntents(l2Network))
-                .addAll(buildUniIntents(l2Network, hostsFromL2Network(l2Network)))
+                .addAll(buildBrcIntents(fabricNetwork))
+                .addAll(buildUniIntents(fabricNetwork, hostsFromL2Network(fabricNetwork)))
                 .build();
     }
 
     // Build Boadcast Intents for a L2 Network.
-    private Set<SinglePointToMultiPointIntent> buildBrcIntents(L2Network l2Network) {
-        Set<Interface> interfaces = l2Network.interfaces();
-        if (interfaces.size() < 2 || !l2Network.l2Forward() || !l2Network.l2Broadcast()) {
+    private Set<SinglePointToMultiPointIntent> buildBrcIntents(FabricNetwork fabricNetwork) {
+        Set<Interface> interfaces = fabricNetwork.interfaces();
+        if (interfaces.size() < 2 || !fabricNetwork.isForward() || !fabricNetwork.isBroadcast()) {
             return ImmutableSet.of();
         }
         Set<SinglePointToMultiPointIntent> brcIntents = Sets.newHashSet();
-        ResourceGroup resourceGroup = ResourceGroup.of(l2Network.name());
+        ResourceGroup resourceGroup = ResourceGroup.of(fabricNetwork.name());
 
         // Generates broadcast Intents from any network interface to other
         // network interface from the L2 Network.
@@ -279,18 +293,21 @@
                     .filter(iface -> !iface.equals(src))
                     .map(this::buildFilteredConnectedPoint)
                     .collect(Collectors.toSet());
-            Key key = buildKey(l2Network.name(), "BCAST", srcFcp.connectPoint(), MacAddress.BROADCAST);
+            Key key = buildKey(fabricNetwork.name(), "BCAST",
+                    srcFcp.connectPoint(), MacAddress.BROADCAST);
             TrafficSelector selector = DefaultTrafficSelector.builder()
                     .matchEthDst(MacAddress.BROADCAST)
                     .build();
-            SinglePointToMultiPointIntent.Builder intentBuilder = SinglePointToMultiPointIntent.builder()
-                    .appId(l2ForwardAppId)
+            SinglePointToMultiPointIntent.Builder
+                    intentBuilder = SinglePointToMultiPointIntent.builder()
+                    .appId(appId)
                     .key(key)
                     .selector(selector)
                     .filteredIngressPoint(srcFcp)
                     .filteredEgressPoints(dstFcps)
-                    .constraints(buildConstraints(L2NETWORK_CONSTRAINTS, l2Network.encapsulation()))
-                    .priority(SimpleFabricService.PRI_L2NETWORK_BROADCAST)
+                    .constraints(buildConstraints(L2NETWORK_CONSTRAINTS,
+                            fabricNetwork.encapsulation()))
+                    .priority(PRI_L2NETWORK_BROADCAST)
                     .resourceGroup(resourceGroup);
             brcIntents.add(intentBuilder.build());
         });
@@ -298,30 +315,33 @@
     }
 
     // Builds unicast Intents for a L2 Network.
-    private Set<MultiPointToSinglePointIntent> buildUniIntents(L2Network l2Network, Set<Host> hosts) {
-        Set<Interface> interfaces = l2Network.interfaces();
-        if (!l2Network.l2Forward() || interfaces.size() < 2) {
+    private Set<MultiPointToSinglePointIntent> buildUniIntents(FabricNetwork fabricNetwork,
+                                                               Set<Host> hosts) {
+        Set<Interface> interfaces = fabricNetwork.interfaces();
+        if (!fabricNetwork.isForward() || interfaces.size() < 2) {
             return ImmutableSet.of();
         }
         Set<MultiPointToSinglePointIntent> uniIntents = Sets.newHashSet();
-        ResourceGroup resourceGroup = ResourceGroup.of(l2Network.name());
+        ResourceGroup resourceGroup = ResourceGroup.of(fabricNetwork.name());
         hosts.forEach(host -> {
             FilteredConnectPoint hostFcp = buildFilteredConnectedPoint(host);
             Set<FilteredConnectPoint> srcFcps = interfaces.stream()
                     .map(this::buildFilteredConnectedPoint)
                     .filter(fcp -> !fcp.equals(hostFcp))
                     .collect(Collectors.toSet());
-            Key key = buildKey(l2Network.name(), "UNI", hostFcp.connectPoint(), host.mac());
+            Key key = buildKey(fabricNetwork.name(), "UNI", hostFcp.connectPoint(), host.mac());
             TrafficSelector selector = DefaultTrafficSelector.builder()
                     .matchEthDst(host.mac()).build();
-            MultiPointToSinglePointIntent.Builder intentBuilder = MultiPointToSinglePointIntent.builder()
-                    .appId(l2ForwardAppId)
+            MultiPointToSinglePointIntent.Builder
+                    intentBuilder = MultiPointToSinglePointIntent.builder()
+                    .appId(appId)
                     .key(key)
                     .selector(selector)
                     .filteredIngressPoints(srcFcps)
                     .filteredEgressPoint(hostFcp)
-                    .constraints(buildConstraints(L2NETWORK_CONSTRAINTS, l2Network.encapsulation()))
-                    .priority(SimpleFabricService.PRI_L2NETWORK_UNICAST)
+                    .constraints(buildConstraints(L2NETWORK_CONSTRAINTS,
+                            fabricNetwork.encapsulation()))
+                    .priority(PRI_L2NETWORK_UNICAST)
                     .resourceGroup(resourceGroup);
             uniIntents.add(intentBuilder.build());
         });
@@ -331,8 +351,8 @@
 
     // Intent generate utilities
 
-    private Set<Host> hostsFromL2Network(L2Network l2Network) {
-        Set<Interface> interfaces = l2Network.interfaces();
+    private Set<Host> hostsFromL2Network(FabricNetwork fabricNetwork) {
+        Set<Interface> interfaces = fabricNetwork.interfaces();
         return interfaces.stream()
                 .map(this::hostsFromInterface)
                 .flatMap(Collection::stream)
@@ -346,11 +366,14 @@
                 .collect(Collectors.toSet());
     }
 
-    private Key buildKey(String l2NetworkName, String type, ConnectPoint cPoint, MacAddress dstMac) {
-        return Key.of(l2NetworkName + "-" + type + "-" + cPoint.toString() + "-" + dstMac, l2ForwardAppId);
+    private Key buildKey(String l2NetworkName, String type,
+                         ConnectPoint cPoint, MacAddress dstMac) {
+        return Key.of(l2NetworkName + "-" + type + "-" +
+                cPoint.toString() + "-" + dstMac, appId);
     }
 
-    private List<Constraint> buildConstraints(List<Constraint> constraints, EncapsulationType encapsulation) {
+    private List<Constraint> buildConstraints(List<Constraint> constraints,
+                                              EncapsulationType encapsulation) {
         if (!encapsulation.equals(EncapsulationType.NONE)) {
             List<Constraint> newConstraints = new ArrayList<>(constraints);
             constraints.stream()
@@ -385,25 +408,27 @@
     // Dump command handler
     private void dump(String subject, PrintStream out) {
         if ("intents".equals(subject)) {
-            out.println("L2Forward Broadcast Intents:\n");
+            out.println("Forwarding Broadcast Intents:\n");
             for (SinglePointToMultiPointIntent intent: bctIntentsMap.values()) {
                 out.println("    " + intent.key().toString()
                           + ": " + intent.selector().criteria()
                           + ", [" + intent.filteredIngressPoint().connectPoint()
                           + "] -> " + intent.filteredEgressPoints().stream()
-                                      .map(FilteredConnectPoint::connectPoint).collect(Collectors.toSet()));
+                                      .map(FilteredConnectPoint::connectPoint)
+                                        .collect(Collectors.toSet()));
             }
             out.println("");
-            out.println("L2Forward Unicast Intents:\n");
+            out.println("Forwarding Unicast Intents:\n");
             for (MultiPointToSinglePointIntent intent: uniIntentsMap.values()) {
                 out.println("    " + intent.key().toString()
                           + ": " + intent.selector().criteria()
                           + ", [" + intent.filteredIngressPoints().stream()
-                                    .map(FilteredConnectPoint::connectPoint).collect(Collectors.toSet())
+                                    .map(FilteredConnectPoint::connectPoint)
+                                    .collect(Collectors.toSet())
                           + "] -> " + intent.filteredEgressPoint().connectPoint());
             }
             out.println("");
-            out.println("L2Forward Intents to Be Purged:\n");
+            out.println("Forwarding Intents to Be Purged:\n");
             for (Key key: toBePurgedIntentKeys) {
                 out.println("    " + key.toString());
             }
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricManager.java
similarity index 72%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricManager.java
index d42f8e1..7a4e5d8 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricManager.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
@@ -64,6 +64,12 @@
 import org.osgi.service.component.annotations.Deactivate;
 import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.onosproject.simplefabric.api.FabricNetwork;
+import org.onosproject.simplefabric.api.FabricRoute;
+import org.onosproject.simplefabric.api.FabricSubnet;
+import org.onosproject.simplefabric.api.SimpleFabricEvent;
+import org.onosproject.simplefabric.api.SimpleFabricListener;
+import org.onosproject.simplefabric.api.SimpleFabricService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -75,7 +81,15 @@
 import java.util.Map;
 import java.util.Set;
 
-import static org.onosproject.simplefabric.RouteTools.createBinaryString;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_ETH_ADDRESS_SELECTOR;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_IPV6;
+import static org.onosproject.simplefabric.api.Constants.APP_ID;
+import static org.onosproject.simplefabric.api.Constants.IDLE_INTERVAL_MSEC;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_ALLOW_LINK_CP;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_HASHED_PATH_SELECTION;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_MATCH_IP_PROTO;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_SINGLE_TO_SINGLE;
+import static org.onosproject.simplefabric.util.RouteTools.createBinaryString;
 
 
 /**
@@ -118,25 +132,25 @@
     // SimpleFabric variables
     private ApplicationId appId = null;
 
-    // l2 broadcast networks
-    private Set<L2Network> l2Networks = new HashSet<>();
-    private Set<Interface> l2NetworkInterfaces = new HashSet<>();
+    // fabric networks
+    private Set<FabricNetwork> fabricNetworks = new HashSet<>();
+    private Set<Interface> networkInterfaces = new HashSet<>();
 
     // Subnet table
-    private Set<IpSubnet> ipSubnets = new HashSet<>();
-    private InvertedRadixTree<IpSubnet> ip4SubnetTable =
+    private Set<FabricSubnet> fabricSubnets = new HashSet<>();
+    private InvertedRadixTree<FabricSubnet> ip4SubnetTable =
                  new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
-    private InvertedRadixTree<IpSubnet> ip6SubnetTable =
+    private InvertedRadixTree<FabricSubnet> ip6SubnetTable =
                  new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
 
-    // Border Route table
-    private Set<Route> borderRoutes = new HashSet<>();
-    private InvertedRadixTree<Route> ip4BorderRouteTable =
+    // Fabric Route table
+    private Set<FabricRoute> fabricRoutes = new HashSet<>();
+    private InvertedRadixTree<FabricRoute> ip4BorderRouteTable =
                  new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
-    private InvertedRadixTree<Route> ip6BorderRouteTable =
+    private InvertedRadixTree<FabricRoute> ip6BorderRouteTable =
                  new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
 
-    // VirtialGateway
+    // Virtual gateway
     private Map<IpAddress, MacAddress> virtualGatewayIpMacMap = Maps.newConcurrentMap();
 
     // Refresh monitor thread
@@ -149,7 +163,6 @@
     private final InternalNetworkConfigListener configListener = new InternalNetworkConfigListener();
     private final InternalDeviceListener deviceListener = new InternalDeviceListener();
     private final InternalHostListener hostListener = new InternalHostListener();
-    private final InternalInterfaceListener interfaceListener = new InternalInterfaceListener();
 
     private ConfigFactory<ApplicationId, SimpleFabricConfig> simpleFabricConfigFactory =
         new ConfigFactory<ApplicationId, SimpleFabricConfig>(
@@ -178,9 +191,9 @@
         hostService.addListener(hostListener);
 
         componentService.activate(appId, SimpleFabricNeighbour.class.getName());
-        componentService.activate(appId, SimpleFabricReactiveRouting.class.getName());
-        if (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) {
-            componentService.activate(appId, SimpleFabricL2Forward.class.getName());
+        componentService.activate(appId, SimpleFabricRouting.class.getName());
+        if (ALLOW_ETH_ADDRESS_SELECTOR) {
+            componentService.activate(appId, SimpleFabricForwarding.class.getName());
         }
 
         refreshThread = new InternalRefreshThread();
@@ -194,9 +207,9 @@
         log.info("simple fabric stopping");
 
         componentService.deactivate(appId, SimpleFabricNeighbour.class.getName());
-        componentService.deactivate(appId, SimpleFabricReactiveRouting.class.getName());
-        if (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) {
-            componentService.deactivate(appId, SimpleFabricL2Forward.class.getName());
+        componentService.deactivate(appId, SimpleFabricRouting.class.getName());
+        if (ALLOW_ETH_ADDRESS_SELECTOR) {
+            componentService.deactivate(appId, SimpleFabricForwarding.class.getName());
         }
 
         deviceService.removeListener(deviceListener);
@@ -211,7 +224,7 @@
     }
 
     // Set up from configuration
-    // returns found dirty and refresh listners are called (true) or not (false)
+    // returns found isDirty and refresh listeners are called (true) or not (false)
     private boolean refresh() {
         log.debug("simple fabric refresh");
         boolean dirty = false;
@@ -223,66 +236,66 @@
             return false;
         }
 
-        // l2Networks
-        Set<L2Network> newL2Networks = new HashSet<>();
-        Set<Interface> newL2NetworkInterfaces = new HashSet<>();
-        for (L2Network newL2NetworkConfig : config.getL2Networks()) {
-            L2Network newL2Network = L2Network.of(newL2NetworkConfig);
+        // fabricNetworks
+        Set<FabricNetwork> newFabricNetworks = new HashSet<>();
+        Set<Interface> newInterfaces = new HashSet<>();
+        for (FabricNetwork newFabricNetworkConfig : config.fabricNetworks()) {
+            FabricNetwork newFabricNetwork = DefaultFabricNetwork.of(newFabricNetworkConfig);
 
             // fill up interfaces and Hosts with active port only
-            for (String ifaceName : newL2NetworkConfig.interfaceNames()) {
+            for (String ifaceName : newFabricNetworkConfig.interfaceNames()) {
                 Interface iface = getInterfaceByName(ifaceName);
                 if (iface != null && deviceService.isAvailable(iface.connectPoint().deviceId())) {
-                     newL2Network.addInterface(iface);
-                     newL2NetworkInterfaces.add(iface);
+                     newFabricNetwork.addInterface(iface);
+                     newInterfaces.add(iface);
                 }
             }
             for (Host host : hostService.getHosts()) {
                 // consider host with ip only
                 if (!host.ipAddresses().isEmpty()) {
                     Interface iface = findAvailableDeviceHostInterface(host);
-                    if (iface != null && newL2Network.contains(iface)) {
-                        newL2Network.addHost(host);
+                    if (iface != null && newFabricNetwork.contains(iface)) {
+                        newFabricNetwork.addHost(host);
                     }
                 }
             }
-            newL2Network.setDirty(true);
+            newFabricNetwork.setDirty(true);
 
-            // update newL2Network's dirty flags if same entry already exists
-            for (L2Network prevL2Network : l2Networks) {
-                if (prevL2Network.equals(newL2Network)) {
-                    newL2Network.setDirty(prevL2Network.dirty());
+            // update newFabricNetwork's isDirty flags if same entry already exists
+            for (FabricNetwork prevFabricNetwork : fabricNetworks) {
+                if (prevFabricNetwork.equals(newFabricNetwork)) {
+                    newFabricNetwork.setDirty(prevFabricNetwork.isDirty());
                     break;
                 }
             }
-            newL2Networks.add(newL2Network);
+            newFabricNetworks.add(newFabricNetwork);
         }
-        if (!l2Networks.equals(newL2Networks)) {
-            l2Networks = newL2Networks;
+        if (!fabricNetworks.equals(newFabricNetworks)) {
+            fabricNetworks = newFabricNetworks;
             dirty = true;
         }
-        if (!l2NetworkInterfaces.equals(newL2NetworkInterfaces)) {
-            l2NetworkInterfaces = newL2NetworkInterfaces;
+        if (!networkInterfaces.equals(newInterfaces)) {
+            networkInterfaces = newInterfaces;
             dirty = true;
         }
 
-        // ipSubnets
-        Set<IpSubnet> newIpSubnets = config.ipSubnets();
-        InvertedRadixTree<IpSubnet> newIp4SubnetTable =
+        // default Fabric Subnets
+        Set<FabricSubnet> newFabricSubnets = config.fabricSubnets();
+        InvertedRadixTree<FabricSubnet> newIp4SubnetTable =
                  new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
-        InvertedRadixTree<IpSubnet> newIp6SubnetTable =
+        InvertedRadixTree<FabricSubnet> newIp6SubnetTable =
                  new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
         Map<IpAddress, MacAddress> newVirtualGatewayIpMacMap = Maps.newConcurrentMap();
-        for (IpSubnet subnet : newIpSubnets) {
-            if (subnet.ipPrefix().isIp4()) {
-                newIp4SubnetTable.put(createBinaryString(subnet.ipPrefix()), subnet);
+        for (FabricSubnet subnet : newFabricSubnets) {
+            if (subnet.prefix().isIp4()) {
+                newIp4SubnetTable.put(createBinaryString(subnet.prefix()), subnet);
             } else {
-                newIp6SubnetTable.put(createBinaryString(subnet.ipPrefix()), subnet);
+                newIp6SubnetTable.put(createBinaryString(subnet.prefix()), subnet);
             }
             newVirtualGatewayIpMacMap.put(subnet.gatewayIp(), subnet.gatewayMac());
         }
-        if (!ipSubnets.equals(newIpSubnets)) {
-            ipSubnets = newIpSubnets;
+        if (!fabricSubnets.equals(newFabricSubnets)) {
+            fabricSubnets = newFabricSubnets;
             ip4SubnetTable = newIp4SubnetTable;
             ip6SubnetTable = newIp6SubnetTable;
             dirty = true;
@@ -292,21 +305,21 @@
             dirty = true;
         }
 
-        // borderRoutes config handling
-        Set<Route> newBorderRoutes = config.borderRoutes();
-        if (!borderRoutes.equals(newBorderRoutes)) {
-            InvertedRadixTree<Route> newIp4BorderRouteTable =
+        // fabricRoutes config handling
+        Set<FabricRoute> newFabricRoutes = config.fabricRoutes();
+        if (!fabricRoutes.equals(newFabricRoutes)) {
+            InvertedRadixTree<FabricRoute> newIp4BorderRouteTable =
                     new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
-            InvertedRadixTree<Route> newIp6BorderRouteTable =
+            InvertedRadixTree<FabricRoute> newIp6BorderRouteTable =
                     new ConcurrentInvertedRadixTree<>(new DefaultByteArrayNodeFactory());
-            for (Route route : newBorderRoutes) {
+            for (FabricRoute route : newFabricRoutes) {
                 if (route.prefix().isIp4()) {
                     newIp4BorderRouteTable.put(createBinaryString(route.prefix()), route);
                 } else {
                     newIp6BorderRouteTable.put(createBinaryString(route.prefix()), route);
                 }
             }
-            borderRoutes = newBorderRoutes;
+            fabricRoutes = newFabricRoutes;
             ip4BorderRouteTable = newIp4BorderRouteTable;
             ip6BorderRouteTable = newIp6BorderRouteTable;
             dirty = true;
@@ -332,7 +345,7 @@
     }
 
     @Override
-    public ApplicationId getAppId() {
+    public ApplicationId appId() {
         if (appId == null) {
             appId = coreService.registerApplication(APP_ID);
         }
@@ -340,57 +353,57 @@
     }
 
     @Override
-    public Collection<L2Network> getL2Networks() {
-        return ImmutableSet.copyOf(l2Networks);
+    public Collection<FabricNetwork> fabricNetworks() {
+        return ImmutableSet.copyOf(fabricNetworks);
     }
 
     @Override
-    public Set<IpSubnet> getIpSubnets() {
-        return ImmutableSet.copyOf(ipSubnets);
+    public Set<FabricSubnet> defaultFabricSubnets() {
+        return ImmutableSet.copyOf(fabricSubnets);
     }
 
     @Override
-    public Set<Route> getBorderRoutes() {
-        return ImmutableSet.copyOf(borderRoutes);
+    public Set<FabricRoute> fabricRoutes() {
+        return ImmutableSet.copyOf(fabricRoutes);
     }
 
     @Override
-    public boolean isVMac(MacAddress mac) {
+    public boolean isVirtualGatewayMac(MacAddress mac) {
         return virtualGatewayIpMacMap.containsValue(mac);
     }
 
     @Override
-    public boolean isL2NetworkInterface(Interface intf) {
-        return l2NetworkInterfaces.contains(intf);
+    public boolean isFabricNetworkInterface(Interface intf) {
+        return networkInterfaces.contains(intf);
     }
 
     @Override
-    public MacAddress findVMacForIp(IpAddress ip) {
+    public MacAddress vMacForIp(IpAddress ip) {
         return virtualGatewayIpMacMap.get(ip);
     }
 
     @Override
-    public L2Network findL2Network(ConnectPoint port, VlanId vlanId) {
-        for (L2Network l2Network : l2Networks) {
-            if (l2Network.contains(port, vlanId)) {
-                return l2Network;
+    public FabricNetwork fabricNetwork(ConnectPoint port, VlanId vlanId) {
+        for (FabricNetwork fabricNetwork : fabricNetworks) {
+            if (fabricNetwork.contains(port, vlanId)) {
+                return fabricNetwork;
             }
         }
         return null;
     }
 
     @Override
-    public L2Network findL2Network(String name) {
-        for (L2Network l2Network : l2Networks) {
-            if (l2Network.name().equals(name)) {
-                return l2Network;
+    public FabricNetwork fabricNetwork(String name) {
+        for (FabricNetwork fabricNetwork : fabricNetworks) {
+            if (fabricNetwork.name().equals(name)) {
+                return fabricNetwork;
             }
         }
         return null;
     }
 
     @Override
-    public IpSubnet findIpSubnet(IpAddress ip) {
+    public FabricSubnet fabricSubnet(IpAddress ip) {
         if (ip.isIp4()) {
             return ip4SubnetTable.getValueForLongestKeyPrefixing(
                      createBinaryString(IpPrefix.valueOf(ip, Ip4Address.BIT_LENGTH)));
@@ -401,8 +414,8 @@
     }
 
     @Override
-    public Route findBorderRoute(IpAddress ip) {
-        // ASSUME: ipAddress is out of ipSubnet
+    public FabricRoute fabricRoute(IpAddress ip) {
+        // ASSUME: ipAddress is out of fabricSubnet
         if (ip.isIp4()) {
             return ip4BorderRouteTable.getValueForLongestKeyPrefixing(
                      createBinaryString(IpPrefix.valueOf(ip, Ip4Address.BIT_LENGTH)));
@@ -414,7 +427,7 @@
 
 
     @Override
-    public Interface findHostInterface(Host host) {
+    public Interface hostInterface(Host host) {
         return interfaceService.getInterfaces().stream()
                 .filter(iface -> iface.connectPoint().equals(host.location()) &&
                                  iface.vlan().equals(host.vlan()))
@@ -433,32 +446,32 @@
 
     @Override
     public boolean requestMac(IpAddress ip) {
-        IpSubnet ipSubnet = findIpSubnet(ip);
-        if (ipSubnet == null) {
-            log.warn("simple fabric request mac failed for unknown IpSubnet: {}", ip);
+        FabricSubnet fabricSubnet = fabricSubnet(ip);
+        if (fabricSubnet == null) {
+            log.warn("simple fabric request mac failed for unknown fabricSubnet: {}", ip);
             return false;
         }
-        L2Network l2Network = findL2Network(ipSubnet.l2NetworkName());
-        if (l2Network == null) {
-            log.warn("simple fabric request mac failed for unknown l2Network name {}: {}",
-                     ipSubnet.l2NetworkName(), ip);
+        FabricNetwork fabricNetwork = fabricNetwork(fabricSubnet.networkName());
+        if (fabricNetwork == null) {
+            log.warn("simple fabric request mac failed for unknown fabricNetwork name {}: {}",
+                     fabricSubnet.networkName(), ip);
             return false;
         }
-        log.debug("simple fabric send request mac L2Network {}: {}", l2Network.name(), ip);
-        for (Interface iface : l2Network.interfaces()) {
+        log.debug("simple fabric send request mac fabricNetwork {}: {}", fabricNetwork.name(), ip);
+        for (Interface iface : fabricNetwork.interfaces()) {
             Ethernet neighbourReq;
             if (ip.isIp4()) {
-                neighbourReq = ARP.buildArpRequest(ipSubnet.gatewayMac().toBytes(),
-                                                   ipSubnet.gatewayIp().toOctets(),
+                neighbourReq = ARP.buildArpRequest(fabricSubnet.gatewayMac().toBytes(),
+                                                   fabricSubnet.gatewayIp().toOctets(),
                                                    ip.toOctets(),
                                                    iface.vlan().toShort());
             } else {
                 byte[] soliciteIp = IPv6.getSolicitNodeAddress(ip.toOctets());
                 neighbourReq = NeighborSolicitation.buildNdpSolicit(
                                                    ip.toOctets(),
-                                                   ipSubnet.gatewayIp().toOctets(),
+                                                   fabricSubnet.gatewayIp().toOctets(),
                                                    soliciteIp,
-                                                   ipSubnet.gatewayMac().toBytes(),
+                                                   fabricSubnet.gatewayMac().toBytes(),
                                                    IPv6.getMCastMacAddress(soliciteIp),
                                                    iface.vlan());
             }
@@ -482,34 +495,28 @@
     protected void dump(String subject, PrintStream out) {
         if ("show".equals(subject)) {
             out.println("Static Configuration Flag:");
-            out.println("    ALLOW_IPV6="
-                        + SimpleFabricService.ALLOW_IPV6);
-            out.println("    ALLOW_ETH_ADDRESS_SELECTOR="
-                        + SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR);
-            out.println("    REACTIVE_SINGLE_TO_SINGLE="
-                        + SimpleFabricService.REACTIVE_SINGLE_TO_SINGLE);
-            out.println("    REACTIVE_ALLOW_LINK_CP="
-                        + SimpleFabricService.REACTIVE_ALLOW_LINK_CP);
-            out.println("    REACTIVE_HASHED_PATH_SELECTION="
-                        + SimpleFabricService.REACTIVE_HASHED_PATH_SELECTION);
-            out.println("    REACTIVE_MATCH_IP_PROTO="
-                        + SimpleFabricService.REACTIVE_MATCH_IP_PROTO);
+            out.println("    ALLOW_IPV6=" + ALLOW_IPV6);
+            out.println("    ALLOW_ETH_ADDRESS_SELECTOR=" + ALLOW_ETH_ADDRESS_SELECTOR);
+            out.println("    REACTIVE_SINGLE_TO_SINGLE=" + REACTIVE_SINGLE_TO_SINGLE);
+            out.println("    REACTIVE_ALLOW_LINK_CP=" + REACTIVE_ALLOW_LINK_CP);
+            out.println("    REACTIVE_HASHED_PATH_SELECTION=" + REACTIVE_HASHED_PATH_SELECTION);
+            out.println("    REACTIVE_MATCH_IP_PROTO=" + REACTIVE_MATCH_IP_PROTO);
             out.println("");
             out.println("SimpleFabricAppId:");
-            out.println("    " + getAppId());
+            out.println("    " + appId());
             out.println("");
-            out.println("l2Networks:");
-            for (L2Network l2Network : getL2Networks()) {
-                out.println("    " + l2Network);
+            out.println("fabricNetworks:");
+            for (FabricNetwork fabricNetwork : fabricNetworks()) {
+                out.println("    " + fabricNetwork);
             }
             out.println("");
-            out.println("ipSubnets:");
-            for (IpSubnet ipSubnet : getIpSubnets()) {
-                out.println("    " + ipSubnet);
+            out.println("fabricSubnets:");
+            for (FabricSubnet fabricIpSubnet : defaultFabricSubnets()) {
+                out.println("    " + fabricIpSubnet);
             }
             out.println("");
-            out.println("borderRoutes:");
-            for (Route route : getBorderRoutes()) {
+            out.println("fabricRoutes:");
+            for (FabricRoute route : fabricRoutes()) {
                 out.println("    " + route);
             }
         }
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricNeighbour.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricNeighbour.java
similarity index 88%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricNeighbour.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricNeighbour.java
index d506a7e..5d7c8b0 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricNeighbour.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricNeighbour.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
@@ -30,6 +30,10 @@
 import org.onosproject.net.neighbour.NeighbourResolutionService;
 import org.onosproject.net.Host;
 import org.onosproject.net.host.HostService;
+import org.onosproject.simplefabric.api.FabricNetwork;
+import org.onosproject.simplefabric.api.SimpleFabricEvent;
+import org.onosproject.simplefabric.api.SimpleFabricListener;
+import org.onosproject.simplefabric.api.SimpleFabricService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -73,7 +77,7 @@
 
     @Activate
     public void activate() {
-        appId = simpleFabric.getAppId();
+        appId = simpleFabric.appId();
         simpleFabric.addListener(simpleFabricListener);
         refresh();
         log.info("simple fabric neighbour started");
@@ -94,7 +98,7 @@
         Set<Interface> interfaces = interfaceService.getInterfaces();
         // check for new interfaces
         for (Interface intf : interfaces) {
-            if (!monitoredInterfaces.contains(intf) && simpleFabric.isL2NetworkInterface(intf)) {
+            if (!monitoredInterfaces.contains(intf) && simpleFabric.isFabricNetworkInterface(intf)) {
                log.info("simple fabric neighbour register handler: {}", intf);
                neighbourService.registerNeighbourHandler(intf, neighbourHandler, appId);
                monitoredInterfaces.add(intf);
@@ -130,7 +134,7 @@
      * @param context the message context
      */
     protected void handleRequest(NeighbourMessageContext context) {
-        MacAddress mac = simpleFabric.findVMacForIp(context.target());
+        MacAddress mac = simpleFabric.vMacForIp(context.target());
         if (mac != null) {
             log.trace("simple fabric neightbour request on virtualGatewayAddress {}; response to {} {} mac={}",
                       context.target(), context.inPort(), context.vlan(), mac);
@@ -139,8 +143,8 @@
         }
         // else forward to corresponding host
 
-        L2Network l2Network = simpleFabric.findL2Network(context.inPort(), context.vlan());
-        if (l2Network != null) {
+        FabricNetwork fabricNetwork = simpleFabric.fabricNetwork(context.inPort(), context.vlan());
+        if (fabricNetwork != null) {
             int numForwards = 0;
             if (!context.dstMac().isBroadcast() && !context.dstMac().isMulticast()) {
                 for (Host host : hostService.getHostsByMac(context.dstMac())) {
@@ -156,7 +160,7 @@
             // else do broadcast to all host in the same l2 network
             log.trace("simple fabric neightbour request forward broadcast: {} {}",
                      context.inPort(), context.vlan());
-            for (Interface iface : l2Network.interfaces()) {
+            for (Interface iface : fabricNetwork.interfaces()) {
                 if (!context.inPort().equals(iface.connectPoint())) {
                     log.trace("simple fabric forward neighbour request broadcast to {}", iface);
                     context.forward(iface);
@@ -178,10 +182,10 @@
     protected void handleReply(NeighbourMessageContext context,
                                HostService hostService) {
         // Find target L2 Network, then reply to the host
-        L2Network l2Network = simpleFabric.findL2Network(context.inPort(), context.vlan());
-        if (l2Network != null) {
-            // TODO: need to check and update simpleFabric.L2Network
-            MacAddress mac = simpleFabric.findVMacForIp(context.target());
+        FabricNetwork fabricNetwork = simpleFabric.fabricNetwork(context.inPort(), context.vlan());
+        if (fabricNetwork != null) {
+            // TODO: need to check and update simpleFabric.DefaultFabricNetwork
+            MacAddress mac = simpleFabric.vMacForIp(context.target());
             if (mac != null) {
                 log.trace("simple fabric neightbour response message to virtual gateway; drop: {} {} target={}",
                           context.inPort(), context.vlan(), context.target());
@@ -192,14 +196,14 @@
                 log.trace("simple fabric neightbour response message forward: {} {} target={} -> {}",
                           context.inPort(), context.vlan(), context.target(), hosts);
                 hosts.stream()
-                        .map(host -> simpleFabric.findHostInterface(host))
+                        .map(host -> simpleFabric.hostInterface(host))
                         .filter(Objects::nonNull)
                         .forEach(context::forward);
             }
         } else {
             // this might be happened when we remove an interface from L2 Network
             // just ignore this message
-            log.warn("simple fabric neightbour response message drop for unknown l2Network: {} {}",
+            log.warn("simple fabric neightbour response message drop for unknown fabricNetwork: {} {}",
                      context.inPort(), context.vlan());
             context.drop();
         }
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricRouting.java
similarity index 85%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricRouting.java
index ee37a95..cbca9a5 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricRouting.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.google.common.collect.ImmutableList;
 import org.osgi.service.component.annotations.Activate;
@@ -27,41 +27,41 @@
 import org.onlab.packet.ICMP6;
 import org.onlab.packet.IPv4;
 import org.onlab.packet.IPv6;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.Ip6Address;
 import org.onlab.packet.Ip6Prefix;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.net.FilteredConnectPoint;
-import org.onosproject.net.intf.InterfaceService;
 import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.EncapsulationType;
 import org.onosproject.net.Device;
 import org.onosproject.net.DeviceId;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.FilteredConnectPoint;
+import org.onosproject.net.Host;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.flow.DefaultFlowRule;
 import org.onosproject.net.flow.DefaultTrafficSelector;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
-import org.onosproject.net.flow.TrafficSelector;
-import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.flow.FlowRule;
 import org.onosproject.net.flow.FlowRuleService;
-import org.onosproject.net.Host;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.host.HostService;
 import org.onosproject.net.intent.Constraint;
-import org.onosproject.net.intent.constraint.EncapsulationConstraint;
-import org.onosproject.net.intent.constraint.PartialFailureConstraint;
-import org.onosproject.net.intent.constraint.HashedPathSelectionConstraint;
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.MultiPointToSinglePointIntent;
+import org.onosproject.net.intent.constraint.EncapsulationConstraint;
+import org.onosproject.net.intent.constraint.HashedPathSelectionConstraint;
+import org.onosproject.net.intent.constraint.PartialFailureConstraint;
 import org.onosproject.net.intf.Interface;
+import org.onosproject.net.intf.InterfaceService;
 import org.onosproject.net.link.LinkService;
 import org.onosproject.net.packet.DefaultOutboundPacket;
 import org.onosproject.net.packet.InboundPacket;
@@ -70,6 +70,12 @@
 import org.onosproject.net.packet.PacketPriority;
 import org.onosproject.net.packet.PacketProcessor;
 import org.onosproject.net.packet.PacketService;
+import org.onosproject.simplefabric.api.FabricNetwork;
+import org.onosproject.simplefabric.api.FabricSubnet;
+import org.onosproject.simplefabric.api.FabricRoute;
+import org.onosproject.simplefabric.api.SimpleFabricEvent;
+import org.onosproject.simplefabric.api.SimpleFabricListener;
+import org.onosproject.simplefabric.api.SimpleFabricService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -82,15 +88,29 @@
 import java.util.List;
 import java.util.Set;
 
+import static org.onosproject.simplefabric.api.Constants.ALLOW_ETH_ADDRESS_SELECTOR;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_IPV6;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_BASE;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_FORWARD;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_INTERCEPT;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_STEP;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_LOCAL_FORWARD;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_LOCAL_INTERCEPT;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_ALLOW_LINK_CP;
+import static org.onosproject.simplefabric.api.Constants.ROUTING_APP_ID;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_HASHED_PATH_SELECTION;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_MATCH_IP_PROTO;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_SINGLE_TO_SINGLE;
+
 
 /**
- * SimpleFabricReactiveRouting handles L3 Reactive Routing.
+ * SimpleFabricRouting handles Routing.
  */
 @Component(immediate = true, enabled = false)
-public class SimpleFabricReactiveRouting {
+public class SimpleFabricRouting {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
-    private ApplicationId reactiveAppId;
+    private ApplicationId appId;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
     protected CoreService coreService;
@@ -130,36 +150,36 @@
             // NOTE: manage purged intents by key for intentService.getIntent() supports key only
 
     private final InternalSimpleFabricListener simpleFabricListener = new InternalSimpleFabricListener();
-    private ReactiveRoutingProcessor processor = new ReactiveRoutingProcessor();
+    private InternalRoutingProcessor processor = new InternalRoutingProcessor();
 
     @Activate
     public void activate() {
-        reactiveAppId = coreService.registerApplication(simpleFabric.REACTIVE_APP_ID);
-        log.info("simple fabric reactive routing starting with app id {}", reactiveAppId.toString());
+        appId = coreService.registerApplication(ROUTING_APP_ID);
+        log.info("simple fabric routing starting with app id {}", appId.toString());
 
         // NOTE: may not clear at init for MIGHT generate pending_remove garbages
         //       use flush event from simple fabric cli command
 
-        if (simpleFabric.REACTIVE_HASHED_PATH_SELECTION) {
+        if (REACTIVE_HASHED_PATH_SELECTION) {
             reactiveConstraints = ImmutableList.of(new PartialFailureConstraint(),
                                                    new HashedPathSelectionConstraint());
         } else {
             reactiveConstraints = ImmutableList.of(new PartialFailureConstraint());
         }
 
-        processor = new ReactiveRoutingProcessor();
+        processor = new InternalRoutingProcessor();
         packetService.addProcessor(processor, PacketProcessor.director(2));
         simpleFabric.addListener(simpleFabricListener);
 
         registerIntercepts();
         refreshIntercepts();
 
-        log.info("simple fabric reactive routing started");
+        log.info("simple fabric routing started");
     }
 
     @Deactivate
     public void deactivate() {
-        log.info("simple fabric reactive routing stopping");
+        log.info("simple fabric routing stopping");
 
         packetService.removeProcessor(processor);
         simpleFabric.removeListener(simpleFabricListener);
@@ -171,11 +191,11 @@
 
         toBePurgedIntentKeys.clear();
 
-        flowRuleService.removeFlowRulesById(reactiveAppId);
+        flowRuleService.removeFlowRulesById(appId);
 
         processor = null;
 
-        log.info("simple fabric reactive routing stopped");
+        log.info("simple fabric routing stopped");
     }
 
     /**
@@ -186,15 +206,15 @@
 
         packetService.requestPackets(
             DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV4).build(),
-            PacketPriority.REACTIVE, reactiveAppId);
+            PacketPriority.REACTIVE, appId);
 
-        if (simpleFabric.ALLOW_IPV6) {
+        if (ALLOW_IPV6) {
             packetService.requestPackets(
                 DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV6).build(),
-                PacketPriority.REACTIVE, reactiveAppId);
+                PacketPriority.REACTIVE, appId);
         }
 
-        log.info("simple fabric reactive routing ip packet intercepts started");
+        log.info("simple fabric routing ip packet intercepts started");
     }
 
     /**
@@ -205,35 +225,35 @@
 
         packetService.cancelPackets(
             DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV4).build(),
-            PacketPriority.REACTIVE, reactiveAppId);
+            PacketPriority.REACTIVE, appId);
 
-        if (simpleFabric.ALLOW_IPV6) {
+        if (ALLOW_IPV6) {
             packetService.cancelPackets(
                 DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV6).build(),
-                PacketPriority.REACTIVE, reactiveAppId);
+                PacketPriority.REACTIVE, appId);
         }
 
-        log.info("simple fabric reactive routing ip packet intercepts stopped");
+        log.info("simple fabric routing ip packet intercepts stopped");
     }
 
     /**
-     * Refresh device flow rules for reative intercepts on local ipSubnets.
+     * Refresh device flow rules for intercepts on local fabricSubnets.
      */
     private void refreshIntercepts() {
         Set<FlowRule> newInterceptFlowRules = new HashSet<>();
         for (Device device : deviceService.getAvailableDevices()) {
-            for (IpSubnet subnet : simpleFabric.getIpSubnets()) {
-                newInterceptFlowRules.add(generateInterceptFlowRule(true, device.id(), subnet.ipPrefix()));
-                // check if this devices has the ipSubnet, then add ip broadcast flue rule
-                L2Network l2Network = simpleFabric.findL2Network(subnet.l2NetworkName());
-                if (l2Network != null && l2Network.contains(device.id())) {
-                    newInterceptFlowRules.add(generateLocalSubnetIpBctFlowRule(device.id(), subnet.ipPrefix(),
-                                                                               l2Network));
+            for (FabricSubnet subnet : simpleFabric.defaultFabricSubnets()) {
+                newInterceptFlowRules.add(generateInterceptFlowRule(true, device.id(), subnet.prefix()));
+                // check if this devices has the fabricSubnet, then add ip broadcast flue rule
+                FabricNetwork fabricNetwork = simpleFabric.fabricNetwork(subnet.networkName());
+                if (fabricNetwork != null && fabricNetwork.contains(device.id())) {
+                    newInterceptFlowRules.add(generateLocalSubnetIpBctFlowRule(device.id(), subnet.prefix(),
+                            fabricNetwork));
                 }
                 // JUST FOR FLOW RULE TEST ONLY
                 //newInterceptFlowRules.add(generateTestFlowRule(device.id(), subnet.ipPrefix()));
             }
-            for (Route route : simpleFabric.getBorderRoutes()) {
+            for (FabricRoute route : simpleFabric.fabricRoutes()) {
                 newInterceptFlowRules.add(generateInterceptFlowRule(false, device.id(), route.prefix()));
             }
         }
@@ -252,7 +272,7 @@
                 .filter(rule -> !interceptFlowRules.contains(rule))
                 .forEach(rule -> {
                     flowRuleService.applyFlowRules(rule);
-                    log.info("simple fabric reactive routing apply intercept flow rule: {}", rule);
+                    log.info("simple fabric routing apply intercept flow rule: {}", rule);
                 });
             interceptFlowRules = newInterceptFlowRules;
         }
@@ -276,13 +296,13 @@
                 .withPriority(reactivePriority(false, isDstLocalSubnet, prefix.prefixLength()))
                 .withSelector(selector.build())
                 .withTreatment(DefaultTrafficTreatment.builder().punt().build())
-                .fromApp(reactiveAppId)
+                .fromApp(appId)
                 .makePermanent()
                 .forTable(0).build();
         return rule;
     }
 
-    private FlowRule generateLocalSubnetIpBctFlowRule(DeviceId deviceId, IpPrefix prefix, L2Network l2Network) {
+    private FlowRule generateLocalSubnetIpBctFlowRule(DeviceId deviceId, IpPrefix prefix, FabricNetwork fabricNetwork) {
         TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
         IpPrefix bctPrefix;
         if (prefix.isIp4()) {
@@ -303,7 +323,7 @@
         }
         TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
         Set<ConnectPoint> newEgressPoints = new HashSet<>();
-        for (Interface iface : l2Network.interfaces()) {
+        for (Interface iface : fabricNetwork.interfaces()) {
             if (iface.connectPoint().deviceId().equals(deviceId)) {
                 treatment.setOutput(iface.connectPoint().port());
             }
@@ -313,7 +333,7 @@
                 .withPriority(reactivePriority(true, true, bctPrefix.prefixLength()))
                 .withSelector(selector.build())
                 .withTreatment(treatment.build())
-                .fromApp(reactiveAppId)
+                .fromApp(appId)
                 .makePermanent()
                 .forTable(0).build();
         return rule;
@@ -324,7 +344,7 @@
      */
     private void refreshRouteIntents() {
         for (Intent entry : intentService.getIntents()) {
-            if (!reactiveAppId.equals(entry.appId())) {
+            if (!appId.equals(entry.appId())) {
                 continue;
             }
 
@@ -362,8 +382,8 @@
                 toBePurgedIntentKeys.add(intent.key());
                 continue;
             }
-            if (!(simpleFabric.findL2Network(intent.egressPoint(), VlanId.NONE) != null ||
-                  (simpleFabric.REACTIVE_ALLOW_LINK_CP &&
+            if (!(simpleFabric.fabricNetwork(intent.egressPoint(), VlanId.NONE) != null ||
+                  (REACTIVE_ALLOW_LINK_CP &&
                    !linkService.getEgressLinks(intent.egressPoint()).isEmpty()))) {
                 log.info("refresh route intents; remove intent for egress point not available: key={}", intent.key());
                 intentService.withdraw(intentService.getIntent(intent.key()));
@@ -372,7 +392,7 @@
             }
 
             // MAY NEED TO CHECK: intent.egressPoint and intent.treatment's dstMac is valid against hosts
-            if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE && !simpleFabric.REACTIVE_ALLOW_LINK_CP) {
+            if (REACTIVE_SINGLE_TO_SINGLE && !REACTIVE_ALLOW_LINK_CP) {
                 // single path intent only; no need to check ingress points
                 continue;
             }
@@ -381,8 +401,8 @@
             boolean ingressPointChanged = false;
             for (FilteredConnectPoint cp : intent.filteredIngressPoints()) {
                 if (deviceService.isAvailable(cp.connectPoint().deviceId()) &&
-                    (simpleFabric.findL2Network(cp.connectPoint(), VlanId.NONE) != null ||
-                     (simpleFabric.REACTIVE_ALLOW_LINK_CP &&
+                    (simpleFabric.fabricNetwork(cp.connectPoint(), VlanId.NONE) != null ||
+                     (REACTIVE_ALLOW_LINK_CP &&
                       !linkService.getIngressLinks(cp.connectPoint()).isEmpty()))) {
                     newIngressPoints.add(cp);
                 } else {
@@ -402,7 +422,7 @@
             if (ingressPointChanged) {
                 MultiPointToSinglePointIntent updatedIntent =
                     MultiPointToSinglePointIntent.builder()
-                        .appId(reactiveAppId)
+                        .appId(appId)
                         .key(intent.key())
                         .selector(intent.selector())
                         .treatment(intent.treatment())
@@ -466,7 +486,7 @@
         // NOTE: cli calls are handling within the cli called node only; so should not user inents.isLocal()
         Set<Intent> myIntents = new HashSet<>();
         for (Intent intent : intentService.getIntents()) {
-            if (reactiveAppId.equals(intent.appId())) {
+            if (appId.equals(intent.appId())) {
                 myIntents.add(intent);
             }
         }
@@ -503,9 +523,9 @@
     }
 
     /**
-     * Reactive Packet Handling.
+     * Internal Packet Handling.
      */
-    private class ReactiveRoutingProcessor implements PacketProcessor {
+    private class InternalRoutingProcessor implements PacketProcessor {
         @Override
         public void process(PacketContext context) {
             InboundPacket pkt = context.inPacket();
@@ -552,8 +572,8 @@
     private boolean checkVirtualGatewayIpPacket(InboundPacket pkt, IpAddress srcIp, IpAddress dstIp) {
         Ethernet ethPkt = pkt.parsed();  // assume valid
 
-        MacAddress mac = simpleFabric.findVMacForIp(dstIp);
-        if (mac == null || !simpleFabric.isVMac(ethPkt.getDestinationMAC())) {
+        MacAddress mac = simpleFabric.vMacForIp(dstIp);
+        if (mac == null || !simpleFabric.isVirtualGatewayMac(ethPkt.getDestinationMAC())) {
             /* Destination MAC should be any of virtual gateway macs */
             return false;
         } else if (dstIp.isIp4()) {
@@ -621,12 +641,12 @@
         IpAddress dstNextHop = dstIp;
         MacAddress treatmentSrcMac = ethPkt.getDestinationMAC();
         int borderRoutePrefixLength = 0;
-        boolean updateMac = simpleFabric.isVMac(ethPkt.getDestinationMAC());
+        boolean updateMac = simpleFabric.isVirtualGatewayMac(ethPkt.getDestinationMAC());
 
         // check subnet local or route
-        IpSubnet srcSubnet = simpleFabric.findIpSubnet(srcIp);
+        FabricSubnet srcSubnet = simpleFabric.fabricSubnet(srcIp);
         if (srcSubnet == null) {
-            Route route = simpleFabric.findBorderRoute(srcIp);
+            FabricRoute route = simpleFabric.fabricRoute(srcIp);
             if (route == null) {
                 log.warn("unknown srcIp; drop: srcCp={} srcIp={} dstIp={} ipProto={}",
                          srcCp, srcIp, dstIp, ipProto);
@@ -636,9 +656,9 @@
             srcNextHop = route.nextHop();
             borderRoutePrefixLength = route.prefix().prefixLength();
         }
-        IpSubnet dstSubnet = simpleFabric.findIpSubnet(dstIp);
+        FabricSubnet dstSubnet = simpleFabric.fabricSubnet(dstIp);
         if (dstSubnet == null) {
-            Route route = simpleFabric.findBorderRoute(dstIp);
+            FabricRoute route = simpleFabric.fabricRoute(dstIp);
             if (route == null) {
                 log.warn("unknown dstIp; drop: srcCp={} srcIp={} dstIp={} ipProto={}",
                          srcCp, srcIp, dstIp, ipProto);
@@ -651,11 +671,11 @@
 
         if (dstSubnet != null) {
             // destination is local subnet ip
-            if (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR && dstSubnet.equals(srcSubnet)) {
-                // NOTE: if ALLOW_ETH_ADDRESS_SELECTOR=false; l2Forward is always false
-                L2Network l2Network = simpleFabric.findL2Network(dstSubnet.l2NetworkName());
+            if (ALLOW_ETH_ADDRESS_SELECTOR && dstSubnet.equals(srcSubnet)) {
+                // NOTE: if ALLOW_ETH_ADDRESS_SELECTOR=false; isForward is always false
+                FabricNetwork fabricNetwork = simpleFabric.fabricNetwork(dstSubnet.networkName());
                 treatmentSrcMac = ethPkt.getSourceMAC();
-                if (l2Network != null && l2Network.l2Forward()) {
+                if (fabricNetwork != null && fabricNetwork.isForward()) {
                     // NOTE: no reactive route action but do forward packet for L2Forward do not handle packet
                     // update mac only if dstMac is virtualGatewayMac, else assume valid mac already for the l2 network
                     log.info("LOCAL FORWARD ONLY: "
@@ -709,7 +729,7 @@
             log.warn("forward packet nextHopIp host_mac unknown: nextHopIp={}", nextHopIp);
             hostService.startMonitoringIp(nextHopIp);
             simpleFabric.requestMac(nextHopIp);
-            // CONSIDER: make flood on all port of the dstHost's L2Network
+            // CONSIDER: make flood on all port of the dstHost's DefaultFabricNetwork
             return;
         }
         TrafficTreatment treatment = DefaultTrafficTreatment.builder()
@@ -736,15 +756,15 @@
      *
      * ToHost: dstPrefix = dstHostIp.toIpPrefix(), nextHopIp = destHostIp
      * ToInternet: dstPrefix = route.prefix(), nextHopIp = route.nextHopIp
-     * returns intent submited or not
+     * returns intent submitted or not
      */
     private boolean setUpConnectivity(ConnectPoint srcCp, byte ipProto, IpPrefix srcPrefix, IpPrefix dstPrefix,
                                       IpAddress nextHopIp, MacAddress treatmentSrcMac,
                                       EncapsulationType encap, boolean updateMac,
                                       boolean isDstLocalSubnet, int borderRoutePrefixLength) {
-        if (!(simpleFabric.findL2Network(srcCp, VlanId.NONE) != null ||
-             (simpleFabric.REACTIVE_ALLOW_LINK_CP && !linkService.getIngressLinks(srcCp).isEmpty()))) {
-            log.warn("NO REGI for srcCp not in L2Network; srcCp={} srcPrefix={} dstPrefix={} nextHopIp={}",
+        if (!(simpleFabric.fabricNetwork(srcCp, VlanId.NONE) != null ||
+             (REACTIVE_ALLOW_LINK_CP && !linkService.getIngressLinks(srcCp).isEmpty()))) {
+            log.warn("NO REGI for srcCp not in DefaultFabricNetwork; srcCp={} srcPrefix={} dstPrefix={} nextHopIp={}",
                       srcCp, srcPrefix, dstPrefix, nextHopIp);
             return false;
         }
@@ -766,7 +786,7 @@
             return false;
         }
         TrafficTreatment treatment;
-        if (updateMac && simpleFabric.ALLOW_ETH_ADDRESS_SELECTOR) {
+        if (updateMac && ALLOW_ETH_ADDRESS_SELECTOR) {
             treatment = generateSetMacTreatment(nextHopMac, treatmentSrcMac);
         } else {
             treatment = DefaultTrafficTreatment.builder().build();
@@ -775,39 +795,39 @@
         TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
         if (dstPrefix.isIp4()) {
             selector.matchEthType(Ethernet.TYPE_IPV4);
-            if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
+            if (REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
                 selector.matchIPSrc(srcPrefix);
             }
             if (dstPrefix.prefixLength() > 0) {
                 selector.matchIPDst(dstPrefix);
             }
-            if (ipProto != 0 && simpleFabric.REACTIVE_MATCH_IP_PROTO) {
+            if (ipProto != 0 && REACTIVE_MATCH_IP_PROTO) {
                 selector.matchIPProtocol(ipProto);
             }
         } else {
             selector.matchEthType(Ethernet.TYPE_IPV6);
-            if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
+            if (REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
                 selector.matchIPv6Src(srcPrefix);
             }
             if (dstPrefix.prefixLength() > 0) {
                 selector.matchIPv6Dst(dstPrefix);
             }
-            if (ipProto != 0 && simpleFabric.REACTIVE_MATCH_IP_PROTO) {
+            if (ipProto != 0 && REACTIVE_MATCH_IP_PROTO) {
                 selector.matchIPProtocol(ipProto);
             }
         }
 
         Key key;
         String keyProtoTag = "";
-        if (simpleFabric.REACTIVE_MATCH_IP_PROTO) {
+        if (REACTIVE_MATCH_IP_PROTO) {
             keyProtoTag = "-p" + ipProto;
         }
-        if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE) {
+        if (REACTIVE_SINGLE_TO_SINGLE) {
             // allocate intent per (srcPrefix, dstPrefix)
-            key = Key.of(srcPrefix.toString() + "-to-" + dstPrefix.toString() + keyProtoTag, reactiveAppId);
+            key = Key.of(srcPrefix.toString() + "-to-" + dstPrefix.toString() + keyProtoTag, appId);
         } else {
             // allocate intent per (srcDeviceId, dstPrefix)
-            key = Key.of(srcCp.deviceId().toString() + "-to-" +  dstPrefix.toString() + keyProtoTag, reactiveAppId);
+            key = Key.of(srcCp.deviceId().toString() + "-to-" +  dstPrefix.toString() + keyProtoTag, appId);
         }
 
         // check and merge already existing ingress points
@@ -835,7 +855,7 @@
 
         MultiPointToSinglePointIntent newIntent = MultiPointToSinglePointIntent.builder()
             .key(key)
-            .appId(reactiveAppId)
+            .appId(appId)
             .selector(selector.build())
             .treatment(treatment)
             .filteredIngressPoints(ingressPoints)
@@ -843,7 +863,7 @@
             .priority(priority)
             .constraints(buildConstraints(reactiveConstraints, encap))
             .build();
-        log.info("submmit mp2p intent: srcPrefix={} dstPrefix={} srcCp={} "
+        log.info("submit mp2p intent: srcPrefix={} dstPrefix={} srcCp={} "
                  + "newIntent={} nextHopIp={} nextHopMac={} priority={}",
                  srcPrefix, dstPrefix, ingressPoints, newIntent, nextHopIp, nextHopMac, priority);
         toBePurgedIntentKeys.remove(newIntent.key());
@@ -862,7 +882,7 @@
 
     // monitor border peers for routeService lookup to be effective
     private void monitorBorderPeers() {
-        for (Route route : simpleFabric.getBorderRoutes()) {
+        for (FabricRoute route : simpleFabric.fabricRoutes()) {
             hostService.startMonitoringIp(route.nextHop());
             simpleFabric.requestMac(route.nextHop());
         }
@@ -872,19 +892,19 @@
     private int reactivePriority(boolean isForward, boolean isDstLocalSubnet, int borderRoutePrefixLength) {
         if (isDstLocalSubnet) {  // -> dst:localSubnet
             if (isForward) {
-                return simpleFabric.PRI_REACTIVE_LOCAL_FORWARD;
+                return PRI_REACTIVE_LOCAL_FORWARD;
             } else {  // isInterncept
-                return simpleFabric.PRI_REACTIVE_LOCAL_INTERCEPT;
+                return PRI_REACTIVE_LOCAL_INTERCEPT;
             }
         } else {  // -> dst:boarderRouteNextHop
             int offset;
             if (isForward) {
-                offset = simpleFabric.PRI_REACTIVE_BORDER_FORWARD;
+                offset = PRI_REACTIVE_BORDER_FORWARD;
             } else {  // isIntercept
-                offset = simpleFabric.PRI_REACTIVE_BORDER_INTERCEPT;
+                offset = PRI_REACTIVE_BORDER_INTERCEPT;
             }
-           return simpleFabric.PRI_REACTIVE_BORDER_BASE
-                  + borderRoutePrefixLength * simpleFabric.PRI_REACTIVE_BORDER_STEP + offset;
+           return PRI_REACTIVE_BORDER_BASE
+                  + borderRoutePrefixLength * PRI_REACTIVE_BORDER_STEP + offset;
         }
     }
 
@@ -904,9 +924,9 @@
     // Dump Cli Handler
     private void dump(String subject, PrintStream out) {
         if ("intents".equals(subject)) {
-            out.println("Reactive Routing Route Intents:\n");
+            out.println("Routing Route Intents:\n");
             for (Intent entry : intentService.getIntents()) {
-                if (reactiveAppId.equals(entry.appId())) {
+                if (appId.equals(entry.appId())) {
                     MultiPointToSinglePointIntent intent = (MultiPointToSinglePointIntent) entry;
                     out.println("    " + intent.key().toString()
                                 + " to " + intent.egressPoint().toString()
@@ -916,7 +936,7 @@
             }
             out.println("");
 
-            out.println("Reactive Routing Intercept Flow Rules:\n");
+            out.println("Routing Intercept Flow Rules:\n");
             List<FlowRule> rules = new ArrayList(interceptFlowRules);
             Collections.sort(rules, new Comparator<FlowRule>() {
                     @Override
@@ -931,7 +951,7 @@
                           + " selector=" + rule.selector().criteria().toString());
             }
             out.println("");
-            out.println("Reactive Routing Intents to Be Purged:\n");
+            out.println("Routing Intents to Be Purged:\n");
             for (Key key: toBePurgedIntentKeys) {
                 out.println("    " + key.toString());
             }
@@ -939,7 +959,7 @@
 
         } else if ("reactive-intents".equals(subject)) {
             for (Intent entry : intentService.getIntents()) {
-                if (reactiveAppId.equals(entry.appId())) {
+                if (appId.equals(entry.appId())) {
                     MultiPointToSinglePointIntent intent = (MultiPointToSinglePointIntent) entry;
                     out.println(intent.key().toString()
                                 + " to " + intent.egressPoint().toString()
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/package-info.java
similarity index 67%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
copy to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/package-info.java
index 726d578..d190b08 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,13 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
-
-import org.onosproject.event.EventListener;
 
 /**
- * Entity capable of receiving alarm related events.
+ * Simple fabric implementation package.
  */
-public interface SimpleFabricListener extends EventListener<SimpleFabricEvent> {
-}
-
+package org.onosproject.simplefabric.impl;
\ No newline at end of file
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/package-info.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/package-info.java
similarity index 100%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/package-info.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/package-info.java
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/RouteTools.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/RouteTools.java
similarity index 94%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/RouteTools.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/RouteTools.java
index b14438a..d02fed2 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/RouteTools.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/RouteTools.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -18,7 +18,7 @@
  * to remove dependency on onos.incubator.routing services, since 2017-08-09.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.util;
 
 import org.onlab.packet.IpPrefix;
 
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/package-info.java
similarity index 67%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
copy to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/package-info.java
index 726d578..9b3dde3 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,13 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
-
-import org.onosproject.event.EventListener;
 
 /**
- * Entity capable of receiving alarm related events.
+ * Simple fabric utility package.
  */
-public interface SimpleFabricListener extends EventListener<SimpleFabricEvent> {
-}
-
+package org.onosproject.simplefabric.util;
\ No newline at end of file
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebApplication.java
similarity index 89%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebApplication.java
index d82de73..960b4df 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebApplication.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.web;
 
 import org.onlab.rest.AbstractWebApplication;
 
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebResource.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebResource.java
similarity index 94%
rename from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebResource.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebResource.java
index f1e9af7..cc68d6b 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricWebResource.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebResource.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.web;
 
 import org.onosproject.rest.AbstractWebResource;
+import org.onosproject.simplefabric.api.SimpleFabricService;
 
 import java.io.ByteArrayOutputStream;
 import javax.ws.rs.GET;
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/package-info.java
similarity index 67%
copy from apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
copy to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/package-info.java
index 726d578..596ded0 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricListener.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-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.
@@ -13,13 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
-
-import org.onosproject.event.EventListener;
 
 /**
- * Entity capable of receiving alarm related events.
+ * Simple fabric web package.
  */
-public interface SimpleFabricListener extends EventListener<SimpleFabricEvent> {
-}
-
+package org.onosproject.simplefabric.web;
\ No newline at end of file
diff --git a/apps/simplefabric/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
similarity index 88%
rename from apps/simplefabric/src/main/resources/OSGI-INF/blueprint/shell-config.xml
rename to apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 7b6893b..2aad546 100644
--- a/apps/simplefabric/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -17,12 +17,12 @@
 
     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
         <command>
-            <action class="org.onosproject.simplefabric.SimpleFabricCommand"/>
+            <action class="org.onosproject.simplefabric.cli.SimpleFabricCommand"/>
             <completers>
                 <ref component-id="SimpleFabricCommandCompleter"/>
             </completers>
         </command>
     </command-bundle>
  
-    <bean id="SimpleFabricCommandCompleter" class="org.onosproject.simplefabric.SimpleFabricCommandCompleter"/>
+    <bean id="SimpleFabricCommandCompleter" class="org.onosproject.simplefabric.cli.SimpleFabricCommandCompleter"/>
 </blueprint>
diff --git a/apps/simplefabric/src/main/webapp/WEB-INF/web.xml b/apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml
similarity index 95%
rename from apps/simplefabric/src/main/webapp/WEB-INF/web.xml
rename to apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml
index e136671..ebcac0e 100644
--- a/apps/simplefabric/src/main/webapp/WEB-INF/web.xml
+++ b/apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml
@@ -46,7 +46,7 @@
         <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
         <init-param>
             <param-name>javax.ws.rs.Application</param-name>
-            <param-value>org.onosproject.simplefabric.SimpleFabricWebApplication</param-value>
+            <param-value>org.onosproject.simplefabric.web.SimpleFabricWebApplication</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
diff --git a/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricNetworkTest.java b/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricNetworkTest.java
new file mode 100644
index 0000000..57152e7
--- /dev/null
+++ b/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricNetworkTest.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.impl;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.testing.EqualsTester;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.host.InterfaceIpAddress;
+import org.onosproject.net.intf.Interface;
+import org.onosproject.simplefabric.api.FabricNetwork;
+
+import java.util.List;
+import java.util.Set;
+
+import static junit.framework.TestCase.assertEquals;
+
+/**
+ * Unit tests for the default fabric network class.
+ */
+public final class DefaultFabricNetworkTest {
+
+    private static final String NAME_1 = "network1";
+    private static final String NAME_2 = "network2";
+
+    private static final String INTF_NAMES_1_1 = "h11";
+    private static final String INTF_NAMES_1_2 = "h12";
+    private static final String INTF_NAMES_2_1 = "h21";
+    private static final String INTF_NAMES_2_2 = "h22";
+
+    private static final Set<String> INTF_NAME_SET_1 =
+                            ImmutableSet.of(INTF_NAMES_1_1, INTF_NAMES_1_2);
+    private static final Set<String> INTF_NAME_SET_2 =
+                            ImmutableSet.of(INTF_NAMES_2_1, INTF_NAMES_2_2);
+
+    private static final EncapsulationType ENCAP_TYPE_1 = EncapsulationType.NONE;
+    private static final EncapsulationType ENCAP_TYPE_2 = EncapsulationType.NONE;
+
+    private static final boolean IS_FORWARD_1 = false;
+    private static final boolean IS_FORWARD_2 = true;
+    private static final boolean IS_BROADCAST_1 = false;
+    private static final boolean IS_BROADCAST_2 = true;
+
+    private FabricNetwork fabricNetwork1;
+    private FabricNetwork sameAsFabricNetwork1;
+    private FabricNetwork fabricNetwork2;
+
+    private static Interface createInterface(int index) {
+
+        String name = "INTF_NAME_" + index;
+        ConnectPoint cp = ConnectPoint.fromString("of:0011223344556677/" + index);
+        InterfaceIpAddress intfIp1 = InterfaceIpAddress.valueOf("10.10.10." + index + "/32");
+        InterfaceIpAddress intfIp2 = InterfaceIpAddress.valueOf("20.20.20." + index + "/32");
+        List<InterfaceIpAddress> intfIps = ImmutableList.of(intfIp1, intfIp2);
+        MacAddress mac = MacAddress.valueOf("00:00:00:00:00:00");
+        VlanId vlanId = VlanId.NONE;
+
+        return new Interface(name, cp, intfIps, mac, vlanId);
+    }
+
+    /**
+     * Initial setup for this unit test.
+     */
+    @Before
+    public void setUp() {
+
+        fabricNetwork1 = DefaultFabricNetwork.builder()
+                                .name(NAME_1)
+                                .interfaceNames(INTF_NAME_SET_1)
+                                .encapsulation(ENCAP_TYPE_1)
+                                .forward(IS_FORWARD_1)
+                                .broadcast(IS_BROADCAST_1)
+                                .build();
+
+        sameAsFabricNetwork1 = DefaultFabricNetwork.builder()
+                                .name(NAME_1)
+                                .interfaceNames(INTF_NAME_SET_1)
+                                .encapsulation(ENCAP_TYPE_1)
+                                .forward(IS_FORWARD_1)
+                                .broadcast(IS_BROADCAST_1)
+                                .build();
+
+        fabricNetwork2 = DefaultFabricNetwork.builder()
+                                .name(NAME_2)
+                                .interfaceNames(INTF_NAME_SET_2)
+                                .encapsulation(ENCAP_TYPE_2)
+                                .forward(IS_FORWARD_2)
+                                .broadcast(IS_BROADCAST_2)
+                                .build();
+    }
+
+    /**
+     * Tests object equality.
+     */
+    @Test
+    public void testEquality() {
+        new EqualsTester().addEqualityGroup(fabricNetwork1, sameAsFabricNetwork1)
+                .addEqualityGroup(fabricNetwork2)
+                .testEquals();
+    }
+
+    /**
+     * Test object construction.
+     */
+    @Test
+    public void testConstruction() {
+        FabricNetwork network = fabricNetwork1;
+
+        assertEquals(network.name(), NAME_1);
+        assertEquals(network.interfaceNames(), INTF_NAME_SET_1);
+        assertEquals(network.encapsulation(), ENCAP_TYPE_1);
+        assertEquals(network.isForward(), IS_FORWARD_1);
+        assertEquals(network.isBroadcast(), IS_BROADCAST_1);
+    }
+}
diff --git a/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricRouteTest.java b/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricRouteTest.java
new file mode 100644
index 0000000..8a39179
--- /dev/null
+++ b/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricRouteTest.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.impl;
+
+import com.google.common.testing.EqualsTester;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onosproject.cluster.NodeId;
+import org.onosproject.simplefabric.api.FabricRoute;
+import org.onosproject.simplefabric.api.FabricRoute.Source;
+
+import static junit.framework.TestCase.assertEquals;
+import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
+
+/**
+ * Unit tests for the default fabric router.
+ */
+public final class DefaultFabricRouteTest {
+
+    private static final Source SOURCE_1 = Source.STATIC;
+    private static final Source SOURCE_2 = Source.BGP;
+
+    private static final IpPrefix IP_PREFIX_1 = IpPrefix.valueOf("10.10.10.1/32");
+    private static final IpPrefix IP_PREFIX_2 = IpPrefix.valueOf("20.20.20.2/32");
+
+    private static final IpAddress NEXT_HOP_1 = IpAddress.valueOf("10.10.10.1");
+    private static final IpAddress NEXT_HOP_2 = IpAddress.valueOf("20.20.20.2");
+
+    private static final NodeId SOURCE_NODE_1 = NodeId.nodeId("1");
+    private static final NodeId SOURCE_NODE_2 = NodeId.nodeId("2");
+
+    private FabricRoute fabricRoute1;
+    private FabricRoute sameAsFabricRoute1;
+    private FabricRoute fabricRoute2;
+
+    /**
+     * Tests class immutability.
+     */
+    @Test
+    public void testImmutability() {
+        assertThatClassIsImmutable(DefaultFabricRoute.class);
+    }
+
+    /**
+     * Initial setup for this unit test.
+     */
+    @Before
+    public void setUp() {
+        fabricRoute1 = DefaultFabricRoute.builder()
+                                .source(SOURCE_1)
+                                .prefix(IP_PREFIX_1)
+                                .nextHop(NEXT_HOP_1)
+                                .sourceNode(SOURCE_NODE_1)
+                                .build();
+
+        sameAsFabricRoute1 = DefaultFabricRoute.builder()
+                                .source(SOURCE_1)
+                                .prefix(IP_PREFIX_1)
+                                .nextHop(NEXT_HOP_1)
+                                .sourceNode(SOURCE_NODE_1)
+                                .build();
+
+        fabricRoute2 = DefaultFabricRoute.builder()
+                                .source(SOURCE_2)
+                                .prefix(IP_PREFIX_2)
+                                .nextHop(NEXT_HOP_2)
+                                .sourceNode(SOURCE_NODE_2)
+                                .build();
+    }
+
+    /**
+     * Tests object equality.
+     */
+    @Test
+    public void testEquality() {
+        new EqualsTester().addEqualityGroup(fabricRoute1, sameAsFabricRoute1)
+                .addEqualityGroup(fabricRoute2)
+                .testEquals();
+    }
+
+    /**
+     * Test object construction.
+     */
+    @Test
+    public void testConstruction() {
+        FabricRoute route = fabricRoute1;
+
+        assertEquals(route.source(), SOURCE_1);
+        assertEquals(route.prefix(), IP_PREFIX_1);
+        assertEquals(route.nextHop(), NEXT_HOP_1);
+        assertEquals(route.sourceNode(), SOURCE_NODE_1);
+    }
+}
diff --git a/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricSubnetTest.java b/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricSubnetTest.java
new file mode 100644
index 0000000..82efd14
--- /dev/null
+++ b/apps/simplefabric/app/src/test/java/org/onosproject/simplefabric/impl/DefaultFabricSubnetTest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2018-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.
+ */
+
+package org.onosproject.simplefabric.impl;
+
+import com.google.common.testing.EqualsTester;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
+import org.onlab.packet.MacAddress;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.simplefabric.api.FabricSubnet;
+
+import static junit.framework.TestCase.assertEquals;
+
+/**
+ * Unit tests for the default fabric IP subnet class.
+ */
+public final class DefaultFabricSubnetTest {
+
+    private static final IpPrefix IP_PREFIX_1 = IpPrefix.valueOf("10.10.10.11/32");
+    private static final IpPrefix IP_PREFIX_2 = IpPrefix.valueOf("20.20.20.11/32");
+
+    private static final IpAddress GATEWAY_IP_1 = IpAddress.valueOf("10.10.10.1");
+    private static final IpAddress GATEWAY_IP_2 = IpAddress.valueOf("20.20.20.1");
+
+    private static final MacAddress GATEWAY_MAC_1 = MacAddress.valueOf("00:11:22:33:44:55");
+    private static final MacAddress GATEWAY_MAC_2 = MacAddress.valueOf("11:22:33:44:55:66");
+
+    private static final EncapsulationType ENCAP_TYPE_1 = EncapsulationType.NONE;
+    private static final EncapsulationType ENCAP_TYPE_2 = EncapsulationType.NONE;
+
+    private static final String NETWORK_NAME_1 = "sonaFabric1";
+    private static final String NETWORK_NAME_2 = "sonaFabric2";
+
+    private FabricSubnet subnet1;
+    private FabricSubnet sameAsSubnet1;
+    private FabricSubnet subnet2;
+
+    /**
+     * Initial setup for this unit test.
+     */
+    @Before
+    public void setUp() {
+
+        subnet1 = DefaultFabricSubnet.builder()
+                            .prefix(IP_PREFIX_1)
+                            .gatewayIp(GATEWAY_IP_1)
+                            .gatewayMac(GATEWAY_MAC_1)
+                            .encapsulation(ENCAP_TYPE_1)
+                            .networkName(NETWORK_NAME_1)
+                            .build();
+
+        sameAsSubnet1 = DefaultFabricSubnet.builder()
+                            .prefix(IP_PREFIX_1)
+                            .gatewayIp(GATEWAY_IP_1)
+                            .gatewayMac(GATEWAY_MAC_1)
+                            .encapsulation(ENCAP_TYPE_1)
+                            .networkName(NETWORK_NAME_1)
+                            .build();
+
+        subnet2 = DefaultFabricSubnet.builder()
+                            .prefix(IP_PREFIX_2)
+                            .gatewayIp(GATEWAY_IP_2)
+                            .gatewayMac(GATEWAY_MAC_2)
+                            .encapsulation(ENCAP_TYPE_2)
+                            .networkName(NETWORK_NAME_2)
+                            .build();
+    }
+
+    /**
+     * Tests object equality.
+     */
+    @Test
+    public void testEquality() {
+        new EqualsTester().addEqualityGroup(subnet1, sameAsSubnet1)
+                .addEqualityGroup(subnet2)
+                .testEquals();
+    }
+
+    /**
+     * Test object construction.
+     */
+    @Test
+    public void testConstruction() {
+        FabricSubnet subnet = subnet1;
+
+        assertEquals(subnet.prefix(), IP_PREFIX_1);
+        assertEquals(subnet.gatewayIp(), GATEWAY_IP_1);
+        assertEquals(subnet.gatewayMac(), GATEWAY_MAC_1);
+        assertEquals(subnet.encapsulation(), ENCAP_TYPE_1);
+        assertEquals(subnet.networkName(), NETWORK_NAME_1);
+    }
+}
diff --git a/apps/simplefabric/network-cfg.json b/apps/simplefabric/network-cfg.json
index c8e118b..c7ba9c8 100644
--- a/apps/simplefabric/network-cfg.json
+++ b/apps/simplefabric/network-cfg.json
@@ -1,56 +1,229 @@
 {
-
-  "devices":{
-    "of:0000000000000011":{ "basic":{ "name":"LS1", "latitude":35, "longitude":-100 } },
-    "of:0000000000000012":{ "basic":{ "name":"LS2", "latitude":35, "longitude":-90  } },
-    "of:0000000000000021":{ "basic":{ "name":"SS1", "latitude":40, "longitude":-100 } },
-    "of:0000000000000022":{ "basic":{ "name":"SS2", "latitude":40, "longitude":-90  } }
+  "devices": {
+    "of:0000000000000011": {
+      "basic": {
+        "name": "LS1",
+        "latitude": 35,
+        "longitude": -100
+      }
+    },
+    "of:0000000000000012": {
+      "basic": {
+        "name": "LS2",
+        "latitude": 35,
+        "longitude": -90
+      }
+    },
+    "of:0000000000000021": {
+      "basic": {
+        "name": "SS1",
+        "latitude": 40,
+        "longitude": -100
+      }
+    },
+    "of:0000000000000022": {
+      "basic": {
+        "name": "SS2",
+        "latitude": 40,
+        "longitude": -90
+      }
+    }
   },
-
-  "ports" : {
-    "of:0000000000000011/1" : { "interfaces" : [ { "name" : "h11" } ] },
-    "of:0000000000000011/2" : { "interfaces" : [ { "name" : "h12" } ] },
-    "of:0000000000000011/3" : { "interfaces" : [ { "name" : "h13" } ] },
-    "of:0000000000000011/4" : { "interfaces" : [ { "name" : "h14" } ] },
-    "of:0000000000000011/5" : { "interfaces" : [ { "name" : "d11" } ] },
-    "of:0000000000000011/6" : { "interfaces" : [ { "name" : "d12" } ] },
-    "of:0000000000000011/7" : { "interfaces" : [ { "name" : "LS1_SS1" } ] },
-    "of:0000000000000011/8" : { "interfaces" : [ { "name" : "LS1_SS2" } ] },
-
-    "of:0000000000000012/1" : { "interfaces" : [ { "name" : "h21" } ] } ,
-    "of:0000000000000012/2" : { "interfaces" : [ { "name" : "h22" } ] },
-    "of:0000000000000012/3" : { "interfaces" : [ { "name" : "h23" } ] },
-    "of:0000000000000012/4" : { "interfaces" : [ { "name" : "h24" } ] },
-    "of:0000000000000012/5" : { "interfaces" : [ { "name" : "d21" } ] },
-    "of:0000000000000012/6" : { "interfaces" : [ { "name" : "d22" } ] },
-    "of:0000000000000012/7" : { "interfaces" : [ { "name" : "LS2_SS1" } ] },
-    "of:0000000000000012/8" : { "interfaces" : [ { "name" : "LS2_SS2" } ] },
-
-    "of:0000000000000021/1" : { "interfaces" : [ { "name" : "SS1_LS1" } ] },
-    "of:0000000000000021/2" : { "interfaces" : [ { "name" : "SS1_LS2" } ] },
-
-    "of:0000000000000022/1" : { "interfaces" : [ { "name" : "SS2_LS1" } ] },
-    "of:0000000000000022/2" : { "interfaces" : [ { "name" : "SS2_LS2" } ] }
-
+  "ports": {
+    "of:0000000000000011/1": {
+      "interfaces": [
+        {
+          "name": "h11"
+        }
+      ]
+    },
+    "of:0000000000000011/2": {
+      "interfaces": [
+        {
+          "name": "h12"
+        }
+      ]
+    },
+    "of:0000000000000011/3": {
+      "interfaces": [
+        {
+          "name": "h13"
+        }
+      ]
+    },
+    "of:0000000000000011/4": {
+      "interfaces": [
+        {
+          "name": "h14"
+        }
+      ]
+    },
+    "of:0000000000000011/5": {
+      "interfaces": [
+        {
+          "name": "d11"
+        }
+      ]
+    },
+    "of:0000000000000011/6": {
+      "interfaces": [
+        {
+          "name": "d12"
+        }
+      ]
+    },
+    "of:0000000000000011/7": {
+      "interfaces": [
+        {
+          "name": "LS1_SS1"
+        }
+      ]
+    },
+    "of:0000000000000011/8": {
+      "interfaces": [
+        {
+          "name": "LS1_SS2"
+        }
+      ]
+    },
+    "of:0000000000000012/1": {
+      "interfaces": [
+        {
+          "name": "h21"
+        }
+      ]
+    },
+    "of:0000000000000012/2": {
+      "interfaces": [
+        {
+          "name": "h22"
+        }
+      ]
+    },
+    "of:0000000000000012/3": {
+      "interfaces": [
+        {
+          "name": "h23"
+        }
+      ]
+    },
+    "of:0000000000000012/4": {
+      "interfaces": [
+        {
+          "name": "h24"
+        }
+      ]
+    },
+    "of:0000000000000012/5": {
+      "interfaces": [
+        {
+          "name": "d21"
+        }
+      ]
+    },
+    "of:0000000000000012/6": {
+      "interfaces": [
+        {
+          "name": "d22"
+        }
+      ]
+    },
+    "of:0000000000000012/7": {
+      "interfaces": [
+        {
+          "name": "LS2_SS1"
+        }
+      ]
+    },
+    "of:0000000000000012/8": {
+      "interfaces": [
+        {
+          "name": "LS2_SS2"
+        }
+      ]
+    },
+    "of:0000000000000021/1": {
+      "interfaces": [
+        {
+          "name": "SS1_LS1"
+        }
+      ]
+    },
+    "of:0000000000000021/2": {
+      "interfaces": [
+        {
+          "name": "SS1_LS2"
+        }
+      ]
+    },
+    "of:0000000000000022/1": {
+      "interfaces": [
+        {
+          "name": "SS2_LS1"
+        }
+      ]
+    },
+    "of:0000000000000022/2": {
+      "interfaces": [
+        {
+          "name": "SS2_LS2"
+        }
+      ]
+    }
   },
-
-  "apps" : {
-    "org.onosproject.simplefabric" : {
-      "simpleFabric" : {
-        "l2Networks" : [
-          { "name" : "LEAF1", "interfaces" : ["h11", "h12", "h13", "h14", "d11", "d12" ], "l2Forward" : true, "l2Broadcast" : true },
-          { "name" : "LEAF2", "interfaces" : ["h21", "h22", "h23", "h24", "d21", "d22" ], "l2Forward" : true, "l2Broadcast" : true }
+  "apps": {
+    "org.onosproject.simplefabric": {
+      "simpleFabric": {
+        "fabricNetworks": [
+          {
+            "name": "LEAF1",
+            "interfaces": [
+              "h11",
+              "h12",
+              "h13",
+              "h14",
+              "d11",
+              "d12"
+            ],
+            "isForward": true,
+            "isBroadcast": true
+          },
+          {
+            "name": "LEAF2",
+            "interfaces": [
+              "h21",
+              "h22",
+              "h23",
+              "h24",
+              "d21",
+              "d22"
+            ],
+            "isForward": true,
+            "isBroadcast": true
+          }
         ],
-        "ipSubnets" : [
-           { "ipPrefix" : "10.0.1.0/24", "gatewayIp" : "10.0.1.1", "gatewayMac" : "00:00:10:00:01:01", "l2NetworkName" : "LEAF1" },
-           { "ipPrefix" : "10.0.2.0/24", "gatewayIp" : "10.0.2.1", "gatewayMac" : "00:00:10:00:02:01", "l2NetworkName" : "LEAF2" }
+        "fabricSubnets": [
+          {
+            "prefix": "10.0.1.0/24",
+            "gatewayIp": "10.0.1.1",
+            "gatewayMac": "00:00:10:00:01:01",
+            "networkName": "LEAF1"
+          },
+          {
+            "prefix": "10.0.2.0/24",
+            "gatewayIp": "10.0.2.1",
+            "gatewayMac": "00:00:10:00:02:01",
+            "networkName": "LEAF2"
+          }
         ],
-        "borderRoutes" : [
-           { "ipPrefix" : "0.0.0.0/0", "nextHop" : "10.0.1.2" }
+        "fabricRoutes": [
+          {
+            "prefix": "0.0.0.0/0",
+            "nextHop": "10.0.1.2"
+          }
         ]
       }
     }
   }
-
 }
 
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/IpSubnet.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/IpSubnet.java
deleted file mode 100644
index 596c659..0000000
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/IpSubnet.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2017-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.
- */
-package org.onosproject.simplefabric;
-
-import com.google.common.base.MoreObjects;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
-import org.onlab.packet.MacAddress;
-import org.onosproject.net.EncapsulationType;
-
-import java.util.Objects;
-
-/**
- * Configuration details for an ip subnet entry.
- */
-public class IpSubnet {
-    private final IpPrefix ipPrefix;
-    private final IpAddress gatewayIp;
-    private final MacAddress gatewayMac;
-    private EncapsulationType encapsulation;
-    private final String l2NetworkName;
-
-    /**
-     * Creates a new ip subnet entry.
-     *
-     * @param ipPrefix  an ip subnet
-     * @param gatewayIp IP of the virtual gateway
-     * @param gatewayMac MacAddress of the virtual gateway
-     * @param encapsulation EnacaptulatioType for routes related to this subnet
-     * @param l2NetworkName Name of L2 Network this subnet is bound
-     */
-    public IpSubnet(IpPrefix ipPrefix, IpAddress gatewayIp, MacAddress gatewayMac,
-                    EncapsulationType encapsulation, String l2NetworkName) {
-        this.ipPrefix = ipPrefix;
-        this.gatewayIp = gatewayIp;
-        this.gatewayMac = gatewayMac;
-        this.encapsulation = EncapsulationType.NONE;
-        this.l2NetworkName = l2NetworkName;
-    }
-
-    /**
-     * Gets the ip subnet of the ip subnet entry.
-     *
-     * @return the ip subnet
-     */
-    public IpPrefix ipPrefix() {
-        return ipPrefix;
-    }
-
-    /**
-     * Gets the virtual gateway IP address of the ip subnet entry.
-     *
-     * @return the virtual gateway IP address
-     */
-    public IpAddress gatewayIp() {
-        return gatewayIp;
-    }
-
-    /**
-     * Gets the virtual gateway Mac address of the ip subnet entry.
-     *
-     * @return the virtuai gateway Mac address
-     */
-    public MacAddress gatewayMac() {
-        return gatewayMac;
-    }
-
-    /**
-     * Gets the encapsulation type of ip subnet entry.
-     *
-     * @return the encapsulation type
-     */
-    public EncapsulationType encapsulation() {
-        return encapsulation;
-    }
-
-    /**
-     * Gets the name of L2 Network this subnet is bound.
-     *
-     * @return the l2Network name this subnet is allocated
-     */
-    public String l2NetworkName() {
-        return l2NetworkName;
-    }
-
-    /**
-     * Tests whether the IP version of this entry is IPv4.
-     *
-     * @return true if the IP version of this entry is IPv4, otherwise false.
-     */
-    public boolean isIp4() {
-        return ipPrefix.isIp4();
-    }
-
-    /**
-     * Tests whether the IP version of this entry is IPv6.
-     *
-     * @return true if the IP version of this entry is IPv6, otherwise false.
-     */
-    public boolean isIp6() {
-        return ipPrefix.isIp6();
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(ipPrefix, gatewayIp, gatewayMac, encapsulation, l2NetworkName);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == this) {
-            return true;
-        }
-        if (!(obj instanceof IpSubnet)) {
-            return false;
-        }
-        IpSubnet that = (IpSubnet) obj;
-        return Objects.equals(this.ipPrefix, that.ipPrefix)
-               && Objects.equals(this.gatewayIp, that.gatewayIp)
-               && Objects.equals(this.gatewayMac, that.gatewayMac)
-               && Objects.equals(this.encapsulation, that.encapsulation)
-               && Objects.equals(this.l2NetworkName, that.l2NetworkName);
-    }
-
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(getClass())
-                .add("ipPrefix", ipPrefix)
-                .add("gatewayIp", gatewayIp)
-                .add("gatewayMac", gatewayMac)
-                .add("encapsulation", encapsulation)
-                .add("l2NetworkName", l2NetworkName)
-                .toString();
-    }
-}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/L2Network.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/L2Network.java
deleted file mode 100644
index 5579159..0000000
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/L2Network.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright 2017-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.
- */
-
-package org.onosproject.simplefabric;
-
-import com.google.common.base.MoreObjects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-import org.onlab.packet.VlanId;
-import org.onosproject.net.intf.Interface;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.Host;
-import org.onosproject.net.HostId;
-import org.onosproject.net.EncapsulationType;
-
-import java.util.Collection;
-import java.util.Objects;
-import java.util.Set;
-
-
-/**
- * Class stores a L2Network information.
- */
-public final class L2Network {
-
-    private String name;                  // also for network configuration
-    private Set<String> interfaceNames;   // also for network configuration
-    private EncapsulationType encapsulation;  // also for network configuration
-    private boolean l2Forward;            // do l2Forward (default:true) or not
-    private boolean l2Broadcast;          // do l2Broadcast (default:true) or not
-
-    /* status variables */
-    private Set<Interface> interfaces;    // available interfaces from interfaceNames
-    private Set<HostId> hostIds;          // available hosts from interfaces
-    private boolean dirty;
-
-    /**
-     * Constructs a L2Network data for Config value.
-     *
-     * @param name the given name
-     * @param ifaceNames the interface names
-     * @param encapsulation the encapsulation type
-     * @param l2Forward flag for l2Forward intents to be installed or not
-     * @param l2Broadcast flag for l2Broadcast intents to be installed or not
-     */
-    L2Network(String name, Collection<String> ifaceNames, EncapsulationType encapsulation,
-              boolean l2Forward, boolean l2Broadcast) {
-        this.name = name;
-        this.interfaceNames = Sets.newHashSet();
-        this.interfaceNames.addAll(ifaceNames);
-        this.encapsulation = encapsulation;
-        this.l2Forward = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Forward : false;
-        this.l2Broadcast = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Broadcast : false;
-        this.interfaces = Sets.newHashSet();
-        this.hostIds = Sets.newHashSet();
-        this.dirty = false;
-    }
-
-    /**
-     * Constructs a L2Network data by given name and encapsulation type.
-     *
-     * @param name the given name
-     * @param encapsulation the encapsulation type
-     */
-    private L2Network(String name, EncapsulationType encapsulation) {
-        this.name = name;
-        this.interfaceNames = Sets.newHashSet();
-        this.encapsulation = encapsulation;
-        this.l2Forward = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? true : false;
-        this.l2Broadcast = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? true : false;
-        this.interfaces = Sets.newHashSet();
-        this.hostIds = Sets.newHashSet();
-        this.dirty = false;
-    }
-
-    /**
-     * Creates a L2Network data by given name.
-     * The encapsulation type of the L2Network will be NONE.
-     *
-     * @param name the given name
-     * @return the L2Network data
-     */
-    public static L2Network of(String name) {
-        Objects.requireNonNull(name);
-        return new L2Network(name, EncapsulationType.NONE);
-    }
-
-    /**
-     * Creates a copy of L2Network data.
-     *
-     * @param l2Network the L2Network data
-     * @return the copy of the L2Network data
-     */
-    public static L2Network of(L2Network l2Network) {
-        Objects.requireNonNull(l2Network);
-        L2Network l2NetworkCopy = new L2Network(l2Network.name(), l2Network.encapsulation());
-        l2NetworkCopy.interfaceNames.addAll(l2Network.interfaceNames());
-        l2NetworkCopy.l2Forward = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Network.l2Forward() : false;
-        l2NetworkCopy.l2Broadcast = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Network.l2Broadcast() : false;
-        l2NetworkCopy.interfaces.addAll(l2Network.interfaces());
-        l2NetworkCopy.hostIds.addAll(l2Network.hostIds());
-        l2NetworkCopy.setDirty(l2Network.dirty());
-        return l2NetworkCopy;
-    }
-
-    // field queries
-
-    /**
-     * Gets L2Network name.
-     *
-     * @return the name of L2Network
-     */
-    public String name() {
-        return name;
-    }
-
-    /**
-     * Gets L2Network interfaceNames.
-     *
-     * @return the interfaceNames of L2Network
-     */
-    public Set<String> interfaceNames() {
-        return ImmutableSet.copyOf(interfaceNames);
-    }
-
-    /**
-     * Gets L2Network encapsulation type.
-     *
-     * @return the encapsulation type of L2Network
-     */
-    public EncapsulationType encapsulation() {
-        return encapsulation;
-    }
-
-    /**
-     * Gets L2Network l2Forward flag.
-     *
-     * @return the l2Forward flag of L2Network
-     */
-    public boolean l2Forward() {
-        return l2Forward;
-    }
-
-    /**
-     * Gets L2Network l2Broadcast flag.
-     *
-     * @return the l2Broadcast flag of L2Network
-     */
-    public boolean l2Broadcast() {
-        return l2Broadcast;
-    }
-
-    /**
-     * Gets L2Network interfaces.
-     *
-     * @return the interfaces of L2Network
-     */
-    public Set<Interface> interfaces() {
-        return ImmutableSet.copyOf(interfaces);
-    }
-
-    /**
-     * Gets L2Network hosts.
-     *
-     * @return the hosts of L2Network
-     */
-    public Set<HostId> hostIds() {
-        return ImmutableSet.copyOf(hostIds);
-    }
-
-    /**
-     * Gets L2Network dirty flag.
-     *
-     * @return the dirty flag of L2Network
-     */
-    public boolean dirty() {
-        return dirty;
-    }
-
-    /**
-     * Checks if the interface is of L2Network.
-     *
-     * @param iface the interface to be checked
-     * @return true if L2Network contains the interface
-     */
-    public boolean contains(Interface iface) {
-        return interfaces.contains(iface);
-    }
-
-    /**
-     * Checks if the ConnectPoint and Vlan is of L2Network.
-     *
-     * @param port the ConnectPoint to be checked
-     * @param vlanId the VlanId of the ConnectPoint to be checked
-     * @return true if L2Network contains the interface of the ConnnectPoint and VlanId
-     */
-    public boolean contains(ConnectPoint port, VlanId vlanId) {
-        for (Interface iface : interfaces) {
-            if (iface.connectPoint().equals(port) && iface.vlan().equals(vlanId)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks if the DeviceId is of L2Network.
-     *
-     * @param deviceId the DeviceId to be checked
-     * @return true if L2Network contains any interface of the DeviceId
-     */
-    public boolean contains(DeviceId deviceId) {
-        for (Interface iface : interfaces) {
-            if (iface.connectPoint().deviceId().equals(deviceId)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Adds interface to L2Network.
-     *
-     * @param iface the Interface to be added
-     */
-    public void addInterface(Interface iface) {
-        Objects.requireNonNull(iface);
-        if (interfaces.add(iface)) {
-            setDirty(true);
-        }
-    }
-
-    /**
-     * Adds host to L2Network.
-     *
-     * @param host the Host to be added
-     */
-    public void addHost(Host host) {
-        Objects.requireNonNull(host);
-        if (hostIds.add(host.id())) {
-            setDirty(true);
-        }
-    }
-
-    /**
-     * Sets L2Network dirty flag.
-     *
-     * @param newDirty the dirty flag to be set
-     */
-    public void setDirty(boolean newDirty) {
-        dirty = newDirty;
-    }
-
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(getClass())
-                .add("name", name)
-                .add("interfaceNames", interfaceNames)
-                .add("encapsulation", encapsulation)
-                .add("l2Forward", l2Forward)
-                .add("l2Broadcast", l2Broadcast)
-                .add("interfaces", interfaces)
-                .add("hostIds", hostIds)
-                .add("dirty", dirty)
-                .toString();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == this) {
-            return true;
-        }
-        if (!(obj instanceof L2Network)) {
-            return false;
-        }
-        L2Network other = (L2Network) obj;
-        return Objects.equals(other.name, this.name)
-               && Objects.equals(other.interfaceNames, this.interfaceNames)
-               && Objects.equals(other.encapsulation, this.encapsulation)
-               && Objects.equals(other.l2Forward, this.l2Forward)
-               && Objects.equals(other.l2Broadcast, this.l2Broadcast)
-               && Objects.equals(other.interfaces, this.interfaces)
-               && Objects.equals(other.hostIds, this.hostIds);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(name, interfaces, encapsulation, l2Forward, l2Broadcast);
-    }
-}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/Route.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/Route.java
deleted file mode 100644
index 8eabb95..0000000
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/Route.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright 2016-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.
- */
-/*
- * local copy of onos/incubator/api/src/main/java/org/onosproject/incubator/net/routing/Route.java
- * to remove dependency on onos.incubator.routing services, since 2017-08-09.
- */
-
-package org.onosproject.simplefabric;
-
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
-import org.onosproject.cluster.NodeId;
-
-import java.util.Objects;
-
-import static com.google.common.base.MoreObjects.toStringHelper;
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Represents a route.
- */
-public class Route {
-
-    private static final String VERSION_MISMATCH =
-            "Prefix and next hop must be in the same address family";
-
-    private static final NodeId UNDEFINED = new NodeId("-");
-
-    /**
-     * Source of the route.
-     */
-    public enum Source {
-        /**
-         * Route came from the iBGP route source.
-         */
-        BGP,
-
-        /**
-         * Route came from the FPM route source.
-         */
-        FPM,
-
-        /**
-         * Route can from the static route source.
-         */
-        STATIC,
-
-        /**
-         * Route source was not defined.
-         */
-        UNDEFINED
-    }
-
-    private final Source source;
-    private final IpPrefix prefix;
-    private final IpAddress nextHop;
-    private final NodeId sourceNode;
-
-    /**
-     * Creates a route.
-     *
-     * @param source route source
-     * @param prefix IP prefix
-     * @param nextHop next hop IP address
-     */
-    public Route(Source source, IpPrefix prefix, IpAddress nextHop) {
-        this(source, prefix, nextHop, UNDEFINED);
-    }
-
-    /**
-     * Creates a route.
-     *
-     * @param source route source
-     * @param prefix IP prefix
-     * @param nextHop next hop IP address
-     * @param sourceNode ONOS node the route was sourced from
-     */
-    public Route(Source source, IpPrefix prefix, IpAddress nextHop, NodeId sourceNode) {
-        checkNotNull(prefix);
-        checkNotNull(nextHop);
-        checkArgument(prefix.version().equals(nextHop.version()), VERSION_MISMATCH);
-
-        this.source = checkNotNull(source);
-        this.prefix = prefix;
-        this.nextHop = nextHop;
-        this.sourceNode = checkNotNull(sourceNode);
-    }
-
-    /**
-     * Returns the route source.
-     *
-     * @return route source
-     */
-    public Source source() {
-        return source;
-    }
-
-    /**
-     * Returns the IP prefix of the route.
-     *
-     * @return IP prefix
-     */
-    public IpPrefix prefix() {
-        return prefix;
-    }
-
-    /**
-     * Returns the next hop IP address.
-     *
-     * @return next hop
-     */
-    public IpAddress nextHop() {
-        return nextHop;
-    }
-
-    /**
-     * Returns the ONOS node the route was sourced from.
-     *
-     * @return ONOS node ID
-     */
-    public NodeId sourceNode() {
-        return sourceNode;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(prefix, nextHop);
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (this == other) {
-            return true;
-        }
-
-        if (!(other instanceof Route)) {
-            return false;
-        }
-
-        Route that = (Route) other;
-
-        return Objects.equals(this.prefix, that.prefix) &&
-                Objects.equals(this.nextHop, that.nextHop);
-    }
-
-    @Override
-    public String toString() {
-        return toStringHelper(this)
-                .add("prefix", prefix)
-                .add("nextHop", nextHop)
-                .toString();
-    }
-}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricConfig.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricConfig.java
deleted file mode 100644
index 7bae152..0000000
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricConfig.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2017-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.
- */
-
-package org.onosproject.simplefabric;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.google.common.collect.Sets;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
-import org.onlab.packet.MacAddress;
-import org.onosproject.core.ApplicationId;
-import org.onosproject.net.config.Config;
-import org.onosproject.net.EncapsulationType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Set;
-
-/**
- * Configuration object for prefix config.
- */
-public class SimpleFabricConfig extends Config<ApplicationId> {
-    public static final String KEY = "simpleFabric";
-
-    private static final String L2NETWORKS = "l2Networks";
-    private static final String NAME = "name";
-    private static final String INTERFACES = "interfaces";
-    private static final String ENCAPSULATION = "encapsulation";
-    private static final String L2FORWARD = "l2Forward";
-    private static final String L2BROADCAST = "l2Broadcast";
-    private static final String IPSUBNETS = "ipSubnets";
-    private static final String BORDERROUTES = "borderRoutes";
-    private static final String IPPREFIX = "ipPrefix";
-    private static final String GATEWAYIP = "gatewayIp";
-    private static final String GATEWAYMAC = "gatewayMac";
-    private static final String L2NETWORKNAME = "l2NetworkName";
-    private static final String NEXTHOP = "nextHop";
-
-    private final Logger log = LoggerFactory.getLogger(getClass());
-
-    /**
-     * Returns all l2Networks in this configuration.
-     *
-     * @return A set of L2Network.
-     */
-    public Set<L2Network> getL2Networks() {
-        Set<L2Network> l2Networks = Sets.newHashSet();
-        JsonNode l2NetworkNode = object.get(L2NETWORKS);
-        if (l2NetworkNode == null) {
-            return l2Networks;
-        }
-
-        l2NetworkNode.forEach(jsonNode -> {
-            Set<String> ifaces = Sets.newHashSet();
-            JsonNode l2NetworkIfaces = jsonNode.path(INTERFACES);
-            if (l2NetworkIfaces == null) {
-                log.warn("simple fabric network config cannot find {}; skip: jsonNode={}", INTERFACES, jsonNode);
-            } else if (!l2NetworkIfaces.toString().isEmpty()) {
-                l2NetworkIfaces.forEach(ifacesNode -> ifaces.add(new String(ifacesNode.asText())));
-            }
-            String encapsulation = "NONE";   // NONE or VLAN
-            if (jsonNode.hasNonNull(ENCAPSULATION)) {
-                encapsulation = jsonNode.get(ENCAPSULATION).asText();
-            }
-            boolean l2Forward = true;
-            if (jsonNode.hasNonNull(L2FORWARD)) {
-                l2Forward = jsonNode.get(L2FORWARD).asBoolean();
-            }
-            boolean l2Broadcast = true;
-            if (jsonNode.hasNonNull(L2BROADCAST)) {
-                l2Broadcast = jsonNode.get(L2BROADCAST).asBoolean();
-            }
-            try {
-                l2Networks.add(new L2Network(
-                        jsonNode.get(NAME).asText(), ifaces, EncapsulationType.enumFromString(encapsulation),
-                        l2Forward, l2Broadcast));
-            } catch (Exception e) {
-                log.warn("simple fabric network config l2Network parse failed; skip: error={} jsonNode={}", jsonNode);
-            }
-        });
-        return l2Networks;
-    }
-
-    /**
-     * Gets the set of configured local IP subnets.
-     *
-     * @return IP Subnets
-     */
-    public Set<IpSubnet> ipSubnets() {
-        Set<IpSubnet> subnets = Sets.newHashSet();
-        JsonNode subnetsNode = object.get(IPSUBNETS);
-        if (subnetsNode == null) {
-            log.warn("simple fabric network config ipSubnets is null!");
-            return subnets;
-        }
-
-        subnetsNode.forEach(jsonNode -> {
-            String encapsulation = "NONE";   // NONE or VLAN
-            if (jsonNode.hasNonNull(ENCAPSULATION)) {
-                encapsulation = jsonNode.get(ENCAPSULATION).asText();
-            }
-            try {
-                subnets.add(new IpSubnet(
-                        IpPrefix.valueOf(jsonNode.get(IPPREFIX).asText()),
-                        IpAddress.valueOf(jsonNode.get(GATEWAYIP).asText()),
-                        MacAddress.valueOf(jsonNode.get(GATEWAYMAC).asText()),
-                        EncapsulationType.enumFromString(encapsulation),
-                        jsonNode.get(L2NETWORKNAME).asText()));
-            } catch (Exception e) {
-                log.warn("simple fabric network config ipSubnet parse failed; skip: error={} jsonNode={}", jsonNode);
-            }
-        });
-
-        return subnets;
-    }
-
-    /**
-     * Returns all routes in this configuration.
-     *
-     * @return A set of route.
-     */
-    public Set<Route> borderRoutes() {
-        Set<Route> routes = Sets.newHashSet();
-
-        JsonNode routesNode = object.get(BORDERROUTES);
-        if (routesNode == null) {
-            //log.warn("simple fabric network config borderRoutes is null!");
-            return routes;
-        }
-
-        routesNode.forEach(jsonNode -> {
-            try {
-                routes.add(new Route(
-                      Route.Source.STATIC,
-                      IpPrefix.valueOf(jsonNode.path(IPPREFIX).asText()),
-                      IpAddress.valueOf(jsonNode.path(NEXTHOP).asText())));
-            } catch (IllegalArgumentException e) {
-                log.warn("simple fabric network config parse error; skip: {}", jsonNode);
-            }
-        });
-
-        return routes;
-    }
-
-}
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricService.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricService.java
deleted file mode 100644
index be2bed3..0000000
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricService.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright 2017-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.
- */
-package org.onosproject.simplefabric;
-
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
-import org.onosproject.core.ApplicationId;
-import org.onosproject.event.ListenerService;
-import org.onosproject.net.intf.Interface;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.Host;
-
-import java.io.OutputStream;
-import java.util.Set;
-import java.util.Collection;
-
-/**
- * Provides information about the routing configuration.
- */
-public interface SimpleFabricService
-        extends ListenerService<SimpleFabricEvent, SimpleFabricListener> {
-
-    // App symbols
-    static final String APP_ID = "org.onosproject.simplefabric";
-    static final String L2FORWARD_APP_ID = "org.onosproject.simplefabric.l2forward";
-    static final String REACTIVE_APP_ID = "org.onosproject.simplefabric.reactive";
-
-    // Priority for l2NetworkRouting: L2NETWORK_UNICAST or L2NETWORK_BROADCAST
-    static final int PRI_L2NETWORK_UNICAST = 601;
-    static final int PRI_L2NETWORK_BROADCAST = 600;
-
-    // Reactive Routing within Local Subnets
-    // ASSUME: local subnets NEVER overlaps each other
-    static final int PRI_REACTIVE_LOCAL_FORWARD = 501;
-    static final int PRI_REACTIVE_LOCAL_INTERCEPT = 500;
-    // Reactive Routing for Border Routes with local subnet
-    // Priority: REACTIVE_BROUTE_BASE + routeIpPrefix * REACTIVE_BROUTE_STEP
-    //           + REACTIVE_BROUTE_FORWARD or REACTIVE_BROUTE_INTERCEPT
-    static final int PRI_REACTIVE_BORDER_BASE = 100;
-    static final int PRI_REACTIVE_BORDER_STEP = 2;
-    static final int PRI_REACTIVE_BORDER_FORWARD = 1;
-    static final int PRI_REACTIVE_BORDER_INTERCEPT = 0;
-
-    // Simple fabric event related timers
-    static final long IDLE_INTERVAL_MSEC = 5000;
-
-    // Feature control parameters
-    static final boolean ALLOW_IPV6 = false;
-    static final boolean ALLOW_ETH_ADDRESS_SELECTOR = true;
-    static final boolean REACTIVE_SINGLE_TO_SINGLE = false;
-    static final boolean REACTIVE_ALLOW_LINK_CP = false;  // MUST BE false (yjlee, 2017-10-18)
-    static final boolean REACTIVE_HASHED_PATH_SELECTION = false;
-    static final boolean REACTIVE_MATCH_IP_PROTO = false;
-
-    /**
-     * Gets appId.
-     *
-     * @return appId of simple fabric app
-     */
-    ApplicationId getAppId();
-
-    /**
-     * Gets all the l2Networks.
-     *
-     * @return all the l2Networks
-     */
-    Collection<L2Network> getL2Networks();
-
-    /**
-     * Retrieves the entire set of ipSubnets configuration.
-     *
-     * @return all the ipSubnets
-     */
-    Set<IpSubnet> getIpSubnets();
-
-    /**
-     * Retrieves the entire set of static routes to outer networks.
-     *
-     * @return the set of static routes to outer networks.
-     */
-    Set<Route> getBorderRoutes();
-
-    /**
-     * Evaluates whether a mac is of Virtual Gateway Mac Addresses.
-     *
-     * @param mac the MacAddress to evaluate
-     * @return true if the mac is of any Vitrual Gateway Mac Address of ipSubnets
-     */
-    boolean isVMac(MacAddress mac);
-
-    /**
-     * Evaluates whether an Interface belongs to l2Networks.
-     *
-     * @param intf the interface to evaluate
-     * @return true if the inteface belongs to l2Networks configed, otherwise false
-     */
-    boolean isL2NetworkInterface(Interface intf);
-
-    /**
-     * Find Virtual Gateway Mac Address for Local Subnet Virtual Gateway Ip.
-     *
-     * @param ip the ip to check for Virtual Gateway Ip
-     * @return mac address of virtual gateway
-     */
-    MacAddress findVMacForIp(IpAddress ip);
-
-    /**
-     * Finds the L2 Network with given port and vlanId.
-     *
-     * @param port the port to be matched
-     * @param vlanId the vlanId to be matched
-     * @return the L2 Network for specific port and vlanId or null
-     */
-    L2Network findL2Network(ConnectPoint port, VlanId vlanId);
-
-    /**
-     * Finds the L2 Network of the name.
-     *
-     * @param name the name to be matched
-     * @return the L2 Network for specific name
-     */
-    L2Network findL2Network(String name);
-
-    /**
-     * Finds the IpSubnet containing the ipAddress.
-     *
-     * @param ipAddress the ipAddress to be matched
-     * @return the IpSubnet for specific ipAddress
-     */
-    IpSubnet findIpSubnet(IpAddress ipAddress);
-
-    /**
-     * Finds the Border Route containing the ipAddress.
-     * ASSUME: ipAddress is out of ipSubnets
-     *
-     * @param ipAddress the ipAddress to be matched
-     * @return the IpSubnet for specific ipAddress
-     */
-    Route findBorderRoute(IpAddress ipAddress);
-
-    /**
-     * Finds the network interface related to the host.
-     *
-     * @param host the host
-     * @return the interface related to the host
-     */
-    Interface findHostInterface(Host host);
-
-    /**
-     * Sends Neighbour Query (ARP or NDP) to Find Host Location.
-     *
-     * @param ip the ip address to resolve
-     * @return true if request mac packets are emitted. otherwise false
-     */
-    boolean requestMac(IpAddress ip);
-
-    /**
-     * Sends Dump Event to all SimpleFabricListeners to Dump Info on the Subject.
-     *
-     * @param subject the subject to dump
-     * @param out the output stream to dump
-     */
-    void dumpToStream(String subject, OutputStream out);
-
-    /**
-     * Triggers to send Refresh Notification to all sub modules.
-     */
-    void triggerRefresh();
-
-    /**
-     * Triggers to send Flush Notification to all sub modules.
-     */
-    void triggerFlush();
-
-}
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DocumentTreeTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DocumentTreeTestCommand.java
new file mode 100644
index 0000000..448d681
--- /dev/null
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DocumentTreeTestCommand.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2016-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.
+ */
+package org.onosproject.distributedprimitives.cli;
+
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.store.serializers.KryoNamespaces;
+import org.onosproject.store.service.DocumentPath;
+import org.onosproject.store.service.DocumentTree;
+import org.onosproject.store.service.Serializer;
+import org.onosproject.store.service.StorageService;
+import org.onosproject.store.service.Versioned;
+
+/**
+ * CLI command to manipulate a document tree.
+ */
+@Command(scope = "onos", name = "document-tree-test",
+        description = "Manipulate a document tree")
+public class DocumentTreeTestCommand extends AbstractShellCommand {
+
+    @Argument(index = 0, name = "name",
+            description = "tree name",
+            required = true, multiValued = false)
+    String name = null;
+
+    @Argument(index = 1, name = "operation",
+            description = "operation name",
+            required = true, multiValued = false)
+    String operation = null;
+
+    @Argument(index = 2, name = "path",
+            description = "first arg",
+            required = false, multiValued = false)
+    String arg1 = null;
+
+    @Argument(index = 3, name = "value",
+            description = "second arg",
+            required = false, multiValued = false)
+    String arg2 = null;
+
+    DocumentTree<String> tree;
+
+    @Override
+    protected void doExecute() {
+        StorageService storageService = get(StorageService.class);
+        tree = storageService.<String>getDocumentTree(name, Serializer.using(KryoNamespaces.BASIC)).asDocumentTree();
+
+        tree.addListener(value -> {
+            log.debug("Received event: {}", value);
+        });
+
+        if ("set".equals(operation)) {
+            log.debug("set {} {}", DocumentPath.from(arg1), arg2);
+            print(tree.set(DocumentPath.from(arg1), arg2));
+        } else if ("get".equals(operation)) {
+            log.debug("get {}", DocumentPath.from(arg1));
+            print(tree.get(DocumentPath.from(arg1)));
+        } else if ("remove".equals(operation)) {
+            log.debug("removeNode {}", DocumentPath.from(arg1));
+            print(tree.removeNode(DocumentPath.from(arg1)));
+        } else if ("create".equals(operation)) {
+            log.debug("create {} {}", DocumentPath.from(arg1), arg2);
+            print("%b", tree.create(DocumentPath.from(arg1), arg2));
+        } else if ("createRecursive".equals(operation)) {
+            log.debug("createRecursive {} {}", DocumentPath.from(arg1), arg2);
+            print("%b", tree.createRecursive(DocumentPath.from(arg1), arg2));
+        }
+    }
+
+    void print(Versioned<String> value) {
+        if (value == null) {
+            print("null");
+        } else {
+            print("%s", value.value());
+        }
+    }
+}
diff --git a/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 30401a0..eeeab33 100644
--- a/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/apps/test/distributed-primitives/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -44,6 +44,9 @@
             <action class="org.onosproject.distributedprimitives.cli.ConsistentMapTestCommand"/>
         </command>
         <command>
+            <action class="org.onosproject.distributedprimitives.cli.DocumentTreeTestCommand"/>
+        </command>
+        <command>
             <action class="org.onosproject.distributedprimitives.cli.EventuallyConsistentMapTestCommand"/>
         </command>
         <command>
