(FACT-2728) Added hypervisors fact for Solaris#2045
Merged
oanatmaria merged 1 commit intopuppetlabs:4.xfrom Aug 31, 2020
Merged
(FACT-2728) Added hypervisors fact for Solaris#2045oanatmaria merged 1 commit intopuppetlabs:4.xfrom
oanatmaria merged 1 commit intopuppetlabs:4.xfrom
Conversation
c077717 to
ed772db
Compare
gimmyxd
reviewed
Aug 25, 2020
| end | ||
|
|
||
| def resolve(key) | ||
| Facter::Resolvers::Solaris::Ldom.resolve(key) |
There was a problem hiding this comment.
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
Comment on lines
+28
to
+34
| { | ||
| 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.
Alternatively yo this you could also use Hash#select or something similar to keep only the needed keys.
Contributor
Author
There was a problem hiding this comment.
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
oanatmaria
reviewed
Aug 27, 2020
oanatmaria
reviewed
Aug 27, 2020
9c36e5c to
f34a74f
Compare
oanatmaria
approved these changes
Aug 31, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.