Class: HammerCLIForeman::ComputeResources::Ovirt
- Defined in:
- lib/hammer_cli_foreman/compute_resource/ovirt.rb
Instance Method Summary collapse
- #compute_attributes ⇒ Object
- #host_attributes ⇒ Object
- #interface_attributes ⇒ Object
- #mandatory_resource_options ⇒ Object
- #name ⇒ Object
- #provider_specific_fields ⇒ 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 15 16 17 18 19 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 8 def compute_attributes [ ['cluster', _('ID or name of cluster to use')], ['template', _('Hardware profile to use')], ['cores', _('Integer value, number of cores')], ['sockets', _('Integer value, number of sockets')], ['memory', _('Amount of memory, integer value in bytes')], ['ha', _('Boolean, set 1 to high availability')], ['display_type', _('Possible values: %s') % 'VNC, SPICE'], ['keyboard_layout', _('Possible values: %s. Not usable if display type is SPICE.') % 'ar, de-ch, es, fo, fr-ca, hu, ja, mk, no, pt-br, sv, da, en-gb, et, fr, fr-ch, is, lt, nl, pl, ru, th, de, en-us, fi, fr-be, hr, it, lv, nl-be, pt, sl, tr'] ] end |
#host_attributes ⇒ Object
21 22 23 24 25 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 21 def host_attributes [ ['start', _('Boolean, set 1 to start the vm')] ] end |
#interface_attributes ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 27 def interface_attributes [ ['compute_name', _('Compute name, e.g. eth0')], ['compute_network', _('Select one of available networks for a cluster, must be an ID or a name')], ['compute_interface', _('Interface type')], ['compute_vnic_profile', _('Vnic Profile')] ] end |
#mandatory_resource_options ⇒ Object
63 64 65 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 63 def super + %i[url user password datacenter] end |
#name ⇒ Object
4 5 6 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 4 def name 'oVirt' end |
#provider_specific_fields ⇒ Object
47 48 49 50 51 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 47 def provider_specific_fields super + [ Fields::Field.new(:label => _('Datacenter'), :path => [:datacenter]) ] end |
#provider_vm_specific_fields ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 53 def provider_vm_specific_fields [ Fields::Field.new(:label => _('CPUs'), :path => [:cpu]), Fields::Field.new(:label => _('Memory'), :path => [:memory]), Fields::Field.new(:label => _('Status'), :path => [:status]), Fields::Field.new(:label => _('Cores'), :path => [:cores]), Fields::Field.new(:label => _('Type'), :path => [:type]) ] end |
#volume_attributes ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/hammer_cli_foreman/compute_resource/ovirt.rb', line 36 def volume_attributes [ ['size_gb', _('Volume size in GB, integer value')], ['storage_domain', _('ID or name of storage domain')], ['bootable', _('Boolean, set 1 for bootable, only one volume can be bootable')], ['preallocate', _('Boolean, set 1 to preallocate')], ['wipe_after_delete', _('Boolean, set 1 to wipe disk after delete')], ['interface', _('Disk interface name, must be ide, virtio or virtio_scsi')] ] end |