summaryrefslogtreecommitdiff
path: root/lib/chef/knife/status.rb
Commit message (Collapse)AuthorAgeFilesLines
* Knife bootstrap options cleanupLamont Granquist2020-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have issue that are caused by old code before merging of hash values were done correctly. The `config` hash correctly merges all options and should always be used. Knife plugins should never touch Chef::Config[:knife] values (either reading or writing from them). The `knife_config` should be converted to the `config` hash since it directly accesses Chef::Config[:knife] values. The `config_value()` helper should no longer be used. Very clearly most people started to use that when they should just use the config hash directly. That was intended to be used only when a knife cli option was being renamed and the former configuration value needed to be used as well. It has been cargo culted around as the way to access config values, and that should really stop. The DataBagSecretOption mixin has been cleaned up so that the cli options read+write only to the config[:cl_secret] and config[:cl_secret_file] values. The config file values go into config[:secret] and config[:secret_file]. The fact that those are the merged values in the `config` hash doesn't matter since only the cli should be writing to the first two and only the config file should be writing to the latter two. I don't know why it was made so complicated to begin with, but if there's some hidden chef-11.early backcompat there, then chef-16 deliberately breaks that. The use of `locate_config_value` helpers in all knife plugins is also discouraged (but they all implement those themselves), just use the config hash, which has the correct hash merge ordering. All of those need to be deleted. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Update knife status --long to use cloud attributes not ec2 specific attributesstatus_done_rightTim Smith2020-01-281-2/+2
| | | | | | This way we get the public IP / hostname on Azure, GCE, DigitalOcean, Softlayer, etc. Signed-off-by: Tim Smith <tsmith@chef.io>
* more distro constants for "Chef"Marc Chamberland2019-05-231-1/+2
| | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* fix a bunch of weirdly mangled require linesLamont Granquist2019-05-081-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-081-4/+4
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove deprecated knife status --hide-healthy flaghide_healthyTim Smith2018-10-291-13/+0
| | | | | | We've been telling people this was going away in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io>
* Make sure knife descriptions all have periodsknife_sentences_2Tim Smith2018-07-161-1/+1
| | | | | | Some did. Some didn't. Looks weird that way. Signed-off-by: Tim Smith <tsmith@chef.io>
* fix Style/HashSyntaxLamont Granquist2018-07-021-11/+11
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* chefstyle Style/AndOr fixesLamont Granquist2016-03-141-2/+2
| | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* auto fixing some rubocopsLamont Granquist2016-02-091-1/+1
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-4/+4
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-2/+2
| | | | useless use of `"#{foo.to_s}"`
* Bring back -H/--hide-healthy for back-compatJeff Blaine2015-10-241-1/+13
| | | | Deprecates -H/--hide-healthy instead of removing it.
* Changes --hide-healthy to --hide-by-mins MINSJeff Blaine2015-10-241-6/+7
| | | | | | | | | | | | | | | | | | | Fixes #3679 Reasoning: The definition of "healthy" is overloaded in the old form (--hide-healthy) to be "a host that has run chef". The code makes no check to determine if the chef run was successful, so it has the capability to provide false positives for "health". Just because a node object was saved with ohai_time set doesn't mean the Chef run was successful. There are exception handlers like lastrun that intentionally save the node object on exception. The previous 1 hour hardcoded time was totally arbitrary. Perhaps "healthy" to others means "nodes that have run chef in the last 4 hours" (or 30 minutes, or 3 days...).
* explicitly require node presentertm/fix_presenter_includeThom May2015-04-131-0/+1
|
* use partial searchThom May2015-04-081-1/+12
|
* Ensure valid lucene queriesThom May2015-03-161-2/+4
|
* Allow knife status to filter by environmentThom May2015-03-121-7/+18
| | | | This closes #3031 and also fixes a bug in handling custom queries
* Add JSON output to knife status commandNicolas Dupeux2014-10-061-58/+11
| | | | the status subcommand now honor the common option --format
* Removed the redundant comma and space from run_list.Iulia Banghea2013-10-101-1/+1
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+119
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!