-
Notifications
You must be signed in to change notification settings - Fork 896
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
[WIP] Discover ip address of the physical infra provider #15553
[WIP] Discover ip address of the physical infra provider #15553
Conversation
575b8da
to
d9d0ea6
Compare
d9d0ea6
to
e22aa0b
Compare
212fc6f
to
041874e
Compare
041874e
to
dafee24
Compare
Checked commits CharlleDaniel/manageiq@e22aa0b~...dafee24 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
|
||
def resolve_hostname(ipaddress, ems) | ||
ems.hostname = "https://#{Resolv.getname(ipaddress)}/" | ||
_log.info("EMS ID: #{ems.id}" + " Resolved hostname successfully.") |
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.
Can you put another print showing this method in action?
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.
@blomquisg Can we merge this PR? |
end | ||
|
||
def resolve_ip_address(hostname, ems) | ||
ems.ipaddress = Resolv.getaddress(hostname) |
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.
@agrare you had a PR recently that changed the refresh process to treat the EMS as a first class item in inventory parsing, right?
I think that would work better here than doing more parsing in the save_inventory
logic.
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.
@blomquisg yes #15252 added the ability to update the ems in save_ems_inventory
And ManageIQ/manageiq-providers-vmware#62 is an (unmerged 😉 😉) example of its use.
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.
ZING! (merged now)
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!
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.
Let's move the parsing of the IP and Hostname for the EMS back into the inventory parsing code.
@agrare can point to the right place to do that.
@CharlleDaniel I would add something like Fun fact you can update the |
Hi @blomquisg and @agrare, I agree with the sugestions, thanks for the review! I will work on it. 👍 |
@blomquisg, @agrare, @AndreyMenezes and @rodneyhbrown7 I close this PR because I open a new PR in the manageiq-provider. |
This PR is able to:
Discover the Ip address of the physical infra providers
After the refresh: