Class: HammerCLIForeman::ComputeResources::Libvirt
- Defined in:
- lib/hammer_cli_foreman/compute_resource/libvirt.rb
Instance Method Summary collapse
- #compute_attributes ⇒ Object
- #host_attributes ⇒ Object
- #interface_attributes ⇒ Object
- #interfaces_attrs_name ⇒ Object
- #mandatory_resource_options ⇒ Object
- #name ⇒ Object
- #provider_vm_specific_fields ⇒ Object
- #volume_attributes ⇒ Object
Methods inherited from Base
Instance Method Details
#compute_attributes ⇒ Object
8 9 10 11 12 13 14 |
# 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 ⇒ Object
16 17 18 19 20 |
# 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 ⇒ Object
22 23 24 25 26 27 28 29 |
# 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 ⇒ Object
40 41 42 |
# File 'lib/hammer_cli_foreman/compute_resource/libvirt.rb', line 40 def interfaces_attrs_name 'nics_attributes' end |
#mandatory_resource_options ⇒ Object
56 57 58 |
# File 'lib/hammer_cli_foreman/compute_resource/libvirt.rb', line 56 def super + %i[url] end |
#name ⇒ Object
4 5 6 |
# File 'lib/hammer_cli_foreman/compute_resource/libvirt.rb', line 4 def name 'Libvirt' end |
#provider_vm_specific_fields ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# 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 ⇒ Object
31 32 33 34 35 36 37 38 |
# 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 |