diff --git a/lib/fog/vcloud_director/generators/compute/vapp.rb b/lib/fog/vcloud_director/generators/compute/vapp.rb index 700410632..7dad183a7 100644 --- a/lib/fog/vcloud_director/generators/compute/vapp.rb +++ b/lib/fog/vcloud_director/generators/compute/vapp.rb @@ -3,13 +3,13 @@ module Fog module Compute module VcloudDirector - # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VmType.html + # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VAppType.html class Vapp - attr_reader :name, :description + attr_reader :name, :options - def initialize(name, description=nil) + def initialize(name, options={}) @name = name - @description = description + @options = options end def generate_xml @@ -18,7 +18,7 @@ module Fog VApp('xmlns' => 'http://www.vmware.com/vcloud/v1.5', 'name' => name ) { - Description description unless description.nil? + Description options[:Description] if options.key?(:Description) } end.to_xml end diff --git a/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb b/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb index 714e42d59..a958502f3 100644 --- a/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +++ b/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb @@ -19,8 +19,8 @@ module Fog # # @see http://pubs.vmware.com/vcd-55/topic/com.vmware.vcloud.api.reference.doc_55/doc/operations/PUT-VAppNameAndDescription.html # @since vCloud API version 0.9 - def put_vapp_name_and_description(id, name, description=nil) - body = Fog::Generators::Compute::VcloudDirector::Vapp.new(name, description).generate_xml + def put_vapp_name_and_description(id, name, options={}) + body = Fog::Generators::Compute::VcloudDirector::Vapp.new(name, options).generate_xml request( :body => body, :expects => 202,