Project

General

Profile

Bug #16730

repository delete by name neither allows to delete repo w/o org nor accepts the org

Added by Brad Buckingham over 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:

repository delete --help doesn't show any option --organization or organization-id

~]# hammer -u admin -p changeme repository delete --help
Usage:
hammer repository delete [OPTIONS]

Options:
--id ID
--name NAME Repository name to search by
--product PRODUCT_NAME Product name to search by
--product-id PRODUCT_ID product numeric identifier
-h, --help print help

atomic_f23 repo is already there

~]# hammer -u admin -p changeme repository list --organization-id=1 | grep atomic_f23
4 | atomic_f23 | atomic | ostree | https://kojipkgs.fedoraproject.org/atomic/23/

If we don't pass --organization, hammer raises error couldn't find org

~]# hammer -u admin -p changeme repository delete --name atomic_f23 --product atomic
Could not delete the Repository:
Error: Could not find organization. Some search options were missing, please see --help.

if we pass org, it says unrecognized option

~]# hammer -u admin -p changeme repository delete --name atomic_f23 --product atomic --organization-ids=1
Could not delete the Repository:
Error: Unrecognised option '--organization-ids'

~]# hammer -u admin -p changeme repository delete --name atomic_f23 --product atomic --organization-id=1
Could not delete the Repository:
Error: Unrecognised option '--organization-id'

~]# hammer -u admin -p changeme repository delete --name atomic_f23 --product atomic --organization='Default Organization'
Could not delete the Repository:
Error: Unrecognised option '--organization'

Version-Release number of selected component (if applicable):
sat6.3 snap2

How reproducible:

Steps to Reproduce:
1. delete a repository with repo name and product name

Actual results:
repository delete by name neither allows to delete repo w/o org nor accepts the org

Expected results:
help should list the --organization/--organization-id parameter if its required otherwise repo should be deleted successfully w/o org

Additional info:

Associated revisions

Revision 7f4d6b79 (diff)
Added by Andrew Kofink over 4 years ago

Fixes #16730 - allow organization options... (#456)

allow organization options in hammer repository delete command

History

#1 Updated by Justin Sherrill over 4 years ago

  • Subject changed from repository delete by name neither allows to delete repo w/o org nor accepts the org to repository delete by name neither allows to delete repo w/o org nor accepts the org
  • Legacy Backlogs Release (now unused) set to 114

#2 Updated by Brad Buckingham over 4 years ago

  • Assignee set to Andrew Kofink
  • Target version set to 129

#3 Updated by Andrew Kofink over 4 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/456 added

#4 Updated by Andrew Kofink over 4 years ago

  • Status changed from New to Ready For Testing

#5 Updated by The Foreman Bot over 4 years ago

  • Legacy Backlogs Release (now unused) deleted (114)

#6 Updated by Anonymous over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#7 Updated by Justin Sherrill over 4 years ago

  • Legacy Backlogs Release (now unused) set to 162

#8 Updated by Justin Sherrill over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 162 to 188

Also available in: Atom PDF