You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Hiroshi Yoshikawa (JIRA)" <ji...@apache.org> on 2015/05/28 09:30:17 UTC

[jira] [Updated] (LIBCLOUD-715) Can't list a template image in CloudStack Project

     [ https://issues.apache.org/jira/browse/LIBCLOUD-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiroshi Yoshikawa updated LIBCLOUD-715:
---------------------------------------
    Description: 
There is no way to specify _CloudStack Project ID_ in *list_images()*'s arguments.
So you can't create VMs using Project specific templates.

I suggest adding _projectid_ parameter in *list_images()* method as below:

{code:title=cloudstack.py|borderStyle=solid}
    def list_images(self, location=None, project=None):
        args = {
            'templatefilter': 'executable'
        }
        if location is not None:
            args['zoneid'] = location.id
        if project is not None:
            args['projectid'] = project.id

        imgs = self._sync_request(command='listTemplates',
                                  params=args,
                                  method='GET')
{code}

  was:
There is no way to specify CloudStack Project-ID in *list_images()*'s arguments.
So you can't create VMs using Project specific templates.

I suggest adding 'projectid' parameter in *list_images()* method as below:

{code:title=cloudstack.py|borderStyle=solid}
    def list_images(self, location=None, project=None):
        args = {
            'templatefilter': 'executable'
        }
        if location is not None:
            args['zoneid'] = location.id
        if project is not None:
            args['projectid'] = project.id

        imgs = self._sync_request(command='listTemplates',
                                  params=args,
                                  method='GET')
{code}


> Can't list a template image in CloudStack Project
> -------------------------------------------------
>
>                 Key: LIBCLOUD-715
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-715
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>         Environment: CloudStack 4.3.0.2
>            Reporter: Hiroshi Yoshikawa
>            Priority: Minor
>
> There is no way to specify _CloudStack Project ID_ in *list_images()*'s arguments.
> So you can't create VMs using Project specific templates.
> I suggest adding _projectid_ parameter in *list_images()* method as below:
> {code:title=cloudstack.py|borderStyle=solid}
>     def list_images(self, location=None, project=None):
>         args = {
>             'templatefilter': 'executable'
>         }
>         if location is not None:
>             args['zoneid'] = location.id
>         if project is not None:
>             args['projectid'] = project.id
>         imgs = self._sync_request(command='listTemplates',
>                                   params=args,
>                                   method='GET')
> {code}



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