Skip to content

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

Merged
merged 4 commits into from
Aug 4, 2021
Merged

Conversation

caberos
Copy link
Contributor

@caberos caberos commented Jul 26, 2021

@allmightyspiff allmightyspiff linked an issue Jul 27, 2021 that may be closed by this pull request
Copy link
Contributor

@ATGE ATGE left a 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

image

  • slcli loadbal order-options -d dal13
    worked branch output:
    image
    slcli (SoftLayer Command-line) v5.9.6 output:
    image

click.secho("ERROR: Use `slcli lb order-options --datacenter <DC>` "
"to find pricing information and private subnets for that specific site.")

else:
Copy link
Contributor

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.

Copy link
Member

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.

@allmightyspiff allmightyspiff added CLI Ordering Anything related to ordering labels Aug 2, 2021
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.

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:
Copy link
Member

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.

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.

Make sure to lowercase user input for datacenter here. Otherwise this looks great and ready to merge. Thanks.

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.

Thanks, changes look good.

@allmightyspiff allmightyspiff merged commit 30a7eda into softlayer:master Aug 4, 2021
@allmightyspiff allmightyspiff mentioned this pull request Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Ordering Anything related to ordering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor loadbal order-options
3 participants