Project

General

Profile

Bug #32454

hammer template update has a option --organization-id that does not update anything.

Added by Oleh Fedorenko 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1868310

Description of problem:

The option --organization-id under the command1 does not update anything.

Below two commands are the same:

[1] # hammer template update --id <ID_of_Template> --organization-id <ID_of_Org>

  1. hammer template update --id <ID_of_Template>

- The below [1] and [2] commands do not have any option that needs to be updated still it stats that it updated the template.

- Whereas in the [3] command it uses the --new-name option to update.

[1]
~~~~~~
[root@localhost ]# hammer template update --id 41
<Resource :config_templates>
Provisioning template updated.
~~~~~~~
~

[2]
~~~~~~
[root@localhost ]# hammer template update --id 41 --organization-id 1
<Resource :config_templates>
Provisioning template updated.
~~~~~~~
~

[3]
~~~~~~~
[root@localhost ]# hammer template update --id <id> --new-name hello-world --organization-id <ID>
<Resource :config_templates>
Provisioning template updated.
~~~~~~~~
~

- So the option --organization-id is in the context of "hammer template update" a non-switch which shouldn't be present, as it cannot do anything.

How reproducible:
100% reproducible.

Actual results:
--organization-id when mention without any option does not through an error nor it asks for any other option input that needs to be updated.

Expected results:
Either remove the option or an error message should print to mention any other option to update.

Associated revisions

Revision d7315c19 (diff)
Added by Oleh Fedorenko 5 months ago

Fixes #32454 - Show new msg for empty update commands

Revision 320e7f30
Added by Yifat Makias 5 months ago

Merge pull request #568 from ofedoren/bug-32454-new-msg-for-updates

Fixes #32454 - Show new msg for empty update commands

History

#1 Updated by Oleh Fedorenko 6 months ago

  • Assignee set to Oleh Fedorenko
  • Status changed from New to Assigned

The soultion for this is to show message "Nothing to update" if update commands do not update anything.

#2 Updated by The Foreman Bot 6 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/568 added

#3 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases hammer-cli-foreman-3.0.0 added

#4 Updated by Oleh Fedorenko 5 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Oleh Fedorenko 5 months ago

  • Fixed in Releases hammer-cli-foreman-2.5.1 added

Also available in: Atom PDF