Class: HammerCLIForemanKubevirt::ComputeResources::Kubevirt
- Inherits:
-
HammerCLIForeman::ComputeResources::Base
- Object
- HammerCLIForeman::ComputeResources::Base
- HammerCLIForemanKubevirt::ComputeResources::Kubevirt
- Defined in:
- lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb
Instance Method Summary collapse
- #compute_attributes ⇒ Object
- #host_attributes ⇒ Object
- #interface_attributes ⇒ Object
- #mandatory_resource_options ⇒ Object
- #name ⇒ Object
- #provider_specific_fields ⇒ Object
- #volume_attributes ⇒ Object
Instance Method Details
#compute_attributes ⇒ Object
12 13 14 15 16 17 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 12 def compute_attributes [ ['cpu_cores', _('number of cores, Integer value')], ['memory', _('Amount of memory, integer value in bytes')], ] end |
#host_attributes ⇒ Object
19 20 21 22 23 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 19 def host_attributes [ ['start', _('Boolean (expressed as 0 or 1), whether to start the machine or not')], ] end |
#interface_attributes ⇒ Object
25 26 27 28 29 30 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 25 def interface_attributes [ ['compute_cni_provider', _('Container Network Interface Provider name')], ['compute_network', _('The network to connect the vm to')], ] end |
#mandatory_resource_options ⇒ Object
48 49 50 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 48 def super + %i[hostname api_port namespace token] end |
#name ⇒ Object
8 9 10 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 8 def name _('KubeVirt') end |
#provider_specific_fields ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 40 def provider_specific_fields [ Fields::Field.new(label: _('hostname'), path: [:hostname]), Fields::Field.new(label: _('api_port'), path: [:api_port]), Fields::Field.new(label: _('namespace'), path: [:namespace]), ] end |
#volume_attributes ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 32 def volume_attributes [ ['capacity', _('Volume size in GB, integer value')], ['storage_class', _('Name of the storage class')], ['bootable', _('Boolean, only one volume can be bootable (overrides network interface boot)')], ] end |