Project

General

Profile

Bug #17135

Creating override-value-order for smart classes using CLI doesnt handle comma delimited order

Added by Ori Rabin almost 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart variables
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:

When setting an override-value-order for an sc-param hammer is not
correctly parsing the comma delimited order, rather taking that
comma delimited list as a single argument.

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

Sat 6.1.7

How reproducible:

100%

Steps to Reproduce:
1. hammer -u admin -p password sc-param update --override true --default-value ["10.37.224.254"] --id 129 --parameter-type array --override-value-order fqdn','datacentre','region','lifecycle_environment','hostgroup','datacentre,lifecycle_environment'
2.
3.

Actual results:

It's creating a single order value
‘fqdn','datacentre','region','lifecycle_environment','hostgroup','datacentre,lifecycle_environment'

Expected results:

It should create an ordered list, ie.
fqdn
datacentre
region
lifecycle_environment
hostgroup
datacentre,lifecycle_environment

Additional info:


Related issues

Related to Hammer CLI - Bug #17355: Indistinguishable multiple matchers for override value orderClosed2016-11-16
Blocked by Hammer CLI - Bug #17180: Parameters of type list can not include values containing commasClosed2016-11-02

Associated revisions

Revision b1cf7962 (diff)
Added by Martin Bacovsky about 1 year ago

Refs #17135 - Replace CSV parser in List Normalizer

Revision 78dd9cce (diff)
Added by Ori Rabin about 1 year ago

Fixes #17135 - Adding a list normalizer to override-value-order

History

#1 Updated by Martin Bacovsky almost 2 years ago

  • Blocked by Bug #17180: Parameters of type list can not include values containing commas added

#2 Updated by Martin Bacovsky almost 2 years ago

I'd suggest to use List normalizer for the override-value-order parameter. It can be achieved by using Array type for override-value-order in https://github.com/theforeman/foreman/blob/698e916ce208b5040b83a908a058c83c94d158ee/app/controllers/api/v2/smart_class_parameters_controller.rb#L49

The normalizer needs to be fixed to support commas in the values (#17180) though. The related blocking issue was attached.

#3 Updated by Tomáš Strachota almost 2 years ago

  • Category changed from Other commands to Smart variables

#4 Updated by Tomáš Strachota over 1 year ago

  • Subject changed from Creating override-value-order for smart classes using CLI doesnt handle comma delimited order to Indistinguishable multiple matchers for override value order
  • Status changed from New to Assigned
  • Assignee set to Tomáš Strachota
  • Target version set to 1.4.4

#5 Updated by Tomáš Strachota over 1 year ago

  • Subject changed from Indistinguishable multiple matchers for override value order to Creating override-value-order for smart classes using CLI doesnt handle comma delimited order
  • Status changed from Assigned to New
  • Assignee deleted (Tomáš Strachota)
  • Target version deleted (1.4.4)

#6 Updated by Tomáš Strachota over 1 year ago

Disregard my previous two changes and comments. I edited existing issue instead of creating a new one by mistake. I'm sorry.

#7 Updated by Tomáš Strachota over 1 year ago

  • Related to Bug #17355: Indistinguishable multiple matchers for override value order added

#8 Updated by Ori Rabin over 1 year ago

  • Target version set to 113

#9 Updated by Ori Rabin about 1 year ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
  • Target version changed from 113 to 1.13.3

#10 Updated by The Foreman Bot about 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/312 added

#11 Updated by The Foreman Bot about 1 year ago

  • Pull request https://github.com/theforeman/hammer-cli/pull/246 added

#12 Updated by Ivan Necas about 1 year ago

  • Target version changed from 1.13.3 to 1.14.2

#13 Updated by Tomáš Strachota about 1 year ago

  • Legacy Backlogs Release (now unused) set to 242

#14 Updated by Ori Rabin about 1 year ago

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

Also available in: Atom PDF