Class: ConfigBuilder::Model::Provider::Libvirt
- Defined in:
- lib/config_builder/model/provider/libvirt.rb
Overview
Instance Attribute Summary collapse
-
#connect_via_ssh ⇒ String
If use ssh tunnel to connect to Libvirt.
-
#default_prefix ⇒ String
name).
-
#driver ⇒ String
A hypervisor name to access via Libvirt.
-
#host ⇒ String
The name of the server, where libvirtd is running.
-
#id_ssh_key_file ⇒ String
ID SSH key file.
-
#management_network_address ⇒ String
Libvirt default network address.
-
#management_network_name ⇒ String
Libvirt default network name.
-
#password ⇒ String
Password for Libvirt connection.
-
#random_hostname ⇒ String
Turn on to prevent hostname conflicts.
-
#socket ⇒ String
Path towards the libvirt socket.
-
#storage_pool_name ⇒ String
snapshots will be stored.
-
#uri ⇒ String
Manually specify URI.
-
#username ⇒ String
The username to access Libvirt.
Instance Method Summary collapse
-
#initialize ⇒ Libvirt
constructor
A new instance of Libvirt.
- #to_proc ⇒ Object
Methods inherited from Base
#attrs=, #call, def_model_attribute, model_attributes, new_from_hash
Constructor Details
#initialize ⇒ Libvirt
Returns a new instance of Libvirt.
69 70 71 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 69 def initialize @defaults = {} end |
Instance Attribute Details
#connect_via_ssh ⇒ String
Returns If use ssh tunnel to connect to Libvirt.
18 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 18 def_model_attribute :connect_via_ssh |
#default_prefix ⇒ String
name)
56 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 56 def_model_attribute :default_prefix |
#driver ⇒ String
Returns A hypervisor name to access via Libvirt.
10 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 10 def_model_attribute :driver |
#host ⇒ String
Returns The name of the server, where libvirtd is running.
14 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 14 def_model_attribute :host |
#id_ssh_key_file ⇒ String
Returns ID SSH key file.
34 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 34 def_model_attribute :id_ssh_key_file |
#management_network_address ⇒ String
Returns Libvirt default network address.
51 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 51 def_model_attribute :management_network_address |
#management_network_name ⇒ String
Returns Libvirt default network name.
47 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 47 def_model_attribute :management_network_name |
#password ⇒ String
Returns Password for Libvirt connection.
30 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 30 def_model_attribute :password |
#random_hostname ⇒ String
Returns Turn on to prevent hostname conflicts.
43 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 43 def_model_attribute :random_hostname |
#socket ⇒ String
Returns Path towards the libvirt socket.
22 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 22 def_model_attribute :socket |
#storage_pool_name ⇒ String
snapshots will be stored.
39 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 39 def_model_attribute :storage_pool_name |
#uri ⇒ String
Returns Manually specify URI.
6 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 6 def_model_attribute :uri |
#username ⇒ String
Returns The username to access Libvirt.
26 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 26 def_model_attribute :username |
Instance Method Details
#to_proc ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/config_builder/model/provider/libvirt.rb', line 73 def to_proc Proc.new do |vm_config| vm_config.provider 'libvirt' do |vb_config| with_attr(:uri) { |val| vb_config.host = val } with_attr(:driver) { |val| vb_config.host = val } with_attr(:host) { |val| vb_config.host = val } with_attr(:connect_via_ssh) { |val| vb_config.connect_via_ssh = val } with_attr(:socket) { |val| vb_config.socket = val } with_attr(:username) { |val| vb_config.username = val } with_attr(:password) { |val| vb_config.username = val } with_attr(:id_ssh_key_file) { |val| vb_config.id_ssh_key_file = val } with_attr(:storage_pool_name) { |val| vb_config.storage_pool_name = val } with_attr(:random_hostname) { |val| vb_config.random_hostname = val } with_attr(:management_network_name) { |val| vb_config.username = val } with_attr(:management_network_address) { |val| vb_config.username = val } with_attr(:default_prefix) { |val| vb_config.username = val } with_attr(:memory) { |val| vb_config.memory = val } with_attr(:cpus) { |val| vb_config.cpus = val } with_attr(:cpu_mode) { |val| vb_config.cpu_mode = val } with_attr(:disk_bus) { |val| vb_config.disk_bus = val } with_attr(:nested) { |val| vb_config.nested = val } with_attr(:volume_cache) { |val| vb_config.volume_cache = val } with_attr(:kernel) { |val| vb_config.kernel = val } with_attr(:cmd_line) { |val| vb_config.cmd_line = val } with_attr(:initrd) { |val| vb_config.initrd = val } end end end |