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

Adding support for Wind River Linux in support of Cisco devices #33

Merged
merged 2 commits into from
Dec 4, 2015

Conversation

adamleff
Copy link
Contributor

@adamleff adamleff commented Dec 3, 2015

Wind River Linux is the underlying OS for Cisco Nexus and IOS-XR
devices, and is essentially a Red Hat variant. These changes allow
train to connect to these devices and run commands properly.

Wind River Linux is the underlying OS for Cisco Nexus and IOS-XR
devices, and is essentially a Red Hat variant.  These changes allow
train to connect to these devices and run commands properly.
@chris-rock
Copy link
Contributor

Hi Adam, thank you very much for this great addition. Do you think it may be possible to reuse the redhatish_platform & redhatish_version like https://github.com/chef/train/blob/adamleff/wrl-support/lib/train/extras/os_detect_linux.rb#L115?

@adamleff
Copy link
Contributor Author

adamleff commented Dec 3, 2015

Good afternoon, @chris-rock!

Wind River Linux is like RH in functionality, but in terms of how it describes itself name/version-wise, it's not that similar. The os-release (and subsequent cisco-release file, if present) are in a multi-line but parseable format, and those files are customized by Cisco, as well.

So, redhatish_platform and redhatish_version doesn't make sense to use here. This is why we used a similar technique in Ohai to detect the platform, platform_family, and platform_version for WRL rather than the "platformish" methods in Ohai as well:

https://github.com/chef/ohai/blob/master/lib/ohai/plugins/linux/platform.rb#L38-L45
https://github.com/chef/ohai/blob/master/lib/ohai/plugins/linux/platform.rb#L54-L64
https://github.com/chef/ohai/blob/master/lib/ohai/plugins/linux/platform.rb#L145-L159

@arlimus
Copy link
Contributor

arlimus commented Dec 3, 2015

Let's replicate the Ohai approach here; I originaly left out that code piece because we didn't test for Cisco yet. Love to get it back in!

os-release file fetching/parsing. Started unit tests for
detect_linux_via_config and related methods.
@adamleff
Copy link
Contributor Author

adamleff commented Dec 3, 2015

@chris-rock / @arlimus - check out the latest commit I just pushed and tell me what you think, please! I started the unit test for os_detect_linux but did not do all of it. I can certainly help write that coverage if needed but I figured a start is better than nothing, and I made sure to 100% cover the changes I was making.

Also test/unit/transports/local_test.rb was changed simply because minitest+mocha will complain for any object named "mock" so I had to change that to avoid a minitest failure.

@chris-rock
Copy link
Contributor

@adamleff looks very good from my side!

@arlimus
Copy link
Contributor

arlimus commented Dec 4, 2015

Really love the added tests, thank you so uch for all of it!!
A lot of improvements + Wind River Linux as a bonus ;)
Thank you @adamleff !
Cheers @chris-rock for the review 👍

arlimus added a commit that referenced this pull request Dec 4, 2015
Adding support for Wind River Linux in support of Cisco devices
@arlimus arlimus merged commit 8dd1acf into master Dec 4, 2015
@arlimus arlimus deleted the adamleff/wrl-support branch December 4, 2015 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants