[one-users] oneimage filter by path or source

Daniel Dehennin daniel.dehennin at baby-gnu.org
Wed Sep 17 02:27:28 PDT 2014


Carlos Martín Sánchez <cmartin at opennebula.org> writes:


[...]

> Actually, since the source is not a column, ticket 2372 would not apply.
> This would require a more general filter.
>
> Maxim, what would be your use case?
> If you need to do a one-time search, you can filter the data through the
> api [1] or using xpath:
>
> $ oneimage list -x | xpath  -e
> '/IMAGE_POOL/IMAGE[PATH="/tmp/ttylinux.raw"]/ID'

+1

I used the xpath tool from libxml-xpath-perl to make several complicated
XPath queries to find images not used by any templates.

Finaly, I prefer this solution since it's more UNIX' spirit, piping
several simple[1] commands.

Regards.

Footnotes: 
[1]  In term of XPath, simple looks like a joke ;-)

-- 
Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6  2AAD CC1E 9E5B 7A6F E2DF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 342 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140917/890a7682/attachment.pgp>


More information about the Users mailing list