added the api_key variable for the service calls
This commit is contained in:
@@ -236,9 +236,9 @@ if __name__ == '__main__':
|
|||||||
logger.info('Dataset {} was unlocked successfully'.format(dataset['name']))
|
logger.info('Dataset {} was unlocked successfully'.format(dataset['name']))
|
||||||
# restart services since the dataset was unlocked
|
# restart services since the dataset was unlocked
|
||||||
logger.info('Restarting the NFS service')
|
logger.info('Restarting the NFS service')
|
||||||
response = request('service/restart', 'POST', {'service': 'nfs'})
|
response = request('service/restart', api_key, 'POST', {'service': 'nfs'})
|
||||||
logger.info('Restarting the CIFS/SMB service')
|
logger.info('Restarting the CIFS/SMB service')
|
||||||
response = request('service/restart', 'POST', {'service': 'cifs'})
|
response = request('service/restart', api_key, 'POST', {'service': 'cifs'})
|
||||||
else:
|
else:
|
||||||
logger.error('Dataset {} was NOT unlocked successfully'.format(dataset['name']))
|
logger.error('Dataset {} was NOT unlocked successfully'.format(dataset['name']))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user