mirror of
https://opendev.org/x/pyghmi
synced 2025-12-27 03:11:44 +00:00
Add support for non standard ports.
It is possible and in some cases required for an implementation to deviate from the IPMI standard port of 623. This enables the library to actually support that case. Change-Id: I62e322410924153cebde9827d7ba0d0583aa1d83
This commit is contained in:
@@ -71,7 +71,7 @@ class Command(object):
|
||||
:param kg: Optional parameter to use if BMC has a particular Kg configured
|
||||
"""
|
||||
|
||||
def __init__(self, bmc, userid, password, onlogon=None, kg=None):
|
||||
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
|
||||
@@ -81,11 +81,13 @@ class Command(object):
|
||||
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 logged(self, response):
|
||||
|
||||
@@ -42,7 +42,7 @@ class Console(object):
|
||||
|
||||
#TODO(jbjohnso): still need an exit and a data callin function
|
||||
def __init__(self, bmc, userid, password,
|
||||
iohandler=None,
|
||||
iohandler=None, port=623,
|
||||
force=False, kg=None):
|
||||
if type(iohandler) == tuple: # two file handles
|
||||
self.console_in = iohandler[0]
|
||||
@@ -71,6 +71,7 @@ class Console(object):
|
||||
self.ipmi_session = session.Session(bmc=bmc,
|
||||
userid=userid,
|
||||
password=password,
|
||||
port=port,
|
||||
kg=kg,
|
||||
onlogon=self._got_session)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user