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 an orderBy filter to slcli vlan list #1599

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

caberos
Copy link
Contributor

@caberos caberos commented Mar 23, 2022

@edsonarios
Copy link
Contributor

Screenshots of the result
image

Copy link
Contributor

@edsonarios edsonarios left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Member

@allmightyspiff allmightyspiff left a comment

Choose a reason for hiding this comment

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

The only problem I have with this change is that it changes the default behavior of list_vlans from "Get all vlans in pages of 100" to "Get only 100 vlans", which I think will cause issues with some customers who have a lot of vlans.

I think we should default limit to None in the function definition and in the CLI argument list. So that if the user doesn't set a limit, they get all vlans back.
If a user does set a limit, they only get that number back.

Something like this:

 if limit > 0:
    return self.account.getNetworkVlans(mask=kwargs['mask'], filter=_filter.to_dict(), limit=limit)
else:
    self.account.getNetworkVlans(mask=kwargs['mask'], filter=_filter.to_dict(), iter=True)

@allmightyspiff allmightyspiff linked an issue Mar 24, 2022 that may be closed by this pull request
@allmightyspiff allmightyspiff merged commit d05b13d into softlayer:master Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add an orderBy filter to slcli vlan list
3 participants