summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* make linux/network.rb define collect_data(:linux)linux-networkClaire McQuin2014-01-072-1/+2
|
* Merge pull request #256 from opscode/kernel-plugin-fixClaire McQuin2014-01-072-2/+24
|\ | | | | Fix kernel[:modules] on :darwin
| * add kernel kextstat -k -l output to test kernel/modules in darwin/kernel.rbClaire McQuin2014-01-071-1/+23
| |
| * The kernel plugin now sets the kernel/modules attribute on the :darwin platformClaire McQuin2014-01-021-1/+1
| |
* | Merge pull request #258 from opscode/lcg/catch-chef-loaderrorlamont-granquist2014-01-061-3/+10
|\ \ | | | | | | catch and ignore failure to load chef
| * | add comment on why rescue'ingLamont Granquist2014-01-061-0/+3
| | |
| * | catch and ignore failure to load chefLamont Granquist2014-01-061-3/+7
| | | | | | | | | | | | | | | | | | | | | if chef version is 11.8.2 and it pins ohai to <~ 6.0, then if we install ohai 7, the chef plugin will attempt to load chef up and then will puke hard since ohai 7 is already loaded. this just skips chef version detection if that dependency resolution problem occurs.
* | | Merge pull request #259 from opscode/lcg/move-default-log-to-stderrlamont-granquist2014-01-061-5/+5
|\ \ \ | |/ / |/| | send log output to STDERR by default
| * | send log output to STDERR by defaultLamont Granquist2014-01-061-5/+5
|/ / | | | | | | | | mixing up JSON output with STDOUT warnings and errors is guaranteed to annoy all the people.
* | Merge branch 'one-plugin-per-class'danielsdeleo2014-01-022-55/+137
|\ \ | |/ |/|
| * Evaluate all plugin files before instatiating plugin objectsdanielsdeleo2014-01-022-55/+137
|/ | | | | | | | The previous logic instantiated plugins as the files were read. This caused multiple instances of plugins to be created when a plugin is "reopened" in another file. Additionally, loading-specific logic is moved from System to Loader.
* Merge branch 'cli-run-mode'danielsdeleo2014-01-021-2/+3
|\
| * Pass user-requested attributes from CLI to whitelistcli-run-modedanielsdeleo2014-01-021-2/+3
|/ | | | | | | | | | This greatly speeds up running ohai from the command line when given a set of attributes to display (like `ohai ec2`). Prior to this patch, ohai would run all plugins and then filter out the data. With this patch, ohai only runs relevant plugins. As an unscientific test `bin/ohai network` on my laptop takes ~4s without this patch compared to ~1.1s with the patch.
* Merge branch 'ruby18-travis-workaround'danielsdeleo2014-01-021-1/+14
|\ | | | | | | See OHAI-545
| * Temporarily force rubygems 2.1.x for travisdanielsdeleo2014-01-021-1/+14
|/ | | | | This works around an incompatibility between bundler, rubygems 2.2.0, and ruby 1.8.7.
* Merge pull request #250 from opscode/OC-10250Claire McQuin2014-01-025-19/+140
|\ | | | | OC-10250
| * modify error messages, processing syntax error messagesClaire McQuin2013-12-202-19/+22
| |
| * tune syntax error message output, handle invalid plugin names that aren't ↵Claire McQuin2013-12-195-0/+53
| | | | | | | | syntax errors
| * rescue from syntax error in loaderClaire McQuin2013-12-192-16/+81
| |
* | Explicitly test dependency cycle detection for self-dependencydanielsdeleo2013-12-191-25/+48
| |
* | Remove Solaris2 DMI self-dependencydanielsdeleo2013-12-191-1/+0
| | | | | | | | | | | | | | In any case, this wasn't going to work, but may leave this plugin non-functional on Solaris2. We need to work out how a platform-specific collect_data block can call the default one when needed to make this plugin work correctly again.
* | Fix dependency cycle error explanation.danielsdeleo2013-12-192-2/+3
|/
* Merge pull request #240 from opscode/OC-9410Claire McQuin2013-12-185-34/+205
|\ | | | | when a plugin depends on an attribute that doesn't have a provider, look for providers in parent attribute(s) and pick those to run instead.
| * add methods for verifying and splitting attributes, fix behavior of ↵Claire McQuin2013-12-184-53/+116
| | | | | | | | find_closest_providers_for to look for a parent attribute that actually has providers, create new error Ohai::Exceptions::ProviderNotFound to indicate when an attribute exists in the mapping but doesn't have any listed providers
| * separate out different ways of gathering attribute providers into different ↵Claire McQuin2013-12-174-66/+97
| | | | | | | | methods
| * move lookup of parent providers for attributes from runner to provides_mapClaire McQuin2013-12-174-74/+65
| |
| * when a plugin depends on an attribute that doesn't have a provider, look for ↵Claire McQuin2013-12-172-4/+90
| | | | | | | | providers in parent attribute(s)
* | Merge pull request #245 from opscode/OC-10876Serdar Sutay2013-12-171-0/+23
|\ \ | |/ |/| Add spec test to check the platform specific collect_data check.
| * Add spec test to check the platform specific collect_data check.OC-10876sersut2013-12-171-0/+23
|/
* Merge pull request #242 from opscode/OC-10251Serdar Sutay2013-12-175-394/+341
|\ | | | | OC-10251: Comments and minor changes for Nitpicks
| * Remove the left over pry statements.OC-10251sersut2013-12-172-2/+2
| |
| * Handle AttributeNotFound exception correctly.sersut2013-12-174-4/+32
| |
| * Rewrite system specs with OHAI integration testing infra.sersut2013-12-175-401/+320
|/ | | | | | Refactor the runner class. Make sure require_plugin() checks v6 plugins first. Use partial paths as keys in the v6 dependency solver.
* Merge branch 'run-mode-option'danielsdeleo2013-12-164-10/+113
|\ | | | | | | | | Add whitelist attributes run mode option to Ohai::System API. Integrating with CLI will be done in a follow-up patch.
| * Add option to only run plugins providing requested attributesdanielsdeleo2013-12-164-10/+113
|/ | | | | | | | | * `Ohai::System#all_plugins` takes an option whitelist filter * `Ohai::ProvidesMap#find_providers_for` now finds all plugins at the specified nesting or deeper. For example, if a plugin provides "virtualization/networks" and no plugin provides "virtualization", then find_providers_for(["virtualization"]) would return `[nil]`. It now finds all providers deeper than the specified level in the map.
* Merge pull request #239 from opscode/OC-9924Serdar Sutay2013-12-1618-452/+594
|\ | | | | OC-9924 - Recursively search plugin_path directories for plugins
| * Disable one test which requires changes to require_plugin() which will be ↵OC-9924sersut2013-12-133-32/+17
| | | | | | | | done as a separate PR in order to keep this PR small.
| * Refactor hints to its own class.sersut2013-12-136-73/+199
| |
| * This PR includes a few refactorings. Since they are intertwined they are ↵sersut2013-12-1313-306/+275
| | | | | | | | | | | | | | | | | | | | done in a single PR :( 1-) VersionVI and VersionVII classes are moved to their own classes. 2-) VersionVII class only gets the data instead of full System object. 3-) A new integration testing infrastructure is started (similar to Chef integration tests). 4-) Loader code is refactored. 5-) New integration tests for Loader are added.
| * Move VersionVI and VersionVII plugin classes into their own files.sersut2013-12-128-119/+181
|/
* Merge pull request #236 from opscode/fix-windows-testsSeth Chisamore2013-12-051-4/+11
|\ | | | | Clean up `jenkins_run_tests.bat`
| * Clean up `jenkins_run_tests.bat`Seth Chisamore2013-12-051-4/+11
|/ | | | This change ensures the bat file is in sync with what we have in opscode/chef.
* Merge branch 'plugin-provider-cleanup'danielsdeleo2013-12-0412-220/+295
|\ | | | | | | Extract a class to maintain the provided attributes to providing plugins mapping
| * Remove no-longer-relevant "TODO"danielsdeleo2013-12-041-1/+0
| |
| * Rename variables/methods for ProvidesMap to provides_mapdanielsdeleo2013-12-049-40/+41
| | | | | | | | | | | | | | | | | | The name "attributes" to refer to the map of attributes<->plugins providing attributes was confusing because it was inaccurate and often used near a local variable named "attributes" containing a very different kind of data (such as an Array of strings referring to attributes another plugin depended on). Renaming to "provides_map" clears up the confusion.
| * Remove access to ProvidesMap internal data structuredanielsdeleo2013-12-044-28/+13
| | | | | | | | | | Only test code was accessing this, modified to use the public API of the class.
| * Extract ProvidesMap and tests to their own filesdanielsdeleo2013-12-046-211/+245
| | | | | | | | | | | | Also eliminates redundant tests in other classes that primarily test ProvidesMap behavior. Higher-level tests have been left in place to verify the interaction of the components.
| * Extract plugin<->provides mapping to custom classdanielsdeleo2013-12-045-72/+125
| | | | | | | | | | | | | | | | Code to map a plugin to the attributes it provides or look up a plugin by provided attributes was located in different parts of the code base where it operated directly on the underlying data structure. Extracting to a class lets us access the information we want using domain specific terminology so things are easier to understand.
| * Add support for :focus tests to spec helperdanielsdeleo2013-12-041-0/+4
| |
| * Fix warnings in DSL::Plugin specdanielsdeleo2013-12-041-12/+11
|/