Skip to content

Commit

Permalink
Filter out resources with no physical_resource_id
Browse files Browse the repository at this point in the history
Filter out resources with no physical_resource_id.
Before we were ignoring those with:
https://github.com/Ladas/manageiq-providers-openstack/blob/d0799c4a5766650f2d3d149875c1b58f8a16040f/app/models/manageiq/providers/openstack/refresh_parser_common/orchestration_stacks.rb#L165

Without ignoring thise results in error :
[NoMethodError]: undefined method `ems_ref=' for nil:NilClass  Method:[block in method_missing]
  • Loading branch information
Ladas committed Oct 11, 2017
1 parent 68b096f commit 8fe9503
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def orchestration_stack_resources(stack, stack_inventory_object)
raw_resources.reject! { |r| r.physical_resource_id.nil? }
raw_resources.each do |resource|
uid = resource.physical_resource_id

next unless uid
o = persister.orchestration_stacks_resources.find_or_build(uid)
o.ems_ref = uid
o.logical_resource = resource.logical_resource_id
Expand Down

0 comments on commit 8fe9503

Please sign in to comment.