Class: HammerCLIForeman::ComputeResources::EC2

Inherits:
Base
  • Object
show all
Defined in:
lib/hammer_cli_foreman/compute_resource/ec2.rb

Instance Method Summary collapse

Methods inherited from Base

#host_attributes, #interface_attributes, #interfaces_attrs_name, #volume_attributes

Instance Method Details

#compute_attributesObject



8
9
10
# File 'lib/hammer_cli_foreman/compute_resource/ec2.rb', line 8

def compute_attributes
  %w[availability_zone flavor_id groups security_group_ids managed_ip]
end

#mandatory_resource_optionsObject



29
30
31
# File 'lib/hammer_cli_foreman/compute_resource/ec2.rb', line 29

def mandatory_resource_options
  super + %i[region user password]
end

#nameObject



4
5
6
# File 'lib/hammer_cli_foreman/compute_resource/ec2.rb', line 4

def name
  'EC2'
end

#provider_specific_fieldsObject



12
13
14
15
16
# File 'lib/hammer_cli_foreman/compute_resource/ec2.rb', line 12

def provider_specific_fields
  super + [
    Fields::Field.new(:label => _('Region'), :path => [:region])
  ]
end

#provider_vm_specific_fieldsObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/hammer_cli_foreman/compute_resource/ec2.rb', line 18

def provider_vm_specific_fields
  [
    Fields::Field.new(:label => _('DNS'), :path => [:dns_name]),
    Fields::Field.new(:label => _('Type'), :path => [:flavor_id]),
    Fields::Field.new(:label => _('State'), :path => [:state]),
    Fields::Field.new(:label => _('Owner Id'), :path => [:ownerId]),
    Fields::Field.new(:label => _('DNS Name'), :path => [:dns_name]),
    Fields::Field.new(:label => _('Virtualization Type'), :path => [:virtualization_type])
  ]
end