Add getNodes method to fetch the list of nodes from chef.