Hi Alex,
First of all, you found a bug. The parameter and return type for the getNodeFacts() method were both wrong. I fixed that
and pushed a new version (0.1.6) of the API code to our Nexus instance.
The getNodeFacts method calls:
/v3/nodes/<node>/facts
The call is documented here:
http://docs.puppetlabs.com/puppetdb/2.1/api/query/v3/nodes.html#get-v3nodesnodefacts
It's a shortcut to the /v3/facts endpoint with a query ["=", "certname", <"NODE">. In addition to this query, the
v3/facts endpoint will also accept a query for "name" or "value". You should hence be able to write expressions like:
result = getNodeFacts(eq(Fact.NAME, "some name"), "some certname");
or
result = getNodeFacts(eq(Fact.VALUE, "some value"), "some certname");
HTH,
- thomas
On 2014-07-21 16:25, Alex Wacker wrote:
Sorry I forgot to include the current error when attempting to pull with the
method:
com.puppetlabs.puppetdb.javaclient.model.Resource cannot be cast to
com.puppetlabs.puppetdb.javaclient.model.Fact
On Monday, July 21, 2014 10:06:15 AM UTC-4, Alex Wacker wrote:
Appreciate that, I appeared to miss it in the docs.
In regards to the getNodeFactsMethod() , I am having a hard time understanding
what Parameters<Node> is supposed
to contain.
If I am attempting to get all the facts for a specific node as a List<Fact>
could you provide me a quick example
on what this node statement is supposed to contain?
I attempted basing it off of what other similar methods in the docs but did
not have much luck.
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected] <mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/f599b660-d175-40b5-afca-ad1c15bc6675%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-dev/f599b660-d175-40b5-afca-ad1c15bc6675%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/53CE3926.6080800%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.