Bug 1310568
| Summary: | Remove '--new-name' option from sc-param to not to update the param name. | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Jitendra Yejare <jyejare> |
| Component: | Hammer | Assignee: | Tomas Strachota <tstrachota> |
| Status: | CLOSED ERRATA | QA Contact: | Adam Ruzicka <aruzicka> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | Nightly | CC: | aruzicka, bkearney, ehelms |
| Target Milestone: | Unspecified | ||
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/13830 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 11:07:01 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: | 1278718 | ||
Upstream bug assigned to tstrachota Upstream bug assigned to tstrachota Moving to POST since upstream bug http://projects.theforeman.org/issues/13830 has been closed ------------- Anonymous Applied in changeset commit:hammer-cli-foreman|90ec64540dbf3e4546d3cd33492ef8c1279517e1. Verified in this latest Satellite 6.2 snap 3. The issue is still persists. I can see '--new-name' option for sc-param to update. Also on attempt to update sc-param with --new-name, output says 'parameter updated'. For some reason the bug made it to ON_QA without cherry-pick. Switching back to POST with a note in the devel whiteboard. Please don't include needs_cherrypick manually as that is set and used by our tooling. VERIFIED. @Sat6.2.0-Snap13.1 tfm-rubygem-hammer_cli_katello-0.0.22.11-1.el7sat.noarch used reproducer in comment #0: # hammer sc-param update --help Usage: hammer sc-param update [OPTIONS] Options: --avoid-duplicates AVOID_DUPLICATES Remove duplicate values (only array type) One of true/false, yes/no, 1/0. --default-value DEFAULT_VALUE Value to use when there is no match --description DESCRIPTION Description of smart class --hidden-value HIDDEN_VALUE When enabled the parameter is hidden in the UI One of true/false, yes/no, 1/0. --id ID --merge-default MERGE_DEFAULT Include default value when merging all matching values One of true/false, yes/no, 1/0. --merge-overrides MERGE_OVERRIDES Merge all matching values (only array/hash type) One of true/false, yes/no, 1/0. --name NAME Smart class parameter name --override OVERRIDE Override this parameter. One of true/false, yes/no, 1/0. --override-value-order OVERRIDE_VALUE_ORDER The order in which values are resolved --parameter-type PARAMETER_TYPE Type of the parameter. Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json' --path PATH The order in which values are resolved --puppet-class PUPPET_CLASS_NAME Puppet class name --puppet-class-id PUPPET_CLASS_ID ID of Puppet class --required REQUIRED This parameter is required. One of true/false, yes/no, 1/0. --use-puppet-default USE_PUPPET_DEFAULT Do not send this parameter via the ENC. Puppet will use the value defined in the Puppet manifest for this parameter One of true/false, yes/no, 1/0. --validator-rule VALIDATOR_RULE Used to enforce certain values for the parameter values --validator-type VALIDATOR_TYPE Type of the validator. Possible value(s): 'regexp', 'list', '' -h, --help print help # hammer sc-param list | head -n 4 ---|--------------------|---------------|----------|----------------------- ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS ---|--------------------|---------------|----------|----------------------- 6 | authmethod | | | access_insights_client # hammer sc-param update --id 6 --new-name newname Could not update the parameter: Error: Unrecognised option '--new-name' See: 'hammer sc-param update --help' >>> the '--new-name' option is not shown in --help >>> the '--new-name' option is not accepted 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/RHBA-2016:1501 |
Description of problem: Currently '--new-name' option is shown to update the smart class parameter name from CLI. But actually smart class parameter name should not be updated by any means. This option is applicable in case of 'smart variable' only. Version-Release number of selected component (if applicable): foreman-1.11.0-0.develop.201602171602gitd5b5059.el7.noarch How reproducible: Always Steps to Reproduce: 1. Attempt to update the smart class parameter name using CLI hammer commnad: # hammer sc-param update --new-name <new_anme> --id <sc-params id> Actual results: Success ! Example Output: [root@qeblade36 ~]# hammer sc-param update --help Ignoring ruby-libvirt-0.5.2 because its extensions are not built. Try: gem pristine ruby-libvirt --version 0.5.2 Usage: hammer sc-param update [OPTIONS] Options: --avoid-duplicates AVOID_DUPLICATES Remove duplicate values (only array type) One of true/false, yes/no, 1/0. --default-value DEFAULT_VALUE Value to use when there is no match --description DESCRIPTION Description of smart class --hidden-value HIDDEN_VALUE When enabled the parameter is hidden in the UI One of true/false, yes/no, 1/0. --id ID --merge-default MERGE_DEFAULT Include default value when merging all matching values One of true/false, yes/no, 1/0. --merge-overrides MERGE_OVERRIDES Merge all matching values (only array/hash type) One of true/false, yes/no, 1/0. --name NAME Smart class parameter name --new-name NEW_NAME --override OVERRIDE Override this parameter. One of true/false, yes/no, 1/0. --override-value-order OVERRIDE_VALUE_ORDER The order in which values are resolved --parameter-type PARAMETER_TYPE Type of the parameter. Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json' --path PATH The order in which values are resolved --puppet-class PUPPET_CLASS_NAME Puppet class name --puppet-class-id PUPPET_CLASS_ID ID of Puppet class --required REQUIRED This parameter is required. One of true/false, yes/no, 1/0. --use-puppet-default USE_PUPPET_DEFAULT Do not send this parameter via the ENC. Puppet will use the value defined in the Puppet manifest for this parameter One of true/false, yes/no, 1/0. --validator-rule VALIDATOR_RULE Used to enforce certain values for the parameter values --validator-type VALIDATOR_TYPE Type of the validator. Possible value(s): 'regexp', 'list', '' -h, --help print help Expected results: The '--new-name' option should not be available for sc-param.