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

(FACT-2218) virtual fact for OSX #1945

Merged
merged 9 commits into from
Jun 30, 2020
Merged

(FACT-2218) virtual fact for OSX #1945

merged 9 commits into from
Jun 30, 2020

Conversation

BogdanIrimie
Copy link
Contributor

@BogdanIrimie BogdanIrimie commented Jun 29, 2020

Added virtual fact. Refactored system_profiler resolver so it only reads partial data.

@BogdanIrimie BogdanIrimie added the enhancement New feature or enhancement label Jun 29, 2020
@BogdanIrimie BogdanIrimie marked this pull request as ready for review June 29, 2020 15:09
@BogdanIrimie BogdanIrimie requested review from a team June 29, 2020 15:09
@puppetcla
Copy link

CLA signed by all contributors.


def check_parallels
subsystem_vendor_id = Facter::Resolvers::Macosx::SystemProfiler.resolve(:subsystem_vendor_id)
return 'parallels' if subsystem_vendor_id&.start_with?('0x1ab8')
Copy link
Contributor

Choose a reason for hiding this comment

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

Is 0x1ab8 constant? Won't it change on other versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a constant used since Facter 2.x

result = "parallels" if output["spethernet_subsystem-vendor-id"] =~ /0x1ab8/

It is the same for Facter 3.x

if (line == "Subsystem Vendor ID: 0x1ab8") {

@oanatmaria oanatmaria merged commit 8a3accd into 4.x Jun 30, 2020
@BogdanIrimie BogdanIrimie deleted the FACT-2218 branch July 9, 2020 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants