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

Detect Rackspace on Windows #1060

Merged
merged 2 commits into from
Oct 24, 2017
Merged

Detect Rackspace on Windows #1060

merged 2 commits into from
Oct 24, 2017

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Sep 19, 2017

This uses the same method we previously used on EC2. It won't poll any data since that requires the xen cli tools, but it will show up as being on rackspace, which is an important first step.

@tas50 tas50 requested a review from a team September 19, 2017 23:55
Copy link
Contributor

@coderanger coderanger left a comment

Choose a reason for hiding this comment

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

With that one thing fixed, looks good.

if wmi.first_of("Win32_ComputerSystem")["PrimaryOwnerName"] == "Rackspace"
Ohai::Log.debug("Plugin Rackspace: has_rackspace_manufacturer? == true")
return true
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Should have a final false for good measure :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nil evals perfectly here and this is the same pattern we're using in all our other methods

@tas50 tas50 changed the title WIP: Detect Rackspace on Windows Detect Rackspace on Windows Oct 24, 2017
This uses the same method we previously used on EC2. It won't poll any data since that requires the xen cli tools, but it will show up as being on rackspace, which is an important first step.

Signed-off-by: Tim Smith <tsmith@chef.io>
All we have is the main rackspace attribute and since we're checking
ruby versions in the method we can't really mock out the wmi stuff.

Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 merged commit aee837b into master Oct 24, 2017
@tas50 tas50 deleted the rackspace_windows branch January 30, 2018 00:44
@chef chef locked and limited conversation to collaborators Mar 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants