Sha256: c44d2140b09bbf6ee53508c476a7b30eebb77d89114423ceeddc8d39888e60da
Contents?: true
Size: 691 Bytes
Versions: 20
Compression:
Stored size: 691 Bytes
Contents
module Fog module OpenStack class Compute module MetaParent def parent @parent end def parent=(new_parent) @parent = new_parent end def collection_name if @parent.class == Fog::OpenStack::Compute::Image return "images" elsif @parent.class == Fog::OpenStack::Compute::Server return "servers" else raise "Metadata is not supported for this model type." end end def metas_to_hash(metas) hash = {} metas.each { |meta| hash.store(meta.key, meta.value) } hash end end end end end
Version data entries
20 entries across 20 versions & 3 rubygems