diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 7dee099e..a8051b9c 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -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): diff --git a/pyghmi/ipmi/console.py b/pyghmi/ipmi/console.py index 3f76ed25..3ae15549 100644 --- a/pyghmi/ipmi/console.py +++ b/pyghmi/ipmi/console.py @@ -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)