Method: Fog::Vcloud::Compute::Real#configure_vm_name_description

Defined in:
lib/fog/vcloud/requests/compute/configure_vm_name_description.rb

#configure_vm_name_description(edit_href, name, description) ⇒ Object

[View source]

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/fog/vcloud/requests/compute/configure_vm_name_description.rb', line 7

def configure_vm_name_description(edit_href, name, description)

  body = <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<VApp xmlns="http://www.vmware.com/vcloud/v1" name="#{name}" type="application/vnd.vmware.vcloud.vApp+xml">
    <Description>#{description}</Description>
</VApp>
EOF

  request(
    :body     => body,
    :expects  => 202,
    :headers  => {'Content-Type' => "application/vnd.vmware.vcloud.vApp+xml"},
    :method   => 'PUT',
    :uri      => edit_href,
    :parse    => true
  )
end