Project

General

Profile

Actions

Bug #17135

closed

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

Added by Ori Rabin over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart variables
Target version:
Fixed in Releases:
Found in Releases:
In Kanboard:

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 2 (0 open2 closed)

Related to Hammer CLI - Bug #17355: Indistinguishable multiple matchers for override value orderClosedTomáš Strachota11/16/2016Actions
Blocked by Hammer CLI - Bug #17180: Parameters of type list can not include values containing commasClosedMartin Bacovsky11/02/2016Actions
Actions #1

Updated by Martin Bacovsky over 7 years ago

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

Updated by Martin Bacovsky over 7 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.

Actions #3

Updated by Tomáš Strachota over 7 years ago

  • Category changed from Other commands to Smart variables
Actions #4

Updated by Tomáš Strachota over 7 years 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
Actions #5

Updated by Tomáš Strachota over 7 years 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)
Actions #6

Updated by Tomáš Strachota over 7 years ago

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

Actions #7

Updated by Tomáš Strachota over 7 years ago

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

Updated by Ori Rabin over 7 years ago

  • Target version set to 113
Actions #9

Updated by Ori Rabin almost 7 years ago

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

Updated by The Foreman Bot almost 7 years ago

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

Updated by The Foreman Bot almost 7 years ago

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

Updated by Ivan Necas almost 7 years ago

  • Target version changed from 1.13.3 to 1.14.2
Actions #13

Updated by Tomáš Strachota over 6 years ago

  • translation missing: en.field_release set to 242
Actions #14

Updated by Ori Rabin over 6 years ago

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

Also available in: Atom PDF