Merge branch 'master' into merge

Change-Id: Id77bb2de77dd288404c83e331b076aaf9aafacc5
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>