Skip to content

Comments

Implement ListStorageSpaces call#20

Open
rawe0 wants to merge 1 commit intomainfrom
list-storage-space
Open

Implement ListStorageSpaces call#20
rawe0 wants to merge 1 commit intomainfrom
list-storage-space

Conversation

@rawe0
Copy link
Member

@rawe0 rawe0 commented Feb 23, 2026

This PR implements the ListStorageSpaces call and the create filter class method that is needed.

@rawe0 rawe0 force-pushed the list-storage-space branch 2 times, most recently from 4f42ff3 to 7ad1be0 Compare February 23, 2026 14:55
@rawe0 rawe0 marked this pull request as ready for review February 23, 2026 15:04
Create a filter for listing storage spaces.

:param filter_value: Value of the filter.
:param filter_type: Type of the filter. Supported values are "ID", "OWNER", "SPACE_TYPE", "PATH" and "USER".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use a literal (with the possible values) instead of a string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like an enum you mean? I think this is simpler because then we don't need to import this enum when calling the method.

I have thought about using the filters directly as inputs but then we would have to import the cs3apis when calling the functions which I don't like, I prefer to decouple this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also having exactly these values allows me to do this:

filter_type_value = cs3spp.ListStorageSpacesRequest.Filter.Type.Value(filter_type)

@rawe0 rawe0 force-pushed the list-storage-space branch from 7ad1be0 to bd54158 Compare February 24, 2026 10:40
@rawe0
Copy link
Member Author

rawe0 commented Feb 24, 2026

I noticed the comments were wrong, and also changed it so we get an error instead of None when no correct filter_type is provided.

@rawe0 rawe0 requested a review from diocas February 24, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants