Bug #11147

hammer says "Error: 301 Moved Permanently" when you are missing "https://" in server option

Added by Bryan Kearney over 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assigned To:Martin Bacovsky
Category:Foreman commands
Target version:hammer-cli 0.7.0
Difficulty: Bugzilla link:1242488
Found in release: Pull request:https://github.com/theforeman/hammer-cli-foreman/pull/223
Story points-
Velocity based estimate-

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1242488
Description of problem:
Hammer says "Error: 301 Moved Permanently" when you are missing "https://" in server option. It is not user-friendly and I had to bug developer to find that typo.

Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.4.11-1.el6_6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. hammer --server $(hostname) --username admin --password changeme organization create --label 'satellite-qa' --name 'satellite-qa'

Actual results:
  1. hammer --server $(hostname) --username admin --password changeme organization create --label 'satellite-qa' --name 'satellite-qa'
    Could not create the organization:
    Error: 301 Moved Permanently

Expected results:
Some useful error message explaining what is wrong

Additional info:
Running with "https://" is OK:

  1. hammer --server https://$(hostname) --username admin --password changeme organization create --label 'satellite-qa' --name 'satellite-qa'
    Organization created

Related issues

Related to Hammer CLI - Bug #14312: hammer-cli-foreman-0.6.1 misses dependency on apipie-bind... Closed 03/22/2016

Associated revisions

Revision 4a9eceb0
Added by Martin Bacovsky about 1 year ago

Fixes #11147 - Handle API request redirects with useful message

Revision 287fdfcb
Added by Tomas Strachota about 1 year ago

Merge pull request #223 from mbacovsky/11147_redirects

Fixes #11147 - Handle API request redirects with useful message

History

#1 Updated by Tomáš Strachota over 1 year ago

  • Target version set to hammer-cli 0.5.0

#2 Updated by Tomáš Strachota over 1 year ago

  • Target version changed from hammer-cli 0.5.0 to hammer-cli 0.6.0

#3 Updated by Tomáš Strachota about 1 year ago

  • Target version changed from hammer-cli 0.6.0 to hammer-cli 0.6.1

#4 Updated by Martin Bacovsky about 1 year ago

  • Category set to Foreman commands
  • Status changed from New to Assigned
  • Assigned To set to Martin Bacovsky

#5 Updated by The Foreman Bot about 1 year ago

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

#6 Updated by Martin Bacovsky about 1 year ago

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

#7 Updated by Tomáš Strachota about 1 year ago

  • Target version changed from hammer-cli 0.6.1 to hammer-cli 0.7.0

#8 Updated by Dominic Cleal about 1 year ago

  • Related to Bug #14312: hammer-cli-foreman-0.6.1 misses dependency on apipie-bindings >=0.0.16 added

Also available in: Atom PDF