1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #1643 from chirag-jog/vcloud_enhancements_001

Further fixes and enhancements to vCloud
This commit is contained in:
Wesley Beary 2013-03-08 13:17:29 -08:00
commit 1e6da326a3
2 changed files with 9 additions and 1 deletions

View file

@ -23,6 +23,14 @@ module Fog
end
end
def password_enabled?
load_unless_loaded!
customization_options = service.get_vapp_template(self.entity[:href]).body[:Children][:Vm][:GuestCustomizationSection]
return false if customization_options[:AdminPasswordEnabled] == "false"
return true if customization_options[:AdminPasswordEnabled] == "true" \
and customization_options[:AdminPasswordAuto] == "false" \
and ( options[:password].nil? or options[:password].empty? )
end
end
end
end

View file

@ -23,7 +23,7 @@ EOF
request(
:body => body,
:expects => 202,
:headers => {'Content-Type' => network_info[:"vcloud_type"] },
:headers => {'Content-Type' => network_info[:"type"] },
:method => 'PUT',
:uri => "#{edit_uri}",
:parse => true