Giter Site home page Giter Site logo

Comments (2)

howdoicomputer avatar howdoicomputer commented on August 16, 2024

Now, I can get around this by doing a partial_search like so

nodes = ridley.partial_search(:node, 'name:*', ['ec2'])
puts nodes.count
puts ridley.node.all.count

nodes.each do |node|
  puts node.automatic.ec2.public_hostname
  sleep 5
end
⋊> ~/w/w/chef_ec2_dossier ruby test.rb                                                                         22:38:14
1000
13188
ec2-54-87-46-137.compute-1.amazonaws.com

However, partial search has a page limit of 1000? A full search caused Ridley to crash. Not surprising given the obscene node count (I just came into a role where the Chef environment was extremely neglected).

It also looks like the .automatic method doesn't return values when taken from a node collection?

ridley.node.all.each do |node|
  puts node.automatic.to_hash
  sleep 5
end

Returns an empty hash for each node.

from ridley.

howdoicomputer avatar howdoicomputer commented on August 16, 2024

Oh, duh. Found it in your README.md.

Notify: You have to send the #reload message to node objects returned from a full listing. Their attributes aren't automatically populated from the initial search.

Herp a derp derp. Now everything works.

For anyone searching through issues to find out why your code doesn't work. Well, here it is.

Also, to grab node attributes: .default .automatic .blah. Totally forgot I had to do a reload from last time I touched this library. Hah.

from ridley.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.