On Thu, Jun 4, 2009 at 1:33 PM, Lars Ellenberg <lars.ellenb...@linbit.com> wrote: > On Wed, Jun 03, 2009 at 10:45:41PM +0200, Andrew Beekhof wrote: >> fixed: >> http://hg.clusterlabs.org/pacemaker/stable-1.0/rev/cf478ed1269f > > thanks. > though that simply returns the parent XML_ELEMENT_NODE, > which makes both > '//primiti...@type="IPaddr2" and instance_attributes/nvpa...@name = "ip" and > @value="10.0.0.1"]]' and > '//primiti...@type="IPaddr2" and instance_attributes/nvpa...@name = "ip" and > @value="10.0.0.1"]]/@id' > return the same, namely the full primitive xml: > <primitive class="ocf" id="ip_try3" provider="heartbeat" type="IPaddr2"> > <instance_attributes id="ip_try3-instance_attributes"> > <nvpair id="ip_try3-instance_attributes-ip" name="ip" > value="10.0.0.1"/> > </instance_attributes> > </primitive> > > where I would have liked the ..../@id to only spit out > ip_try3 > > current workaround is obviously > | sed -ne '1 { s/^<.* id="\([^"]*\)".*>$/\1/p; };q' > > but "it would be nice..."
yeah, alas everything between the xpath result and the screen was built for element nodes. i guess cibadmin could reapply the xpath expression to the result it got from the cluster. that could work. > hm. maybe I can hack something there myself. if you happened to write a patch for the above i'd be sure to include it :-) _______________________________________________ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker