class HammerCLIForemanGoogle::ComputeResources::Google

Public Instance Methods

compute_attributes() click to toggle source
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 10
def compute_attributes
  %w[machine_type network associate_external_ip]
end
interfaces_attrs_name() click to toggle source
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 14
def interfaces_attrs_name
  'network_interfaces_nics_attributes'
end
mandatory_resource_options() click to toggle source
Calls superclass method
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 40
def mandatory_resource_options
  super + %i[key_path zone]
end
name() click to toggle source
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 6
def name
  'GCE'
end
provider_specific_fields() click to toggle source
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 24
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() click to toggle source
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 31
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() click to toggle source
# File lib/hammer_cli_foreman_google/compute_resources/google.rb, line 18
def volume_attributes
  [
    ['size_gb', _('Volume size in GB, integer value')]
  ]
end