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

[vcloud_director] Handle Guest admin password

Admin passwords can be retrieved and modified using the VMWare console,
so it's useful to allow the same operations here.

Moreover, when an admin password is enabled and "admin password auto" is
false, it's impossible to modify Guest settings.
i.e., "The administrator password cannot be empty when it is enabled and
automatic password generation is not selected."

This patch also fixes `put_guest_customization_section_vapp` where an
AdminPassword element was never created.
This commit is contained in:
Stefano Tortarolo 2013-12-08 09:56:31 +01:00
parent e34ff64840
commit 18ef1ecb61
4 changed files with 5 additions and 0 deletions

View file

@ -387,6 +387,7 @@ vm.customization
join_domain_enabled=false,
use_org_settings=false,
admin_password_auto=false,
admin_password='',
admin_password_enabled=false,
reset_password_required=false,
virtual_machine_id="2ddeea36-ac71-470f-abc5-c6e3c2aca192",

View file

@ -15,6 +15,7 @@ module Fog
attribute :join_domain_enabled
attribute :use_org_settings
attribute :admin_password_auto
attribute :admin_password
attribute :admin_password_enabled
attribute :reset_password_required
attribute :virtual_machine_id

View file

@ -32,6 +32,8 @@ module Fog
@response[:join_domain_enabled] = (value == "true")
when 'UseOrgSettings'
@response[:use_org_settings] = (value == "true")
when 'AdminPassword'
@response[:admin_password] = value
when 'AdminPasswordEnabled'
@response[:admin_password_enabled] = (value == "true")
when 'AdminPasswordAuto'

View file

@ -62,6 +62,7 @@ module Fog
:change_sid => :ChangeSid,
:join_domain_enabled => :JoinDomainEnabled,
:use_org_settings => :UseOrgSettings,
:admin_password => :AdminPassword,
:admin_password_enabled => :AdminPasswordEnabled,
:admin_password_auto => :AdminPasswordAuto,
:reset_password_required => :ResetPasswordRequired,