-
Notifications
You must be signed in to change notification settings - Fork 495
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
(FACT-2728) Added hypervisors fact for Solaris #2045
Conversation
c077717
to
ed772db
Compare
end | ||
|
||
def resolve(key) | ||
Facter::Resolvers::Solaris::Ldom.resolve(key) |
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 think you can replace this with something like:
%i[
chassis_serial control_domain domain_name
domain_uuid role_control role_io role_root role_service
].map! { |key| [key, Facter::Resolvers::Solaris::Ldom.resolve(key)] }.to_h
{ | ||
brand: current_zone[:brand], | ||
id: current_zone[:id], | ||
ip_type: current_zone[:iptype], | ||
name: current_zone[:name], | ||
uuid: current_zone[:uuid] | ||
} |
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.
Alternatively yo this you could also use Hash#select or something similar to keep only the needed keys.
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 problem here is that one key (ip_type) needs to be changed, so no general rule to map keys would work.
CLA signed by all contributors. |
ed772db
to
9c36e5c
Compare
9c36e5c
to
f34a74f
Compare
No description provided.