Class: Mccloud::Provider::Libvirt::Vm
- Includes:
- VmCommand
- Defined in:
- lib/mccloud/provider/libvirt/vm.rb
Instance Attribute Summary
Attributes inherited from Core::Vm
#agent_forwarding, #auto_selection, #bootstrap, #bootstrap_password, #bootstrap_user, #create_options, #declared, #definition, #env, #forwardings, #name, #port, #private_key_path, #provider, #provisioners, #public_key_path, #shared_files, #shared_folders, #stacked, #user
Instance Method Summary collapse
- #ip_address ⇒ Object
- #private_ip_address ⇒ Object
- #public_ip_address ⇒ Object
- #raw ⇒ Object
- #running? ⇒ Boolean
Methods included from VmCommand
#_bootstrap, #_provision, #destroy, #forward, #halt, #reload, #rsync, #scp, #ssh, #transfer, #up
Methods inherited from Core::Vm
#auto_selected?, #declared?, #forward_port, #initialize, #method_missing, #provision, #provisioner, #stacked?
Methods included from Core::VmCommand
#adjust_rsync_path, #bg_exec, #execute, #fg_exec, #rsync, #rsync_permissions, #share, #share_file, #share_folder, #share_sync, #ssh, #ssh_bootstrap, #ssh_commandline_options, #ssh_forward, #ssh_tunnel_start, #ssh_tunnel_stop, #sudo, #sudo_string, #windows_client?
Constructor Details
This class inherits a constructor from Mccloud::Provider::Core::Vm
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mccloud::Provider::Core::Vm
Instance Method Details
#ip_address ⇒ Object
22 23 24 |
# File 'lib/mccloud/provider/libvirt/vm.rb', line 22 def ip_address return self.public_ip_address end |
#private_ip_address ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/mccloud/provider/libvirt/vm.rb', line 43 def private_ip_address unless raw.nil? ip=raw.private_ip_address else ip=nil end return ip end |
#public_ip_address ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/mccloud/provider/libvirt/vm.rb', line 26 def public_ip_address unless raw.nil? ip=raw.public_ip_address else ip=nil end return ip end |
#raw ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mccloud/provider/libvirt/vm.rb', line 52 def raw if @raw.nil? found=@provider.raw.servers.all(:name => "#{@provider.filter}#{@name}") unless found.nil? @raw=found.first end else @raw.private_key_path=@private_key_path @raw.username = @user end return @raw end |
#running? ⇒ Boolean
35 36 37 38 39 40 41 |
# File 'lib/mccloud/provider/libvirt/vm.rb', line 35 def running? if raw.nil? return false else return raw.ready? end end |