ssh aruba

This commit is contained in:
carlosmgr 2016-02-02 22:40:04 +00:00
parent e91c8e4143
commit 7f87df20c2

View File

@ -12,7 +12,6 @@ from datetime import timedelta
import re
import threading
from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD
from homeassistant.helpers import validate_config
from homeassistant.util import Throttle
@ -45,6 +44,7 @@ def get_scanner(hass, config):
class ArubaDeviceScanner(object):
""" This class queries a Aruba Acces Point for connected devices. """
def __init__(self, config):
self.host = config[CONF_HOST]
self.username = config[CONF_USERNAME]
@ -113,10 +113,10 @@ class ArubaDeviceScanner(object):
_LOGGER.error("Host key Changed")
return
elif query == 5:
#_LOGGER.error("Connection refused by server")
_LOGGER.error("Connection refused by server")
return
elif query == 6:
#_LOGGER.error("Connection timed out")
_LOGGER.error("Connection timed out")
return
ssh.sendline(self.password)
ssh.expect('#')