oca.image

class oca.Image(xml, client)

Bases: oca.pool.PoolElement

static allocate(client, template)

Allocates a new image in OpenNebula

Arguments

client
oca.Client object
template
a string containing the template of the image
chown(uid, gid)

Changes the owner/group

Arguments

uid
New owner id. Set to -1 to leave current value
gid
New group id. Set to -1 to leave current value
delete()

Deletes current object from the pool

disable()

Disables an image

enable()

Enables an image

info(*args)
classmethod new_with_id(client, element_id)

Retrives object which id equals `id`.

Arguments

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

Publishes an image

set_nonpersistent()

Set Image as non persistent

set_persistent()

Set Image as persistent

short_state

Short string representation of image state. One of ‘init’, ‘rdy’, ‘used’, ‘disa’

short_type

Short string representation of image type. One of ‘OS’, ‘CD’, ‘DB’

str_state

String representation of image state. One of ‘INIT’, ‘READY’, ‘USED’, ‘DISABLED’

str_type

String representation of image type. One of ‘OS’, ‘CDROM’, ‘DATABLOCK’

unpublish()

Unpublishes an image

update(template)

Replaces the template contents

Arguments

template
New template contents
class oca.ImagePool(client)

Bases: oca.pool.Pool

Previous topic

oca.host

Next topic

oca.virtualnetwork

This Page