# HG changeset patch # User drewp@bigasterisk.com # Date 1443957496 25200 # Node ID 7faf642438bc8cd09a676fb44f59c127cb31528f # Parent fd282f1f58131ee26c516e98f9a43c12af71e2c3 start of code for reading cisco router data Ignore-this: 562f1fc842a1f13aec9462537d66affe diff -r fd282f1f5813 -r 7faf642438bc service/tomatoWifi/wifi.py --- 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):