changeset 1007:6c30561d7d30

start of code for reading cisco router data Ignore-this: 562f1fc842a1f13aec9462537d66affe darcs-hash:20151004111816-312f9-789573e1c61d8fe6b59e316a4a798da80bf53e76
author drewp <drewp@bigasterisk.com>
date Sun, 04 Oct 2015 04:18:16 -0700
parents 63e8a6cd2d3b
children 084f95932677
files service/tomatoWifi/wifi.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/service/tomatoWifi/wifi.py	Sun Oct 04 04:17:55 2015 -0700
+++ b/service/tomatoWifi/wifi.py	Sun Oct 04 04:18:16 2015 -0700
@@ -131,6 +131,15 @@
             clientHostname=clientHostname, connection=iface, ipaddr=ipaddr, dhcpExpires=expires))
     
     returnValue(sorted(byMac.values()))
+
+@inlineCallbacks
+def loadCiscoData():
+    config = json.load(open("/my/proj/homeauto/service/tomatoWifi/priv-uva.json"))
+    headers = {'Authorization': ['Basic %s' % config['userPass'].encode('base64').strip()]}
+    print headers
+    resp = yield fetch('http://10.2.0.2/', headers=headers)
+    print resp.body
+    returnValue([])
     
             
 def jsValue(js, variableName):