[Engine-devel] Hints for building up a spicec connection in Ovirt

I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection? And if this is the wrong place to ask, can you point me in the correct direction? Andrew Wells

On 03/14/2012 04:51 PM, Andrew Wells wrote:
I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection?
And if this is the wrong place to ask, can you point me in the correct direction?
rhev-m mostly uses the activex/xpi wrappers. cc-ing spice-devel on command line invocation (or client integrating with the REST API). one thing you will need is to call the engine via the API to set the "ticket" (password) of the VM, to pass to the client.

On Wed, Mar 14, 2012 at 05:36:38PM +0200, Itamar Heim wrote:
On 03/14/2012 04:51 PM, Andrew Wells wrote:
I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection?
And if this is the wrong place to ask, can you point me in the correct direction?
rhev-m mostly uses the activex/xpi wrappers. cc-ing spice-devel on command line invocation (or client integrating with the REST API).
one thing you will need is to call the engine via the API to set the "ticket" (password) of the VM, to pass to the client. http://code.google.com/p/rhev-api-labs/source/browse/python/spice/ is a fairly old example written for RHEV 2.2 based on the powershell RHEV-M API, but I don't think this really changed.

On 03/14/2012 06:49 PM, Ewoud Kohl van Wijngaarden wrote:
On Wed, Mar 14, 2012 at 05:36:38PM +0200, Itamar Heim wrote:
On 03/14/2012 04:51 PM, Andrew Wells wrote:
I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection?
And if this is the wrong place to ask, can you point me in the correct direction?
rhev-m mostly uses the activex/xpi wrappers. cc-ing spice-devel on command line invocation (or client integrating with the REST API).
one thing you will need is to call the engine via the API to set the "ticket" (password) of the VM, to pass to the client. http://code.google.com/p/rhev-api-labs/source/browse/python/spice/ is a fairly old example written for RHEV 2.2 based on the powershell RHEV-M API, but I don't think this really changed.
actually, i just saw the ovirt cli has a console launch option. michael - does it launch spice as well, or only vnc?

On Wed, Mar 14, 2012 at 12:53 PM, Itamar Heim <iheim@redhat.com> wrote:
On 03/14/2012 06:49 PM, Ewoud Kohl van Wijngaarden wrote:
On Wed, Mar 14, 2012 at 05:36:38PM +0200, Itamar Heim wrote:
On 03/14/2012 04:51 PM, Andrew Wells wrote:
I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection?
And if this is the wrong place to ask, can you point me in the correct direction?
rhev-m mostly uses the activex/xpi wrappers. cc-ing spice-devel on command line invocation (or client integrating with the REST API).
one thing you will need is to call the engine via the API to set the "ticket" (password) of the VM, to pass to the client.
http://code.google.com/p/rhev-**api-labs/source/browse/python/**spice/<http://code.google.com/p/rhev-api-labs/source/browse/python/spice/> is a fairly old example written for RHEV 2.2 based on the powershell RHEV-M API, but I don't think this really changed.
actually, i just saw the ovirt cli has a console launch option. michael - does it launch spice as well, or only vnc?
______________________________**_________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/**mailman/listinfo/engine-devel<http://lists.ovirt.org/mailman/listinfo/engine-devel>
So I am assuming that building this connection up in a linux terminal on Ovirt is more or less equal to setting it up using RHEV, but is that not the case? Also what michael posted looks good, but I will need to wait before I can actually dig into that code. In the end I am hoping to just launch X and then launch the spicec session.

On 03/14/2012 06:53 PM, Itamar Heim wrote:
On 03/14/2012 06:49 PM, Ewoud Kohl van Wijngaarden wrote:
On Wed, Mar 14, 2012 at 05:36:38PM +0200, Itamar Heim wrote:
On 03/14/2012 04:51 PM, Andrew Wells wrote:
I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection?
And if this is the wrong place to ask, can you point me in the correct direction?
rhev-m mostly uses the activex/xpi wrappers. cc-ing spice-devel on command line invocation (or client integrating with the REST API).
one thing you will need is to call the engine via the API to set the "ticket" (password) of the VM, to pass to the client. http://code.google.com/p/rhev-api-labs/source/browse/python/spice/ is a fairly old example written for RHEV 2.2 based on the powershell RHEV-M API, but I don't think this really changed.
actually, i just saw the ovirt cli has a console launch option. michael - does it launch spice as well, or only vnc?
right now only vnc, in next release spice will be supported as well. -- Michael Pasternak RedHat, ENG-Virtualization R&D

On Thu, Mar 15, 2012 at 2:58 AM, Michael Pasternak <mpastern@redhat.com>wrote:
On 03/14/2012 06:53 PM, Itamar Heim wrote:
On 03/14/2012 06:49 PM, Ewoud Kohl van Wijngaarden wrote:
On Wed, Mar 14, 2012 at 05:36:38PM +0200, Itamar Heim wrote:
On 03/14/2012 04:51 PM, Andrew Wells wrote:
I am trying to build a connection manually with spicec (or what ever I need to build the connection with) in Ovirt/RHEV and I am wondering what do I need to form this connection?
And if this is the wrong place to ask, can you point me in the correct direction?
rhev-m mostly uses the activex/xpi wrappers. cc-ing spice-devel on command line invocation (or client integrating with the REST API).
one thing you will need is to call the engine via the API to set the "ticket" (password) of the VM, to pass to the client. http://code.google.com/p/rhev-api-labs/source/browse/python/spice/ is a fairly old example written for RHEV 2.2 based on the powershell RHEV-M API, but I don't think this really changed.
actually, i just saw the ovirt cli has a console launch option. michael - does it launch spice as well, or only vnc?
right now only vnc, in next release spice will be supported as well.
--
Michael Pasternak RedHat, ENG-Virtualization R&D _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Is the api-power-shell https://rhevm.example.com:8443/rhevm-api-powershellstill in 3.0? do I need to install it? Or is this the /api now?

On 03/15/2012 05:03 PM, Andrew Wells wrote:
On Thu, Mar 15, 2012 at 2:58 AM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com>> wrote: ...
Is the api-power-shell https://rhevm.example.com:8443/rhevm-api-powershell still in 3.0? do I need to install it? Or is this the /api now?
no. this is the old 2.2 wrapper api. 3.0 has a "native" /api now.

On Thu, Mar 15, 2012 at 11:07 AM, Itamar Heim <iheim@redhat.com> wrote:
On 03/15/2012 05:03 PM, Andrew Wells wrote:
On Thu, Mar 15, 2012 at 2:58 AM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com>> wrote:
...
Is the api-power-shell https://rhevm.example.com:**8443/rhevm-api-powershell<https://rhevm.example.com:8443/rhevm-api-powershell>still in 3.0? do I need to install it? Or is this the /api now?
no. this is the old 2.2 wrapper api. 3.0 has a "native" /api now.
Is there a package that provides the python rhev libraries used in the script? Or where is the source so that I can include/import them.

And is their any documentation on using the python rhev libraries as that would be helpful as well. you guys are getting me excited thinking this might work. On Thu, Mar 15, 2012 at 11:32 AM, Andrew Wells <agwells0714@gmail.com>wrote:
On Thu, Mar 15, 2012 at 11:07 AM, Itamar Heim <iheim@redhat.com> wrote:
On 03/15/2012 05:03 PM, Andrew Wells wrote:
On Thu, Mar 15, 2012 at 2:58 AM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com>> wrote:
...
Is the api-power-shell https://rhevm.example.com:**8443/rhevm-api-powershell<https://rhevm.example.com:8443/rhevm-api-powershell>still in 3.0? do I need to install it? Or is this the /api now?
no. this is the old 2.2 wrapper api. 3.0 has a "native" /api now.
Is there a package that provides the python rhev libraries used in the script? Or where is the source so that I can include/import them.

On 03/15/2012 05:33 PM, Andrew Wells wrote:
And is their any documentation on using the python rhev libraries as that would be helpful as well. you guys are getting me excited thinking this might work.
to both your questions: http://www.ovirt.org/wiki/CLI http://www.ovirt.org/wiki/SDK http://lists.ovirt.org/pipermail/users/2012-March/001159.html http://lists.ovirt.org/pipermail/users/2012-March/001158.html
On Thu, Mar 15, 2012 at 11:32 AM, Andrew Wells <agwells0714@gmail.com <mailto:agwells0714@gmail.com>> wrote:
On Thu, Mar 15, 2012 at 11:07 AM, Itamar Heim <iheim@redhat.com <mailto:iheim@redhat.com>> wrote:
On 03/15/2012 05:03 PM, Andrew Wells wrote:
On Thu, Mar 15, 2012 at 2:58 AM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com> <mailto:mpastern@redhat.com <mailto:mpastern@redhat.com>>> wrote:
...
Is the api-power-shell https://rhevm.example.com:__8443/rhevm-api-powershell <https://rhevm.example.com:8443/rhevm-api-powershell> still in 3.0? do I need to install it? Or is this the /api now?
no. this is the old 2.2 wrapper api. 3.0 has a "native" /api now.
Is there a package that provides the python rhev libraries used in the script? Or where is the source so that I can include/import them.

On Thu, Mar 15, 2012 at 11:47 AM, Itamar Heim <iheim@redhat.com> wrote:
On 03/15/2012 05:33 PM, Andrew Wells wrote:
And is their any documentation on using the python rhev libraries as that would be helpful as well. you guys are getting me excited thinking this might work.
to both your questions: http://www.ovirt.org/wiki/CLI http://www.ovirt.org/wiki/SDK http://lists.ovirt.org/**pipermail/users/2012-March/**001159.html<http://lists.ovirt.org/pipermail/users/2012-March/001159.html> http://lists.ovirt.org/**pipermail/users/2012-March/**001158.html<http://lists.ovirt.org/pipermail/users/2012-March/001158.html>
On Thu, Mar 15, 2012 at 11:32 AM, Andrew Wells <agwells0714@gmail.com
<mailto:agwells0714@gmail.com>**> wrote:
On Thu, Mar 15, 2012 at 11:07 AM, Itamar Heim <iheim@redhat.com <mailto:iheim@redhat.com>> wrote:
On 03/15/2012 05:03 PM, Andrew Wells wrote:
On Thu, Mar 15, 2012 at 2:58 AM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com> <mailto:mpastern@redhat.com <mailto:mpastern@redhat.com>>>
wrote:
...
Is the api-power-shell https://rhevm.example.com:__**8443/rhevm-api-powershell
<https://rhevm.example.com:**8443/rhevm-api-powershell<https://rhevm.example.com:8443/rhevm-api-powershell>> still in 3.0? do I need to install it? Or is this the /api now?
no. this is the old 2.2 wrapper api. 3.0 has a "native" /api now.
Is there a package that provides the python rhev libraries used in the script? Or where is the source so that I can include/import them.
You are Awesome!

--reSNjdE3Iylkp4B8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hey, On Thu, Mar 15, 2012 at 11:33:15AM -0400, Andrew Wells wrote:
And is their any documentation on using the python rhev libraries as that would be helpful as well. you guys are getting me excited thinking this might work.
If that can be helpful to you, I've worked on some C code to talk to the oVirt REST API to be able to list VMs and get the needed info to connect to such a VM with SPICE. The code is unfinished, but listing VMs, starting VMs and connecting to VM without TLS works, I can send you this code if that can be of any use to you. Christophe --reSNjdE3Iylkp4B8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAk9iGaEACgkQJKRp+3pW947mewCfdDlJspYm1o/WkgC5hyS0ooAV J/oAoJ7fdzMLPmTKK+8zYIulWy+bbGMo =3CCT -----END PGP SIGNATURE----- --reSNjdE3Iylkp4B8--

On Thu, Mar 15, 2012 at 12:32 PM, Christophe Fergeau <cfergeau@redhat.com>wrote:
Hey,
On Thu, Mar 15, 2012 at 11:33:15AM -0400, Andrew Wells wrote:
And is their any documentation on using the python rhev libraries as that would be helpful as well. you guys are getting me excited thinking this might work.
If that can be helpful to you, I've worked on some C code to talk to the oVirt REST API to be able to list VMs and get the needed info to connect to such a VM with SPICE. The code is unfinished, but listing VMs, starting VMs and connecting to VM without TLS works, I can send you this code if that can be of any use to you.
Christophe
More examples the better, thanks!

On Thu, Mar 15, 2012 at 12:32 PM, Christophe Fergeau <cfergeau@redhat.com= wrote: =20
Hey,
On Thu, Mar 15, 2012 at 11:33:15AM -0400, Andrew Wells wrote:
And is their any documentation on using the python rhev libraries as =
--l4GQ7sizse6iPvDe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 12:38:05PM -0400, Andrew Wells wrote: that
would be helpful as well. you guys are getting me excited thinking th= is might work.
If that can be helpful to you, I've worked on some C code to talk to the oVirt REST API to be able to list VMs and get the needed info to connec= t to such a VM with SPICE. The code is unfinished, but listing VMs, starting= VMs and connecting to VM without TLS works, I can send you this code if that can be of any use to you.
I quickly made a tarball http://teuf.fedorapeople.org/libgovirt-0.0.1.tar.xz but it's probably far too low level for your needs :) It needs librest from git.gnome.org too, and you need to set your details in one of the C files. If all you want is to get a ticket from ovirt and then start spicec using it, it's better to use the previously mentioned python tool. Christophe --l4GQ7sizse6iPvDe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAk9iItsACgkQJKRp+3pW946n5gCfd+xR/UahIWSuSwtIzHfvmLpD doUAoJi8+2lkrc/wh4mT9OVPfPalmvjt =Nuud -----END PGP SIGNATURE----- --l4GQ7sizse6iPvDe--
participants (5)
-
Andrew Wells
-
Christophe Fergeau
-
Ewoud Kohl van Wijngaarden
-
Itamar Heim
-
Michael Pasternak