Class: Fog::Brightbox::Compute::DatabaseSnapshot

Inherits:
Model
  • Object
show all
Includes:
ResourceLocking
Defined in:
lib/fog/brightbox/models/compute/database_snapshot.rb

Instance Method Summary collapse

Methods included from ResourceLocking

#lock!, #locked?, #unlock!

Methods included from ModelHelper

#collection_name, #resource_name

Instance Method Details

#destroyObject



47
48
49
50
51
# File 'lib/fog/brightbox/models/compute/database_snapshot.rb', line 47

def destroy
  requires :identity
  merge_attributes(service.delete_database_snapshot(identity))
  true
end

#ready?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/fog/brightbox/models/compute/database_snapshot.rb', line 43

def ready?
  state == "available"
end

#saveObject



33
34
35
36
37
38
39
40
41
# File 'lib/fog/brightbox/models/compute/database_snapshot.rb', line 33

def save
  options = {
    name: name,
    description: description
  }
  data = update_database_snapshot(options)
  merge_attributes(data)
  true
end