diff options
-rw-r--r-- | lib/chef/knife/config_get.rb | 3 | ||||
-rw-r--r-- | lib/chef/knife/config_get_profile.rb | 3 | ||||
-rw-r--r-- | lib/chef/knife/config_list_profiles.rb | 3 | ||||
-rw-r--r-- | lib/chef/knife/config_use_profile.rb | 3 |
4 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef/knife/config_get.rb b/lib/chef/knife/config_get.rb index 9a57d14316..023c82e8a9 100644 --- a/lib/chef/knife/config_get.rb +++ b/lib/chef/knife/config_get.rb @@ -23,6 +23,7 @@ class Chef class Knife class ConfigGet < Knife banner "knife config get [OPTION...] (options)\nDisplays the value of Chef::Config[OPTION] (or all config values)" + category "deprecated" option :all, short: "-a", @@ -37,6 +38,8 @@ class Chef default: false def run + Chef::Log.warn("knife config get has been deprecated in favor of knife config show. This will removed in marjor release verison!") + if config[:format] == "summary" && !config[:raw] # If using the default, human-readable output, also show which config files are being loaded. # Some of this is a bit hacky since it duplicates diff --git a/lib/chef/knife/config_get_profile.rb b/lib/chef/knife/config_get_profile.rb index 716c65dc4b..5fe1d27ffc 100644 --- a/lib/chef/knife/config_get_profile.rb +++ b/lib/chef/knife/config_get_profile.rb @@ -21,6 +21,7 @@ class Chef class Knife class ConfigGetProfile < Knife banner "knife config get-profile" + category "deprecated" # Disable normal config loading since this shouldn't fail if the profile # doesn't exist of the config is otherwise corrupted. @@ -29,6 +30,8 @@ class Chef end def run + Chef::Log.warn("knife config get-profiles has been deprecated in favor of knife config use. This will removed in marjor release verison!") + ui.msg(self.class.config_loader.credentials_profile(config[:profile])) end diff --git a/lib/chef/knife/config_list_profiles.rb b/lib/chef/knife/config_list_profiles.rb index f652377e89..cd33a9a05a 100644 --- a/lib/chef/knife/config_list_profiles.rb +++ b/lib/chef/knife/config_list_profiles.rb @@ -21,6 +21,7 @@ class Chef class Knife class ConfigListProfiles < Knife banner "knife config list-profiles (options)" + category "deprecated" deps do require_relative "../workstation_config_loader" @@ -37,6 +38,8 @@ class Chef end def run + Chef::Log.warn("knife config list-profiles has been deprecated in favor of knife config list. This will removed in marjor release verison!") + credentials_data = self.class.config_loader.parse_credentials_file if credentials_data.nil? || credentials_data.empty? # Should this just show the ambient knife.rb config as "default" instead? diff --git a/lib/chef/knife/config_use_profile.rb b/lib/chef/knife/config_use_profile.rb index 745a250523..7a50efcb1e 100644 --- a/lib/chef/knife/config_use_profile.rb +++ b/lib/chef/knife/config_use_profile.rb @@ -21,6 +21,7 @@ class Chef class Knife class ConfigUseProfile < Knife banner "knife config use-profile PROFILE" + category "deprecated" deps do require "fileutils" unless defined?(FileUtils) @@ -33,6 +34,8 @@ class Chef end def run + Chef::Log.warn("knife config use-profile has been deprecated in favor of knife config use. This will removed in marjor release verison!") + credentials_data = self.class.config_loader.parse_credentials_file context_file = ChefConfig::PathHelper.home(".chef", "context").freeze profile = @name_args[0]&.strip |