
--Apple-Mail=_DABC6D3E-089C-4507-B371-9F1FC1C6E673 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8
On 13 Apr 2018, at 10:14, fsoyer <fsoyer@systea.fr> wrote: =20 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=E2=80=99s REST API rather than internal host-side API
I found that I can interact with vdsm-client Task getInfo taskID=3D<uuid>, and replace getInfo by = "stop", BUT : how can I find this UUID ??? Old "vdsClient -s 0 getAllTasksStatuses" has no equivalent ??
that=E2=80=99s a Host class api, vdsm-client Host getAllTasksStatuses
=20 Does someone knows if a complete doc exists dot vdsm-client ?
Thanks Frank =20 =20 =20 =20 =20 Le Mercredi, Janvier 25, 2017 12:30 CET, Irit Goihman = <igoihman@redhat.com> a =C3=A9crit: =20
=20 Hi All, =20 vdsClient will be removed from master branch today. It is using XMLRPC protocol which has been deprecated and replaced by = JSON-RPC. =20 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. =20 The client is not aware of the available methods and parameters, and = you should consult=20 the schema [1] in order to construct the desired command. =20 Future version should parse the schema and provide online help. =20 =20 If you're using vdsClient, we will be happy to assist you in = migrating to the new vdsm client. =20 =20 =20 vdsm-client usage: =20 vdsm-client [-h] [-a ADDRESS] [-p PORT] [--unsecure] [--timeout = TIMEOUT] [-f FILE] namespace method [name=3Dvalue = [name=3Dvalue] ...] =20 =20 Invoking simple methods: =20 # vdsm-client Host getVMList ['b3f6fa00-b315-4ad4-8108-f73da817b5c5'] =20 For invoking methods with many or complex parameters, you can read =
=20 # vdsm-client Lease info -f lease.json =20 where lease.json file content is: =20 { = =20 "lease": { = =20 "sd_id": "75ab40e3-06b1-4a54-a825-2df7a40b93b2", = =20 "lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5" = =20 } = =20 } =20 =20 It is also possible to read parameters from standard input, creating = complex parameters interactively: =20 # cat <<EOF | vdsm-client Lease info -f - = =20 { = =20 "lease": { = =20 "sd_id": "75ab40e3-06b1-4a54-a825-2df7a40b93b2", = =20 "lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5" = =20 } = =20 } = =20 EOF =20 =20 =20 Constructing a command from vdsm schema: =20 Let's take VM.getStats as an example. This is the entry in the schema: =20 VM.getStats: = =20 added: '3.1' = =20 description: Get statistics about a running virtual machine. = =20 params: = =20 - description: The UUID of the VM = =20 name: vmID = =20 type: *UUID = =20 return: = =20 description: An array containing a single VmStats record = =20 type: = =20 - *VmStats = =20 =20 namespace: VM method name: getStats params: vmID =20 The vdsm-client command is: =20 # vdsm-client VM getStats vmID=3Db3f6fa00-b315-4ad4-8108-f73da817b5c5 =20 =20 Invoking getVdsCaps command: =20 # vdsm-client Host getCapabilities =20 =20 =20 Please consult vdsm-client help and man page for further details and =
the man page mentioned below and source code. this is not a public API Thanks, michal the parameters from a JSON format file: options.
=20 =20 =20 [1] https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml = <https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml> =20 -- Irit Goihman Software Engineer Red Hat Israel Ltd. =20 =20
Users mailing list Users@ovirt.org <mailto:Users@ovirt.org> http://lists.ovirt.org/mailman/listinfo/users = <http://lists.ovirt.org/mailman/listinfo/users>
--Apple-Mail=_DABC6D3E-089C-4507-B371-9F1FC1C6E673 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On 13 Apr 2018, at 10:14, fsoyer <<a = href=3D"mailto:fsoyer@systea.fr" class=3D"">fsoyer@systea.fr</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><span = style=3D"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;" class=3D"">Hi all,</span><br = style=3D"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;" = class=3D""><span style=3D"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;" class=3D"">I can't find any exhaustive doc for new = vdsm-client. My problem actually is a task (export a vm to OVA) = blocked.</span><br style=3D"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;" class=3D""></div></blockquote><div><br = class=3D""></div>if you want to interact with that action it would = always be best to start with engine=E2=80=99s REST API rather than = internal host-side API</div><div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D""><span style=3D"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;" class=3D"">I found that I can interact = with</span><br style=3D"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;" class=3D""><span style=3D"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;" class=3D"">vdsm-client Task getInfo = taskID=3D<uuid>, and replace getInfo by "stop", BUT : how can I = find this UUID ???</span></div></blockquote><blockquote type=3D"cite" = class=3D""><div class=3D""><span style=3D"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;" class=3D"">Old "vdsClient -s 0 getAllTasksStatuses" = has no equivalent ??</span><br style=3D"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;" = class=3D""></div></blockquote><div><br class=3D""></div>that=E2=80=99s a = Host class api, vdsm-client Host getAllTasksStatuses<br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><br = style=3D"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;" = class=3D""><span style=3D"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;" class=3D"">Does someone knows if a complete doc exists dot = vdsm-client ?</span><br style=3D"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;" class=3D""></div></blockquote><div><br = class=3D""></div>the man page mentioned below and source code. this is = not a public API</div><div><br = class=3D""></div><div>Thanks,</div><div>michal</div><div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><span = style=3D"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;" class=3D"">Thanks</span><br = style=3D"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;" = class=3D""><span style=3D"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;" class=3D"">Frank</span><p class=3D"Text2" style=3D"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 = class=3D""> </p><br style=3D"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;" class=3D""><br style=3D"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;" class=3D""><span = style=3D"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;" class=3D"">Le Mercredi, Janvier 25, 2017 = 12:30 CET, Irit Goihman <<a href=3D"mailto:igoihman@redhat.com" = class=3D"">igoihman@redhat.com</a>> a =C3=A9crit:</span><br = style=3D"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;" = class=3D""><span style=3D"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;" class=3D""> </span><blockquote type=3D"cite" = cite=3D"x-msg://71/CAA=3Di7HMsB7iRYqP9yyBx4w7pGer9rTE9wkJZRgcmXRQMaJezwg@m= ail.gmail.com" style=3D"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;" class=3D""><div dir=3D"ltr" class=3D"">Hi= All,<div class=3D""> </div><div class=3D"">vdsClient will be = removed from master branch today.</div><div class=3D"">It is using = XMLRPC protocol which has been deprecated and replaced by = JSON-RPC.</div><div class=3D""> </div><div class=3D"">A new client = for vdsm was introduced in 4.1: vdsm-client.</div><div class=3D"">This = is a simple client that uses JSON-RPC protocol which was introduced in = ovirt 3.5.</div><div class=3D""> </div><div class=3D"">The client = is not aware of the available methods and parameters, and you should = consult </div><div class=3D"">the schema [1] in order to construct = the desired command.</div><div class=3D""> </div><div = class=3D"">Future version should parse the schema and provide online = help.</div><div class=3D""> </div><div class=3D""> </div><div = class=3D"">If you're using vdsClient, we will be happy to assist you in = migrating to the new vdsm client.</div><div class=3D""> </div><div = class=3D""> </div><div class=3D""> </div><div class=3D""><b = class=3D""><u class=3D"">vdsm-client usage:</u></b></div><div = class=3D""> </div><div class=3D""><div class=3D"">vdsm-client [-h] = [-a ADDRESS] [-p PORT] [--unsecure] [--timeout TIMEOUT]</div><div = class=3D""> = [-f FILE] namespace method [name=3Dvalue [name=3Dvalue] = ...]</div></div><div class=3D""> </div><div = class=3D""> </div><div class=3D""><div class=3D"">Invoking simple = methods:</div><div class=3D""> </div><div class=3D""># vdsm-client = Host getVMList</div><div = class=3D"">['b3f6fa00-b315-4ad4-8108-f73da817b5c5']</div></div><div = class=3D""> </div><div class=3D"">For invoking methods with many or = complex parameters, you can read the parameters from a JSON format = file:</div><div class=3D""> </div><div class=3D""># vdsm-client = Lease info -f lease.json</div><div class=3D""> </div><div = class=3D"">where lease.json file content is:</div><div = class=3D""> </div><div class=3D""><div class=3D"">{ = = = = </div><div class=3D""> = "lease": { = = = </div><div = class=3D""> "sd_id": = "75ab40e3-06b1-4a54-a825-2df7a40b93b2", = </div><div = class=3D""> "lease_id": = "b3f6fa00-b315-4ad4-8108-f73da817b5c5" = </div><div class=3D""> = } = = = = </div><div class=3D""> } </div></div><div = class=3D""> </div><div class=3D"">It is also possible to read = parameters from standard input, creating complex parameters = interactively:</div><div class=3D""> </div><div class=3D""><div = class=3D""># cat <<EOF | vdsm-client Lease info -f - = = </div><div class=3D""> = { = = = = </div><div class=3D""> "lease": { = = = = </div><div class=3D""> = "sd_id": "75ab40e3-06b1-4a54-a825-2df7a40b93b2", = = </div><div class=3D""> = "lease_id": "b3f6fa00-b315-4ad4-8108-f73da817b5c5" = </div><div = class=3D""> } = = = = </div><div class=3D""> } = = = = </div><div = class=3D""> EOF </div></div><div = class=3D""> </div><div class=3D""> </div><div class=3D""><b = class=3D""><u class=3D"">Constructing a command from vdsm = schema:</u></b></div><div class=3D""> </div><div class=3D"">Let's = take VM.getStats as an example.</div><div class=3D"">This is the entry = in the schema:</div><div class=3D""> </div><div class=3D""><div = class=3D"">VM.getStats: = = = </div><div = class=3D""> added: '3.1' = = = </div><div = class=3D""> description: Get statistics about a running = virtual machine. = </div><div class=3D""> params: = = = = </div><div class=3D""> - description: = The UUID of the VM = = </div><div class=3D""> = name: vmID = = = </div><div class=3D""> = type: *UUID = = = </div><div class=3D""> return: = = = = </div><div class=3D""> = description: An array containing a single VmStats record = </div><div = class=3D""> type: = = = = </div><div class=3D""> - *VmStats = = = = </div></div><div class=3D""> </div><div class=3D"">namespace: = VM</div><div class=3D"">method name: getStats</div><div class=3D"">params:= vmID</div><div class=3D""> </div><div class=3D"">The vdsm-client = command is:</div><div class=3D""> </div><div class=3D""># = vdsm-client VM getStats = vmID=3Db3f6fa00-b315-4ad4-8108-f73da817b5c5</div><div = class=3D""> </div><div class=3D""> </div><div class=3D""><div = class=3D""><b class=3D""><u class=3D"">Invoking getVdsCaps = command:</u></b></div><div class=3D""> </div><div class=3D""># = vdsm-client Host getCapabilities</div></div><div = class=3D""> </div><div class=3D""><div class=3D""> </div><div = class=3D""> </div><div class=3D"">Please consult vdsm-client help = and man page for further details and options.</div><div = class=3D""> </div><div class=3D""> </div><div = class=3D""> </div><div class=3D"">[1]<span = class=3D"Apple-converted-space"> </span><a = href=3D"https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml" = class=3D"">https://github.com/oVirt/vdsm/blob/master/lib/api/vdsm-api.yml<= /a></div><div class=3D""> </div>--<div class=3D"gmail_signature"><div= dir=3D"ltr" class=3D"">Irit Goihman<div class=3D"">Software = Engineer</div><div class=3D"">Red Hat Israel = Ltd.</div></div></div></div></div></blockquote><br style=3D"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;" class=3D""><br = style=3D"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;" = class=3D""><span style=3D"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;" = class=3D"">_______________________________________________</span><br = style=3D"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;" = class=3D""><span style=3D"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;" class=3D"">Users mailing list</span><br style=3D"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;" class=3D""><a = href=3D"mailto:Users@ovirt.org" style=3D"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;" class=3D"">Users@ovirt.org</a><br = style=3D"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;" class=3D""><a = href=3D"http://lists.ovirt.org/mailman/listinfo/users" = style=3D"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;" = class=3D"">http://lists.ovirt.org/mailman/listinfo/users</a></div></blockq= uote></div><br class=3D""></body></html>= --Apple-Mail=_DABC6D3E-089C-4507-B371-9F1FC1C6E673--