[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] get_all_records_where


  • To: <xen-api@xxxxxxxxxxxxx>
  • From: Randy <amps@xxxxxxxxx>
  • Date: Tue, 19 Feb 2013 17:41:37 -0800
  • Delivery-date: Wed, 20 Feb 2013 01:41:52 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>
  • Mail-reply-to: <amps@xxxxxxxxx>

I'm trying to better understand the 'where' expression parameter on this API call. I can't seem to find any documentation in the API manual, nor any practical examples floating around the net or in example scripts. My attempts at deciphering the xen-api source code are failing miserably.

For basic scenario like this (the only one I could find on the net), it makes sense:

VM.get_all_records_where('field "is_a_template" = "true" and field "is_a_snapshot" = "false"')

But I'd like to lust VM's only with particular tags. Like this, but via XAPI instead:

xe vm-list tags="test2, test"

In xensource.log you can see that get_all_records_where is called, but the parameter info is redacted:

Feb 19 20:37:23 cl-ash-h1 xapi: [debug|cl-ash-h1|10922153 UNIX /var/xapi/xapi|dispatch:VM.get_all_records_where D:c2dbcc791f62|api_readonly] VM.get_all_records_where

Is there any way I can debug the call parameters so I can run the same command from my scripts? Or can someone clue me in on an expression that would work with the tags (array style) field?

--
~Randy

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.