Class: RightScale::Server

Inherits:
Base
  • Object
show all
Defined in:
lib/right_api/rightscale.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, class_name, #data, establish_connection, find, first, #id, #initialize, plural_name, #update_attribute, xml_name

Methods included from AccessibleFragment

#get_element, #has_element?, #initialize, #method_missing

Constructor Details

This class inherits a constructor from RightScale::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AccessibleFragment

Instance Attribute Details

#aws_idObject

Returns the value of attribute aws_id.



125
126
127
# File 'lib/right_api/rightscale.rb', line 125

def aws_id
  @aws_id
end

Instance Method Details

#deploymentObject



127
128
129
# File 'lib/right_api/rightscale.rb', line 127

def deployment
  @deployment ||= Deployment.all.detect {|deployment| deployment.id == deployment_href.split('/').last}
end

#volume_rightscale_idsObject



135
136
137
# File 'lib/right_api/rightscale.rb', line 135

def volume_rightscale_ids
  puts @@non_api_connection.get("/servers/#{id}/volumes").scan(/(?=ec2_ebs_volumes\/)\d+/).inspect
end