Update 'freenas_network_unlock.py'
This commit is contained in:
@@ -53,7 +53,7 @@ POOLS = request('storage/volume/', 'GET')
|
|||||||
for pool in POOLS['response']:
|
for pool in POOLS['response']:
|
||||||
if pool['is_decrypted'] == False:
|
if pool['is_decrypted'] == False:
|
||||||
logging.info('Pool {} is locked'.format(pool['name']))
|
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']:
|
if response['ok']:
|
||||||
logging.info('Pool {} was unlocked successfully'.format(pool['name']))
|
logging.info('Pool {} was unlocked successfully'.format(pool['name']))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user