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
10 11 12 13 14 15 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 10 def compute_attributes [ ['cpu_cores', _('number of cores, Integer value')], ['memory', _('Amount of memory, integer value in bytes')] ] end |
#host_attributes ⇒ Object
17 18 19 20 21 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 17 def host_attributes [ ['start', _('Boolean (expressed as 0 or 1), whether to start the machine or not')] ] end |
#interface_attributes ⇒ Object
23 24 25 26 27 28 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 23 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
46 47 48 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 46 def super + %i[hostname api_port namespace token] end |
#name ⇒ Object
6 7 8 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 6 def name _('KubeVirt') end |
#provider_specific_fields ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 38 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
30 31 32 33 34 35 36 |
# File 'lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb', line 30 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 |