cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Kent <phillip.k...@xmlsoup.com>
Subject Re: Get information
Date Tue, 17 Mar 2015 10:22:37 GMT
Hi Martins,

the API documentation has quite a lot of mistakes and it has gaps as well.

All of the API reference documentation is embedded in the CloudStack
source code.

I think the best way to get developers to look at it is to submit a bug at
https://issues.apache.org/jira/browse/CLOUDSTACK/

or submit a pull request on the source code in Github, for example
here is one that I did...
https://github.com/apache/cloudstack/pull/98

Phillip

---------- Forwarded message ----------
From: "Mārtiņš Jakubovičs" <martins@vertigs.lv>
To: users@cloudstack.apache.org
Cc:
Date: Tue, 17 Mar 2015 09:53:52 +0200
Subject: Re: Get information
Hello Phillip,

/isoid/ is working only when ISO image is attached to instance. It
contains information only about attached ISO.
But anyway this is a bit odd, when I need to call API requests, which
return error, to find is this instance from ISO or template.
So is this documentation and removed API feature, or something else?
Maybe some of developers can say comment this?

On 03/16/2015 07:56 PM, Phillip Kent wrote:
>
> Hello Martins,
>
> that's a good observation.
>
> What happens for me is that, for deployment from ISO, the response
> values are duplicated:
>
> templateid = isoid
> templatename = isoname
> templatedisplaytext = isodisplaytext
>
> On the other hand, for deployment from template, the response does not
> contain any values for isoid, isoname, isodisplaytext .
>
> You would think for consistency, if the iso... response values are set
> then the template... response values should not be set.
>
> But I expect there are internal functions which look for a value for
> templateid so if it is missing it makes things more complicated.
>
> In order to know which VMs you have are based on ISO image, you could
> do a selection of those for which response['isoid'] has a value.
>
> (In Python, trying to find response['isoid'] will throw a KeyError
> exception it if is missing, so you can extract the VM info you need
> with
>    try:
>          ....
>    except KeyError:
>         ....
> )
>
> Note: I am using CloudPlatform 4.3.0, but it has some customisation so
> may not be standard behaviour.
>
> Phillip
>
> ---------- Forwarded message ----------
> From: "Mārtiņš Jakubovičs" <martins@vertigs.lv>
> To: users@cloudstack.apache.org
> Cc:
> Date: Mon, 16 Mar 2015 17:58:58 +0200
> Subject: Get information
> Hello,
>
> I want to get a list of instances which are created from ISO images.
> API documentation
> <http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/listVirtualMachines.html>
> tells, that templateid should return -1 if instance is created from
> ISO image, but it returns ISO image ID instead. Is that a bug?
>
> Thanks.

Mime
View raw message