lib/fog/hp/requests/compute/update_meta.rb in fog-1.22.0 vs lib/fog/hp/requests/compute/update_meta.rb in fog-1.22.1
- old
+ new
@@ -1,10 +1,9 @@
module Fog
module Compute
class HP
class Real
-
# Set or update metadata item for specific collections
#
# ==== Parameters
# * 'collection_name'<~String> - name of the collection i.e. images, servers for which the metadata is intented.
# * 'parent_id'<~Integer> - id of the collection i.e. image_id or the server_id
@@ -22,17 +21,14 @@
:expects => 200,
:method => 'PUT',
:path => "#{collection_name}/#{parent_id}/metadata/#{key}"
)
end
-
end
class Mock
-
def update_meta(collection_name, parent_id, key, value)
-
if collection_name == "images" then
if get_image_details(parent_id)
self.data[:images][parent_id]['metadata'][key] = value
else
raise Fog::Compute::HP::NotFound
@@ -49,13 +45,10 @@
response = Excon::Response.new
response.body = { "meta" => { key => value } }
response.status = 200
response
-
end
-
end
-
end
end
end