[one-users] Oca 3 template instantiate

Daniel Molina dmolina at opennebula.org
Fri Dec 16 09:37:55 PST 2011


Hi Carlos,

2011/12/14 Carlos Fernández Iglesias <ciglesias at cesga.es>:
> Hello,
>
> Is there a way to know the "vmid"  "oca.VmTemplate.instantiate(name='name')"
> is going to assign to the virtual machine?

In the following link you can find the response from the xmlrpc
request which includes the ID assigned to the new vm:
http://www.opennebula.org/documentation:rel3.0:api#onetemplateinstantiate

>
> And
>
> Can you retrieve the content of a template from oca so it can be used in
> "oca.VirtualMachine.allocate(client, template)" ?

The following method will retrieve the informartion of the template in
XML format, therefore you will have to convert it to the template
syntax:
http://www.opennebula.org/documentation:rel3.0:api#onetemplateinfo

If you are using the ruby binding there is a template_to_str method
for this task.

Kind regards

>
> Thank you.
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



-- 
Daniel Molina
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula



More information about the Users mailing list