Class: HammerCLIForemanGoogle::ComputeResources::Google

Inherits:
HammerCLIForeman::ComputeResources::Base
  • Object
show all
Defined in:
lib/hammer_cli_foreman_google/compute_resources/google.rb

Instance Method Summary collapse

Instance Method Details

#compute_attributesObject



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_nameObject



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_optionsObject



42
43
44
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 42

def mandatory_resource_options
  super + %i[key_path zone]
end

#nameObject



8
9
10
# File 'lib/hammer_cli_foreman_google/compute_resources/google.rb', line 8

def name
  'GCE'
end

#provider_specific_fieldsObject



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_fieldsObject



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_attributesObject



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