Sha256: d76163706094289a6a19fcb12ded3b2ec78379f1a8dce03b32a332a06ee50e5d

Contents?: true

Size: 933 Bytes

Versions: 1

Compression:

Stored size: 933 Bytes

Contents

module Fog
  module VcloudDirector
    class Compute
      class Real
        # deprecated Use {#put_vapp_metadata_item_metadata} instead.
        def put_metadata_value(vm_id, metadata_key, metadata_value)
          Fog::Logger.deprecation("#{self} => #put_metadata_value is deprecated, use #put_vapp_metadata_item_metadata instead [light_black](#{caller.first})[/]")

          body="
          <MetadataValue xmlns=\"http://www.vmware.com/vcloud/v1.5\">
              <Value>#{metadata_value}</Value>
           </MetadataValue>"

          request(
            :body    => body,
            :expects => 202,
            :headers => {'Content-Type' => 'application/vnd.vmware.vcloud.metadata.value+xml'},
            :method  => 'PUT',
            :parser  => Fog::ToHashDocument.new,
            :path    => "vApp/#{vm_id}/metadata/#{URI::DEFAULT_PARSER.escape(metadata_key)}"
          )
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-vcloud-director-0.3.1 lib/fog/vcloud_director/requests/compute/put_metadata_value.rb