From f66ae539293373d9e4091057d6b945819a112983 Mon Sep 17 00:00:00 2001 From: Mukta A Date: Wed, 24 Jul 2013 16:54:38 +0530 Subject: [PATCH] Fixed merge issue: we only call the validate_params from the server create class --- lib/chef/knife/openstack_server_create.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/chef/knife/openstack_server_create.rb b/lib/chef/knife/openstack_server_create.rb index fffa8ce8..6d70b688 100644 --- a/lib/chef/knife/openstack_server_create.rb +++ b/lib/chef/knife/openstack_server_create.rb @@ -99,8 +99,7 @@ def before_bootstrap config[:bootstrap_ip_address] = bootstrap_ip_address end - def validate! - super(:openstack_username,:openstack_password,:openstack_auth_url) + def validate_params! errors = [] if locate_config_value(:bootstrap_protocol) == 'ssh' if locate_config_value(:identity_file).nil? && locate_config_value(:ssh_password).nil? @@ -114,7 +113,7 @@ def validate! else errors << "You must provide a valid bootstrap protocol. options [ssh/winrm]. For linux type images, options [ssh]" end - exit 1 if errors.each{|e| ui.error(e)}.any? + exit 1 if errors.each{|e| ui.error(e)}.any? end end end