{"action":"created","issue":{"url":"https://api.github.com/repos/dalen/puppet-puppetdbquery/issues/7","labels_url":"https://api.github.com/repos/dalen/puppet-puppetdbquery/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/dalen/puppet-puppetdbquery/issues/7/comments","events_url":"https://api.github.com/repos/dalen/puppet-puppetdbquery/issues/7/events","html_url":"https://github.com/dalen/puppet-puppetdbquery/issues/7","id":7549841,"number":7,"title":"Allow for a retrieval of all active nodes","user":{"login":"jasonhancock","id":1113245,"avatar_url":"https://avatars.githubusercontent.com/u/1113245?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonhancock","html_url":"https://github.com/jasonhancock","followers_url":"https://api.github.com/users/jasonhancock/followers","following_url":"https://api.github.com/users/jasonhancock/following{/other_user}","gists_url":"https://api.github.com/users/jasonhancock/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonhancock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonhancock/subscriptions","organizations_url":"https://api.github.com/users/jasonhancock/orgs","repos_url":"https://api.github.com/users/jasonhancock/repos","events_url":"https://api.github.com/users/jasonhancock/events{/privacy}","received_events_url":"https://api.github.com/users/jasonhancock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2012-10-12T18:08:43Z","updated_at":"2015-10-12T06:16:27Z","closed_at":"2015-10-12T06:16:27Z","body":"Prior to version 0.1.0, you could retrieve the list of all active nodes by doing something like this:\r\n```\r\n$active_nodes = pdbnodequery(['=',['node','active'],true])\r\n```\r\n\r\nWith the changes introduced in 5426aa7d8576d6a9011832d6219176831626b060, you now have to do this to achive the same thing:\r\n\r\n```\r\n$active_nodes = pdbnodequery_all(['=',['node','active'],true])\r\n```\r\n\r\nHowever, it would be nice to only have to do this:\r\n```\r\n$active_nodes = pdbnodequery()\r\n```\r\n\r\nOr, I would be happy with:\r\n```\r\n$active_nodes = pdbnodequery([])\r\n```\r\nThe last two examples fail with this error message:\r\n```\r\nerr: Could not retrieve catalog from remote server: Error 400 on SERVER: PuppetDB query error: [500] Server Error at /etc/puppet/path/to/some/manifest/init.pp:47 on node server.example.com\r\n```\r\n\r\nThere's obviously a working workaround, so I can understand if you don't want to update the code for this edge case. If that's the case, would you accept a pull request to update the documentation with an example for how to retrieve a list of active nodes?"},"comment":{"url":"https://api.github.com/repos/dalen/puppet-puppetdbquery/issues/comments/147299050","html_url":"https://github.com/dalen/puppet-puppetdbquery/issues/7#issuecomment-147299050","issue_url":"https://api.github.com/repos/dalen/puppet-puppetdbquery/issues/7","id":147299050,"user":{"login":"dalen","id":7400,"avatar_url":"https://avatars.githubusercontent.com/u/7400?v=3","gravatar_id":"","url":"https://api.github.com/users/dalen","html_url":"https://github.com/dalen","followers_url":"https://api.github.com/users/dalen/followers","following_url":"https://api.github.com/users/dalen/following{/other_user}","gists_url":"https://api.github.com/users/dalen/gists{/gist_id}","starred_url":"https://api.github.com/users/dalen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalen/subscriptions","organizations_url":"https://api.github.com/users/dalen/orgs","repos_url":"https://api.github.com/users/dalen/repos","events_url":"https://api.github.com/users/dalen/events{/privacy}","received_events_url":"https://api.github.com/users/dalen/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T06:16:27Z","updated_at":"2015-10-12T06:16:27Z","body":"Well, this works in the latest versions, Although using the `query_nodes` function instead. Closing."}}