summaryrefslogtreecommitdiff
path: root/lib/chef/knife/core
Commit message (Collapse)AuthorAgeFilesLines
* Fix up knife loggingtm/investigate_loggingThom May2018-04-111-1/+5
| | | | | | | ensure that trace level is selectable if necessary via -VVV Pass the correct object to net/ssh Signed-off-by: Thom May <thom@chef.io>
* mechanical conversion of most debug log statements to traceThom May2018-03-261-1/+1
| | | | Signed-off-by: Thom May <thom@chef.io>
* Update status lineChibuikem Amaechi2018-01-231-22/+22
| | | | Signed-off-by: Chibuikem Amaechi <cramaechi@me.com>
* Update error handling for "knife status" #3287Chibuikem Amaechi2018-01-231-0/+5
| | | | | | | | | | | If a node object's ohai_time value is "nil" then the calculated time-since-last-run value is incorrect because the "nil" gets converted to integer "0". "knife status" should signal an error when a node's ohai_time value is nil. Signed-off-by: Chibuikem Amaechi <cramaechi@me.com>
* Fix IndentationChibuikem Amaechi2018-01-111-4/+4
| | | | Signed-off-by: Chibuikem Amaechi <cramaechi@me.com>
* Fix knife status to show seconds when needed #5055Chibuikem Amaechi2018-01-101-2/+6
| | | | | | | | | | | | | When a node.save operation is executed and a "knife status" is immediately executed I get "xx minutes" instead of "xx seconds". The code behind 'knife status' isn't designed to have the ability to format the time difference in seconds. To remediate issue, make sure there is a condition in place to format the time difference in seconds when appropriate. Signed-off-by: Chibuikem Amaechi <cramaechi@me.com>
* Update the knife editor error message to point to the correct documentnew_knife_docTim Smith2018-01-021-1/+1
| | | | | | I updated the structure of the knife documentation a while back and we have a dedicated doc for setting up knife now. Signed-off-by: Tim Smith <tsmith@chef.io>
* Escape single-quoted strings from the contextAllan Espinosa2017-12-201-1/+1
| | | | | | Fixes #6680 Signed-off-by: Allan Espinosa <aespinosa33@bloomberg.net>
* Link to the knife docs in both places where we error on editorknife_docTim Smith2017-08-291-1/+1
| | | | | | We're already doing this same thing in the other location where we throw the editor error. Signed-off-by: Tim Smith <tsmith@chef.io>
* avoid mutation attempt of node['platform']Jeremy J. Miller2017-07-171-1/+1
| | | | | | | | | | | Fixes https://github.com/chef/chef/issues/6277 Added `node['platform']` and `node['platform_version']` attributes in the unit tests to trigger a "can't modify frozen String" error. Fixed by doing shallow copy of `node['platform']` on assignment. Signed-off-by: Jeremy J. Miller <jm@chef.io>
* If we don't have a run_list, don't send ittm/fix-policy-bootstrapThom May2017-07-051-0/+1
| | | | | | | | This should help bootstrapping with policies Fixes: #5353 Signed-off-by: Thom May <thom@chef.io>
* remove now-unnecessary fileLamont Granquist2017-04-021-69/+0
| | | | | | forgot to clean this up Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: remove deprecated knife subcommand APIsLamont Granquist2017-04-011-32/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Kill JSON auto inflate with firetm/remove_json_autoinflateThom May2017-03-141-2/+1
| | | | Signed-off-by: Thom May <thom@chef.io>
* Require chef/version when trying to read iter-478/fips_bootstrapTyler Ball2017-02-231-7/+8
| | | | | | | | | | | | | | | | When a node is bootstrapped in FIPS mode and then tries to run a chef-client run it gets the following error: ``` STDERR: /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/chef-config-12.18.31/lib/chef-config/workstation_config_loader.rb:163:in `rescue in apply_config': You have an error in your config file /var/opt/delivery/workspace/.chef/knife.rb (ChefConfig::ConfigurationError) NameError: uninitialized constant Chef /var/opt/delivery/workspace/.chef/knife.rb:2:in `eval' /var/opt/delivery/workspace/.chef/knife.rb:2:in `eval' /var/opt/delivery/workspace/.chef/knife.rb:2:in `from_string' ``` Signed-off-by: tyler-ball <tyleraball@gmail.com>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-134-29/+23
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/DefWithParenthesesLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/SelfAssignmentLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5502 from ↵Bryan McLellan2016-11-231-1/+25
|\ | | | | | | | | MsysTechnologiesllc/dheeraj/configurable_log_details Knife Bootstrap: Passing config_log_level and config_log_location from config.rb
| * Added specs for config_log_locationdheerajd-msys2016-11-221-7/+5
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * Handling remaining values of config_log_locationdheerajd-msys2016-11-181-2/+27
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * Passing config_log_level and config_log_location in client.rb and fixed ↵dheerajd-msys2016-11-091-1/+2
| | | | | | | | | | | | specs failure Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-162-4/+4
|/ | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
* Add the `--field-separator` flag to knife show commandsTom Duffield2016-10-281-1/+13
| | | | | | | | | | | | | For the commands that allow you to filter which attributes it shows you using the `--attribute` flag, add the `--field-separator` flag to allow the user to customize which character(s) they want to use to deliniate the attribute hierarchy. ```shell knife node show NODE -S: -a "packages:Chef Client v12.12.15" ``` Signed-off-by: Tom Duffield <tom@chef.io>
* Make includers of MultiAttributeReturnOption consistentTom Duffield2016-10-281-3/+5
| | | | | | | | Make all the Knife subcommands that include `Chef::Knife::Core::AttributeReturnOption` consistent in how they handle attributes. Signed-off-by: Tom Duffield <tom@chef.io>
* add another spec for chef_environmentLamont Granquist2016-09-201-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix method_access and array handling in node presenterLamont Granquist2016-09-201-16/+12
| | | | 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>
* autofixing Style/MultilineIfThen copLamont Granquist2016-08-161-1/+1
|
* Merge pull request #4059 from yossigo/bootstrap_proxy_authLamont Granquist2016-08-021-0/+10
|\ | | | | Add bootstrap proxy authentication support.
| * Add bootstrap proxy authentication support.Yossi Gottlieb2015-10-141-0/+10
| |
* | correct typo in knife bootstrap contextAndre Elizondo2016-06-231-1/+1
| | | | | | We want client_d, not cliend_d
* | Merge pull request #4670 from tas50/knife_wording-3Tim Smith2016-03-232-2/+2
|\ \ | | | | | | Improve wording in Knife
| * | Single space after periodsTim Smith2016-03-052-2/+2
| | | | | | | | | | | | | | | Double spacing is for typewriters. Knife doesn't run on typewriters http://www.writersdigest.com/online-editor/how-many-spaces-after-a-period
* | | Merge pull request #4707 from chef/lcg/useless-assignmentLamont Granquist2016-03-151-1/+1
|\ \ \ | | | | | | | | fix some UselessAssignment cases
| * | | fix some UselessAssignment caseslcg/useless-assignmentLamont Granquist2016-03-141-1/+1
| | | |
* | | | chefstyle Style/AndOr fixesLamont Granquist2016-03-144-4/+4
|/ / / | | | | | | | | | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* | | s/escape_glob/escape_glob_dir/lcg/fix-escape-globLamont Granquist2016-03-104-9/+9
|/ / | | | | | | | | Removes all remaining references to the deprecated escape_glob helper routine.
* | Merge pull request #4617 from chef/lcg/chefstyle-perfLamont Granquist2016-03-042-3/+4
|\ \ | | | | | | Autofixing new Perf cops in 0.37.2
| * | Autofixing new Perf cops in 0.37.2Lamont Granquist2016-02-232-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6 Performance/Casecmp 18 Performance/Detect 1 Performance/RangeInclude 27 Performance/RedundantBlockCall 6 Performance/RedundantMatch 5 Performance/RedundantMerge 18 Performance/StringReplacement
* | | Adding specs for rehash updatetyler-ball2016-03-041-2/+3
| | |
* | | Changing the knife behavior when using the cached plugins to only display 1 ↵tyler-ball2016-03-041-3/+21
| | | | | | | | | | | | error message when plugin files are missing from the cache
* | | First part of fixing the rehash command, it now always loads gems from disc ↵tyler-ball2016-03-041-0/+6
| | | | | | | | | | | | instead of using the hash file
* | | Merge pull request #4630 from chef/ksubrama/fips_guardKartik Null Cating-Subramanian2016-02-261-1/+7
|\ \ \ | | | | | | | | Have client.rb verify that FIPS mode can be enforced
| * | | Have client.rb verify that FIPS mode can be enforcedksubrama/fips_guardKartik Null Cating-Subramanian2016-02-251-1/+7
| |/ /
* | | Copy client.d files during bootstrapJay Mundrawala2016-02-241-0/+25
|/ / | | | | | | | | When knife finds a client.d/ directory, it will upload all files nested under that directory.
* | bugfix #2865 check for validation_keytm/h4ck3rm1k3-master-masterJames Michael DuPont2016-02-161-1/+2
| |
* | Be way more explicit about how we're handling datatm/missed_migrationThom May2016-02-152-5/+14
| | | | | | | | | | | | | | This just codifies the behaviour we're actually using - that we're passing a json string and expecting a hash back. Also adds a deprecation warning to the use of Chef::JSONCompat.from_json
* | convert MultilineOperationIndentation style to "indented"Lamont Granquist2016-02-121-1/+1
| | | | | | | | this looks nicer.
* | pull rubocop 0.37.2 into chefstyleLamont Granquist2016-02-122-3/+3
| | | | | | | | | | this is from the same ruleset that we had, but the new code catches more conditions.