Project

General

Profile

Bug #6342

Compute profile should be used when empty volumes and interfaces passed in compute_attributes

Added by Dominic Cleal about 5 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When creating hosts through the API with hammer, it's fairly unavoidable that you get a params hash containing:

"compute_attributes"=>{"volumes_attributes"=>{},"interfaces_attributes"=>{},"nics_attributes"=>{}}

due to hammer not knowing if a compute profile will be used or not via the host group.

set_compute_attributes in Host::Managed checks for compute_attributes.empty?, which will return false when these empty sub-hashes are present. It should be possible to use the compute profile even when passing in this empty data.

Either that, or CR VM creation should be reliable without them set to {}, but it currently isn't.


Related issues

Related to Foreman - Feature #4250: Expose compute profiles via APIClosed2014-02-04
Related to Hammer CLI - Feature #6344: Commands for read operations around compute profiles and attributesAssigned
Related to Foreman - Bug #13507: Creating VMs with hammer requires too many parametersResolved2016-02-01
Related to Foreman - Bug #14179: Interface/NIC compute attributes in API host creation overwritten with compute profile attributesClosed2016-03-14
Related to Foreman - Bug #10223: Image provisoning over API doesn't start host automaticallyNew2015-04-21
Has duplicate Hammer CLI - Bug #11829: hammer host create does not send correct compute-attributes information which breaks a condition on the server sideDuplicate2015-09-15
Has duplicate Foreman - Bug #14485: hammer should consider everything from the "Compute Profile"Duplicate2016-04-05

Associated revisions

Revision 47990639 (diff)
Added by Tomáš Strachota over 3 years ago

Fixes #6342 - merge compute profile when attributes in api host#create

API v2 host#craete call now merges user specified compute attributes
with compute profile. UI functionality remains untouched.

History

#1 Updated by Dominic Cleal about 5 years ago

  • Related to Feature #4250: Expose compute profiles via API added

#2 Updated by Dominic Cleal about 5 years ago

  • Related to Feature #6344: Commands for read operations around compute profiles and attributes added

#3 Updated by Dominic Cleal almost 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Target version set to 1.8.1

#4 Updated by Dmitri Dolguikh almost 5 years ago

  • Target version changed from 1.8.1 to 1.8.0

#5 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Ready For Testing to Assigned

#6 Updated by Dmitri Dolguikh almost 5 years ago

  • Target version changed from 1.8.0 to 1.7.5

#7 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Dominic Cleal)
  • Target version deleted (1.7.5)

#8 Updated by Dominic Cleal almost 4 years ago

  • Has duplicate Bug #11829: hammer host create does not send correct compute-attributes information which breaks a condition on the server side added

#9 Updated by Bryan Kearney almost 4 years ago

  • Bugzilla link set to 1263332

#10 Updated by Tomáš Strachota over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomáš Strachota

#11 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2802 added
  • Pull request deleted ()

#12 Updated by Guido Günther over 3 years ago

  • Related to Bug #13507: Creating VMs with hammer requires too many parameters added

#13 Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#14 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 71

#15 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #14179: Interface/NIC compute attributes in API host creation overwritten with compute profile attributes added

#16 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #10223: Image provisoning over API doesn't start host automatically added

#17 Updated by Guido Günther over 3 years ago

Anonymous wrote:

Applied in changeset 47990639ae6b02f541e5d76b392d5549afd74bc7.

Could this be fixed on 1.10.x as well? We won't be able to update to 1.11.x in not time so this would be awesome.

#18 Updated by Dominic Cleal over 3 years ago

Sorry, this is a behaviour change and has a bit of risk (one regression so far) so it'll only be in 1.11.

#19 Updated by Dominic Cleal about 3 years ago

  • Has duplicate Bug #14485: hammer should consider everything from the "Compute Profile" added

#20 Updated by Bryan Kearney about 3 years ago

  • Bugzilla link changed from 1263332 to 1319564

Also available in: Atom PDF