From 288636b36719d25ccc6e81acb554753317b4ebee Mon Sep 17 00:00:00 2001 From: siddheshwar-more Date: Fri, 26 Jul 2013 22:10:46 +0530 Subject: [PATCH] Added validation for openstack winrm password --- lib/chef/knife/openstack_server_create.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/chef/knife/openstack_server_create.rb b/lib/chef/knife/openstack_server_create.rb index 6d70b688..805dd1f0 100644 --- a/lib/chef/knife/openstack_server_create.rb +++ b/lib/chef/knife/openstack_server_create.rb @@ -109,7 +109,9 @@ def validate_params! errors << "You must provide SSH Key." end elsif locate_config_value(:bootstrap_protocol) == 'winrm' - super(:winrm_user, :winrm_password) + if locate_config_value(:winrm_password).nil? + errors << "You must provide Winrm Password." + end else errors << "You must provide a valid bootstrap protocol. options [ssh/winrm]. For linux type images, options [ssh]" end