Class: Fog::Compute::Server
- Defined in:
- lib/fog/compute/models/server.rb
Direct Known Subclasses
AWS::Server, Bluebox::Server, Brightbox::Server, Glesys::Server, GoGrid::Server, Joyent::Server, Linode::Server, Ninefold::Server, OpenStack::Server, Ovirt::Server, Rackspace::Server, Fog::Compute::Slicehost::Server, Fog::Compute::StormOnDemand::Server, Voxel::Server, Vsphere::Server
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #scp(local_path, remote_path, upload_options = {}) ⇒ Object (also: #scp_upload)
- #scp_download(remote_path, local_path, download_options = {}) ⇒ Object
- #ssh(commands, options = {}) ⇒ Object
Methods inherited from Model
#initialize, #inspect, #reload, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#scp(local_path, remote_path, upload_options = {}) ⇒ Object Also known as: scp_upload
7 8 9 10 11 12 13 14 |
# File 'lib/fog/compute/models/server.rb', line 7 def scp(local_path, remote_path, = {}) require 'net/scp' requires :public_ip_address, :username = {} [:key_data] = [private_key] if private_key Fog::SCP.new(public_ip_address, username, ).upload(local_path, remote_path, ) end |
#scp_download(remote_path, local_path, download_options = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/fog/compute/models/server.rb', line 18 def scp_download(remote_path, local_path, = {}) require 'net/scp' requires :public_ip_address, :username = {} [:key_data] = [private_key] if private_key Fog::SCP.new(public_ip_address, username, ).download(remote_path, local_path, ) end |