Bug 1463686 - Smartclass parameters does not allow for multiple data types [NEEDINFO]
Smartclass parameters does not allow for multiple data types
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Smart Variables (Show other bugs)
6.2.7
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-21 09:45 EDT by Eric Beaudoin
Modified: 2017-08-15 04:05 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
orabin: needinfo? (ebeaudoi)


Attachments (Terms of Use)

  None (edit)
Description Eric Beaudoin 2017-06-21 09:45:21 EDT
- Description of problem:
The elastic.co elasticsearch puppet class accepts multiple datatypes for the $version parameter.
The parameter defaults to the boolean value False, but can also be set to a version number in String format.  The Smart class parameters Parameters details UI does not handle this case.  You are forced to choose on or the other.

Choose boolean and you can't enter a version number.
Choose string and Puppet will return an error because "False" is not a Boolean.

Link to puppet class code: 
https://github.com/elastic/puppet-elasticsearch/blob/5.3.1/manifests/init.pp

A work around is to choose string and always specify a version number (which is probably the best practice anyways), but this forces the user to choose a version.


- Actual results:
The Elasticsearch Puppet class $version parameter accepts both a Boolean (the default value) or a String representing the version to install, but the Satellite UI only allows you to pick one datatype.  This means I'm forced to specify a version number everywhere.  I cannot specify a version in one host group and leave the default setting in another because the data type validation will fail at either the Satellite or Puppet level.

Expected results:
The smart class Boolean accept True/False/value
Comment 3 orabin 2017-07-03 04:04:19 EDT
Why not use the "Use Puppet default" option?

The $version parameter should be string and in cases where you need to go back to the default check the "Use Puppet default" checkbox.
This will avoid sending anything to puppet in a specific case.
You can add a matcher hostgroup=EXAMPLE and check the "Use Puppet default" for that matcher and then all hosts that have that hostgroup EXAMPLE will not sent the value of version unless you add a matcher of a higher priority for them.

Note You need to log in before you can comment on or make changes to this bug.