Class: RightScaleAPI::Ec2EbsVolume
- Inherits:
-
Account::SubResource
- Object
- Base
- Account::SubResource
- RightScaleAPI::Ec2EbsVolume
- Defined in:
- lib/right-scale-api/ec2_ebs_volume.rb
Overview
Instance Attribute Summary
Attributes inherited from Account::SubResource
Instance Method Summary collapse
-
#attach_to_server(server, device, mount) ⇒ Object
Attaches the volume to a server.
- #collection_uri ⇒ Object
Methods inherited from Base
api_name, attributes, create, #delete, #destroy, get, #get, #head, #initialize, #path, #post, #put, #reload!, #send_request, #update, #uri
Constructor Details
This class inherits a constructor from RightScaleAPI::Base
Instance Method Details
#attach_to_server(server, device, mount) ⇒ Object
Attaches the volume to a server
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/right-scale-api/ec2_ebs_volume.rb', line 22 def attach_to_server server, device, mount account.post '/component_ec2_ebs_volumes', :body => { :component_ec2_ebs_volume => { :ec2_ebs_volume_href => uri, :component_href => server.href, :device => device, :mount => mount } } end |
#collection_uri ⇒ Object
33 34 35 |
# File 'lib/right-scale-api/ec2_ebs_volume.rb', line 33 def collection_uri account.path + "/ec2_ebs_volumes" end |