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 }],
    ['cpu_mode', _('Possible values: %{modes}') % { modes: 'default, host-model, host-passthrough' }]
  ]
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
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 44
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
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