Ok I see, thank you. 
vdsm-client Host getAllTasksStatuses works on the SPM.
vdsm-client Task getInfo TaskID=TaskID=55cbec7f-e7dc-4431-bce9-8ec1d61a7feb
returns :
vdsm-client: Command Task.getInfo with args {'TaskID': 
'55cbec7f-e7dc-4431-bce9-8ec1d61a7feb'} failed:
(code=-32603, message=Internal JSON-RPC error: {'reason': '__init__() takes 
exactly 2 arguments (1 given)'})

There is no examples with tasks below, and the link to github ends in 404...

I'll try to find some docs about API, and tasks management, if you believe 
that's best. Any link to share ?

Le Vendredi, Avril 13, 2018 14:41 CEST, Michal Skrivanek 
<michal.skriva...@redhat.com> a écrit:
   On 13 Apr 2018, at 10:14, fsoyer <fso...@systea.fr> wrote: Hi all,
I can't find any exhaustive doc for new vdsm-client. My problem actually is a 
task (export a vm to OVA) blocked. 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 I found that I can interact with
vdsm-client Task getInfo taskID=<uuid>, and replace getInfo by "stop", BUT : 
how can I find this UUID ???Old "vdsClient -s 0 getAllTasksStatuses" has no 
equivalent ?? that’s a Host class api, vdsm-client Host getAllTasksStatuses
Does someone knows if a complete doc exists dot vdsm-client ? the man page 
mentioned below and source code. this is not a public API Thanks,michal Thanks


Le Mercredi, Janvier 25, 2017 12:30 CET, Irit Goihman <igoih...@redhat.com> a 
 Hi All, vdsClient will be removed from master branch today.It is using XMLRPC 
protocol which has been deprecated and replaced by JSON-RPC. A new client for 
vdsm was introduced in 4.1: vdsm-client.This is a simple client that uses 
JSON-RPC protocol which was introduced in ovirt 3.5. The client is not aware of 
the available methods and parameters, and you should consult the schema [1] in 
order to construct the desired command. Future version should parse the schema 
and provide online help.  If you're using vdsClient, we will be happy to assist 
you in migrating to the new vdsm client.   vdsm-client usage: vdsm-client [-h] 
[-a ADDRESS] [-p PORT] [--unsecure] [--timeout TIMEOUT]                   [-f 
FILE] namespace method [name=value [name=value] ...]  Invoking simple methods: 
# vdsm-client Host getVMList['b3f6fa00-b315-4ad4-8108-f73da817b5c5'] For 
invoking methods with many or complex parameters, you can read the parameters 
from a JSON format file: # vdsm-client Lease info -f lease.json where 
lease.json file content is: {                                                   
                                   "lease": {                                   
"lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"                             
}                                                                          }   
It is also possible to read parameters from standard input, creating complex 
parameters interactively: # cat <<EOF | vdsm-client Lease info -f -             
                                  "lease": {                                    
"lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"                            } 
EOF    Constructing a command from vdsm schema: Let's take VM.getStats as an 
example.This is the entry in the schema: VM.getStats:                           
                                             added: '3.1'                       
                                             description: Get statistics about 
a running virtual machine.                    params:                           
                                              -   description: The UUID of the 
VM                                                 name: vmID                   
                                                   type: *UUID                  
                                                   description: An array 
containing a single VmStats record                        type:                 
                                                          - *VmStats            
                                                   namespace: VMmethod name: 
getStatsparams: vmID The vdsm-client command is: # vdsm-client VM getStats 
vmID=b3f6fa00-b315-4ad4-8108-f73da817b5c5  Invoking getVdsCaps command: # 
vdsm-client Host getCapabilities   Please consult vdsm-client help and man page 
for further details and options.   [1] 
https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml --Irit 
GoihmanSoftware EngineerRed Hat Israel Ltd.

Users mailing list

Users mailing list

Reply via email to