Class: Veewee::Provider::Kvm::Box

Inherits:
Core::Box
  • Object
show all
Includes:
Core, Core::BoxCommand, Veewee::Provider::Kvm, BoxCommand
Defined in:
lib/veewee/provider/kvm/box.rb

Instance Attribute Summary collapse

Attributes inherited from Core::Box

#definition, #env, #name, #provider

Instance Method Summary collapse

Methods included from BoxCommand

#add_floppy, #add_virtio_drivers, #build, #console_type, #create, #create_server, #create_volume, #destroy, #destroy_vm, #destroy_volume, #exists?, #exists_vm?, #exists_volume?, #halt, #ip_address, #poweroff, #running?, #ssh_options, #stop, #up, #validate_kvm

Methods included from Core::BoxCommand

#build, #build_info, #copy_to_box, #create_floppy, #create_wget_vbs_command, #escape_and_echo, #exec, #fill_sequence, #filter_postinstall_files, #halt, #handle_kickstart, #handle_postinstall, #issh, #poweroff, #scp, #send_vnc_keycode, #ssh, #ssh_command_string, #string_to_vnccode, #sudo, #transfer_buildinfo, #validate_postinstall_regex, #validate_tags, #vnc_type, #wget_vbs, #wget_vbs_file, #wincp, #winrm, #winrm_command_string

Methods inherited from Core::Box

#gem_available?, #reload, #set_definition, #ui

Methods included from Core::Helper::Iso

#download_iso, #download_progress, #hashsum, #verify_iso, #verify_sum

Methods included from Core::Helper::Comm

#comm_execute, #comm_method, #comm_transfer_file, #when_comm_login_works

Methods included from Core::Helper::Ssh

#ssh_execute, #ssh_transfer_file, #when_ssh_login_works

Methods included from Core::Helper::Shell

#shell_exec

Methods included from Core::Helper::Web

#allow_for_http_request, #server_for_http_request, #wait_for_http_request

Methods included from Core::Helper::Tcp

#execute_when_tcp_available, #get_local_ip, #guess_free_port, #host_ip_as_seen_by_guest, #is_tcp_port_open?

Constructor Details

#initialize(name, env) ⇒ Box

Returns a new instance of Box.



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/veewee/provider/kvm/box.rb', line 30

def initialize(name,env)

  super(name,env)

  @connection=::Fog::Compute[:libvirt]

  # Many of the existing templates have disk_format set to "VDI"
  # Use "raw" instead as a Libvirt-compatible default
  definition.disk_format.downcase!
  definition.disk_format = "raw" if definition.disk_format == "vdi"
  @volume_name = "#{name}.#{definition.disk_format}"

end

Instance Attribute Details

#connectionObject

Returns the value of attribute connection.



28
29
30
# File 'lib/veewee/provider/kvm/box.rb', line 28

def connection
  @connection
end