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 yaml # For parsing the yaml config file
|
||||||
import config # configuration file
|
import config # configuration file
|
||||||
|
|
||||||
for pool in config.POOLS:
|
|
||||||
print(pool)
|
|
||||||
|
|
||||||
exit()
|
|
||||||
|
|
||||||
def ping(host):
|
def ping(host):
|
||||||
"""
|
"""
|
||||||
Returns True if host (str) responds to a ping request.
|
Returns True if host (str) responds to a ping request.
|
||||||
@@ -25,9 +20,9 @@ def ping(host):
|
|||||||
|
|
||||||
#if ping(FREENAS_HOST):
|
#if ping(FREENAS_HOST):
|
||||||
VOLUMES = requests.get(
|
VOLUMES = requests.get(
|
||||||
'https://{}/api/v1.0/storage/volume/'.format(FREENAS_HOST),
|
'https://{}/api/v1.0/storage/volume/'.format(config.HOSTNAME),
|
||||||
auth=('root', '{}'.format(ROOT_PASSWORD)),
|
auth=('root', '{}'.format(config.ROOT_PASSWORD)),
|
||||||
verify='{}'.format(CA_CERT),
|
verify='{}'.format(config.CA_CERT_PATH),
|
||||||
).json()
|
).json()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user