def __init__(self, console, password, username='root'):
        """
        :param console: The console dns or ip address
        :param password: Console password
        :param username: Console username
        """
        
        self.console = console
        self.username = username
        self.password = password
        self.output = None
        self.error = None
        self.status = None
        
        self._ipmitool_path = self._get_ipmitool_path()
        if not self._ipmitool_path:
             raise IOError("Failed to locate ipmitool command!")
        
        self.args = ['-I', 'lanplus', '-H', self.console, '-U', self.username]
        
        if sys.platform == 'linux2':
            self.args.extend(['-P', self.password])
            self.method = self._subprocess_method
                    
        elif sys.platform == 'sunos5':
            self.method = self._expect_method
        
        else:
            self.method = self._expect_method
def __init__ ( self , console , password , username = 'root' ) : self . console = console self . username = username self . password = password self . output = None self . error = None self . status = None self . _ipmitool_path = self . _get_ipmitool_path ( ) if not self . _ipmitool_path : raise IOError ( "Failed to locate ipmitool command!" ) self . args = [ '-I' , 'lanplus' , '-H' , self . console , '-U' , self . username ] if sys . platform == 'linux2' : self . args . extend ( [ '-P' , self . password ] ) self . method = self . _subprocess_method elif sys . platform == 'sunos5' : self . method = self . _expect_method else : self . method = self . _expect_method
:param console: The console dns or ip address
        :param password: Console password
        :param username: Console username