refactor code and service separation for MOAS support

Change-Id: Id00a59a46a30d3a8c976611e637c28fe609c9842
diff --git a/tools/tutorials/artemis/configs/network-cfg.json b/tools/tutorials/artemis/configs/network-cfg.json
index 8b5d56f..35380ce 100644
--- a/tools/tutorials/artemis/configs/network-cfg.json
+++ b/tools/tutorials/artemis/configs/network-cfg.json
@@ -1,5 +1,75 @@
 {
-    "ports" : {
+    "apps": {
+        "org.onosproject.artemis": {
+            "artemis": {
+                "moas": { },
+                "monitors": {
+                    "exabgp": [
+                        "192.168.1.2:5000"
+                    ],
+                    "ripe": []
+                },
+                "prefixes": [
+                    {
+                        "moas": [ ],
+                        "paths": [
+                            {
+                                "neighbor": [
+                                    {
+                                        "asn": 65002,
+                                        "neighbor": [
+                                            65001
+                                        ]
+                                    }
+                                ],
+                                "origin": 65004
+                            }
+                        ],
+                        "prefix": "40.0.0.0/8"
+                    }
+                ]
+            }
+        },
+        "org.onosproject.reactive.routing": {
+            "reactiveRouting": {
+                "ip4LocalPrefixes": [
+                    {
+                        "ipPrefix" : "40.0.0.0/24",
+                        "type" : "PUBLIC",
+                        "gatewayIp" : "40.0.0.1"
+                    },
+                    {
+                        "ipPrefix" : "150.1.3.0/30",
+                        "type" : "PRIVATE",
+                        "gatewayIp" : "150.1.3.2"
+                    }
+                ],
+                "ip6LocalPrefixes": [],
+                "virtualGatewayMacAddress": "e2:f5:32:16:9a:46"
+            }
+        },
+        "org.onosproject.router": {
+            "bgp": {
+                "bgpSpeakers" : [
+                    {
+                        "name" : "speaker1",
+                        "connectPoint" : "of:00002a45d713e141/4",
+                        "peers" : [
+                            "150.1.3.1"
+                        ]
+                    }
+                ]
+            }
+        }
+    },
+    "devices": {
+        "ovsdb:192.168.0.2": {
+            "basic": {
+                "driver": "ovs"
+            }
+        }
+    },
+    "ports": {
         "of:00002a45d713e141/2" : {
             "interfaces" : [
                 {
@@ -18,67 +88,5 @@
                 }
             ]
         }
-    },
-    "apps" : {
-        "org.onosproject.router" : {
-            "bgp" : {
-                "bgpSpeakers" : [
-                    {
-                        "name" : "speaker1",
-                        "connectPoint" : "of:00002a45d713e141/4",
-                        "peers" : [
-                            "150.1.3.1"
-                        ]
-                    }
-                ]
-            }
-        },
-        "org.onosproject.reactive.routing" : {
-            "reactiveRouting" : {
-                "ip4LocalPrefixes" : [
-                    {
-                        "ipPrefix" : "40.0.0.0/24",
-                        "type" : "PUBLIC",
-                        "gatewayIp" : "40.0.0.1"
-                    },
-                    {
-                        "ipPrefix" : "150.1.3.0/30",
-                        "type" : "PRIVATE",
-                        "gatewayIp" : "150.1.3.2"
-                    }
-                ],
-                "ip6LocalPrefixes" : [
-                ],
-                "virtualGatewayMacAddress" : "e2:f5:32:16:9a:46"
-            }
-        },
-        "org.onosproject.artemis" : {
-            "artemis" : {
-                "prefixes" : [ 
-                    {
-                        "prefix" : "40.0.0.0/8",
-                        "paths" : [ 
-                            {
-                                "origin" : 65004,
-                                "neighbor" : [
-                                    {
-                                        "asn" : 65002,
-                                        "neighbor": [
-                                            65001
-                                        ]
-                                    }
-                                ]
-                            }
-                        ],
-                        "moas" : [ ]
-                    }
-                ],
-                "frequency" : 3000,
-                "monitors" : {
-                    "ripe" : [ ],
-                    "exabgp": [ "192.168.1.2:5000" ]
-                }
-            }
-        }
     }
-}
+}
\ No newline at end of file