class EY::CloudClient::Instance
Public Instance Methods
has_app_code?()
click to toggle source
# File lib/engineyard-cloud-client/models/instance.rb, line 9 def has_app_code? !["db_master", "db_slave"].include?(role.to_s) end
provisioned?()
click to toggle source
# File lib/engineyard-cloud-client/models/instance.rb, line 17 def provisioned? hostname && role && status != "starting" # not foolproof, but help throw out bad instances end
remove()
click to toggle source
# File lib/engineyard-cloud-client/models/instance.rb, line 21 def remove environment.remove_instance(self) end
running?()
click to toggle source
# File lib/engineyard-cloud-client/models/instance.rb, line 13 def running? status == "running" end
sort_attributes()
click to toggle source
# File lib/engineyard-cloud-client/models/instance.rb, line 25 def sort_attributes # Shift app_master above app since that's how it's usually shown sort_role = role == 'app' ? 'app_slave' : role [sort_string(sort_role), sort_string(name), sort_string(hostname)] end