Exemple #1
0
def reboot(miner: Miner, login):
    """ reboot the miner through ftp """
    connection = Ssh(miner.ipaddress, login.username, login.password, port=getportfromminer(miner))
    connection.open_shell()
    response = connection.exec_command('/sbin/reboot')
    print_connection_data(connection)
    connection.close_connection()
    return response
Exemple #2
0
def getminerconfig(miner: Miner, login):
    '''ger the miner config file'''
    connection = Ssh(miner.ipaddress,
                     login.username,
                     login.password,
                     port=getportfromminer(miner))
    config = connection.exec_command('cat /config/{0}.conf'.format(
        getminerfilename(miner)))
    connection.close_connection()
    return config