mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
2e0b7e545a
Done with `rubocop --auto-correct --only EmptyLineBetweenDefs,EmptyLines,EmptyLinesAroundBody`
28 lines
756 B
Ruby
28 lines
756 B
Ruby
module Fog
|
|
module Generators
|
|
module Compute
|
|
module VcloudDirector
|
|
# @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VAppType.html
|
|
class Vapp
|
|
attr_reader :name, :options
|
|
|
|
def initialize(name, options={})
|
|
@name = name
|
|
@options = options
|
|
end
|
|
|
|
def generate_xml
|
|
attrs = @attrs
|
|
Nokogiri::XML::Builder.new do
|
|
VApp('xmlns' => 'http://www.vmware.com/vcloud/v1.5',
|
|
'name' => name
|
|
) {
|
|
Description options[:Description] if options.key?(:Description)
|
|
}
|
|
end.to_xml
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|