1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/openstack/models/compute/metadatum.rb
Nelvin Driz 4d33ccb7a7 [openstack|compute] General Cleanup and Update
- Focus on adding additional vm actions support
- New request types are not fully tested
2012-04-30 10:34:59 +08:00

29 lines
582 B
Ruby

require 'fog/core/model'
require 'fog/openstack/models/meta_parent'
module Fog
module Compute
class OpenStack
class Metadatum < Fog::Model
include Fog::Compute::OpenStack::MetaParent
identity :key
attribute :value
def destroy
requires :identity
connection.delete_meta(collection_name, @parent.id, key)
true
end
def save
requires :identity, :value
connection.update_meta(collection_name, @parent.id, key, value)
true
end
end
end
end
end