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

Gather WPAR state in the AIX virtualization plugin #1576

Merged
merged 2 commits into from
Nov 18, 2020
Merged

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Nov 18, 2020

This is a pretty important bit of information on the wpar.

@tas50 tas50 requested review from a team as code owners November 18, 2020 22:37
@tas50 tas50 changed the title Gather WPAR state in the AIX virtualization plugin- Gather WPAR state in the AIX virtualization plugin Nov 18, 2020
Signed-off-by: Tim Smith <tsmith@chef.io>
This is an important thing to know about the wpars

Signed-off-by: Tim Smith <tsmith@chef.io>
if wpar_no.to_i > 0
virtualization[:wpar_no] = wpar_no
else
# the below parses the output of lswpar in the long format
so = shell_out("lswpar -L").stdout.scan(/={65}.*?(?:EXPORTED\n\n)+/m)
wpars = Mash.new
so.each do |wpar|
wpar_name = wpar.lines[1].split[0]
wpar_heading = wpar.lines[1].split
Copy link
Contributor

Choose a reason for hiding this comment

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

You could potentially simplify this a bit by using .split(" - ").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm a bit nervous about relying on particular space counts. I had it that way originally and then went back to this one.

@tas50 tas50 merged commit 6d7f25f into master Nov 18, 2020
@tas50 tas50 deleted the aix_virtualization branch November 18, 2020 23:39
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.

None yet

2 participants