Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rentable_by filter #1204

Merged
merged 2 commits into from
Sep 23, 2024
Merged

Conversation

Omarabdul3ziz
Copy link
Contributor

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstring

@@ -141,7 +141,8 @@ type NodeFilter struct {
OwnedBy *uint64 `schema:"owned_by,omitempty"`
Rented *bool `schema:"rented,omitempty"`
RentedBy *uint64 `schema:"rented_by,omitempty"`
AvailableFor *uint64 `schema:"available_for,omitempty"`
RentableBy *uint64 `schema:"rentable_by,omitempty"` // rented by twin or rentable
Copy link
Contributor

Choose a reason for hiding this comment

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

RentedBy instead of RentableBy no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rentedby is already a functional filter returns all the nodes rented by a specific twin.
rentableby is a new filter that should return all the nodes rented by a specific twin + all the nodes available to rent

Copy link
Contributor Author

@Omarabdul3ziz Omarabdul3ziz Sep 18, 2024

Choose a reason for hiding this comment

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

rentedby is already a functional filter returns all the nodes rented by a specific twin.
rentableby is a new filter that should return all the nodes rented by a specific twin + all the nodes available to rent. somehow combining rentable and rentedby

Copy link
Contributor

Choose a reason for hiding this comment

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

How is that different from AvailableFor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

available_for returns the nodes rented by a twin id + the shared nodes. (available to deploy on)
rentable_for returns the nodes rented by a twin id + the rentable nodes. (rented or available to rent)

Copy link
Contributor

Choose a reason for hiding this comment

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

Tb bos :D let's make it rentable_or_rented_by :D

@Omarabdul3ziz Omarabdul3ziz merged commit ed885b4 into development Sep 23, 2024
39 checks passed
@Omarabdul3ziz Omarabdul3ziz deleted the development_proxy_rentable_by_filter branch September 23, 2024 15:16
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.

3 participants