Project

General

Profile

Bug #12294

hammer host update ... --parameters=... fails if parameters already exist

Added by Bryan Kearney almost 6 years ago. Updated about 3 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1274683

Description of problem:
I want to create and update hosts using hammer host create/update and pass custom parameters to it. This works fine on create but fails when I want to update a host and pass a parameter that is already present.

Version-Release number of selected component (if applicable):
foreman 1.13
hammer 0.8.0
hammer_cli_foreman 0.8.0

How reproducible:
always

Steps to Reproduce:
1. hammer host create ... --parameters="foo=bar"
2. hammer host update ... --parameters="foo=bar"

Actual results:

Could not update the host:
  Name has already been taken

Expected results:
Host updated

Additional info:
It does not matter if I want to set the parameter to the same or a new value.


Related issues

Related to Foreman - Bug #18687: API updates with parameters_attributes throws "undefined method `map!' for {}:ActionController::Parameters"Closed2017-02-27

Associated revisions

Revision 00ed8ba5 (diff)
Added by Ondřej Pražák over 4 years ago

Fixes #12294 - Update existing params using API

History

#1 Updated by Tomáš Strachota almost 5 years ago

  • Description updated (diff)
  • Category set to Smart variables

#2 Updated by Ori Rabin almost 5 years ago

  • Project changed from Hammer CLI to Foreman
  • Category deleted (Smart variables)

This error happens in the api when sending host_parameters_attributes (without hammer).

#3 Updated by Ori Rabin almost 5 years ago

  • Category set to Parameters

#4 Updated by Ori Rabin over 4 years ago

  • Category changed from Parameters to API

#5 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ondřej Pražák
  • Pull request https://github.com/theforeman/foreman/pull/4224 added

#6 Updated by Anonymous over 4 years ago

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

#7 Updated by Marek Hulán over 4 years ago

  • Target version set to 1.11.4

#8 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 209

#9 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #18687: API updates with parameters_attributes throws "undefined method `map!' for {}:ActionController::Parameters" added

Also available in: Atom PDF