VOL-373 support 3 tuple and multiple version numbers for ONOS apps

Change-Id: I2b6487628c2a01ff0d1fc408ddc1a921885197cb
diff --git a/config/app-install.sh b/config/app-install.sh
new file mode 100644
index 0000000..0523886
--- /dev/null
+++ b/config/app-install.sh
@@ -0,0 +1,23 @@
+#!/bin/bash 
+
+for app in $APPS; do
+    echo "Installing application '$app'"
+    oar=$(find $BUILD_ROOT -path "*/target/*" -name "$app*".oar)
+    if [ "$oar x" == " x" ]; then
+        echo "Required application, $app, not found."
+	continue
+    fi
+    rm -rf $APP_INSTALL_ROOT
+    mkdir -p $APP_INSTALL_ROOT
+    cd $APP_INSTALL_ROOT
+    cp $oar $APP_INSTALL_ROOT
+    jar -xf $APP_INSTALL_ROOT/$(basename $oar)
+    name=$(grep "name=" $APP_INSTALL_ROOT/app.xml | sed 's/<app name="//g;s/".*//g')
+    mkdir -p $APPS_ROOT/$name
+    cp $APP_INSTALL_ROOT/app.xml $APPS_ROOT/$name/app.xml
+    touch $APPS_ROOT/$name/active
+    [ -f $APP_INSTALL_ROOT/app.png ] && cp $APP_INSTALL_ROOT/app.png $APPS_ROOT/$name/app.png
+    cp $APP_INSTALL_ROOT/$(basename $oar) $APPS_ROOT/$name/$name.oar
+    cp -rf $APP_INSTALL_ROOT/m2/* $KARAF_M2
+    rm -rf $APP_INSTALL_ROOT
+done
diff --git a/config/netcfg.json b/config/netcfg.json
new file mode 100644
index 0000000..245c263
--- /dev/null
+++ b/config/netcfg.json
@@ -0,0 +1,127 @@
+{
+  "apps": {
+    "org.opencord.aaa": {
+      "AAA": {
+        "radiusIp": "172.25.0.100",
+	"nasIp": "5.6.7.8",
+        "radiusServerPort": "1812",
+        "radiusSecret": "SECRET",
+	"bindings" : [
+		{
+		 "mac" : "de:ad:be:ef:ba:11",
+		 "s-tag" : 2,
+		 "c-tag" : 2,
+         "nas_port_id" : "location"
+		},
+                {
+         "mac" : "de:ad:be:ef:ca:fe",
+         "s-tag" : 2,
+         "c-tag" : 122,
+         "nas_port_id" : "location"
+        }
+	  ] 
+    }
+ },
+    "org.onosproject.dhcp-relay" : {
+           "dhcprelay" : {
+               "dhcpserverConnectPoint" : "of:00000cafecafecafe/4",
+               "serverip" : "11.11.11.11",
+               "gatewayip" : "9.9.9.9"
+           }
+    }
+  },
+  "devices": {
+    "of:0001000000000001": {
+      "basic": {
+        "driver": "pmc-olt"
+      },
+      "accessDevice": {
+        "uplink": "0",
+        "vlan": "2"
+      }
+    },
+    "of:0001000000000002": {
+      "basic": {
+        "driver": "pmc-olt"
+      },
+      "accessDevice": {
+        "uplink": "0",
+        "vlan": "1001"
+      }
+    },
+    "of:0001000000000003": {
+      "basic": {
+        "driver": "pmc-olt"
+      },
+      "accessDevice": {
+        "uplink": "0",
+        "vlan": "1002"
+      }
+    },
+    "of:0001000000000004": {
+      "basic": {
+        "driver": "pmc-olt"
+      },
+      "accessDevice": {
+        "uplink": "0",
+        "vlan": "1003"
+      }
+    },
+    "of:0001000000000005": {
+      "basic": {
+        "driver": "pmc-olt"
+      },
+      "accessDevice": {
+        "uplink": "0",
+        "vlan": "1004"
+      }
+    },
+    "of:0001000000000006": {
+      "basic": {
+        "driver": "pmc-olt"
+      },
+      "accessDevice": {
+        "uplink": "0",
+        "vlan": "1005"
+      }
+    }
+  },
+  "ports" : { 
+	"of:0000000000000001/2" : {
+           "interfaces" : [
+               {
+                   "name" : "yoyoma1",
+                   "ips"  : [ "10.0.2.1/24" ],
+                   "mac"  : "00:00:00:01:01:00"
+               }
+           ]
+        },
+	"of:00000cafecafecafe/3" : {
+           "interfaces" : [
+               {
+                   "name" : "yoyoma",
+                   "ips"  : [ "10.0.2.2/24" ],
+                   "mac"  : "00:00:00:01:02:00"
+               }
+           ]
+        },"of:00000cafecafecafe/2" : {
+           "interfaces" : [
+               {
+                   "name" : "yoyoma2",
+                   "ips"  : [ "10.0.2.3/24" ],
+                   "mac"  : "00:00:00:01:03:00"
+               }
+           ]
+        },
+	"of:00000cafecafecafe/4" : {
+           "interfaces" : [
+               {
+                   "name" : "yoyoma4",
+                   "ips"  : [ "10.0.2.4/24" ],
+                   "mac"  : "00:00:00:01:04:00"
+               }
+           ]
+        }
+
+  }
+}