cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Mehta <>
Subject Re: Template status field via API
Date Sat, 01 Sep 2012 19:48:10 GMT
Hi Richard,
Please find my answers inline.


On 01-Sep-2012, at 10:07 PM, Richard Downer wrote:

> Hi,
> I'm working on the jclouds project, and its support for the CloudStack API.
> I'm looking at the responses for the listTemplates command, status field.
> This field appears to include English text which describes the template
> state, presumably ready to go straight into a UI element. But jclouds
> prefers to have enumerated types, so it wants to parse the strings and
> return a known enum to its users.
> I've been examining the CloudStack source code, and it seems that this is
> the piece of code responsible for writing that field:

> First question - do I have that right, or is this response field from
> somewhere else? (I'm a bit of a newbie at the CloudStack codebase.)

This is the correct location.

> Here are the possible strings that the field could be set to:
>  - Processing
>  - Installing Template
>  - x% Downloaded
>  - Download Complete
>  - Successfully Installed

I think you missed the error situation. This string can vary in case of error cases.

> Second question - what states lead to each of these statuses? In
> particular, I'm uncertain of the final one, "Successfully Installed". By
> using the registerTemplate command I was able to see most of the other
> status strings, but I haven't yet seen the last one. Is it reachable, and
> if so by what route?

You are right. From the code it seems to be unreachable code. 

> Last question - are there significant differences between 2.2.x and 3.0.x
> in this area?

No, there aren't significant changes

> Many thanks,
> -- 
> Richard Downer • Lead Engineer • Cloudsoft Corporation •
> Skype richardcloudsoft • Twitter @FrontierTown

View raw message