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:
commit
1e6da326a3
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue