Sha256: 5a7a99571ba0af4041798a2d8ca1066815a45c1c846cdfe9cd07ec6e6f2007f5
Contents?: true
Size: 582 Bytes
Versions: 2
Compression:
Stored size: 582 Bytes
Contents
require 'engineyard-cloud-client/models/api_struct' module EY class CloudClient class Instance < ApiStruct.new(:id, :role, :name, :status, :amazon_id, :public_hostname, :environment, :bridge, :availability_zone) alias hostname public_hostname alias bridge? bridge def has_app_code? !["db_master", "db_slave"].include?(role.to_s) end def running? status == "running" end def provisioned? hostname && role && status != "starting" # not foolproof, but help throw out bad instances end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
engineyard-cloud-client-1.0.12 | lib/engineyard-cloud-client/models/instance.rb |
engineyard-cloud-client-1.0.11 | lib/engineyard-cloud-client/models/instance.rb |