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" <[email protected]>
To: [email protected]
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.