Bug #17135
closedCreating override-value-order for smart classes using CLI doesnt handle comma delimited order
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:
Updated by Martin Bacovsky about 8 years ago
- Blocked by Bug #17180: Parameters of type list can not include values containing commas added
Updated by Martin Bacovsky about 8 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.
Updated by Tomáš Strachota about 8 years ago
- Category changed from Other commands to Smart variables
Updated by Tomáš Strachota about 8 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
Updated by Tomáš Strachota about 8 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)
Updated by Tomáš Strachota about 8 years ago
Disregard my previous two changes and comments. I edited existing issue instead of creating a new one by mistake. I'm sorry.
Updated by Tomáš Strachota about 8 years ago
- Related to Bug #17355: Indistinguishable multiple matchers for override value order added
Updated by Ori Rabin over 7 years ago
- Status changed from New to Assigned
- Assignee set to Ori Rabin
- Target version changed from 113 to 1.13.3
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/312 added
Updated by The Foreman Bot over 7 years ago
- Pull request https://github.com/theforeman/hammer-cli/pull/246 added
Updated by Ivan Necas over 7 years ago
- Target version changed from 1.13.3 to 1.14.2
Updated by Tomáš Strachota over 7 years ago
- Translation missing: en.field_release set to 242
Updated by Ori Rabin over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|78dd9cced8e1c6f9c355ebde6c97c5a47e61b13b.