[ovirt-devel] [UI plugins] RestApiSessionAcquired is out, api.ssoToken() is in

2016-05-12 Thread Vojtech Szocs
Hi everyone,

we've merged a patch that aligns UI code with Engine SSO infra:

  https://gerrit.ovirt.org/#/c/49278/

In particular, UI code that creates & maintains REST webapp's
HTTP session was removed in favor of using SSO token.

**UI plugin authors take note!** The "RestApiSessionAcquired"
callback was removed -- please update your UI plugins to use
the new "api.ssoToken" function when making REST API requests:

  var xhr = new XMLHttpRequest();
  xhr.open('GET', 'http://example.com/ovirt-engine/api');
  xhr.setRequestHeader('Authorization', 'Bearer ' + api.ssoToken());
  xhr.setRequestHeader('Accept', 'application/json');
  xhr.addEventListener('load', function () {
// response loaded OK, parse JSON data
var data = JSON.parse(this.responseText);
  });
  xhr.send();

While being a breaking change, this should simplify UI plugin
code because:

- the new "api.ssoToken" function can be called anytime,
  removing the need for an asynchronous callback

- no need to use session-specific request headers anymore
  (like "Prefer: persistent-auth" and "JSESSIONID: xxx"),
  just use "Authorization: Bearer xxx" and you're good

Please see commit msg of above mentioned patch for further
details on the changes and their implications.

Let me know if you have any questions or comments.

Regards,
Vojtech
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Nir Soffer
On Thu, May 12, 2016 at 2:23 PM, Martin Perina  wrote:
>
> On Thu, May 12, 2016 at 1:16 PM, Nir Soffer  wrote:
>>
>> I sent a patch for the vdsm developers page, please reveiw:
>> https://github.com/oVirt/ovirt-site/pull/238
>>
>> On Thu, May 12, 2016 at 2:08 PM, Nir Soffer  wrote:
>> > On Thu, May 12, 2016 at 1:07 PM, Martin Sivak  wrote:
>> >>> I can, but 0.5.3 should be available in the oVirt repositories for
>> >>> F22.
>> >>
>> >> And it is indeed there
>> >>
>> >>
>> >> http://resources.ovirt.org/pub/ovirt-3.6/rpm/fc22/noarch/mom-0.5.3-1.fc22.noarch.rpm
>> >
>> > Thanks, I was looking in the ovirt-4.* repos
>> >
>> > Sandro, why the ovirt-4.* repos do not keep this version?
>> >
>> > I assumed that installing
>> > http://resources.ovirt.org/pub/yum-repo/
>> ovirt-release-master.rpm
>
> F22 is not supported for master (4.0), because F22 will be retired before
> oVirt 4.0 GA. oVirt 4.0 will be supported (for now) only on F23/EL7.
>
> If you plan to develop 4.0 on F22, it's possible, but you need to manually
> edit repository ovirt-master-snapshot.repo provided by
> ovirt-release-master.rpm and use F23 packages on F22.

Thanks, seems that its time to upgrade to f23.

Nir
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Martin Perina
On Thu, May 12, 2016 at 1:16 PM, Nir Soffer  wrote:

> I sent a patch for the vdsm developers page, please reveiw:
> https://github.com/oVirt/ovirt-site/pull/238
>
> On Thu, May 12, 2016 at 2:08 PM, Nir Soffer  wrote:
> > On Thu, May 12, 2016 at 1:07 PM, Martin Sivak  wrote:
> >>> I can, but 0.5.3 should be available in the oVirt repositories for
> >>> F22.
> >>
> >> And it is indeed there
> >>
> >>
> http://resources.ovirt.org/pub/ovirt-3.6/rpm/fc22/noarch/mom-0.5.3-1.fc22.noarch.rpm
> >
> > Thanks, I was looking in the ovirt-4.* repos
> >
> > Sandro, why the ovirt-4.* repos do not keep this version?
> >
> > I assumed that installing
> > http://resources.ovirt.org/pub/yum-repo/
> ​​
> ovirt-release-master.rpm
> 
>
​
F22 is not supported for master (4.0), because F22 will be retired before
oVirt 4.0 GA. oVirt 4.0 will be supported (for now) only on F23/EL7.

If you plan to develop 4.0 on F22, it's possible, but you need to manually
edit repository ovirt-master-snapshot.repo provided by
ovirt-release-master.rpm and use F23 packages on F22.
​

>
> >
> > is enough for getting all the requirements on master, but it seems that
> you need
> > to install also:
> > http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm
> >
> > Which is not even documented in
> > http://www.ovirt.org/develop/developer-guide/vdsm/developers/
> >
> > Nir
> >
> >>
> >>
> >> On Thu, May 12, 2016 at 12:05 PM, Martin Sivak 
> wrote:
>  Testing mom or testing vdsm? Maybe these tests are not relevant now
> that mom
>  runs in separate process?
> >>>
> >>> Those are API tests.
> >>>
>  Here we have a bigger problem - the version we require is not
> available
>  for Fedora 22, practically breaking support on Fedora 22.
> 
>  Latest version in Fedora 22 is 0.5.1.
> 
>  Martin, can you build lastest mom for Fedora 22?
> >>>
> >>> I can, but 0.5.3 should be available in the oVirt repositories for
> >>> F22. Are we still releasing vdsm in Koji?
> >>>
> >>>
> >>> Martin
> >>>
> >>> On Thu, May 12, 2016 at 11:27 AM, Nir Soffer 
> wrote:
>  On Thu, May 12, 2016 at 9:43 AM, Francesco Romani 
> wrote:
> > - Original Message -
> > [...]
> >> Needing a yaml package and python3-netaddr make sense, but I don't
> understand
> >> why we need these packages for building vdsm:
> >>
> >> - libvirt-python3 - we should not access libvirt using the tests
> >
> > True, but we use constants (e.g. error codes) in the tests, hence
> > the need for that package
> 
>  Makes sense.
> 
> >
> >> - mom - we are not running mom on a development machine
> >
> > Similar, there are few tests (momTests.py/momPolicyTests.py) which
> import
> > the package for testing purposes
> 
>  Testing mom or testing vdsm? Maybe these tests are not relevant now
> that mom
>  runs in separate process?
> 
>  Here we have a bigger problem - the version we require is not
> available
>  for Fedora 22, practically breaking support on Fedora 22.
> 
>  Latest version in Fedora 22 is 0.5.1.
> 
>  Martin, can you build lastest mom for Fedora 22?
> 
>  Nir
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Nir Soffer
On Thu, May 12, 2016 at 1:07 PM, Martin Sivak  wrote:
>> I can, but 0.5.3 should be available in the oVirt repositories for
>> F22.
>
> And it is indeed there
>
> http://resources.ovirt.org/pub/ovirt-3.6/rpm/fc22/noarch/mom-0.5.3-1.fc22.noarch.rpm

Thanks, I was looking in the ovirt-4.* repos

Sandro, why the ovirt-4.* repos do not keep this version?

I assumed that installing
http://resources.ovirt.org/pub/yum-repo/ovirt-release-master.rpm

is enough for getting all the requirements on master, but it seems that you need
to install also:
http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm

Which is not even documented in
http://www.ovirt.org/develop/developer-guide/vdsm/developers/

Nir

>
>
> On Thu, May 12, 2016 at 12:05 PM, Martin Sivak  wrote:
>>> Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
>>> runs in separate process?
>>
>> Those are API tests.
>>
>>> Here we have a bigger problem - the version we require is not available
>>> for Fedora 22, practically breaking support on Fedora 22.
>>>
>>> Latest version in Fedora 22 is 0.5.1.
>>>
>>> Martin, can you build lastest mom for Fedora 22?
>>
>> I can, but 0.5.3 should be available in the oVirt repositories for
>> F22. Are we still releasing vdsm in Koji?
>>
>>
>> Martin
>>
>> On Thu, May 12, 2016 at 11:27 AM, Nir Soffer  wrote:
>>> On Thu, May 12, 2016 at 9:43 AM, Francesco Romani  
>>> wrote:
 - Original Message -
 [...]
> Needing a yaml package and python3-netaddr make sense, but I don't 
> understand
> why we need these packages for building vdsm:
>
> - libvirt-python3 - we should not access libvirt using the tests

 True, but we use constants (e.g. error codes) in the tests, hence
 the need for that package
>>>
>>> Makes sense.
>>>

> - mom - we are not running mom on a development machine

 Similar, there are few tests (momTests.py/momPolicyTests.py) which import
 the package for testing purposes
>>>
>>> Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
>>> runs in separate process?
>>>
>>> Here we have a bigger problem - the version we require is not available
>>> for Fedora 22, practically breaking support on Fedora 22.
>>>
>>> Latest version in Fedora 22 is 0.5.1.
>>>
>>> Martin, can you build lastest mom for Fedora 22?
>>>
>>> Nir
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Martin Sivak
> I can, but 0.5.3 should be available in the oVirt repositories for
> F22.

And it is indeed there

http://resources.ovirt.org/pub/ovirt-3.6/rpm/fc22/noarch/mom-0.5.3-1.fc22.noarch.rpm


On Thu, May 12, 2016 at 12:05 PM, Martin Sivak  wrote:
>> Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
>> runs in separate process?
>
> Those are API tests.
>
>> Here we have a bigger problem - the version we require is not available
>> for Fedora 22, practically breaking support on Fedora 22.
>>
>> Latest version in Fedora 22 is 0.5.1.
>>
>> Martin, can you build lastest mom for Fedora 22?
>
> I can, but 0.5.3 should be available in the oVirt repositories for
> F22. Are we still releasing vdsm in Koji?
>
>
> Martin
>
> On Thu, May 12, 2016 at 11:27 AM, Nir Soffer  wrote:
>> On Thu, May 12, 2016 at 9:43 AM, Francesco Romani  wrote:
>>> - Original Message -
>>> [...]
 Needing a yaml package and python3-netaddr make sense, but I don't 
 understand
 why we need these packages for building vdsm:

 - libvirt-python3 - we should not access libvirt using the tests
>>>
>>> True, but we use constants (e.g. error codes) in the tests, hence
>>> the need for that package
>>
>> Makes sense.
>>
>>>
 - mom - we are not running mom on a development machine
>>>
>>> Similar, there are few tests (momTests.py/momPolicyTests.py) which import
>>> the package for testing purposes
>>
>> Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
>> runs in separate process?
>>
>> Here we have a bigger problem - the version we require is not available
>> for Fedora 22, practically breaking support on Fedora 22.
>>
>> Latest version in Fedora 22 is 0.5.1.
>>
>> Martin, can you build lastest mom for Fedora 22?
>>
>> Nir
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Martin Sivak
> Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
> runs in separate process?

Those are API tests.

> Here we have a bigger problem - the version we require is not available
> for Fedora 22, practically breaking support on Fedora 22.
>
> Latest version in Fedora 22 is 0.5.1.
>
> Martin, can you build lastest mom for Fedora 22?

I can, but 0.5.3 should be available in the oVirt repositories for
F22. Are we still releasing vdsm in Koji?


Martin

On Thu, May 12, 2016 at 11:27 AM, Nir Soffer  wrote:
> On Thu, May 12, 2016 at 9:43 AM, Francesco Romani  wrote:
>> - Original Message -
>> [...]
>>> Needing a yaml package and python3-netaddr make sense, but I don't 
>>> understand
>>> why we need these packages for building vdsm:
>>>
>>> - libvirt-python3 - we should not access libvirt using the tests
>>
>> True, but we use constants (e.g. error codes) in the tests, hence
>> the need for that package
>
> Makes sense.
>
>>
>>> - mom - we are not running mom on a development machine
>>
>> Similar, there are few tests (momTests.py/momPolicyTests.py) which import
>> the package for testing purposes
>
> Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
> runs in separate process?
>
> Here we have a bigger problem - the version we require is not available
> for Fedora 22, practically breaking support on Fedora 22.
>
> Latest version in Fedora 22 is 0.5.1.
>
> Martin, can you build lastest mom for Fedora 22?
>
> Nir
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Nir Soffer
On Thu, May 12, 2016 at 9:43 AM, Francesco Romani  wrote:
> - Original Message -
> [...]
>> Needing a yaml package and python3-netaddr make sense, but I don't understand
>> why we need these packages for building vdsm:
>>
>> - libvirt-python3 - we should not access libvirt using the tests
>
> True, but we use constants (e.g. error codes) in the tests, hence
> the need for that package

Makes sense.

>
>> - mom - we are not running mom on a development machine
>
> Similar, there are few tests (momTests.py/momPolicyTests.py) which import
> the package for testing purposes

Testing mom or testing vdsm? Maybe these tests are not relevant now that mom
runs in separate process?

Here we have a bigger problem - the version we require is not available
for Fedora 22, practically breaking support on Fedora 22.

Latest version in Fedora 22 is 0.5.1.

Martin, can you build lastest mom for Fedora 22?

Nir
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [VDSM] Strange build requirements added lately

2016-05-12 Thread Francesco Romani
- Original Message -
[...]
> Needing a yaml package and python3-netaddr make sense, but I don't understand
> why we need these packages for building vdsm:
> 
> - libvirt-python3 - we should not access libvirt using the tests

True, but we use constants (e.g. error codes) in the tests, hence
the need for that package

> - mom - we are not running mom on a development machine

Similar, there are few tests (momTests.py/momPolicyTests.py) which import
the package for testing purposes

Bests,

-- 
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel