def __init__(self, bmc, userid, password, iohandler, port=623, force=False, kg=None): self.keepaliveid = None self.connected = False self.broken = False self.out_handler = iohandler self.remseq = 0 self.myseq = 0 self.lastsize = 0 self.retriedpayload = 0 self.pendingoutput = [] self.awaitingack = False self.activated = False self.force_session = force self.ipmi_session = session.Session(bmc=bmc, userid=userid, password=password, port=port, kg=kg, onlogon=self._got_session) # induce one iteration of the loop, now that we would be # prepared for it in theory session.Session.wait_for_rsp(0)
def StartThread(IPAddress): #IPAddress = IPEntry.get() #print("ip:%s" % IPAddress) IPMISession = ipmisession.Session(bmc=IPAddress, userid="admin", password="******") adrc = ADRC() adrc.Run(IPMISession)
def __init__(self, bmc, userid, password, port=623, onlogon=None, kg=None): # TODO(jbjohnso): accept tuples and lists of each parameter for mass # operations without pushing the async complexities up the stack self.onlogon = onlogon self.bmc = bmc if onlogon is not None: self.ipmi_session = session.Session(bmc=bmc, userid=userid, password=password, onlogon=self.logged, port=port, kg=kg) else: self.ipmi_session = session.Session(bmc=bmc, userid=userid, password=password, port=port, kg=kg)
def __init__(self, **kwargs): config = _get_config(**kwargs) self.o = session.Session(bmc=config['api_host'], userid=config['api_user'], password=config['api_pass'], port=config['api_port'], kg=config['api_kg'], onlogon=self._onlogon) while not self.o.logged: # override timeout self.o.maxtimeout = config['api_login_timeout'] self.o.wait_for_rsp(timeout=1) self.o.maxtimeout = 5
def __init__(self, bmc, userid, password, port=623, onlogon=None, kg=None): # TODO(jbjohnso): accept tuples and lists of each parameter for mass # operations without pushing the async complexities up the stack self.onlogon = onlogon self.bmc = bmc self._sdr = None if onlogon is not None: self.ipmi_session = session.Session(bmc=bmc, userid=userid, password=password, onlogon=self.logged, port=port, kg=kg) # induce one iteration of the loop, now that we would be # prepared for it in theory session.Session.wait_for_rsp(0) else: self.ipmi_session = session.Session(bmc=bmc, userid=userid, password=password, port=port, kg=kg)