Class: Fog::Compute::Brightbox::DatabaseServer
Instance Method Summary
collapse
#collection_name, #resource_name
Instance Method Details
#destroy ⇒ Object
73
74
75
76
77
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 73
def destroy
requires :identity
merge_attributes(service.destroy_database_server(identity))
true
end
|
#ready? ⇒ Boolean
63
64
65
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 63
def ready?
state == "active"
end
|
#reset_password ⇒ Object
79
80
81
82
83
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 79
def reset_password
requires :identity
merge_attributes(service.reset_password_database_server(identity))
true
end
|
#save ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 35
def save
options = {
:name => name,
:description => description
}
options[:allow_access] = allow_access if allow_access
options[:maintenance_weekday] = maintenance_weekday
options[:maintenance_hour] = maintenance_hour
if persisted?
data = update_database_server(options)
else
options[:engine] = database_engine if database_engine
options[:version] = database_version if database_version
options[:database_type] = flavor_id if flavor_id
options[:zone] = zone_id if zone_id
data = create_database_server(options)
end
merge_attributes(data)
true
end
|
#snapshot ⇒ Object
67
68
69
70
71
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 67
def snapshot
requires :identity
merge_attributes(service.snapshot_database_server(identity))
true
end
|