<html>Ok I see, thank you. <br />vdsm-client Host getAllTasksStatuses works on the SPM.<br />But<br />vdsm-client Task getInfo TaskID=TaskID=55cbec7f-e7dc-4431-bce9-8ec1d61a7feb<br />returns :<br />vdsm-client: Command Task.getInfo with args {'TaskID': '55cbec7f-e7dc-4431-bce9-8ec1d61a7feb'} failed:<br />(code=-32603, message=Internal JSON-RPC error: {'reason': '__init__() takes exactly 2 arguments (1 given)'})<br /><br />There is no examples with tasks below, and the link to github ends in 404...<br /><br />I'll try to find some docs about API, and tasks management, if you believe that's best. Any link to share ?<br /><br />Thanks,<br />Frank<p class="Text2"> </p><br />Le Vendredi, Avril 13, 2018 14:41 CEST, Michal Skrivanek <michal.skrivanek@redhat.com> a écrit:<br /> <blockquote type="cite" cite="4BD97EE5-5A02-499B-860E-AD76BF1B7CBA@redhat.com"> </blockquote><meta http-equiv="Content-Type" content="text/html; "><div> <blockquote type="cite"><div>On 13 Apr 2018, at 10:14, fsoyer <<a href="mailto:fsoyer@systea.fr">fsoyer@systea.fr</a>> wrote:</div> <div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Hi all,</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">I can't find any exhaustive doc for new vdsm-client. My problem actually is a task (export a vm to OVA) blocked.</span></div></blockquote><div> </div>if you want to interact with that action it would always be best to start with engine’s REST API rather than internal host-side API</div><div> <blockquote type="cite"><div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">I found that I can interact with</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">vdsm-client Task getInfo taskID=<uuid>, and replace getInfo by "stop", BUT : how can I find this UUID ???</span></div></blockquote><blockquote type="cite"><div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Old "vdsClient -s 0 getAllTasksStatuses" has no equivalent ??</span></div></blockquote><div> </div>that’s a Host class api, vdsm-client Host getAllTasksStatuses<blockquote type="cite"><div><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Does someone knows if a complete doc exists dot vdsm-client ?</span></div></blockquote><div> </div>the man page mentioned below and source code. this is not a public API</div><div> </div><div>Thanks,</div><div>michal</div><div> <blockquote type="cite"><div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Thanks</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Frank</span><p class="Text2" style="font-size: 7pt; font-family: Verdana; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br /> </p><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Le Mercredi, Janvier 25, 2017 12:30 CET, Irit Goihman <<a href="mailto:igoihman@redhat.com">igoihman@redhat.com</a>> a écrit:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;"> </span><blockquote type="cite" cite="x-msg://71/CAA=i7HMsB7iRYqP9yyBx4w7pGer9rTE9wkJZRgcmXRQMaJezwg@mail.gmail.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><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]<span class="Apple-converted-space"> </span><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 style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Users mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><a style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" href="mailto:Users@ovirt.org">Users@ovirt.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><a style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a></div></blockquote></div><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>