<html>Hi all,<br />I can't find any exhaustive doc for new vdsm-client. My problem actually is a task (export a vm to OVA) blocked.<br />I found that I can interact with<br />vdsm-client Task getInfo taskID=<uuid>, and replace getInfo by "stop", BUT : how can I find this UUID ???<br />Old "vdsClient -s 0 getAllTasksStatuses" has no equivalent ??<br /><br />Does someone knows if a complete doc exists dot vdsm-client ?<br />Thanks<br />Frank<p class="Text2"><br /> </p><br /><br />Le Mercredi, Janvier 25, 2017 12:30 CET, Irit Goihman <igoihman@redhat.com> a écrit:<br /> <blockquote type="cite" cite="CAA=i7HMsB7iRYqP9yyBx4w7pGer9rTE9wkJZRgcmXRQMaJezwg@mail.gmail.com"><div dir="ltr">Hi All,<div> </div><div>vdsClient will be removed from master branch today.</div><div>It is using XMLRPC protocol which has been deprecated and replaced by JSON-RPC.</div><div> </div><div>A new client for vdsm was introduced in 4.1: vdsm-client.</div><div>This is a simple client that uses JSON-RPC protocol which was introduced in ovirt 3.5.</div><div> </div><div>The client is not aware of the available methods and parameters, and you should consult </div><div>the schema [1] in order to construct the desired command.</div><div> </div><div>Future version should parse the schema and provide online help.</div><div> </div><div> </div><div>If you're using vdsClient, we will be happy to assist you in migrating to the new vdsm client.</div><div> </div><div> </div><div> </div><div><b><u>vdsm-client usage:</u></b></div><div> </div><div><div>vdsm-client [-h] [-a ADDRESS] [-p PORT] [--unsecure] [--timeout TIMEOUT]</div><div> [-f FILE] namespace method [name=value [name=value] ...]</div></div><div> </div><div> </div><div><div>Invoking simple methods:</div><div> </div><div># vdsm-client Host getVMList</div><div>['b3f6fa00-b315-4ad4-8108-f73da817b5c5']</div></div><div> </div><div>For invoking methods with many or complex parameters, you can read the parameters from a JSON format file:</div><div> </div><div># vdsm-client Lease info -f lease.json</div><div> </div><div>where lease.json file content is:</div><div> </div><div><div>{ </div><div> "lease": { </div><div> "sd_id": "75ab40e3-06b1-4a54-a825-2df7a40b93b2", </div><div> "lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5" </div><div> } </div><div> } </div></div><div> </div><div>It is also possible to read parameters from standard input, creating complex parameters interactively:</div><div> </div><div><div># cat <<EOF | vdsm-client Lease info -f - </div><div> { </div><div> "lease": { </div><div> "sd_id": "75ab40e3-06b1-4a54-a825-2df7a40b93b2", </div><div> "lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5" </div><div> } </div><div> } </div><div> EOF </div></div><div> </div><div> </div><div><b><u>Constructing a command from vdsm schema:</u></b></div><div> </div><div>Let's take VM.getStats as an example.</div><div>This is the entry in the schema:</div><div> </div><div><div>VM.getStats: </div><div> added: '3.1' </div><div> description: Get statistics about a running virtual machine. </div><div> params: </div><div> - description: The UUID of the VM </div><div> name: vmID </div><div> type: *UUID </div><div> return: </div><div> description: An array containing a single VmStats record </div><div> type: </div><div> - *VmStats </div></div><div> </div><div>namespace: VM</div><div>method name: getStats</div><div>params: vmID</div><div> </div><div>The vdsm-client command is:</div><div> </div><div># vdsm-client VM getStats vmID=b3f6fa00-b315-4ad4-8108-f73da817b5c5</div><div> </div><div> </div><div><div><b><u>Invoking getVdsCaps command:</u></b></div><div> </div><div># vdsm-client Host getCapabilities</div></div><div> </div><div><div> </div><div> </div><div>Please consult vdsm-client help and man page for further details and options.</div><div> </div><div> </div><div> </div><div>[1] <a href="https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml">https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml</a></div><div> </div>--<div class="gmail_signature"><div dir="ltr">Irit Goihman<div>Software Engineer</div><div>Red Hat Israel Ltd.</div></div></div></div></div></blockquote><br /><br /><style type="text/css">.Text1 {
color: black;
font-size:9pt;
font-family:Verdana;
}
.Text2 {
color: black;
font-size:7pt;
font-family:Verdana;
}</style></html>