def list_shares(self, service): share_prefix = 'sharesample' + self.random_data.get_random_name(6) try: print('1. Create multiple shares with prefix: ', share_prefix) for i in range(5): service.create_share(share_name=share_prefix + str(i)) print('2. List shares') shares = service.list_shares() for share in shares: print(' Share name:' + share.name) except Exception as e: print(e) finally: print('3. Delete shares with prefix:' + share_prefix) for i in range(5): service.delete_share(share_prefix + str(i))