Project

General

Profile

« Previous | Next » 

Revision ff222ae6

Added by Dominic Cleal about 8 years ago

fixes #14179 - don't merge NIC compute attrs in ComputeProfileMerge

When creating a host over the API and specifying interface compute
attributes, the interface attributes were overwritten from the compute
profile. Example request:

{"host":{"interfaces_attributes":{"0":{"primary":"true","compute_attributes":{"model":"e1000"}}}, ...}}

ComputeProfileMerge stores :interfaces_attributes (name varies based on
the CR type) from the profile in host.compute_attributes, while
InterfaceMerge stores attributes in each interface. When
Orchestration::Compute#add_interfaces_to_compute_attrs runs to merge
per-interface attributes into host.compute_attributes, the step was
skipped as host.compute_attributes[:interfaces_attributes] already
existed from ComputeProfileMerge.

This change excludes interface attributes from being merged by
ComputeProfileMerge, so InterfaceMerge is responsible for copying them
into the interface.

(cherry picked from commit 860cbb0a7c86f7669aad75c7011dbb2030aaede0)

  • added
  • modified
  • copied
  • renamed
  • deleted