Project

General

Profile

Actions

Bug #27621

closed

Click on 'Compute profile' fails with undefined method `reflect_on_association' for ForemanAzureRM::AzureRMCompute:Class

Added by Vijay Singh over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Click on 'Compute profile' fails with undefined method `reflect_on_association' for ForemanAzureRM::AzureRMCompute:Class

Steps:

1. Create a Compute resource.
2. Go to: Infrastructure => Compute Resources => CR Name => Compute profile => click on profile Small/Medium/Large

Traceback:

NoMethodError in ComputeAttributes#new

Showing /home/rootazure/foreman/app/views/compute_resources_vms/form/_networks.html.erb where line #3 raised:

undefined method `reflect_on_association' for ForemanAzureRM::AzureRMCompute:Class

Extracted source (around line #211):

209
210
211
212
213
214

  def new_child_fields_template(form_builder, association, options = { })
    unless options[:object].present?
      association_object = form_builder.object.class.reflect_on_association(association)
      options[:object] = association_object.klass.new(association_object.foreign_key => form_builder.object.id)
    end
    options[:partial]            ||= association.to_s.singularize

Trace of template inclusion: app/views/compute_attributes/_compute_form.html.erb, app/views/compute_attributes/_form.html.erb, app/views/compute_attributes/new.html.erb

Rails.root: /home/rootazure/foreman
Application Trace | Framework Trace | Full Trace

app/helpers/layout_helper.rb:211:in `new_child_fields_template'
app/views/compute_resources_vms/form/_networks.html.erb:3:in `_app_views_compute_resources_vms_form__networks_html_erb___362082360183864988_47215762992460'
app/views/compute_attributes/_compute_form.html.erb:6:in `_app_views_compute_attributes__compute_form_html_erb___3726264439296921901_47215763676940'
app/views/compute_attributes/_form.html.erb:8:in `block (2 levels) in _app_views_compute_attributes__form_html_erb___52828943694087550_47215764570680'
app/views/compute_attributes/_form.html.erb:7:in `block in _app_views_compute_attributes__form_html_erb___52828943694087550_47215764570680'
app/helpers/form_helper.rb:282:in `form_for'
app/views/compute_attributes/_form.html.erb:1:in `_app_views_compute_attributes__form_html_erb___52828943694087550_47215764570680'
app/views/compute_attributes/new.html.erb:23:in `_app_views_compute_attributes_new_html_erb__668289814186074255_47215765569120'
app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
lib/foreman/middleware/telemetry.rb:10:in `call'
lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
lib/foreman/middleware/logging_context_session.rb:22:in `call'
lib/foreman/middleware/logging_context_request.rb:11:in `call'

Request

Parameters:

{"compute_profile_id"=>"1-1-Small", "compute_resource_id"=>"2-CR_AzureRF"}


Related issues 1 (0 open1 closed)

Related to AzureRM - Tracker #27271: AzureRM as a compute resource for Foreman with Azure Ruby SDKClosedAditi Puntambekar

Actions
Actions #1

Updated by Vijay Singh over 5 years ago

  • Related to Tracker #27271: AzureRM as a compute resource for Foreman with Azure Ruby SDK added
Actions #2

Updated by Aditi Puntambekar about 5 years ago

  • Pull request https://github.com/theforeman/foreman_azure_rm/pull/42 added
Actions #3

Updated by Aditi Puntambekar about 5 years ago

  • Status changed from New to Ready For Testing
  • Triaged changed from No to Yes
Actions #4

Updated by Aditi Puntambekar about 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF