[jira] [Commented] (LIBCLOUD-786) GCENodeDriver.ex_get_image needs some love, see description.

2016-01-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15086333#comment-15086333
 ] 

ASF GitHub Bot commented on LIBCLOUD-786:
-

Github user crunk1 closed the pull request at:

https://github.com/apache/libcloud/pull/665


> GCENodeDriver.ex_get_image needs some love, see description.
> 
>
> Key: LIBCLOUD-786
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-786
> Project: Libcloud
>  Issue Type: Bug
>  Components: Compute
>Reporter: Scott Crunkleton
>
> Firstly, the parameter 'ex_project_list' is a misnomer. It is being treated 
> as a single project, not list of projects.
> Secondly, it's slow. When not providing a project parameter, ex_get_image 
> lists all images from all projects listed in GCENodeDriver.IMAGE_PROJECTS. 
> This is a separate API call for each project. After getting all the images, 
> any images that have licenses create another API call via ex_get_license. 
> Thirdly, if any of the license calls try to pull a license from an image 
> project that the user doesn't have access to, it raises a 
> ResourceNotFoundError.
> My opinion: fix the ex_project_list param, and see about not populating the 
> image license data when fetching images.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LIBCLOUD-786) GCENodeDriver.ex_get_image needs some love, see description.

2016-01-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15083976#comment-15083976
 ] 

ASF subversion and git services commented on LIBCLOUD-786:
--

Commit 81a8dbc324f870444e980aee523fea48fc37cbcc in libcloud's branch 
refs/heads/trunk from [~crunk1]
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=81a8dbc ]

Implemented LazyObject class, which provides a .lazy class method. The lazy 
class method returns a Proxy object that subclasses the target object class. 
Upon accessing the proxy object in any way, the object is initialized.

Modified Google Compute Engine License objects, GCELicense, to be such a lazy
object. This addresses https://issues.apache.org/jira/browse/LIBCLOUD-786.

Tests/Verification:
  tox -e lint
  python setup.py test
  Added test/common/test_base.py which has LazyObjectTest

Signed-off-by: Eric Johnson 


> GCENodeDriver.ex_get_image needs some love, see description.
> 
>
> Key: LIBCLOUD-786
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-786
> Project: Libcloud
>  Issue Type: Bug
>  Components: Compute
>Reporter: Scott Crunkleton
>
> Firstly, the parameter 'ex_project_list' is a misnomer. It is being treated 
> as a single project, not list of projects.
> Secondly, it's slow. When not providing a project parameter, ex_get_image 
> lists all images from all projects listed in GCENodeDriver.IMAGE_PROJECTS. 
> This is a separate API call for each project. After getting all the images, 
> any images that have licenses create another API call via ex_get_license. 
> Thirdly, if any of the license calls try to pull a license from an image 
> project that the user doesn't have access to, it raises a 
> ResourceNotFoundError.
> My opinion: fix the ex_project_list param, and see about not populating the 
> image license data when fetching images.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LIBCLOUD-786) GCENodeDriver.ex_get_image needs some love, see description.

2015-12-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LIBCLOUD-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15067740#comment-15067740
 ] 

ASF GitHub Bot commented on LIBCLOUD-786:
-

GitHub user crunk1 opened a pull request:

https://github.com/apache/libcloud/pull/665

Implemented LazyObject class, which provides a .lazy class method. Th…

…e lazy class method returns a Proxy object that subclasses the target 
object class. Upon accessing the proxy object in any way, the object is 
initialized.

Modified Google Compute Engine License objects, GCELicense, to be such a 
lazy object. This addresses https://issues.apache.org/jira/browse/LIBCLOUD-786.

Tests/Verification:
  tox -e lint
  python setup.py test
  Added test/common/test_base.py which has LazyObjectTest

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/crunk1/libcloud trunk

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/libcloud/pull/665.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #665


commit 4314737241e048778f492640e5e730c8bc499d6c
Author: Scott Crunkleton 
Date:   2015-12-22T08:21:06Z

Implemented LazyObject class, which provides a .lazy class method. The lazy 
class method returns a Proxy object that subclasses the target object class. 
Upon accessing the proxy object in any way, the object is initialized.

Modified Google Compute Engine License objects, GCELicense, to be such a 
lazy object.

Tests/Verification:
  tox -e lint
  python setup.py test
  Added test/common/test_base.py which has LazyObjectTest




> GCENodeDriver.ex_get_image needs some love, see description.
> 
>
> Key: LIBCLOUD-786
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-786
> Project: Libcloud
>  Issue Type: Bug
>  Components: Compute
>Reporter: Scott Crunkleton
>
> Firstly, the parameter 'ex_project_list' is a misnomer. It is being treated 
> as a single project, not list of projects.
> Secondly, it's slow. When not providing a project parameter, ex_get_image 
> lists all images from all projects listed in GCENodeDriver.IMAGE_PROJECTS. 
> This is a separate API call for each project. After getting all the images, 
> any images that have licenses create another API call via ex_get_license. 
> Thirdly, if any of the license calls try to pull a license from an image 
> project that the user doesn't have access to, it raises a 
> ResourceNotFoundError.
> My opinion: fix the ex_project_list param, and see about not populating the 
> image license data when fetching images.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)