Update 'freenas_network_unlock.py'

This commit is contained in:
2020-03-04 12:54:04 -05:00
parent 6c7e59d299
commit fd715a6653

View File

@@ -57,7 +57,7 @@ for pool in POOLS['response']:
#recovery_key_binary = recovery_key.read()
#recovery_key_string = (base64.b64encode(recovery_key_binary)).decode('ascii')
#response = request('storage/volume/{}/unlock/'.format(pool['name']), 'POST', {'recovery_key': '{}'.format(recovery_key_string)})
response = request('storage/volume/{}/unlock/'.format(pool['name']), 'POST', {'passphrase': '{}'.format(passphrase)})
response = request('storage/volume/{}/unlock/'.format(pool['name']), 'POST', {'passphrase': '{}'.format(passphrase)})
if response['ok']:
logging.info('Pool {} was unlocked successfully'.format(pool['name']))
else: