Update 'freenas_network_unlock.py'
This commit is contained in:
@@ -27,13 +27,13 @@ VOLUMES = requests.get(
|
|||||||
|
|
||||||
for volume in VOLUMES:
|
for volume in VOLUMES:
|
||||||
if volume['is_decrypted'] == False:
|
if volume['is_decrypted'] == False:
|
||||||
#request.post(
|
response = request.post(
|
||||||
# 'https://{}/api/v1.0/storage/volume/{}/unlock/'.format(config.HOSTNAME,volume.name),
|
'https://{}/api/v1.0/storage/volume/{}/unlock/'.format(config.HOSTNAME,volume['name']),
|
||||||
# data={'passphrase': '{}'.format(config.POOLS[volume.name])},
|
data={'passphrase': '{}'.format(config.POOLS[volume['name']])},
|
||||||
# auth=('root', '{}'.format(config.ROOT_PASSWORD)),
|
auth=('root', '{}'.format(config.ROOT_PASSWORD)),
|
||||||
# verify='{}'.format(config.CA_CERT_PATH),
|
verify='{}'.format(config.CA_CERT_PATH),
|
||||||
#).json()
|
).json()
|
||||||
print(config.POOLS[volume[name]])
|
print(response)
|
||||||
#else:
|
#else:
|
||||||
#print("Host,{}, is not online".format(FREENAS_HOST))
|
#print("Host,{}, is not online".format(FREENAS_HOST))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user