class HammerCLIForeman::ComputeResources::Libvirt
Public Instance Methods
compute_attributes()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 8 def compute_attributes [ ['cpus', _('Number of CPUs'), { bold: true }], ['memory', _('String, amount of memory, value in bytes'), { bold: true }], ['boot_order', _('Device names to specify the boot order')] ] end
host_attributes()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 16 def host_attributes [ ['start', _('Boolean (expressed as 0 or 1), whether to start the machine or not')] ] end
interface_attributes()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 22 def interface_attributes [ ['compute_type', _('Possible values: %s') % 'bridge, network'], ['compute_bridge', _('Name of interface according to type')], ['compute_model', _('Possible values: %s') % 'virtio, rtl8139, ne2k_pci, pcnet, e1000'], ['compute_network'], _('Libvirt instance network, e.g. default') ] end
interfaces_attrs_name()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 40 def interfaces_attrs_name 'nics_attributes' end
mandatory_resource_options()
click to toggle source
Calls superclass method
HammerCLIForeman::ComputeResources::Base#mandatory_resource_options
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 56 def mandatory_resource_options super + %i[url] end
name()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 4 def name 'Libvirt' end
provider_vm_specific_fields()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 44 def provider_vm_specific_fields [ Fields::Field.new(:label => _('CPUs'), :path => [:cpus]), Fields::Field.new(:label => _('Memory'), :path => [:memory_size]), Fields::Field.new(:label => _('Status'), :path => [:state]), Fields::Field.new(:label => _('OS Type'), :path => [:os_type]), Fields::Field.new(:label => _('Domain Type'), :path => [:domain_type]), Fields::Field.new(:label => _('Persistent'), :path => [:persistent]), Fields::List.new(:label => _('Boot order'), :path => [:boot_order]) ] end
volume_attributes()
click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 31 def volume_attributes [ ['pool_name', _('One of available storage pools'), { bold: true }], ['capacity', _('String value, e.g. 10G'), { bold: true }], ['allocation'], _('Initial allocation, e.g. 0G'), ['format_type', _('Possible values: %s') % 'raw, qcow2'] ] end