Class: HammerCLIForeman::ComputeResources::OpenStack

Inherits:
Base
  • Object
show all
Defined in:
lib/hammer_cli_foreman/compute_resource/openstack.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/openstack.rb', line 8

def compute_attributes
  %w[availability_zone boot_from_volume flavor_ref image_ref tenant_id security_groups network]
end

#mandatory_resource_optionsObject



20
21
22
# File 'lib/hammer_cli_foreman/compute_resource/openstack.rb', line 20

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

#nameObject



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

def name
  'OpenStack'
end

#provider_specific_fieldsObject



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

def provider_specific_fields
  super + [
    Fields::Field.new(:label => _('Tenant'), :path => [:tenant]),
    Fields::Field.new(:label => _('Project domain name'), :path => [:project_domain_name]),
    Fields::Field.new(:label => _('Project domain ID'), :path => [:project_domain_id])
  ]
end

#provider_vm_specific_fieldsObject



24
25
26
27
28
29
# File 'lib/hammer_cli_foreman/compute_resource/openstack.rb', line 24

def provider_vm_specific_fields
  [
    Fields::Field.new(:label => _('State'), :path => [:state]),
    Fields::Field.new(:label => _('Tenant Id'), :path => [:tenant_id])
  ]
end