Enable StorageProvider auto-selection on StorageClient API #5

Closed
opened 2025-09-23 20:52:26 +00:00 by CoreRasurae · 0 comments
Member

Currently list_files(), file_exists(), get_file_size(), get_file_metadata(), read_file(), write_file(), create_directory() and delete_directory() only work with the StorageClient pre-assigned StorageProviderInterface instance. However sometimes it would be handy if all those file operations could auto-select the provider if the pre-assigned one is not appropriate for the targeted file system.

Tasks to be done:

  • Modify the StorageClient (client.py) so that it can automatically check if the provider is suitable or not to handle the targeted file system and if not, temporarily instantiate a suitable provider if available, or default to the pre-assigned one, if no suitable provider exists.
  • Make sure to close existing connections if required on failure, or exit
  • Update the unit tests if required to keep the desired coverage of 85%

Definition of done:

  • Show that the StorageClient can now handle different file systems, other than the supported by the pre-assigned provider
  • Show that the unit tests coverage is at least 85%
Currently list_files(), file_exists(), get_file_size(), get_file_metadata(), read_file(), write_file(), create_directory() and delete_directory() only work with the StorageClient pre-assigned StorageProviderInterface instance. However sometimes it would be handy if all those file operations could auto-select the provider if the pre-assigned one is not appropriate for the targeted file system. Tasks to be done: - Modify the StorageClient (client.py) so that it can automatically check if the provider is suitable or not to handle the targeted file system and if not, temporarily instantiate a suitable provider if available, or default to the pre-assigned one, if no suitable provider exists. - Make sure to close existing connections if required on failure, or exit - Update the unit tests if required to keep the desired coverage of 85% Definition of done: - Show that the StorageClient can now handle different file systems, other than the supported by the pre-assigned provider - Show that the unit tests coverage is at least 85%
CoreRasurae added the
State
Unverified
Priority
Backlog
Type
Feature
labels 2025-09-23 20:52:55 +00:00
CoreRasurae added
State
Verified
Priority
Critical
Points
8
and removed
State
Unverified
Priority
Backlog
labels 2025-09-24 10:42:38 +00:00
CoreRasurae added this to the Sprint Sep 15th - 28th project 2025-09-24 10:42:47 +00:00
CoreRasurae self-assigned this 2025-09-24 10:42:48 +00:00
CoreRasurae added
State
In Progress
and removed
State
Verified
labels 2025-09-24 10:43:02 +00:00
CoreRasurae added
State
In Review
and removed
State
In Progress
labels 2025-09-24 18:12:54 +00:00
CoreRasurae added this to the v0.1 milestone 2025-09-24 18:28:38 +00:00
CoreRasurae added
State
Completed
and removed
State
In Review
labels 2025-09-29 20:30:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Blocks
You do not have permission to read 1 dependency
Reference: cleverlibre/clevercloud-storage#5