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')],
    ['memory', _('String, amount of memory, value in bytes')]
  ]
end
host_attributes() click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 15
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 21
def interface_attributes
  [
    ['type',   _('Possible values: %s') % 'bridge, network'],
    ['bridge', _('Name of interface according to type')],
    ['model',  _('Possible values: %s') % 'virtio, rtl8139, ne2k_pci, pcnet, e1000']
  ]
end
interfaces_attrs_name() click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 37
def interfaces_attrs_name
  'nics_attributes'
end
mandatory_resource_options() click to toggle source
# File lib/hammer_cli_foreman/compute_resource/libvirt.rb, line 41
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 29
def volume_attributes
  [
    ['pool_name',   _('One of available storage pools')],
    ['capacity',    _('String value, eg. 10G')],
    ['format_type', _('Possible values: %s') % 'raw, qcow2']
  ]
end