diff options
author | tylercloke <tylercloke@gmail.com> | 2015-06-04 12:23:55 -0700 |
---|---|---|
committer | tylercloke <tylercloke@gmail.com> | 2015-06-05 13:47:44 -0700 |
commit | 58048d42caeadc290876a02aaec7eec6f305920a (patch) | |
tree | ea9743fc860b69f2c4c20bb26b7f58a5d2f6f44f /lib/chef/knife/user_create.rb | |
parent | 4f2400c8cce57e68f14cb9d4b756ab82b23dd69d (diff) | |
download | chef-58048d42caeadc290876a02aaec7eec6f305920a.tar.gz |
Better API version error handling helper code.
Renamed Chef::Mixin::ApiVersionRequestHandling.handle_version_http_exception -> server_client_api_version_intersection and made it do much more useful / sane things. See comments for details.
Diffstat (limited to 'lib/chef/knife/user_create.rb')
-rw-r--r-- | lib/chef/knife/user_create.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/chef/knife/user_create.rb b/lib/chef/knife/user_create.rb index 5332e863ae..e73f6be8b6 100644 --- a/lib/chef/knife/user_create.rb +++ b/lib/chef/knife/user_create.rb @@ -78,11 +78,13 @@ knife user create for Open Source 11 Server is being deprecated. Open Source 11 Server user commands now live under the knife osc_user namespace. For backwards compatibility, we will forward this request to knife osc_user create. If you are using an Open Source 11 Server, please use that command to avoid this warning. -If you are not using an Open Source Chef 11 Server install, please read knife user create --help for proper usage. EOF end def run_osc_11_user_create + # run osc_user_create with our input + ARGV.delete("user") + ARGV.unshift("osc_user") Chef::Knife.run(ARGV, Chef::Application::Knife.options) end @@ -93,12 +95,7 @@ EOF # If only 1 arg is passed, assume OSC 11 case. if @name_args.length == 1 ui.warn(osc_11_warning) - - # run osc_user_create with our input - ARGV.delete("user") - ARGV.unshift("osc_user") run_osc_11_user_create - else # EC / CS 12 user create test_mandatory_field(@name_args[0], "username") |