-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix config validator for region in network client #956
base: master
Are you sure you want to change the base?
Conversation
Added region argument while creating network client for terraform validations
@snwzd Thank you for your contribution. |
Thank you @snwzd for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below. |
Hi, This pull request is regarding the fix for the issue issue that I am facing, please review it and tell me if there are any other changes that need to be made. |
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.
@snwzd thank you for the contribution. Only a minor nit below
networkingClient, err := clientFactory.Networking(func(opts gophercloud.EndpointOpts) gophercloud.EndpointOpts { | ||
opts.Region = infra.Spec.Region | ||
return opts | ||
}) |
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.
We already should have a function to do just that, so can you give it a try with:
networkingClient, err := clientFactory.Networking(openstackclient.WithRegion(infra.Spec.Region))
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.
Hi, I've updated that section
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.
@snwzd you need to run make generate
(according to the test results)
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.
I ran make generate, but it didn’t seem to make much changes. I think it removed the unused gophercloud import, which was the only noticeable change. (probably my editor missed it)
Updated region argument while creating network client for terraform validations
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.
/reviewed ok-to-test
Added region argument while creating network client for terraform validations
How to categorize this PR?
/area robustness
/kind bug
/platform openstack
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #955
Special notes for your reviewer:
While creating networking client for terraform validations, region is not being used as parameter for the function.