def poweron(hostname, timeout=20, username=None, password=None):
    '''
    Power server on

    CLI Example:

    .. code-block:: bash

        salt-run drac.poweron example.com
    '''
    client = __connect(hostname, timeout, username, password)

    if isinstance(client, paramiko.SSHClient):
        (stdin, stdout, stderr) = client.exec_command('racadm serveraction powerup')

        if 'successful' in stdout.readline():
            log.info('powerup successful')
        else:
            log.error('powerup racadm command failed')
            return False
    else:
        log.error('client was not of type paramiko.SSHClient')
        return False

    return True
dataset/ETHPy150Open saltstack/salt/salt/runners/drac.py/poweron/original