Bug #6768

Hammer set-parameter overwrites existing value when adding new different parameter

Added by Dominic Cleal over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Martin Bacovsky
Category:API
Target version:Sprint 26
Difficulty: Bugzilla link:1122479
Found in release: Pull request:https://github.com/theforeman/foreman/pull/1620
Story points-
Velocity based estimate-
Release1.6.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1122479
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:
Very

Steps to Reproduce:
1. Create a HostGroup
2. add params kt_org, kt_env, kt_cv
3. Display actual hostgroup info

Actual results:
Only 1 param is actually set "kt_org"

Expected results:
All three params be set "kt_org" "kt_cv" & "kt_env"

Additional info:
These are the commands I ran

  1. hammer hostgroup create --name "RHEL-65" --operatingsystem-id 1 --domain-id 1 --environment-id 1 --puppet-proxy-id 1 --subnet-id 1 --architecture-id 1 --ptable-id 7 --medium-id 7 --environment-id 2 --puppet-ca-proxy-id 1
    Hostgroup created
  1. hammer hostgroup set-parameter --hostgroup-id 4 --name kt_org --value Hilti
    New hostgroup parameter created
  2. hammer hostgroup set-parameter --hostgroup-id 4 --name kt_env --value Library
    Hostgroup parameter updated
  3. hammer hostgroup set-parameter --hostgroup-id 4 --name kt_cv --value HOI-6_5_0-ci
    Hostgroup parameter updated
  1. hammer hostgroup info --id 4
    Id: 4
    Name: RHEL-65
    Label:
    Operating System: RHEL Server 6.5
    Environment: KT_Hilti_Library_HOI_6_5_0_ci_4
    Model:
    Ancestry:
    Subnet: abcloud-ovirt-vlan
    Domain: abcloud.pw
    Architecture: x86_64
    Partition Table: Kickstart default
    Medium: Hilti/Library/Red_Hat_6_Server_Kickstart_x86_64_6_5
    Puppet CA Proxy Id: 1
    Puppet Master Proxy Id: 1
    ComputeProfile:
    Puppetclasses:

    Parameters:
    kt_org => HOI-6_5_0-ci

Associated revisions

Revision 1eaa44ca
Added by Martin Bačovský over 3 years ago

Fixes #6768 - Hammer set-parameter does not work

History

#1 Updated by Dominic Cleal over 3 years ago

  • Category set to Foreman commands

#2 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Target version set to Sprint 26
  • Pull request https://github.com/theforeman/foreman/pull/1620 added

#3 Updated by Martin Bacovsky over 3 years ago

  • Project changed from Hammer CLI to Foreman
  • Category changed from Foreman commands to API

#4 Updated by Dominic Cleal over 3 years ago

  • Project changed from Foreman to Hammer CLI
  • Release set to 1.6.0

#5 Updated by Dominic Cleal over 3 years ago

  • Project changed from Hammer CLI to Foreman

Ugh.

#6 Updated by Anonymous over 3 years ago

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

Also available in: Atom PDF