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

Fixed minor issue in datacenter name lookup code #8505

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

prydin
Copy link
Contributor

@prydin prydin commented Dec 3, 2020

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Due to a spelling error in an if-statement, the code to resolve names of datacenters was called even when the name was known. This also caused a somewhat misleading debug message to be shown.

@sjwang90 sjwang90 added fix pr to fix corresponding bug area/vsphere labels Dec 3, 2020
@srebhan srebhan self-assigned this Dec 4, 2020
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Nice. As I cannot test, I take your word on it.

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 4, 2020
@@ -437,7 +437,7 @@ func (e *Endpoint) discover(ctx context.Context) error {
}

// Fill in datacenter names where available (no need to do it for Datacenters)
if res.name != "Datacenter" {
if res.name != "datacenter" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any value in making this comparison case insensitive, or is it always capitalized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It’s always capitalized. It’s just a key used internally in the code.

@reimda
Copy link
Contributor

reimda commented Dec 10, 2020

@prydin We'd like to merge this for the 1.17 release tomorrow. Could you respond to Steven's question about case sensitivity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vsphere fix pr to fix corresponding bug ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants