Bug 1127629 - create content host - undefined method `default_environment' for #<User
Summary: create content host - undefined method `default_environment' for #<User
Keywords:
Status: CLOSED DUPLICATE of bug 1127734
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 09:27 UTC by Ales Dujicek
Modified: 2014-08-11 12:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-11 12:49:42 UTC


Attachments (Terms of Use)

Description Ales Dujicek 2014-08-07 09:27:48 UTC
Description of problem:

cannot create content host - getting undefined method exception

# hammer -v -p changeme content-host create --name='cntnthost' --organization-id='80'
[ERROR 2014-08-07 05:25:14 API] 500 Internal Server Error
{
    "displayMessage" => "undefined method `default_environment' for #<User:0x0000000dd43160>",
            "errors" => [
        [0] "undefined method `default_environment' for #<User:0x0000000dd43160>"
    ]
}
[ERROR 2014-08-07 05:25:14 Exception] undefined method `default_environment' for #<User:0x0000000dd43160>
Could not create content host:
  undefined method `default_environment' for #<User:0x0000000dd43160>
[ERROR 2014-08-07 05:25:14 Exception] 

RestClient::InternalServerError (500 Internal Server Error):
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `transmit'
    /usr/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/resource.rb:71:in `post'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.8/lib/apipie_bindings/api.rb:195:in `send'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.8/lib/apipie_bindings/api.rb:195:in `http_call'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.8/lib/apipie_bindings/api.rb:151:in `call'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.8/lib/apipie_bindings/resource.rb:14:in `call'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/command.rb:42:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:164:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/command.rb:33:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/bin/hammer:102
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19


Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140806.0

Comment 2 Brad Buckingham 2014-08-11 12:49:42 UTC

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


Note You need to log in before you can comment on or make changes to this bug.