Bug 1463686 - Smartclass parameters does not allow for multiple data types
Smartclass parameters does not allow for multiple data types
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Smart Variables (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2017-06-21 09:45 EDT by Eric Beaudoin
Modified: 2017-09-28 02:27 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-09-28 02:27:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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: 

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.
Comment 8 orabin 2017-09-28 02:27:42 EDT
Closing based on Comment 7.
Comment 3 provides the workflow with "Use Puppet default" option.

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