mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
34 lines
609 B
Ruby
34 lines
609 B
Ruby
require 'fog/core/model'
|
|
|
|
module Fog
|
|
module Compute
|
|
class Bluebox
|
|
|
|
class Image < Fog::Model
|
|
|
|
identity :id
|
|
|
|
attribute :block_id
|
|
attribute :description
|
|
attribute :public
|
|
attribute :created_at, :aliases => 'created'
|
|
|
|
def save
|
|
requires :block_id
|
|
|
|
data = connection.create_template(block_id, attributes)
|
|
true
|
|
end
|
|
|
|
def destroy
|
|
requires :id
|
|
|
|
data = connection.destroy_template(id)
|
|
true
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|