Guest User

Untitled

a guest
Feb 11th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. s# foreman-rake console
  2. Loading production environment (Rails 4.2.5.1)
  3. Failed to load console gems, starting anyway
  4. irb(main):001:0> User.current = User.where(:admin => true).first
  5. => #<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: "">
  6. irb(main):002:0> c = ComputeResource.where(:type => "Foreman::Model::Vmware")
  7. => #<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>]>
  8. irb(main):003:0> c.available_networks
  9. NoMethodError: undefined method `available_networks' for #<ComputeResource::ActiveRecord_Relation:0x0000000bbf6d68>
  10. 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'
  11. 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'
  12. from (irb):3
  13. from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/console.rb:110:in `start'
  14. from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/console.rb:9:in `start'
  15. from /usr/share/foreman/lib/tasks/console.rake:8:in `block in <top (required)>'
  16. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
  17. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
  18. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
  19. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
  20. 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'
  21. from /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
  22. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
  23. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
  24. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
  25. 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'
  26. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
  27. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
  28. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
  29. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
  30. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
  31. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  32. from /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
  33. from /opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'irb(main):004:0>
Add Comment
Please, Sign In to add comment