Hi Andrew,

I haven't tried the TemplateApi directly, but on examining the
listTemplates method, the query parameters are 'command:listTemplates' and
'listall:true' and 'templatefilter:true'

If I use ComputeService to listImages(), I get only the public templates
which are:

10:12:30.810 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
bfbfd106-1f2c-4401-8bfb-c0d4db22be1a,
ninefold_app_template
10:12:30.810 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
1173bd05-a251-4f24-8aa1-ada42b70a043,
CentOS 6.4
10:12:30.810 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
2943770f-51fc-47b2-b211-74344dc84cf8,
Debian 7.0
10:12:30.810 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
23e4dc75-8fd3-4659-8724-276349a037e0,
Ubuntu 13.04
10:12:30.810 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
d26ba567-63e0-4563-9d5f-349e9fc18a2c,
Ubuntu 12.10
10:12:30.810 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
3008bb3b-73ab-4436-a781-e3070245a2a9,
Ubuntu 12.04.2 LTS
10:12:30.811 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
6c2a1750-c5fd-4861-8b33-3232009b9156,
Fedora 18
10:12:30.812 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
333e5e38-25eb-4a5d-a72e-aaae7a20d883,
CentOS 6.3
10:12:30.812 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
09c74deb-45bb-4ba5-84aa-93b9558a5588,
Windows 2008 R2 - Enterprise
10:12:30.812 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
04ab04ce-7587-48c2-9892-58b7615a3dd5,
Windows 2012 - DataCentre
10:12:30.812 [main] DEBUG a.e.s.s.cloudconnect.CloudConnector -
35a0bb4f-7a7a-4f4c-bf9b-6536596c0825,
Ninefold App Template

The reason for this is the way the query is constructed:

https://api.ninefold.com/compute/v2.0?response=json&command=listTemplates&listAll=true&templatefilter=executable-
this only returns public templates.

I have written a wrapper for the CloudStack API which correctly constructs
the query as follows:

https://api.ninefold.com/compute/v2.0?command=listTemplates&listall=true&templatefilter=self&projectid=
<id>&apiKey=<key>&signature=<signature>

This correctly returns the templates that I own in addition to the public
templates.

So, what is happening is that the listTemplates() method requires an
additional parameter 'projectid' in order to retrieve the private
templates. At the moment this is missing.

Cheers,
Mohan


On Thu, Aug 1, 2013 at 10:09 AM, Andrew Phillips <andr...@apache.org> wrote:

> But in the CloudStackAPI, it says that we need to specify the project id as
>> well in order to get details of the private templates. The above query
>> retrieves only the public templates.
>>
>
> I can't see any explicit support for private templates, but the
> TemplateApi [1] comments do seem to talk about them - have you been able to
> use the listTemplates() command or the updateTemplatePermissions() to check
> whether jclouds can find them?
>
> ap
>
> [1] https://github.com/jclouds/**jclouds/blob/master/apis/**
> cloudstack/src/main/java/org/**jclouds/cloudstack/features/**
> TemplateApi.java#L247<https://github.com/jclouds/jclouds/blob/master/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateApi.java#L247>
>

Reply via email to