summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 16.7.29 by Chef Expeditorv16.7.29Chef Expeditor2020-11-181-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #1575 from chef/aix_kernelTim Smith2020-11-181-2/+2
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Just set the aix platform / platform_family directlyTim Smith2020-11-181-2/+2
| | | | | | | | | | | | If we're in a collect block for aix then we're on aix. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Bump version to 16.7.28 by Chef Expeditorv16.7.28Chef Expeditor2020-11-181-1/+1
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Merge pull request #1574 from chef/aix_kernelTim Smith2020-11-181-4/+6
|\ \ | |/ | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Avoid calling uname 4 times on aixTim Smith2020-11-181-4/+6
| | | | | | | | | | | | Just get all the data we need and then split it. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Bump version to 16.7.27 by Chef Expeditorv16.7.27Chef Expeditor2020-11-181-1/+1
|/ | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #1573 from chef/more_aix_networkTim Smith2020-11-181-7/+5
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Avoid running the regex for each lineTim Smith2020-11-181-6/+4
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Convert shellouts to grep to use regexes in Ruby insteadTim Smith2020-11-181-1/+1
| | | | | | | | | | | | This is significantly faster and having all the data in the specs makes it easier to refactor this later without having access to an AIX system. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Don't try to create the arp mash once each lineTim Smith2020-11-181-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Bump version to 16.7.26 by Chef Expeditorv16.7.26Chef Expeditor2020-11-181-1/+1
|/ | | | Obvious fix; these changes are the result of automation not creative thinking.
* Simplify how we gather memory on AIXTim Smith2020-11-181-3/+3
| | | | | | The grep needs to get refactored away, but at least this way we avoid doing math on all the values we gather. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.25 by Chef Expeditorv16.7.25Chef Expeditor2020-11-181-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Use each_slice to further simplify key/value parsingTim Smith2020-11-181-3/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* lin -> line variableTim Smith2020-11-181-8/+8
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Collapse down some shellout uses to avoid setting variablesTim Smith2020-11-181-4/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Update the provides for this plugin to match other network pluginsTim Smith2020-11-181-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Update lib/ohai/plugins/aix/network.rb Tim Smith2020-11-181-1/+1
| | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Avoid setting the addresses mash twiceTim Smith2020-11-181-2/+1
| | | | | | Just do it at the top of things Signed-off-by: Tim Smith <tsmith@chef.io>
* Refactor how we parse ifconfig in AIXTim Smith2020-11-181-28/+27
| | | | | | | | | | | There's a few different things going on here. - more descriptive variable names. Variables like splat were not very useful and others like iface actually held more than 1 value - replace a gsub and split with just a split on a regex from @phiggins - avoid the whole weird splat thing and ranges and instead just split each interface into the name and all the data. This makes the variables more clear when we use them throughout - avoid some positional math and just use shift to simply pop off the leading values to build the mash Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.24 by Chef Expeditorv16.7.24Chef Expeditor2020-11-181-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.7.23 by Chef Expeditorv16.7.23Chef Expeditor2020-11-181-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Remove the :Joyent plugin as Joyent cloud went EOL 11/2019joyentTim Smith2020-11-171-78/+0
| | | | | | | | There's no reason to execute this plugin on every Ohai run. The Cloud is EOL. https://docs.joyent.com/joyent-public-cloud-eol/faq Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.22 by Chef Expeditorv16.7.22Chef Expeditor2020-11-181-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Simplify all our splitsTim Smith2020-11-176-10/+10
| | | | | | | As Pete pointed out there's no need to split on whitespace when that's the default Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.21 by Chef Expeditorv16.7.21Chef Expeditor2020-11-181-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Update lib/ohai/plugins/aix/network.rb Tim Smith2020-11-171-1/+1
| | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
* Further optimize the netstat -rn parsingTim Smith2020-11-171-9/+7
| | | | | | This is up to 2x faster than the previous implementation Signed-off-by: Tim Smith <tsmith@chef.io>
* Fixes for test failuresTim Smith2020-11-171-2/+3
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Use .each_line vs. .lines.eachTim Smith2020-11-171-6/+6
| | | | | | This uses 2% less memory in my benchmarks Signed-off-by: Tim Smith <tsmith@chef.io>
* Use pure ruby vs. shelling out to grep to parse netstat dataTim Smith2020-11-171-7/+7
| | | | | | | | | | | Besides avoiding potentially pathing issues with grep this is faster: ``` Comparison: pure_ruby: 55.9 i/s grep: 41.6 i/s - 1.34x (± 0.00) slower ``` Signed-off-by: Tim Smith <tsmith@chef.io>
* Don't set network[:interfaces] to an empty mash when we set it laterTim Smith2020-11-171-1/+0
| | | | | | Avoid setting this twice. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.20 by Chef Expeditorv16.7.20Chef Expeditor2020-11-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.7.19 by Chef Expeditorv16.7.19Chef Expeditor2020-11-161-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.7.18 by Chef Expeditorv16.7.18Chef Expeditor2020-11-071-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Bump version to 16.7.17 by Chef Expeditorv16.7.17Chef Expeditor2020-11-071-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #1561 from chef/lsbTim Smith2020-11-061-4/+4
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Remove the line anchor from the LSB plugin matcheslsbTim Smith2020-11-061-4/+4
| | | | | | | | | | | | These are 1 line at a time matches and we want everything until the end. There's no point in doing it this way. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #1562 from chef/remove_legacy_lsbTim Smith2020-11-061-15/+1
|\ \ | | | | | | Remove Linux LSB support for systems without lsb-release CLI
| * | Remove Linux LSB support for systems with lsb-release CLIremove_legacy_lsbTim Smith2020-11-061-15/+1
| |/ | | | | | | | | | | This was something we did for legacy Debian < 7. Seems like we're good to nuke this at this point since we don't ship on anything less than 9 now. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Bump version to 16.7.16 by Chef Expeditorv16.7.16Chef Expeditor2020-11-071-1/+1
| | | | | | | | Obvious fix; these changes are the result of automation not creative thinking.
* | Remove regex anchors in the Linux Memory pluginmore_anchorsTim Smith2020-11-061-36/+36
|/ | | | | | | We're trying to match all everything here so we don't care about the end of the line. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.15 by Chef Expeditorv16.7.15Chef Expeditor2020-11-071-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Update lib/ohai/plugins/linux/hostnamectl.rb Tim Smith2020-11-061-1/+1
| | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
* Update lib/ohai/plugins/linux/hostnamectl.rb Tim Smith2020-11-061-1/+1
| | | | | | | TIL you can limit the split. Thanks @ziggythehamster Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: Keith Gable <ziggy@ignition-project.com>
* Fix parsing of hostnamectl to support values with colonsfix_hostnamectlTim Smith2020-11-061-2/+2
| | | | | | This is probably faster too since we don't have to lstrip each result. Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump version to 16.7.14 by Chef Expeditorv16.7.14Chef Expeditor2020-11-061-1/+1
| | | | Obvious fix; these changes are the result of automation not creative thinking.
* Merge pull request #1558 from chef/speedupTim Smith2020-11-063-9/+3
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Collapse duplicate branches in case statementsTim Smith2020-11-063-9/+3
| | | | | | | | | | | | Simpler case statements Signed-off-by: Tim Smith <tsmith@chef.io>