Bug 1328613

Summary: Creating override-value-order for smart classes using CLI doesnt handle comma delimited order
Product: Red Hat Satellite Reporter: Stuart Auchterlonie <sauchter>
Component: Smart VariablesAssignee: orabin
Status: CLOSED ERRATA QA Contact: Renzo Nuccitelli <rnuccite>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: bkearney, inecas, jcallaha, orabin, rnuccite, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hammer-cli-0.11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1316897, 1479962    

Description Stuart Auchterlonie 2016-04-19 20:59:17 UTC
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:

Comment 5 orabin 2016-10-31 13:07:06 UTC
Created redmine issue http://projects.theforeman.org/issues/17135 from this bug

Comment 6 orabin 2016-10-31 14:30:22 UTC
*** Bug 1332182 has been marked as a duplicate of this bug. ***

Comment 7 Satellite Program 2017-05-18 06:04:05 UTC
Upstream bug assigned to orabin

Comment 8 Satellite Program 2017-05-18 06:04:08 UTC
Upstream bug assigned to orabin

Comment 9 Satellite Program 2017-07-25 10:04:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17135 has been resolved.

Comment 12 Renzo Nuccitelli 2017-12-21 17:20:44 UTC
Worked on satellite 6.3 snap 29:

hammer> sc-param info --id 16
Id:                 16
Parameter:          policies
Default Value:      ["foo"]
Override:           true
Puppet class:       foreman_scap_client
Description:        
Type:               array
Hidden Value?:      false
Use puppet default: no
Required:           true
Validator:          
    Type: 
    Rule:
Override values:    
    Merge overrides:     no
    Merge default value: no
    Avoid duplicates:    no
    Order:               
      fqdn
      hostgroup
      os
      domain
    Values:
Environments:       
    common
    development
    example_env
    production
Created at:         2017/12/21 17:00:22
Updated at:         2017/12/21 17:16:21

hammer> sc-param info --id 16

Id:                 16
Parameter:          policies
Default Value:      ["foo"]
Override:           true
Puppet class:       foreman_scap_client
Description:        
Type:               array
Hidden Value?:      false
Use puppet default: no
Required:           true
Validator:          
    Type: 
    Rule:
Override values:    
    Merge overrides:     no
    Merge default value: no
    Avoid duplicates:    no
    Order:               
      fqdn
      hostgroup
      os
      domain
    Values:
Environments:       
    common
    development
    example_env
    production
Created at:         2017/12/21 17:00:22
Updated at:         2017/12/21 17:16:21


Thus I'm moving this BZ to VERIFIED

Comment 13 Satellite Program 2018-02-21 16:54:17 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336