Class: Fog::Compute::Brightbox::DatabaseServer
Instance Method Summary
collapse
#lock!, #locked?, #unlock!
#collection_name, #resource_name
Instance Method Details
#destroy ⇒ Object
76
77
78
79
80
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 76
def destroy
requires :identity
merge_attributes(service.destroy_database_server(identity))
true
end
|
#ready? ⇒ Boolean
66
67
68
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 66
def ready?
state == "active"
end
|
#reset_password ⇒ Object
82
83
84
85
86
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 82
def reset_password
requires :identity
merge_attributes(service.reset_password_database_server(identity))
true
end
|
#save ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 38
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
70
71
72
73
74
|
# File 'lib/fog/brightbox/models/compute/database_server.rb', line 70
def snapshot
requires :identity
merge_attributes(service.snapshot_database_server(identity))
true
end
|