Project

General

Profile

Actions

Bug #5133

closed

hammer product update requires both ID and NAME

Added by Og Maciel about 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

To update a product using hammer cli, you need to pass both ID and NAME of the product, which goes against what other hammer commands do.

[root@qeblade35 ~]# hammer -v product info --id 88
ID:           88
Name:         Forge
Label:        Forge
Description:
Sync Plan ID:
Sync State:   not_synced
Sync Plan ID:
GPG:
    GPG Key ID:
    GPG Key:
Organization: ACME_Corporation
Readonly:     false
Deletable:    true
Content:
 1) Repo Name: Puppet Labs Forge
    URL:       /custom/Forge/Puppet_Labs_Forge

[root@qeblade35 ~]# hammer -v product update --id 88 --sync-plan-id 1
[ERROR 2014-04-08 16:30:41 Exception] Error: option '--name' is required

See: 'hammer product update --help'
Could not update the product:
  Error: option '--name' is required

  See: 'hammer product update --help'
[ERROR 2014-04-08 16:30:41 Exception]

Clamp::UsageError (option '--name' is required):
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:53:in `parse_options'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:45:in `each'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:45:in `parse_options'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:52:in `parse'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:30:in `parse'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:66:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/bin/hammer:100
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19
[root@qeblade35 ~]# hammer -v product update --id 88 --name Forge --sync-plan-id 1
Product updated
[root@qeblade35 ~]# hammer -v product info --id 88

ID:           88
Name:         Forge
Label:        Forge
Description:
Sync Plan ID: 1
Sync State:   not_synced
Sync Plan ID: 1
GPG:
    GPG Key ID:
    GPG Key:
Organization: ACME_Corporation
Readonly:     false
Deletable:    true
Content:
 1) Repo Name: Puppet Labs Forge
    URL:       /custom/Forge/Puppet_Labs_Forge

As you can see, it was only after I added the product name that I was able to associate an existing sync plan to the product.

This is related to https://bugzilla.redhat.com/show_bug.cgi?id=1085536

Actions #1

Updated by Og Maciel about 10 years ago

  • Status changed from New to Closed
Actions #2

Updated by Eric Helms almost 10 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF