-
Notifications
You must be signed in to change notification settings - Fork 192
Refactor loadbal order-options #1521
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the command slcli lb order-options
works well, just the message displayed as an error looks weird.
Also, the output of the slcli lb order-options --datacenter <DC>
in the worked branch is the same output as the latest slcli
version shows, so looks like the table requirement mentioned in the issue, is not implemented. #1520
slcli lb order-options -d dal10
works fine, but should output 2 tables, instead of 1 table with a table in each column.Table 1 titled " Prices", Table 2 titled " Subnets Private Subnets"
Testing
- ✔️ slcli loadbal order-options
click.secho("ERROR: Use `slcli lb order-options --datacenter <DC>` " | ||
"to find pricing information and private subnets for that specific site.") | ||
|
||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a lot of logic below, maybe you can get a chance to move it and encapsulate it within the manager module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this logic is just table formatting, so I'm ok with it not being in a manager specifically, unless we want to use it in more than just this one command. Breaking it up into a few smaller sub-functions that return Table
objects would make this logic a bit more readable though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with my comments, I'd like to see a unit test specifically for this command with a location specified.
click.secho("ERROR: Use `slcli lb order-options --datacenter <DC>` " | ||
"to find pricing information and private subnets for that specific site.") | ||
|
||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this logic is just table formatting, so I'm ok with it not being in a manager specifically, unless we want to use it in more than just this one command. Breaking it up into a few smaller sub-functions that return Table
objects would make this logic a bit more readable though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to lowercase user input for datacenter here. Otherwise this looks great and ready to merge. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changes look good.
#1520