class Fog::Compute::ProfitBricks::Datacenter
Attributes
options[RW]
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 15 def initialize(attributes = {}) super end
Public Instance Methods
clear(confirm = false)
click to toggle source
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 40 def clear(confirm = false) requires :id if confirm == true service.clear_data_center(id) true else raise ArgumentError.new("Confirm with true boolean to clear datacenter") end end
destroy()
click to toggle source
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 34 def destroy requires :id service.delete_data_center(id) true end
failed?()
click to toggle source
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 54 def failed? state == "ERROR" end
ready?()
click to toggle source
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 50 def ready? state == "AVAILABLE" end
save()
click to toggle source
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 19 def save requires :name, :region data = service.create_data_center(name, region) merge_attributes(data.body["createDataCenterResponse"]) true end
update()
click to toggle source
# File lib/fog/compute/profit_bricks/models/datacenter.rb, line 27 def update requires :id data = service.update_data_center(id, options) merge_attributes(data.body["updateDataCenterResponse"]) true end