lib/fog/rackspace/requests/compute_v2/set_metadata.rb in fog-1.22.0 vs lib/fog/rackspace/requests/compute_v2/set_metadata.rb in fog-1.22.1
- old
+ new
@@ -1,10 +1,9 @@
module Fog
module Compute
class RackspaceV2
class Real
-
# Sets metadata associated with a server or an image.
# @param [String<images, servers>] collection type of metadata
# @param [String] obj_id id of the object where the metadata is attached
# @param [Hash] metadata key value pairs of metadata
# @return [Excon::Response] response:
@@ -22,10 +21,9 @@
:path => "/#{collection}/#{obj_id}/metadata",
:body => Fog::JSON.encode('metadata' => metadata)
)
end
end
-
class Mock
def set_metadata(collection, obj_id, metadata = {})
raise Fog::Compute::RackspaceV2::NotFound if obj_id == 0