1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vcloud_director/models/compute/vm_customization.rb
2013-09-16 18:13:09 +01:00

40 lines
992 B
Ruby

require 'fog/core/model'
module Fog
module Compute
class VcloudDirector
class VmCustomization < Model
identity :id
attribute :type
attribute :href
attribute :enabled
attribute :change_sid
attribute :join_domain_enabled
attribute :use_org_settings
attribute :admin_password_enabled
attribute :reset_password_required
attribute :virtual_machine_id
attribute :computer_name
attribute :has_customization_script
# bug: for some reason if the customization_script has /r, is showed here as /n. Looks likes is something in excon
def script
attributes[:customization_script]
end
def script=(new_script)
attributes[:customization_script] = new_script
end
def save
response = service.put_vm_customization(id, attributes)
service.process_task(response.body)
end
end
end
end
end