<div dir="ltr">Hi All,<div><br></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><br></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><br></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><br></div><div>Future version should parse the schema and provide online help.<br></div><div><br></div><div><br></div><div>If you&#39;re using vdsClient, we will be happy to assist you in migrating to the new vdsm client.</div><div><br></div><div><br></div><div><br></div><div><b><u>vdsm-client usage:</u></b></div><div><br></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><br></div><div><br></div><div><div>Invoking simple methods:<br></div><div><br></div><div># vdsm-client Host getVMList</div><div>[&#39;b3f6fa00-b315-4ad4-8108-f73da817b5c5&#39;]<br></div></div><div><br></div><div>For invoking methods with many or complex parameters, you can read the parameters from a JSON format file:<br></div><div><br></div><div># vdsm-client Lease info -f lease.json<br></div><div><br></div><div>where lease.json file content is:<br></div><div><br></div><div><div>{                                                                            </div><div>          &quot;lease&quot;: {                                                               </div><div>              &quot;sd_id&quot;: &quot;75ab40e3-06b1-4a54-a825-2df7a40b93b2&quot;,                     </div><div>              &quot;lease_id&quot;: &quot;b3f6fa00-b315-4ad4-8108-f73da817b5c5&quot;                   </div><div>          }                                                                        </div><div>  }  </div></div><div><br></div><div>It is also possible to read parameters from standard input, creating complex parameters interactively:<br></div><div><br></div><div><div># cat &lt;&lt;EOF | vdsm-client Lease info -f -                                    </div><div>     {                                                                            </div><div>         &quot;lease&quot;: {                                                               </div><div>             &quot;sd_id&quot;: &quot;75ab40e3-06b1-4a54-a825-2df7a40b93b2&quot;,                     </div><div>             &quot;lease_id&quot;: &quot;b3f6fa00-b315-4ad4-8108-f73da817b5c5&quot;                   </div><div>         }                                                                        </div><div>     }                                                                            </div><div>    EOF  </div></div><div><br></div><div><br></div><div><b><u>Constructing a command from vdsm schema:</u></b><br></div><div><br></div><div>Let&#39;s take VM.getStats as an example.</div><div>This is the entry in the schema:</div><div><br></div><div><div>VM.getStats:                                                                    </div><div>    added: &#39;3.1&#39;                                                                </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><br></div><div>namespace: VM</div><div>method name: getStats</div><div>params: vmID</div><div><br></div><div>The vdsm-client command is:</div><div><br></div><div># vdsm-client VM getStats vmID=b3f6fa00-b315-4ad4-8108-f73da817b5c5</div><div><br></div><div><br></div><div><div><b><u>Invoking getVdsCaps command:</u></b></div><div><br></div><div># vdsm-client Host getCapabilities</div></div><div><br></div><div><div><br></div><div><br></div><div>Please consult vdsm-client help and man page for further details and options.</div><div><br></div><div><br></div><div><br></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><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Irit Goihman<div>Software Engineer</div><div>Red Hat Israel Ltd.<br></div></div></div>
</div></div>