Project

General

Profile

Actions

Bug #17936

closed

Fetching default org/loc from server fails

Added by Tomáš Strachota about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

An attempt to get user's default organization or location from server ends up with no method exception.
Credentials were removed with the api sessions re-work.

Steps to reproduce:

> hammer defaults add --param-name organization_id --provider foreman
Added organization_id default-option with value that will be generated from the server.
> hammer defaults list
----------------|---------------------
PARAMETER       | VALUE               
----------------|---------------------
organization_id | Provided by: Foreman
> hammer user list
Error: undefined method `credentials' for HammerCLIForeman:Module

NoMethodError (undefined method `credentials' for HammerCLIForeman:Module):
    /root/hammer/hammer-cli-foreman/lib/hammer_cli_foreman/defaults.rb:24:in `get_user'
    /root/hammer/hammer-cli-foreman/lib/hammer_cli_foreman/defaults.rb:13:in `get_defaults'
    /root/hammer/hammer-cli/lib/hammer_cli/defaults.rb:54:in `get_defaults'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:243:in `add_custom_defaults'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:229:in `block in all_options'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:227:in `each'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:227:in `inject'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:227:in `all_options'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:236:in `options'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:34:in `parse'
    /usr/local/rvm/gems/ruby-2.3.0/gems/clamp-1.1.1/lib/clamp/command.rb:62:in `run'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:24:in `run'
    /usr/local/rvm/gems/ruby-2.3.0/gems/clamp-1.1.1/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/local/rvm/gems/ruby-2.3.0/gems/clamp-1.1.1/lib/clamp/command.rb:63:in `run'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:24:in `run'
    /usr/local/rvm/gems/ruby-2.3.0/gems/clamp-1.1.1/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/local/rvm/gems/ruby-2.3.0/gems/clamp-1.1.1/lib/clamp/command.rb:63:in `run'
    /root/hammer/hammer-cli/lib/hammer_cli/abstract.rb:24:in `run'
    /usr/local/rvm/gems/ruby-2.3.0/gems/clamp-1.1.1/lib/clamp/command.rb:132:in `run'
    ./bin/hammer:125:in `<main>'
Actions #1

Updated by The Foreman Bot about 7 years ago

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

Updated by Marek Hulán about 7 years ago

  • Target version changed from 1.10.2 to 1.11.2
Actions #3

Updated by Marek Hulán about 7 years ago

  • Target version changed from 1.11.2 to 1.11.4
Actions #4

Updated by Marek Hulán about 7 years ago

  • Target version changed from 1.11.4 to 1.12.1
Actions #5

Updated by Anonymous about 7 years ago

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

Updated by Tomáš Strachota about 7 years ago

  • translation missing: en.field_release set to 234
Actions

Also available in: Atom PDF