Skip to content

Commit

Permalink
Fixed merge issue: we only call the validate_params from the server c…
Browse files Browse the repository at this point in the history
…reate class
  • Loading branch information
Mukta A committed Jul 24, 2013
1 parent d11cd55 commit f66ae53
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/chef/knife/openstack_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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
Expand Down

0 comments on commit f66ae53

Please sign in to comment.