Update 'freenas_network_unlock.py'
This commit is contained in:
@@ -4,11 +4,6 @@ import subprocess # For executing a shell command
|
||||
import yaml # For parsing the yaml config file
|
||||
import config # configuration file
|
||||
|
||||
for pool in config.POOLS:
|
||||
print(pool)
|
||||
|
||||
exit()
|
||||
|
||||
def ping(host):
|
||||
"""
|
||||
Returns True if host (str) responds to a ping request.
|
||||
@@ -25,9 +20,9 @@ def ping(host):
|
||||
|
||||
#if ping(FREENAS_HOST):
|
||||
VOLUMES = requests.get(
|
||||
'https://{}/api/v1.0/storage/volume/'.format(FREENAS_HOST),
|
||||
auth=('root', '{}'.format(ROOT_PASSWORD)),
|
||||
verify='{}'.format(CA_CERT),
|
||||
'https://{}/api/v1.0/storage/volume/'.format(config.HOSTNAME),
|
||||
auth=('root', '{}'.format(config.ROOT_PASSWORD)),
|
||||
verify='{}'.format(config.CA_CERT_PATH),
|
||||
).json()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user