Update 'freenas_network_unlock.py'

This commit is contained in:
2019-11-12 15:12:18 -05:00
parent ce5aebdaa6
commit 6e103d70c9

View File

@@ -53,7 +53,7 @@ POOLS = request('storage/volume/', 'GET')
for pool in POOLS['response']:
if pool['is_decrypted'] == False:
logging.info('Pool {} is locked'.format(pool['name']))
response = request('storage/volume/{}/unlock/'.format(pool['name']), 'POST', {'passphrase': '{}'.format(config.POOLS[pool['name']])})
response = request('storage/volume/{}/unlock/'.format(pool['name']), 'POST', {'passphrase': '{}'.format(config.ENCRYPTION_PASSPHRASES[pool['name']])})
if response['ok']:
logging.info('Pool {} was unlocked successfully'.format(pool['name']))
else: