added the api_key variable for the service calls

This commit is contained in:
2020-09-24 09:59:15 -04:00
parent e4a0310191
commit 00c678f63e

View File

@@ -236,9 +236,9 @@ if __name__ == '__main__':
logger.info('Dataset {} was unlocked successfully'.format(dataset['name']))
# restart services since the dataset was unlocked
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')
response = request('service/restart', 'POST', {'service': 'cifs'})
response = request('service/restart', api_key, 'POST', {'service': 'cifs'})
else:
logger.error('Dataset {} was NOT unlocked successfully'.format(dataset['name']))
else: