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

list pool: order subnets by priority #201

Merged

Conversation

zeromind
Copy link
Collaborator

@zeromind zeromind commented Feb 7, 2022

adjust the db model for Pool to return the list of subnets
sorted by priority, which prohbably is what a user expects in general

additionally, fix the test function assertDictSubset() to make sure msg is a string,
as it would sometimes fail, see #198

resolves #168

adjust the db model for `Pool` to return the list of subnets
sorted by priority, which prohbably is what a user expects in general

additionally, fix `assertDictSubset()` to make sure msg is a string,
as it would sometimes fail, see ionos-cloud#198
@zeromind zeromind added the bug Something isn't working label Feb 7, 2022
@zeromind zeromind requested a review from miesi February 7, 2022 18:22
@Srudush
Copy link
Contributor

Srudush commented Feb 8, 2022

We should merge this. It makes the output that much more stable.

test that `ndcli list pool` prints the subets ordered by priority

we already have pytests that assume them being ordered by priority
by the api, but make sure ndcli prints them like that
@zeromind zeromind marked this pull request as ready for review February 8, 2022 10:42
Copy link
Contributor

@miesi miesi left a comment

Choose a reason for hiding this comment

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

Great work. Looks correct to me. Please merge.

@Srudush Srudush merged commit 781faba into ionos-cloud:master Feb 9, 2022
@zeromind zeromind deleted the list_pool_sorted_subnets_by_priority branch February 9, 2022 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ndcli list pool does not sort list of subnet by priority
3 participants