# File lib/fog/hp/models/compute/metadata.rb, line 17 def all requires :parent if @parent.id metadata = service.list_metadata(collection_name, @parent.id).body['metadata'] metas = [] metadata.each_pair {|k,v| metas << {"key" => k, "value" => v} } load(metas) end end
# File lib/fog/hp/models/compute/metadata.rb, line 27 def destroy(key) requires :parent service.delete_meta(collection_name, @parent.id, key) rescue Fog::Compute::HP::NotFound nil end
# File lib/fog/hp/models/compute/metadata.rb, line 34 def get(key) requires :parent data = service.get_meta(collection_name, @parent.id, key).body["meta"] metas = [] data.each_pair {|k,v| metas << {"key" => k, "value" => v} } new(metas[0]) rescue Fog::Compute::HP::NotFound nil end
# File lib/fog/hp/models/compute/metadata.rb, line 44 def new(attributes = {}) requires :parent super({ :parent => @parent }.merge!(attributes)) end
Generated with the Darkfish Rdoc Generator 2.