class Fog::Generators::Compute::VcloudDirector::Vm
@see pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/types/VmType.html
Attributes
attrs[R]
Public Class Methods
new(attrs={})
click to toggle source
# File lib/fog/vcloud_director/generators/compute/vm.rb, line 9 def initialize(attrs={}) @attrs = attrs end
Public Instance Methods
generate_xml()
click to toggle source
# File lib/fog/vcloud_director/generators/compute/vm.rb, line 13 def generate_xml attrs = @attrs Nokogiri::XML::Builder.new do Vm('xmlns' => 'http://www.vmware.com/vcloud/v1.5', 'name' => attrs[:name]) { Description attrs[:Description] if attrs.key?(:Description) if attrs.key?(:StorageProfile) StorageProfile( 'type' => 'application/vnd.vmware.vcloud.vdcStorageProfile+xml', 'name' => attrs[:StorageProfile][:name], 'href' => attrs[:StorageProfile][:href] ) end } end.to_xml end