12345678910111213141516171819202122 |
- def run_all_samples(self, connection_string):
- print('Azure Storage File Basis samples - Starting.')
-
- #declare variables
- filename = 'filesample' + self.random_data.get_random_name(6)
- sharename = 'sharesample' + self.random_data.get_random_name(6)
-
- try:
- # Create an instance of ShareServiceClient
- service = ShareServiceClient.from_connection_string(conn_str=connection_string)
- print('\n\n* Basic file operations *\n')
- self.basic_file_operations(sharename, filename, service)
- except Exception as e:
- print('error:' + e)
- finally:
- # Delete all Azure Files created in this sample
- self.file_delete_samples(sharename, filename, service)
- print('\nAzure Storage File Basic samples - Completed.\n')
|