Class: HammerCLIForemanGoogle::ComputeResources::Google
- Inherits:
-
HammerCLIForeman::ComputeResources::Base
- Object
- HammerCLIForeman::ComputeResources::Base
- HammerCLIForemanGoogle::ComputeResources::Google
- Defined in:
- lib/hammer_cli_foreman_google/compute_resources/google.rb
Instance Method Summary collapse
- #compute_attributes ⇒ Object
- #interfaces_attrs_name ⇒ Object
- #mandatory_resource_options ⇒ Object
- #name ⇒ Object
- #provider_specific_fields ⇒ Object
- #provider_vm_specific_fields ⇒ Object
- #volume_attributes ⇒ Object
Instance Method Details
#compute_attributes ⇒ Object
12 13 14 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 12 def compute_attributes %w[machine_type network associate_external_ip] end |
#interfaces_attrs_name ⇒ Object
16 17 18 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 16 def interfaces_attrs_name 'network_interfaces_nics_attributes' end |
#mandatory_resource_options ⇒ Object
42 43 44 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 42 def super + %i[key_path zone] end |
#name ⇒ Object
8 9 10 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 8 def name 'GCE' end |
#provider_specific_fields ⇒ Object
26 27 28 29 30 31 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 26 def provider_specific_fields [ Fields::Field.new(label: _('Key Path'), path: [:key_path]), Fields::Field.new(label: _('Zone'), path: [:zone]), ] end |
#provider_vm_specific_fields ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 33 def provider_vm_specific_fields [ Fields::Field.new(label: _('Machine Type'), path: [:machine_type]), Fields::Field.new(label: _('Status'), path: [:status]), Fields::Field.new(label: _('Description'), path: [:description]), Fields::Field.new(label: _('Zone'), path: [:zone]), ] end |
#volume_attributes ⇒ Object
20 21 22 23 24 |
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 20 def volume_attributes [ ['size_gb', _('Volume size in GB, integer value')], ] end |