Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1215167

Summary: Hammer CLI lifecycle-environment create complains of option_prior_id field
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: tkolhar
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-24 13:39:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Og Maciel 2015-04-24 13:32:28 UTC
Description of problem:

Our automation has shown that the command "lifecycle-environment create" has regressed since last build. When creating a new lifecycle-environment, hammer complains about a "Unknown option name 'option_prior_id'" which is not being passed by our tests:

# LANG=en_US.UTF-8 hammer -v -d -u admin -p changeme --output=csv lifecycle-environment create --prior="Library" --organization-id="6" --name="lw80IMW6ai"
[ INFO 2015-04-24 09:22:03 Init] Initialization of Hammer CLI (0.1.4.8) has started...
[DEBUG 2015-04-24 09:22:03 Init] Running at ruby 2.0.0-p598
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2015-04-24 09:22:03 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2015-04-24 09:22:03 Connection] Registered: foreman
[DEBUG 2015-04-24 09:22:03 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en"
}
[ INFO 2015-04-24 09:22:04 Modules] Extension module hammer_cli_foreman (0.1.4.9) loaded
[ INFO 2015-04-24 09:22:04 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.2.5) loaded
[ INFO 2015-04-24 09:22:04 Modules] Extension module hammer_cli_foreman_discovery (0.0.1.7) loaded
[ INFO 2015-04-24 09:22:04 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2015-04-24 09:22:04 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2015-04-24 09:22:04 Modules] Extension module hammer_cli_import (0.10.6.5) loaded
[ INFO 2015-04-24 09:22:04 Modules] Extension module hammer_cli_katello (0.0.7.8) loaded
[DEBUG 2015-04-24 09:22:04 Init] Using locale 'en'
[DEBUG 2015-04-24 09:22:04 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/gems/gems/hammer_cli-0.1.4.8/locale'
[DEBUG 2015-04-24 09:22:04 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale'
[DEBUG 2015-04-24 09:22:04 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/gems/gems/hammer_cli_foreman-0.1.4.9/locale'
[DEBUG 2015-04-24 09:22:04 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale'
[DEBUG 2015-04-24 09:22:04 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/share/gems/gems/hammer_cli_katello-0.0.7.8/locale'
[ INFO 2015-04-24 09:22:04 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true, "option_debug"=>true, "option_username"=>"admin", "option_password"=>"***", "option_output"=>"csv"}
[ INFO 2015-04-24 09:22:04 HammerCLIKatello::LifecycleEnvironmentCommand] Called with options: {}
[ERROR 2015-04-24 09:22:04 Exception] Error: Unknown option name 'option_prior_id'
Could not create environment:
  Error: Unknown option name 'option_prior_id'
[ERROR 2015-04-24 09:22:04 Exception]

RuntimeError (Unknown option name 'option_prior_id'):
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:41:in `get_option'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:52:in `block in option_switches'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:51:in `collect'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:51:in `option_switches'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:29:in `required'
    /usr/share/gems/gems/hammer_cli_katello-0.0.7.8/lib/hammer_cli_katello/lifecycle_environment.rb:15:in `block in included'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:109:in `instance_eval'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/validator.rb:109:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/abstract.rb:49:in `validate_options'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/abstract.rb:32:in `parse'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:66:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/abstract.rb:23:in `run'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/abstract.rb:23:in `run'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/lib/hammer_cli/abstract.rb:23:in `run'
    /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/share/gems/gems/hammer_cli-0.1.4.8/bin/hammer:108:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Version-Release number of selected component (if applicable):

* Satellite 6.1 GA SNAP 1

How reproducible:


Steps to Reproduce:
1. Using the hammer cli, try to create a lifecycle-environment
2.
3.

Actual results:

Error: Unknown option name 'option_prior_id'

Expected results:


Additional info:

Comment 1 Tazim Kolhar 2015-04-24 13:39:51 UTC

*** This bug has been marked as a duplicate of bug 1215027 ***