STC scenario for testing posting and removal of configs

Change-Id: I5395d6b42a52ba29063eb9ee139dcfb659247614
diff --git a/tools/test/scenarios/bin/check-dhcp-netcfg.py b/tools/test/scenarios/bin/check-dhcp-netcfg.py
new file mode 100755
index 0000000..ed5622e
--- /dev/null
+++ b/tools/test/scenarios/bin/check-dhcp-netcfg.py
@@ -0,0 +1,49 @@
+#! /usr/bin/env python
+
+import requests
+import sys
+
+from requests.auth import HTTPBasicAuth
+
+if len(sys.argv) < 3:
+    print "usage: find-dhcp-netcfg onos-node name1=value1 ..."
+    sys.exit(1)
+
+node = sys.argv[1]
+
+cfgRequest = requests.get('http://' + node + ':8181/onos/v1/network/configuration',
+                          auth=HTTPBasicAuth('onos', 'rocks'))
+
+if cfgRequest.status_code != 200:
+    print cfgRequest.text
+    sys.exit(1)
+
+cfgJson = cfgRequest.json()
+appFound = False
+
+
+for index in range(2, len(sys.argv)):
+    pair = sys.argv[index].split("=")
+    for app in cfgJson["apps"]:
+        if app == "org.onosproject.dhcp":
+            dhcp = cfgJson["apps"][app]["dhcp"]
+            appFound = True
+
+            name = pair[0]
+            value = pair[1]
+
+            if dhcp[name] != value:
+                print name + " differs: expected " + value + " but found " + dhcp[name]
+                print cfgJson
+                sys.exit(1)
+
+if appFound:
+    sys.exit(0)
+
+print "DHCP app not found"
+print cfgJson
+sys.exit(2)
+
+
+
+