Project

General

Profile

Bug #14311

hammer-cli defaults add does not work if no defaults file exist.

Added by Shimon Shtein almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

  1. hammer defaults list
    ----------|------
    PARAMETER | VALUE
    ----------|------
  1. hammer defaults providers
    ---------|------------------------------|-------------------------------------------------------------
    PROVIDER | SUPPORTED DEFAULTS | DESCRIPTION
    ---------|------------------------------|-------------------------------------------------------------
    foreman | organization_id, location_id | Use the default organization and/or location from the server
    ---------|------------------------------|-------------------------------------------------------------
  1. hammer defaults add --param-name=organization_id --provider=foreman
    No such file or directory @ rb_sysopen - /root/.hammer/defaults.yml
  1. hammer defaults add --param-name=organization_id --param-value=1
    No such file or directory @ rb_sysopen - /root/.hammer/defaults.yml
  1. hammer activation-key list
    Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.

Tried adding /root/.hammer/defaults.yml

  1. ll /root/.hammer/defaults.yml
    rw-r--r-. 1 root root 0 Mar 21 13:32 /root/.hammer/defaults.yml
  1. hammer defaults add --param-name=organization_id --param-value=1
    Error: undefined method `[]' for false:FalseClass

Associated revisions

Revision 7e37bfa0 (diff)
Added by Shimon Shtein almost 5 years ago

Fixes #14311 - Now hammer recognizes when to create defaults file correctly

Revision fa7844d0
Added by Tomas Strachota almost 5 years ago

Merge pull request #199 from ShimShtein/14311

Fixes #14311 - Now hammer recognizes when to create defaults file correctly

History

#1 Updated by The Foreman Bot almost 5 years ago

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

#2 Updated by Tomáš Strachota almost 5 years ago

  • Bugzilla link set to 1315645

#3 Updated by Shimon Shtein almost 5 years ago

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

Also available in: Atom PDF