Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s# foreman-rake console
- Loading production environment (Rails 4.2.5.1)
- Failed to load console gems, starting anyway
- irb(main):001:0> User.current = User.where(:admin => true).first
- => #<User id: 3, login: "admin", firstname: "Admin", lastname: "User", mail: "root@infra.sre.smf1.mobitv", admin: true, last_login_on: "2019-02-11 11:41:40", auth_source_id: 1, created_at: "2017-02-08 22:40:12", updated_at: "2018-01-01 13:18:23", password_hash: "5b90a33dc956f3fa34e581eed14841f7f88e4788", password_salt: "10f67684e02c225b22f182a9bac12fe37a82ff4b", locale: nil, avatar_hash: nil, default_organization_id: nil, default_location_id: nil, lower_login: "admin", mail_enabled: true, timezone: "", description: "">
- irb(main):002:0> c = ComputeResource.where(:type => "Foreman::Model::Vmware")
- => #<ActiveRecord::Relation [#<Foreman::Model::Vmware id: 34, name: "paytv-dev", description: nil, url: "invct01p1.infra.smf1.mobitv", user: "it@infra.smf1.mobitv", password: "encrypted-eGozcHlyclhkSHhqQVprQm1zelh1MEUreXZrZk9X...", uuid: "PAYTV-DEV", type: "Foreman::Model::Vmware", created_at: "2019-02-11 11:36:09", updated_at: "2019-02-11 11:36:09", attrs: {:setpw=>1, :pubkey_hash=>"64aa51dac42cfb7f477dcb19d858cab810af29bbf685d68c00bd542c1f472d7c"}, email: nil, caching_enabled: true, domain: nil>, #<Foreman::Model::Vmware id: 1, name: "SRE_DATACENTER", description: "SRE test environment", url: "10.173.96.148", user: "infra.smf1.mobitv\\it", password: "encrypted-b1ovdko0UnhteG5jY3phbmRKV1IyamgrOS9Mc3l5...", uuid: "SRE", type: "Foreman::Model::Vmware", created_at: "2017-12-23 12:53:16", updated_at: "2017-12-23 12:53:16", attrs: {:setpw=>1, :pubkey_hash=>"64aa51dac42cfb7f477dcb19d858cab810af29bbf685d68c00bd542c1f472d7c"}, email: nil, caching_enabled: true, domain: nil>]>
- irb(main):003:0> c.available_networks
- NoMethodError: undefined method `available_networks' for #<ComputeResource::ActiveRecord_Relation:0x0000000bbf6d68>
- from /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:136:in `method_missing'
- from /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:99:in `method_missing'
- from (irb):3
- from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/console.rb:110:in `start'
- from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/console.rb:9:in `start'
- from /usr/share/foreman/lib/tasks/console.rake:8:in `block in <top (required)>'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
- from /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
- from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
- from /opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'irb(main):004:0>
Add Comment
Please, Sign In to add comment