oca.template

class oca.VmTemplate(xml, client)

Bases: oca.pool.PoolElement

static allocate(client, template)

Allocates a new template in OpenNebula

client
oca.Client object
group
a string containing the group name
chown(uid=-1, gid=-1)

Changes the ownership of a template.

uid
The User ID of the new owner. If set to -1, the owner is not changed.
gid
The Group ID of the new group. If set to -1, the group is not changed.
delete()

Deletes current object from the pool

info(*args)
instantiate(name='')

Creates a VM instance from a VmTemplate

name
name of the VM instance
classmethod new_with_id(client, element_id)

Retrives object which id equals `id`.

Arguments

`client`
oca.Client object.
`element_id
object id.
publish()

Publishes a template.

unpublish()

Unpublishes a template.

update(template)

Replaces the template contents.

template
The new template contents.
class oca.VmTemplatePool(client)

Bases: oca.pool.Pool

Previous topic

oca.group

Next topic

oca.virtualmachine

This Page