Hi,
it could be something like
require 'OpenNebula'
include 'OpenNebula'
(...)
template = Template.new(Template.build_xml(),@client)
template.allocate(template_str)
where template_str is the contents of the template file containing the vm
definition. You can read them from file yourself.with File.read().
Hope it helps,
Hector
En Wed, 18 Jan 2012 09:53:14 +0100, Tommy Aditya Lawanto
<to...@wowrack.com> escribió:
Hi All,
I read guide about adding a new template on
http://opennebula.org/documentation:rel3.2:vm_guide, which need a file
containing the vm definition.
However, when i get to the Ruby OCA API on
http://opennebula.org/doc/3.0/oca/ruby/. I cannot find any method for
creating a new template which read from file. Could someone explain to
me how can i create a new template using Ruby OCA API?
Any help is much appreaciated, as i completely new to Ruby and Open
Nebula.
Best Regard,
Tommy
--
Hector Sanjuan
OpenNebula Developer
_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org