Mercurial > code > home > repos > homeauto
changeset 202:7faf642438bc
start of code for reading cisco router data
Ignore-this: 562f1fc842a1f13aec9462537d66affe
author | drewp@bigasterisk.com |
---|---|
date | Sun, 04 Oct 2015 04:18:16 -0700 |
parents | fd282f1f5813 |
children | 572580b50de3 |
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):