Project

General

Profile

Actions

Bug #32454

closed

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

Added by Oleh Fedorenko about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
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.

Actions #1

Updated by Oleh Fedorenko about 3 years ago

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

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

Actions #2

Updated by The Foreman Bot about 3 years ago

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

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases hammer-cli-foreman-3.0.0 added
Actions #4

Updated by Oleh Fedorenko about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Oleh Fedorenko about 3 years ago

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

Also available in: Atom PDF