XML-RPC API

This reference documentation describes the xml-rpc methods exposed by OpenNebula. Each description consists of the method name and the input and output values.

All xml-rpc responses share a common structure.

TypeData TypeDescription
OUTBooleanTrue or false whenever is successful or not.
OUTStringIf an error occurs this is the error message.
OUTIntError code.

The output will always consist of three values. The first and third ones are fixed, but the second one will contain the String error message only in case of failure. If the method is successful, the returned value may be of another Data Type.

The Error Code will contain one of the following values:

ValueCodeMeaning
0x0000SUCCESSSuccess response.
0x0100AUTHENTICATIONUser could not be authenticated.
0x0200AUTHORIZATIONUser is not authorized to perform the requested action.
0x0400NO_EXISTSThe requested resource does not exist.
0x0800ACTIONWrong state to perform action.
0x1000XML_RPC_APIWrong parameters, e.g. param should be -1 or -2, but -3 was received.
0x2000INTERNALInternal error, e.g. the resource could not be loaded from the DB.
0x4000ALLOCATEThe resource cannot be allocated.
0x8000LOCKEDThe resource is locked.

The information strings returned by the one.*.info methods are XML-formatted. The complete XML Schemas (XSD) reference is included at the end of this page. We encourage you to use the -x option of the command line interface to collect sample outputs from your own infrastructure.

The methods that accept XML templates require the root element to be TEMPLATE. For instance, this template:

NAME = abc
MEMORY = 1024
ATT1 = value1

Can be also given to OpenNebula with the following XML:

<TEMPLATE>
  <NAME>abc</NAME>
  <MEMORY>1024</MEMORY>
  <ATT1>value1</ATT1>
</TEMPLATE>

Authorization Requests Reference

OpenNebula features a CLI that wraps the XML-RPC requests. For each XML-RPC request, the session token is authenticated, and after that the Request Manager generates an authorization request that can include more than one operation. The following tables document these requests from the different CLI commands.

onevm

onevm commandXML-RPC MethodAuth. Request
deploy*one.vm.deployVM:ADMIN

HOST:MANAGE
undeploy*

terminate*

suspend*

hold

stop*

resume

release

poweroff*

reboot*
one.vm.actionVM:MANAGE
resched

unresched
one.vm.actionVM:ADMIN
migrate*one.vm.migrateVM:ADMIN

HOST:MANAGE
disk-saveas*one.vm.disksaveasVM:MANAGE

IMAGE:CREATE
disk-snapshot-create*one.vm.disksnapshotcreateVM:MANAGE

IMAGE:MANAGE
disk-snapshot-delete*one.vm.disksnapshotdeleteVM:MANAGE

IMAGE:MANAGE
disk-snapshot-revert*one.vm.disksnapshotrevertVM:MANAGE
disk-snapshot-renameone.vm.disksnapshotrenameVM:MANAGE
disk-snapshot-listone.vmpool.infoVM:USE
disk-attach*one.vm.attachVM:MANAGE

IMAGE:USE
disk-detach*one.vm.detachVM:MANAGE
disk-resize*one.vm.diskresizeVM:MANAGE
nic-attach*one.vm.attachnicVM:MANAGE

NET:USE
nic-detach*one.vm.detachnicVM:MANAGE
nic-update*one.vm.updatenicVM:MANAGE
sg-attach*one.vm.attachsgVM:MANAGE
sg-detach*one.vm.detachsgVM:MANAGE
createone.vm.allocateVM:CREATE

IMAGE:USE

NET:USE
showone.vm.infoVM:USE
chown

chgrp
one.vm.chownVM:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.vm.chmodVM:<MANAGE/ADMIN>
renameone.vm.renameVM:MANAGE
snapshot-create*one.vm.snapshotcreateVM:MANAGE
snapshot-delete*one.vm.snapshotdeleteVM:MANAGE
snapshot-revert*one.vm.snapshotrevertVM:MANAGE
snapshot-listone.vmpool.infoVM:USE
resize*one.vm.resizeVM:MANAGE
updateone.vm.updateVM:MANAGE
recover*one.vm.recoverVM:ADMIN
save*– (ruby method)VM:MANAGE

IMAGE:CREATE

TEMPLATE:CREATE
updateconfone.vm.updateconfVM:MANAGE
list
top
one.vmpool.infoVM:USE
listone.vmpool.infoextendedVM:USE
one.vm.monitoringVM:USE
lockone.vm.lockVM:MANAGE
unlockone.vm.unlockVM:MANAGE
create-chart

–schedule
one.vm.schedaddVM:MANAGE
sched-updateone.vm.schedupdateVM:MANAGE
sched-deleteone.vm.scheddeleteVM:MANAGE
backup *one.vm.backupVM:ADMIN
backup-cancel*one.vm.backupcancelVM:ADMIN
pci-attachone.vm.attachpciVM:MANAGE
pci-detachone.vm.detachpciVM:MANAGE
restoreone.vm.restoreVM:MANAGE

onetemplate

onetemplate commandXML-RPC MethodAuth. Request
updateone.template.updateTEMPLATE:MANAGE
instantiateone.template.instantiateTEMPLATE:USE

[IMAGE:USE]

[NET:USE]
createone.template.allocateTEMPLATE:CREATE
cloneone.template.cloneTEMPLATE:CREATE

TEMPLATE:USE
deleteone.template.deleteTEMPLATE:MANAGE
showone.template.infoTEMPLATE:USE
chown

chgrp
one.template.chownTEMPLATE:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.template.chmodTEMPLATE:<MANAGE/ADMIN>
renameone.template.renameTEMPLATE:MANAGE
list

top
one.templatepool.infoTEMPLATE:USE
lockone.template.lockTEMPLATE:MANAGE
unlockone.template.unlockTEMPLATE:MANAGE

onehost

onehost commandXML-RPC MethodAuth. Request
enable

disable

offline
one.host.statusHOST:ADMIN
updateone.host.updateHOST:ADMIN
createone.host.allocateHOST:CREATE

[CLUSTER:ADMIN]
deleteone.host.deleteHOST:ADMIN
renameone.host.renameHOST:ADMIN
showone.host.infoHOST:USE
list
top
one.hostpool.infoHOST:USE

onecluster

onecluster commandXML-RPC MethodAuth. Request
createone.cluster.allocateCLUSTER:CREATE
deleteone.cluster.deleteCLUSTER:ADMIN
updateone.cluster.updateCLUSTER:MANAGE
addhostone.cluster.addhostCLUSTER:ADMIN

HOST:ADMIN
delhostone.cluster.delhostCLUSTER:ADMIN

HOST:ADMIN
adddatastoreone.cluster.adddatastoreCLUSTER:ADMIN

DATASTORE:ADMIN
deldatastoreone.cluster.deldatastoreCLUSTER:ADMIN

DATASTORE:ADMIN
addvnetone.cluster.addvnetCLUSTER:ADMIN

NET:ADMIN
delvnetone.cluster.delvnetCLUSTER:ADMIN

NET:ADMIN
renameone.cluster.renameCLUSTER:MANAGE
showone.cluster.infoCLUSTER:USE
listone.clusterpool.infoCLUSTER:USE

onegroup

onegroup commandXML-RPC MethodAuth. Request
createone.group.allocateGROUP:CREATE
deleteone.group.deleteGROUP:ADMIN
showone.group.infoGROUP:USE
updateone.group.updateGROUP:MANAGE
addadminone.group.addadminGROUP:MANAGE

USER:MANAGE
deladminone.group.deladminGROUP:MANAGE

USER:MANAGE
quotaone.group.quotaGROUP:ADMIN
listone.grouppool.infoGROUP:USE
one.groupquota.info
defaultquotaone.groupquota.updateOnly for users in the oneadmin group

onevdc

onevdc commandXML-RPC MethodAuth. Request
createone.vdc.allocateVDC:CREATE
renameone.vdc.renameVDC:MANAGE
deleteone.vdc.deleteVDC:ADMIN
updateone.vdc.updateVDC:MANAGE
showone.vdc.infoVDC:USE
listone.vdcpool.infoVDC:USE
addgroupone.vdc.addgroupVDC:ADMIN

GROUP:ADMIN
delgroupone.vdc.delgroupVDC:ADMIN

GROUP:ADMIN
addclusterone.vdc.addclusterVDC:ADMIN

CLUSTER:ADMIN

ZONE:ADMIN
delclusterone.vdc.delclusterVDC:ADMIN

CLUSTER:ADMIN

ZONE:ADMIN
addhostone.vdc.addhostVDC:ADMIN

HOST:ADMIN

ZONE:ADMIN
delhostone.vdc.delhostVDC:ADMIN

HOST:ADMIN

ZONE:ADMIN
adddatastoreone.vdc.adddatastoreVDC:ADMIN

DATASTORE:ADMIN

ZONE:ADMIN
deldatastoreone.vdc.deldatastoreVDC:ADMIN

DATASTORE:ADMIN

ZONE:ADMIN
addvnetone.vdc.addvnetVDC:ADMIN

NET:ADMIN

ZONE:ADMIN
delvnetone.vdc.delvnetVDC:ADMIN

NET:ADMIN

ZONE:ADMIN

onevnet

onevnet commandXML-RPC MethodAuth. Request
addarone.vn.add_arNET:ADMIN
rmarone.vn.rm_arNET:ADMIN
freeone.vn.free_arNET:MANAGE
reserveone.vn.reserveNET:USE
updatearone.vn.update_arNET:MANAGE
holdone.vn.holdNET:MANAGE
releaseone.vn.releaseNET:MANAGE
updateone.vn.updateNET:MANAGE
createone.vn.allocateNET:CREATE

[CLUSTER:ADMIN]
delete*one.vn.deleteNET:MANAGE
showone.vn.infoNET:USE
chown

chgrp
one.vn.chownNET:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.vn.chmodNET:<MANAGE/ADMIN>
renameone.vn.renameNET:MANAGE
listone.vnpool.infoNET:USE
lockone.vn.lockNET:MANAGE
unlockone.vn.unlockNET:MANAGE
recoverone.vn.recoverNET:MANAGE

oneuser

oneuser commandXML-RPC MethodAuth. Request
createone.user.allocateUSER:CREATE
deleteone.user.deleteUSER:ADMIN
showone.user.infoUSER:USE
passwdone.user.passwdUSER:MANAGE
loginone.user.loginUSER:MANAGE
updateone.user.updateUSER:MANAGE
chauthone.user.chauthUSER:ADMIN
quotaone.user.quotaUSER:ADMIN
chgrpone.user.chgrpUSER:MANAGE

GROUP:MANAGE
addgroupone.user.addgroupUSER:MANAGE

GROUP:MANAGE
delgroupone.user.delgroupUSER:MANAGE

GROUP:MANAGE
enable

disable
one.user.enableUSER:ADMIN
encode
listone.userpool.infoUSER:USE
one.userquota.info
defaultquotaone.userquota.updateOnly for users in the oneadmin group

onedatastore

onedatastore commandXML-RPC MethodAuth. Request
createone.datastore.allocateDATASTORE:CREATE

[CLUSTER:ADMIN]
deleteone.datastore.deleteDATASTORE:ADMIN
showone.datastore.infoDATASTORE:USE
updateone.datastore.updateDATASTORE:MANAGE
renameone.datastore.renameDATASTORE:MANAGE
chown

chgrp
one.datastore.chownDATASTORE:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.datastore.chmodDATASTORE:<MANAGE / ADMIN>
enable

disable
one.datastore.enableDATASTORE:MANAGE
listone.datastorepool.infoDATASTORE:USE

oneimage

oneimage commandXML-RPC MethodAuth. Request
persistent

nonpersistent
one.image.persistentIMAGE:MANAGE
enable

disable
one.image.enableIMAGE:MANAGE
chtypeone.image.chtypeIMAGE:MANAGE
snapshot-delete*one.image.snapshotdeleteIMAGE:MANAGE
snapshot-revert*one.image.snapshotrevertIMAGE:MANAGE
snapshot-flatten*one.image.snapshotflattenIMAGE:MANAGE
updateone.image.updateIMAGE:MANAGE
createone.image.allocateIMAGE:CREATE

DATASTORE:USE
clone*one.image.cloneIMAGE:CREATE

IMAGE:USE

DATASTORE:USE
delete*one.image.deleteIMAGE:MANAGE
showone.image.infoIMAGE:USE
chown

chgrp
one.image.chownIMAGE:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.image.chmodIMAGE:<MANAGE / ADMIN>
renameone.image.renameIMAGE:MANAGE
list

top
one.imagepool.infoIMAGE:USE
lockone.image.lockIMAGE:MANAGE
unlockone.image.unlockIMAGE:MANAGE
restoreone.image.restoreIMAGE:USE

onemarket

onemarket commandXML-RPC MethodAuth. Request
updateone.market.updateMARKETPLACE:MANAGE
createone.market.allocateMARKETPLACE:CREATE
deleteone.market.deleteMARKETPLACE:MANAGE
showone.market.infoMARKETPLACE:USE
chown

chgrp
one.market.chownMARKETPLACE:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.market.chmodMARKETPLACE:<MANAGE / ADMIN>
renameone.market.renameMARKETPLACE:MANAGE
enable

disable
one.market.enableMARKETPLACE:MANAGE
listone.marketpool.infoMARKETPLACE:USE

onemarketapp

onemarketapp commandXML-RPC MethodAuth. Request
createone.marketapp.allocateMARKETPLACEAPP:CREATE

MARKETPLACE:USE
export*– (ruby method)MARKETPLACEAPP:USE

IMAGE:CREATE

DATASTORE:USE

[TEMPLATE:CREATE]
download*– (ruby method)MARKETPLACEAPP:USE
enable

disable
one.marketapp.enableMARKETPLACEAPP:MANAGE
updateone.marketapp.updateMARKETPLACEAPP:MANAGE
deleteone.marketapp.deleteMARKETPLACEAPP:MANAGE
showone.marketapp.infoMARKETPLACEAPP:USE
chown

chgrp
one.marketapp.chownMARKETPLACEAPP:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.marketapp.chmodMARKETPLACEAPP:<MANAGE / ADMIN>
renameone.marketapp.renameMARKETPLACEAPP:MANAGE
listone.marketapppool.infoMARKETPLACEAPP:USE
lockone.marketapp.lockMARKETPLACEAPP:MANAGE
unlockone.marketapp.unlockMARKETPLACEAPP:MANAGE

onevrouter

onevrouter commandXML-RPC MethodAuth. Request
createone.vrouter.allocateVROUTER:CREATE
updateone.vrouter.updateVROUTER:MANAGE
instantiateone.vrouter.instantiateTEMPLATE:USE

[IMAGE:USE]

[NET:USE]
nic-attachone.vrouter.attachnicVROUTER:MANAGE

NET:USE
nic-detachone.vrouter.detachnicVROUTER:MANAGE
deleteone.vrouter.deleteVROUTER:MANAGE
showone.vrouter.infoVROUTER:USE
chown

chgrp
one.vrouter.chownVROUTER:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.vrouter.chmodVROUTER:<MANAGE/ADMIN>
renameone.vrouter.renameVROUTER:MANAGE
list

top
one.vrouterpool.infoVROUTER:USE
lockone.vrouter.lockVROUTER:MANAGE
unlockone.vrouter.unlockVROUTER:MANAGE

onezone

onezone commandXML-RPC MethodAuth. Request
createone.zone.allocateZONE:CREATE
renameone.zone.renameZONE:MANAGE
updateone.zone.updateZONE:MANAGE
deleteone.zone.deleteZONE:ADMIN
enable

disable
one.zone.enableZONE:ADMIN
server-addone.zone.addserverZONE:ADMIN
server-delone.zone.delserverZONE:ADMIN
server-resetone.zone.resetserverZONE:ADMIN
showone.zone.infoZONE:USE
listone.zonepool.infoZONE:USE
setZONE:USE

onesecgroup

onesecgroup commandXML-RPC MethodAuth. Request
createone.secgroup.allocateSECGROUP:CREATE
cloneone.secgroup.cloneSECGROUP:CREATE

SECGROUP:USE
deleteone.secgroup.deleteSECGROUP:MANAGE
chown

chgrp
one.secgroup.chownSECGROUP:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.secgroup.chmodSECGROUP:<MANAGE / ADMIN>
updateone.secgroup.updateSECGROUP:MANAGE
commitone.secgroup.commitSECGROUP:MANAGE
renameone.secgroup.renameSECGROUP:MANAGE
showone.secgroup.infoSECGROUP:USE
listone.secgrouppool.infoSECGROUP:USE

onevmgroup

onevmgroup commandXML-RPC MethodAuth. Request
createone.vmgroup.allocateVMGROUP:CREATE
deleteone.vmgroup.deleteVMGROUP:MANAGE
chown

chgrp
one.vmgroup.chownVMGROUP:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.vmgroup.chmodVMGROUP:<MANAGE / ADMIN>
updateone.vmgroup.updateVMGROUP:MANAGE
renameone.vmgroup.renameVMGROUP:MANAGE
showone.vmgroup.infoVMGROUP:USE
listone.vmgrouppool.infoVMGROUP:USE
lockone.vmgroup.lockVMGROUP:MANAGE
unlockone.vmgroup.unlockVMGROUP:MANAGE
role-addone.vmgroup.roleaddVMGROUP:MANAGE
role-deleteone.vmgroup.roledeleteVMGROUP:MANAGE
role-updateone.vmgroup.roleupdateVMGROUP:MANAGE

oneacl

oneacl commandXML-RPC MethodAuth. Request
createone.acl.addruleACL:MANAGE
deleteone.acl.delruleACL:MANAGE
listone.acl.infoACL:MANAGE

oneacct

commandXML-RPC MethodAuth. Request
oneacctone.vmpool.accountingVM:USE

oneshowback

commandXML-RPC MethodAuth. Request
listone.vmpool.showbackVM:USE
calculateone.vmpool.calculateshowbackOnly for oneadmin group

documents

XML-RPC MethodAuth. Request
one.document.updateDOCUMENT:MANAGE
one.document.allocateDOCUMENT:CREATE
one.document.cloneDOCUMENT:CREATE

DOCUMENT:USE
one.document.deleteDOCUMENT:MANAGE
one.document.infoDOCUMENT:USE
one.document.chownDOCUMENT:MANAGE

[USER:MANAGE]

[GROUP:USE]
one.document.chmodDOCUMENT:<MANAGE / ADMIN>
one.document.renameDOCUMENT:MANAGE
one.document.lockDOCUMENT:MANAGE
one.document.unlockDOCUMENT:MANAGE
one.documentpool.infoDOCUMENT:USE
one.document.lockDOCUMENT:MANAGE
one.document.unlockDOCUMENT:MANAGE

system

commandXML-RPC MethodAuth. Request
one.system.version
one.system.configOnly for users in the oneadmin group

onevntemplate

onevntemplate commandXML-RPC MethodAuth. Request
updateone.vntemplate.updateVNTEMPLATE:MANAGE
instantiateone.vntemplate.instantiateVNTEMPLATE:USE
createone.vntemplate.allocateVNTEMPLATE:CREATE
cloneone.vntemplate.cloneVNTEMPLATE:CREATE

VNTEMPLATE:USE
deleteone.vntemplate.deleteVNTEMPLATE:MANAGE
showone.vntemplate.infoVNTEMPLATE:USE
chown

chgrp
one.vntemplate.chownVNTEMPLATE:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.vntemplate.chmodVNTEMPLATE:<MANAGE/ADMIN>
renameone.vntemplate.renameVNTEMPLATE:MANAGE
list

top
one.vntemplatepool.infoVNTEMPLATE:USE
lockone.vntemplate.lockVNTEMPLATE:MANAGE
unlockone.vntemplate.unlockVNTEMPLATE:MANAGE

onehook

onehook commandXML-RPC MethodAuth. Request
updateone.hook.updateHOOK:MANAGE
createone.hook.allocateHOOK:CREATE
deleteone.hook.deleteHOOK:MANAGE
showone.hook.infoHOOK:USE
renameone.hook.renameHOOK:MANAGE
list

top
one.hook.infoHOOK:USE
lockone.hook.lockHOOK:MANAGE
unlockone.hook.unlockHOOK:MANAGE
retryone.hook.retryHOOK:MANAGE
logone.hooklog.infoHOOK:-

onebackupjob

onebackupjob commandXML-RPC MethodAuth. Request
createone.backupjob.allocateBACKUPJOB:CREATE
deleteone.backupjob.deleteBACKUPJOB:MANAGE
showone.backupjob.infoBACKUPJOB:USE
updateone.backupjob.updateBACKUPJOB:MANAGE
renameone.backupjob.renameBACKUPJOB:MANAGE
chown

chgrp
one.backupjob.chownBACKUPJOB:MANAGE

[USER:MANAGE]

[GROUP:USE]
chmodone.backupjob.chmodBACKUPJOB:<MANAGE/ADMIN>
lockone.backupjob.lockBACKUPJOB:MANAGE
unlockone.backupjob.unlockBACKUPJOB:MANAGE
backupone.backupjob.backupBACKUPJOB:MANAGE
cancelone.backupjob.cancelBACKUPJOB:MANAGE
retryone.backupjob.retryBACKUPJOB:MANAGE
priorityone.backupjob.priorityBACKUPJOB:<MANAGE/ADMIN>
backup –scheduleone.backupjob.schedaddBACKUPJOB:MANAGE
sched-deleteone.backupjob.scheddeleteBACKUPJOB:MANAGE
sched-updateone.backupjob.schedupdateBACKUPJOB:MANAGE
listone.backupjobpool.infoBACKUPJOB:USE

Actions for Templates Management

one.template.allocate

  • Description: Allocates a new template in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.

one.template.clone

  • Description: Clones an existing Virtual Machine template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe ID of the template to be cloned.
INStringName for the new template.
INBooleantrue to clone the template plus any image defined in DISK. The new IMAGE_ID is set into each DISK.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new template ID / The error string.
OUTIntError code.
OUTIntID of the original object that caused the error.

one.template.delete

  • Description: Deletes the given template from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleantrue to delete the template plus any image defined in DISK.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.template.instantiate

  • Description: Instantiates a new Virtual Machine from a template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringName for the new VM instance. If it is an empty string, OpenNebula will assign one automatically.
INBooleanFalse to create the VM on pending (default), True to create it on hold.
INStringA string containing an extra template to be merged with the one being instantiated. It can be empty. Syntax can be the usual attribute=value or XML.
INBooleantrue to create a private persistent copy of the template plus any image defined in DISK, and instantiate that copy.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new virtual machine ID / The error string.
OUTIntError code.

Sample template string:

MEMORY=4096\nCPU=4\nVCPU=4

one.template.update

  • Description: Replaces the template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.template.chmod

  • Description: Changes the permission bits of a template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
INBooleantrue to chmod the template plus any image defined in DISK.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.template.chown

  • Description: Changes the ownership of a template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.template.rename

  • Description: Renames a template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.template.info

  • Description: Retrieves information for the template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to process the template and include extended information, such as the SIZE for each DISK
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.templatepool.info

  • Description: Retrieves information for all or part of the resources in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

one.template.lock

  • Description: Locks a Template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.template.unlock

  • Description: Unlocks a Template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for Virtual Machine Management

one.vm.allocate

  • Description: Allocates a new Virtual Machine in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template for the vm. Syntax can be the usual attribute=value or XML.
INBooleanFalse to create the VM on pending (default), True to create it on hold.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.vm.deploy

  • Description: initiates the instance of the given vmid on the target Host.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe Host ID of the target host where the VM will be deployed.
INBooleantrue to enforce the Host capacity is not overcommitted.
INIntThe Datastore ID of the target system datastore where the VM will be deployed. It is optional, and can be set to -1 to let OpenNebula choose the datastore.
INStringTemplate with network scheduling results for NIC in AUTO mode.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Datastore that caused the error.

one.vm.action

  • Description: submits an action to be performed on a Virtual Machine.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringthe action name to be performed, see below.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

The action String must be one of the following:

  • terminate-hard
  • terminate
  • undeploy-hard
  • undeploy
  • poweroff-hard
  • poweroff
  • reboot-hard
  • reboot
  • hold
  • release
  • stop
  • suspend
  • resume
  • resched
  • unresched

one.vm.migrate

  • Description: migrates one Virtual Machine (vid) to the target Host (hid).
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntthe target host id (hid) where we want to migrate the vm.
INBooleanif true we are indicating that we want livemigration, otherwise false.
INBooleantrue to enforce the Host capacity is not overcommitted.
INIntthe target system DS id where we want to migrate the vm.
INIntThe migration type (0 save, 1 poweroff, 2 poweroff hard).
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Datastore / Host that caused the error.

one.vm.disksaveas

  • Description: Sets the disk to be saved in the given image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntDisk ID of the disk we want to save.
INStringName for the new Image where the disk will be saved.
INStringType for the new Image. If it is an empty string, then the default one will be used. See the existing types in the Image template reference.
INIntId of the snapshot to export, if -1 the current image state will be used.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new allocated Image ID / The error string.

If the Template was cloned, the new Template ID is not returned. The Template can be found by name: “<image_name>-<image_id>”
OUTIntError code.
OUTIntID of the Image / Datastore that caused the error.

one.vm.disksnapshotcreate

  • Description: Takes a new snapshot of the disk image
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntDisk ID of the disk we want to snapshot.
INStringDescription for the snapshot.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new snapshot ID / The error string.
OUTIntError code.
OUTIntID of the Image that caused the error.

one.vm.disksnapshotdelete

  • Description: Deletes a disk snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntDisk ID of the disk we want to delete.
INIntID of the snapshot to be deleted.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe ID of the snapshot deleted/ The error string.
OUTIntError code.
OUTIntID of the Image that caused the error.

one.vm.disksnapshotrevert

  • Description: Reverts disk state to a previously taken snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntDisk ID of the disk to revert its state.
INIntSnapshot ID to revert the disk state to.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe snapshot ID used / The error string.
OUTIntError code.

one.vm.disksnapshotrename

  • Description: Renames a disk snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntVM ID.
INIntDisk ID.
INIntSnapshot ID.
INStringNew snapshot name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.attach

  • Description: Attaches a new disk to the Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringA string containing a single DISK vector attribute. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

Sample DISK vector attribute:

DISK=[IMAGE_ID=42, TYPE=RBD, DEV_PREFIX=vd, SIZE=123456, TARGET=vdc]

one.vm.detach

  • Description: Detaches a disk from a Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe disk ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.diskresize

  • Description: Resizes a disk of a Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe disk ID.
INStringThe new size string.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Image that caused the error.

one.vm.attachnic

  • Description: Attaches a new network interface to the Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringA string containing a single NIC vector attribute. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine that caused the error.

one.vm.detachnic

  • Description: Detaches a network interface from a Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe nic ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.updatenic

  • Description: Updates (appends) NIC attributes
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe nic ID.
INStringA string containing updated attributes for the NIC.
INIntUpdate type: 0: Replace the whole NIC. 1: Merge new NIC with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.attachsg

  • Description: Attaches a security group to a network interface of a VM, if the VM is running it updates the associated rules.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Virtual Machine ID.
INIntThe NIC ID
INIntThe Security Group ID, which should be added to the NIC
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine that caused the error.

one.vm.detachsg

  • Description: Detaches a security group from a network interface of a VM, if the VM is running it removes the associated rules.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe NIC ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine that caused the error.

one.vm.chmod

  • Description: Changes the permission bits of a Virtual Machine.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vm.chown

  • Description: Changes the ownership of a Virtual Machine.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vm.rename

  • Description: Renames a Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vm.snapshotcreate

  • Description: Creates a new Virtual Machine snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new snapshot name. It can be empty.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new snapshot ID / The error string.
OUTIntError code.

one.vm.snapshotrevert

  • Description: Reverts a Virtual Machine to a snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe snapshot ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.snapshotdelete

  • Description: Deletes a Virtual Machine snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe snapshot ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.resize

  • Description: Changes the capacity of the Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringTemplate containing the new capacity elements CPU, VCPU, MEMORY. If one of them is not present, or its value is 0, it will not be resized.
INBooleantrue to enforce the Host capacity is not overcommitted. This parameter is only acknowledged for users in the oneadmin group, Host capacity will be always enforced for regular users.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine / Host that caused the error.

one.vm.update

  • Description: Replaces the user template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new user template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vm.updateconf

  • Description: Updates (appends) a set of supported configuration attributes in the VM template
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine that caused the error.

The supported attributes are:

AttributeSub-attributes
OSARCH, MACHINE, KERNEL, INITRD, BOOTLOADER, BOOT,
KERNEL_CMD, ROOT, SD_DISK_BUS, UUID, FIRMWARE
CPU_MODELMODEL, FEATURES
FEATURESACPI, PAE, APIC, LOCALTIME, HYPERV, GUEST_AGENT,
VIRTIO_SCSI_QUEUES, VIRTIO_BLK_QUEUES, IOTHREADS
INPUTTYPE, BUS
GRAPHICSTYPE, LISTEN, PASSWD, KEYMAP, COMMAND
VIDEOTYPE, IOMMU, ATS, VRAM, RESOLUTION
RAWDATA, DATA_VMX, TYPE, VALIDATE
CONTEXTAny value, except ETH*. Variable substitution will be made
BACKUP_CONFIGFS_FREEZE, KEEP_LAST, BACKUP_VOLATILE, MODE, INCREMENT_MODE

one.vm.recover

  • Description: Recovers a stuck VM that is waiting for a driver operation. The recovery may be done by failing or succeeding the pending operation. You need to manually check the vm status on the Host to decide if the operation was successful or not.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntRecover operation: success (1), failure (0), retry (2), delete (3), delete-recreate (4), delete-db (5)
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine that caused the error.

one.vm.info

  • Description: Retrieves information for the Virtual Machine.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the VM / DS / Cluster / Host that caused the error.

one.vm.monitoring

  • Description: Returns the Virtual Machine monitoring records.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTStringThe monitoring information string / The error string.
OUTIntError code.

The monitoring information returned is a list of VM elements. Each VM element contains the complete xml of the VM with the updated information returned by the poll action.

For example:

<MONITORING_DATA>
    <VM>
        ...
        <TIMESTAMP>123</TIMESTAMP>
        ...
    </VM>
    <VM>
        ...
        <TIMESTAMP>456</TIMESTAMP>
        ...
    </VM>
</MONITORING_DATA>

one.vm.lock

  • Description: Locks a Virtual Machine. Lock certain actions depending on blocking level.
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.vm.unlock

  • Description: Unlocks a Virtual Machine.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vm.schedadd

  • Description: Add scheduled action to VM
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringTemplate containing the new scheduled action.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine object that caused the error

one.vm.schedupdate

  • Description: Update scheduled VM action
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe ID of the scheduled action.
INStringTemplate containing the updated scheduled action.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine object that caused the error

one.vm.scheddelete

  • Description: Delete scheduled action from VM
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe ID of the scheduled action.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine object that caused the error

one.vm.backup

  • Description: Creates a new backup image for the VM
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe ID of the Datastore to store the backup.
INBooleanReset flag, true to create a new incremental chain.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine object that caused the error

one.vm.backupcancel

  • Description: Try to cancel ongoing backup operation
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine object that caused the error

one.vm.attachpci

  • Description: Attaches a new PCI to a Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringA string containing a single PCI vector attribute. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Machine that caused the error.

one.vm.detachpci

  • Description: Detaches a PCI from a Virtual Machine
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Virtual Machine ID.
INIntThe PCI ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vm.restore

  • Description: Restore VM disks (selectively) from a backup. The VM needs to be in POWEROFF state.
  • Parameters
TypeData TypeDescription
INIntThe VM ID.
INIntThe Image ID of the backup to use
INIntSets the increment to restore. Use -1 for the last increment or with full backups
INIntThe disk ID to restore. Use -1 to restore all disks available in the backup.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.

one.vmpool.info

  • Description: Retrieves information for all or part of the VMs in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
INIntVM state to filter by.
INStringFilter in KEY=VALUE format.
OUTBooleantrue or false whenever is successful or not
OUTStringVersion of the VM Pool with a short VM body documents.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

The state filter can be one of the following:

ValueState
-2Any state, including DONE
-1Any state, except DONE
0INIT
1PENDING
2HOLD
3ACTIVE
4STOPPED
5SUSPENDED
6DONE
8POWEROFF
9UNDEPLOYED
10CLONING
11CLONING_FAILURE

one.vmpool.infoextended

  • Description: Retrieves information for all or part of the VMs in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
INIntVM state to filter by.
INStringFilter in KEY=VALUE format.
OUTBooleantrue or false whenever is successful or not
OUTStringVersion of the VM Pool with a short VM body documents.
OUTIntError code.
OUTIntID of the object that caused the error.

The state filter can be one of the following:

ValueState
-2Any state, including DONE
-1Any state, except DONE
0INIT
1PENDING
2HOLD
3ACTIVE
4STOPPED
5SUSPENDED
6DONE
8POWEROFF
9UNDEPLOYED
10CLONING
11CLONING_FAILURE

one.vmpool.infoset

  • Description: Retrieves information for a specific set of VMs.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringVMs set. A comma separated list of VMs IDs to be retrieved
INBoolExtended. If true the entire VM will be retrieved (similar to
one.vmpool.infoextended)
OUTBooleantrue or false whenever is successful or not
OUTStringVersion of the VM Pool containing the set of VMs.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

one.vmpool.monitoring

  • Description: Returns all the Virtual Machine monitoring records.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntRetrieve monitor records in the last num seconds. 0 just the
last record, -1 all records.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.

See one.vm.monitoring.

Sample output:

<MONITORING_DATA>
    <VM>
        <ID>0</ID>
        <TIMESTAMP>123</TIMESTAMP>
        ...
    </VM>
    <VM>
        <ID>0</ID>
        <TIMESTAMP>456</TIMESTAMP>
        ...
    </VM>
    <VM>
        <ID>3</ID>
        <TIMESTAMP>123</TIMESTAMP>
        ...
    </VM>
    <VM>
        <ID>3</ID>
        <TIMESTAMP>456</TIMESTAMP>
        ...
    </VM>
</MONITORING_DATA>

one.vmpool.accounting

  • Description: Returns the Virtual Machine history records.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntStart time for the time interval. Can be -1, in which case the time interval won’t have a left boundary.
INIntEnd time for the time interval. Can be -1, in which case the time interval won’t have a right boundary.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.

The XML output is explained in detail in the ‘’oneacct’’ guide.

one.vmpool.showback

  • Description: Returns the Virtual Machine showback records
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag
- < = -3: Connected user’s resources
- -2: All resources
- -1: Connected user’s and his group’s resources
- > = 0: UID User’s Resources
INIntFirst month for the time interval. January is 1. Can be -1, in which case the time interval won’t have a left boundary.
INIntFirst year for the time interval. Can be -1, in which case the time interval won’t have a left boundary.
INIntLast month for the time interval. January is 1. Can be -1, in which case the time interval won’t have a right boundary.
INIntLast year for the time interval. Can be -1, in which case the time interval won’t have a right boundary.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.

The XML output will be similar to this one:

<SHOWBACK_RECORDS>

  <SHOWBACK>
    <VMID>4315</VMID>
    <VMNAME>vm_4315</VMNAME>
    <UID>2467</UID>
    <GID>102</GID>
    <UNAME>cloud_user</UNAME>
    <GNAME>vdc-test</GNAME>
    <YEAR>2014</YEAR>
    <MONTH>11</MONTH>
    <CPU_COST>13</CPU_COST>
    <MEMORY_COST>21</MEMORY_COST>
    <DISK_COST>7</DISK_COST>
    <TOTAL_COST>41</TOTAL_COST>
    <HOURS>10</HOURS>
  </SHOWBACK>

  <SHOWBACK>
    ...
  </SHOWBACK>

  ...
</SHOWBACK_RECORDS>

one.vmpool.calculateshowback

  • Description: Processes all the history records, and stores the monthly cost for each VM
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFirst month for the time interval. January is 1. Can be -1, in which case the time interval won’t have a left boundary.
INIntFirst year for the time interval. Can be -1, in which case the time interval won’t have a left boundary.
INIntLast month for the time interval. January is 1. Can be -1, in which case the time interval won’t have a right boundary.
INIntLast year for the time interval. Can be -1, in which case the time interval won’t have a right boundary.
OUTBooleantrue or false whenever is successful or not
OUTStringEmpty / The error string.
OUTIntError code.

Actions for Hosts Management

one.host.allocate

  • Description: Allocates a new Host in OpenNebula
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringHostname of the machine we want to add
INStringThe name of the information manager (im_mad_name), this values are taken from the oned.conf with the tag name IM_MAD (name)
INStringThe name of the virtual machine manager mad name (vmm_mad_name), this values are taken from the oned.conf with the tag name VM_MAD (name)
INIntThe cluster ID. If it is -1, the default one will be used.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated Host ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.host.delete

  • Description: Deletes the given Host from the pool
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.host.status

  • Description: Sets the status of the Host
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Host ID.
INInt0: ENABLED

1: DISABLED

2: OFFLINE
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the host that caused the error.

one.host.update

  • Description: Replaces the Host’s template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.host.rename

  • Description: Renames a Host.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.host.info

  • Description: Retrieves information for the Host.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.host.monitoring

  • Description: Returns the Host monitoring records.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTStringThe monitoring information string / The error string.
OUTIntError code.

The monitoring information returned is a list of HOST elements. Each HOST element contains the complete xml of the host with the updated information returned by the poll action.

For example:

<MONITORING_DATA>
    <HOST>
        ...
        <LAST_MON_TIME>123</LAST_MON_TIME>
        ...
    </HOST>
    <HOST>
        ...
        <LAST_MON_TIME>456</LAST_MON_TIME>
        ...
    </HOST>
</MONITORING_DATA>

one.hostpool.info

  • Description: Retrieves information for all the Hosts in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.hostpool.monitoring

  • Description: Returns all the Host monitoring records.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntRetrieve monitor records in the last num
seconds. 0 just the last record,
-1 all records.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.

Sample output:

<MONITORING_DATA>
    <HOST>
        <ID>0</ID>
        <LAST_MON_TIME>123</LAST_MON_TIME>
        ...
    </HOST>
    <HOST>
        <ID>0</ID>
        <LAST_MON_TIME>456</LAST_MON_TIME>
        ...
    </HOST>
    <HOST>
        <ID>3</ID>
        <LAST_MON_TIME>123</LAST_MON_TIME>
        ...
    </HOST>
    <HOST>
        <ID>3</ID>
        <LAST_MON_TIME>456</LAST_MON_TIME>
        ...
    </HOST>
</MONITORING_DATA>

Actions for Cluster Management

one.cluster.allocate

  • Description: Allocates a new cluster in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringName for the new cluster.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated cluster ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.cluster.delete

  • Description: Deletes the given cluster from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.cluster.update

  • Description: Replaces the cluster template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Object that caused the error.

one.cluster.addhost

  • Description: Adds a Host to the given cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe cluster ID.
INIntThe host ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster/host that caused the error.

one.cluster.delhost

  • Description: Removes a Host from the given cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe cluster ID.
INIntThe host ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster/host that caused the error.

one.cluster.adddatastore

  • Description: Adds a datastore to the given cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe cluster ID.
INIntThe datastore ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.cluster.deldatastore

  • Description: Removes a datastore from the given cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe cluster ID.
INIntThe datastore ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.cluster.addvnet

  • Description: Adds a vnet to the given cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe cluster ID.
INIntThe vnet ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.cluster.delvnet

  • Description: Removes a vnet from the given cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe cluster ID.
INIntThe vnet ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.cluster.rename

  • Description: Renames a cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.cluster.info

  • Description: Retrieves information for the cluster.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.clusterpool.info

  • Description: Retrieves information for all the clusters in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for Virtual Network Management

one.vn.allocate

  • Description: Allocates a new Virtual Network in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the virtual network. Syntax can be the usual attribute=value or XML.
INIntThe cluster ID. If it is -1, the default one will be used.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.vn.delete

  • Description: Deletes the given Virtual Network from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vn.add_ar

  • Description: Adds address ranges to a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringtemplate of the address ranges to add. Syntax can be the usual attribute=value or XML, see below.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Network that caused the error.

Examples of valid templates:

AR = [
    TYPE = IP4,
    IP = 192.168.0.5,
    SIZE = 10 ]
<TEMPLATE>
  <AR>
    <TYPE>IP4</TYPE>
    <IP>192.168.0.5</IP>
    <SIZE>10</SIZE>
  </AR>
</TEMPLATE>

one.vn.rm_ar

  • Description: Removes an address range from a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntID of the address range to remove.
INBooleanOptional force flag, bypass consistency checks
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Network that caused the error.

one.vn.update_ar

  • Description: Updates the attributes of an address range.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringtemplate of the address ranges to update. Syntax can be the usual attribute=value or XML, see below.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Network that caused the error.

Examples of valid templates:

AR = [
    AR_ID = 7,
    GATEWAY = "192.168.30.2",
    EXTRA_ATT = "VALUE",
    SIZE = 10 ]
<TEMPLATE>
  <AR>
    <AR_ID>7</AR_ID>
    <GATEWAY>192.168.30.2</GATEWAY>
    <EXTRA_ATT>VALUE</EXTRA_ATT>
    <SIZE>10</SIZE>
  </AR>
</TEMPLATE>

one.vn.reserve

  • Description: Reserve network addresses.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe virtual network to reserve from.
INStringTemplate, see below.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Network that caused the error.

The third parameter must be an OpenNebula ATTRIBUTE=VALUE template, with these values:

AttributeDescriptionMandatory
SIZESize of the reservationYES
NAMEIf set, the reservation will be created in a new Virtual Network with this nameNO
AR_IDID of the AR from where to take the addressesNO
NETWORK_IDInstead of creating a new Virtual Network, the reservation will be added to the existing virtual network with this ID.NO
MACFirst MAC address to start the reservation range [MAC, MAC+SIZE)NO
IPFirst IPv4 address to start the reservation range [IP, IP+SIZE)NO

one.vn.free_ar

  • Description: Frees a reserved address range from a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntID of the address range to free.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the VNet that caused the error.

one.vn.hold

  • Description: Holds a Virtual Network Lease as used.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringtemplate of the lease to hold, e.g. LEASES=[IP=192.168.0.5].
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the VNet that caused the error.

one.vn.release

  • Description: Releases a Virtual Network Lease on hold.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringtemplate of the lease to release, e.g. LEASES=[IP=192.168.0.5].
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the VNet that caused the error.

one.vn.update

  • Description: Replaces the Virtual Network template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the VNet that caused the error.

one.vn.chmod

  • Description: Changes the permission bits of a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vn.chown

  • Description: Changes the ownership of a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vn.rename

  • Description: Renames a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vn.info

  • Description: Retrieves information for the Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vn.lock

  • Description: Locks a Virtual Network. Lock certain actions depending on blocking level.
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the Object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.vn.unlock

  • Description: Unlocks a Virtual Network.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the Object that caused the error.

one.vn.recover

  • Description: Recovers a stuck Virtual Network which is waiting for a driver operation. The recovery may be done by failing or succeeding the pending operation. You need to manually check the VN status to decide if the operation was successful or not.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntRecover operation: success (1), failure (0), delete (2), retry (3)
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Network that caused the error.

one.vnpool.info

  • Description: Retrieves information for all or part of the Virtual Networks in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for Security Group Management

one.secgroup.allocate

  • Description: Allocates a new security group in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the security group. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.secgroup.clone

  • Description: Clones an existing security group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe ID of the security group to be cloned.
INStringName for the new security group.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new security group ID / The error string.
OUTIntError code.
OUTIntID of the original object that caused the error.

one.secgroup.delete

  • Description: Deletes the given security group from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.secgroup.update

  • Description: Replaces the security group template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.secgroup.commit

  • Description: Commit security group changes to associated VMs. This is intended for retrying updates of VMs or reinitializing the updating process if oned stopped or failed after a one.secgroup.update call.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanI true the action will only operate on outdated and error VMs. False to update all VMs.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.secgroup.chmod

  • Description: Changes the permission bits of a security group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.secgroup.chown

  • Description: Changes the ownership of a security group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.secgroup.rename

  • Description: Renames a security group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.secgroup.info

  • Description: Retrieves information for the security group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.secgrouppool.info

  • Description: Retrieves information for all or part of the security groups in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for VM Group Management

one.vmgroup.allocate

  • Description: Allocates a new VM group in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the VM Group. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.vmgroup.delete

  • Description: Deletes the given VM group from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.update

  • Description: Replaces the VM group template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vmgroup.chmod

  • Description: Changes the permission bits of a VM group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.chown

  • Description: Changes the ownership of a VM group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.rename

  • Description: Renames a VM group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.info

  • Description: Retrieves information for the VM group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.lock

  • Description: Locks a VM Group. Lock certain actions depending on blocking level.
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.vmgroup.unlock

  • Description: Unlocks a VM Group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.roleadd

  • Description: Add role to VM Group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the VM. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.roledelete

  • Description: Delete role from VM Group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe role ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgroup.roleupdate

  • Description: Update VM Group role.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe role ID.
INStringA string containing updated VM Group role. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vmgrouppool.info

  • Description: Retrieves information for all or part of the VM groups in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for Datastore Management

one.datastore.allocate

  • Description: Allocates a new datastore in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the datastore. Syntax can be the usual attribute=value or XML.
INIntThe cluster ID. If it is -1, the default one will be used.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.datastore.delete

  • Description: Deletes the given datastore from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.datastore.update

  • Description: Replaces the datastore template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.datastore.chmod

  • Description: Changes the permission bits of a datastore.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.datastore.chown

  • Description: Changes the ownership of a datastore.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.datastore.rename

  • Description: Renames a datastore.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.datastore.enable

  • Description: Enables or disables a datastore.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanTrue for enabling, false for disabling.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Datastore that caused the error.

one.datastore.info

  • Description: Retrieves information for the datastore.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.datastorepool.info

  • Description: Retrieves information for all or part of the datastores in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for Image Management

one.image.allocate

  • Description: Allocates a new image in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the image. Syntax can be the usual attribute=value or XML.
INIntThe datastore ID.
INBooleantrue to avoid checking datastore capacity. Only for admins.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Datastore that caused the error.

one.image.clone

  • Description: Clones an existing image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe ID of the image to be cloned.
INStringName for the new image.
INIntThe ID of the target datastore. Optional, can be set to -1 to use the current one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new image ID / The error string.
OUTIntError code.
OUTIntID of the original Image / DS or destination DS that caused the error.

one.image.delete

  • Description: Deletes the given image from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanForce flag, remove the Image even if the DS delete operation fails
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.image.enable

  • Description: Enables or disables an image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Image ID.
INBooleanTrue for enabling, false for disabling.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe Image ID / The error string.
OUTIntError code.

one.image.persistent

  • Description: Sets the Image as persistent or not persistent.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Image ID.
INBooleanTrue for persistent, false for non-persisent.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe Image ID / The error string.
OUTIntError code.
OUTIntID of the image that caused the error.

one.image.chtype

  • Description: Changes the type of an Image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Image ID.
INStringNew type for the Image. See the existing types in the Image template reference.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe Image ID / The error string.
OUTIntError code.
OUTIntID of the image that caused the error.

one.image.update

  • Description: Replaces the image template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.image.chmod

  • Description: Changes the permission bits of an image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.image.chown

  • Description: Changes the ownership of an image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.image.rename

  • Description: Renames an image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.image.snapshotdelete

  • Description: Deletes a snapshot from the image
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntID of the snapshot to delete
OUTBooleantrue or false whenever is successful or not
OUTInt/StringID of the deleted snapshot/The error string.
OUTIntError code.

one.image.snapshotrevert

  • Description: Reverts image state to a previous snapshot
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntID of the snapshot to revert to
OUTBooleantrue or false whenever is successful or not
OUTInt/StringID of the snapshot/The error string.
OUTIntError code.

one.image.snapshotflatten

  • Description: Flattens the snapshot of image and discards others
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntID of the snapshot to flatten
OUTBooleantrue or false whenever is successful or not
OUTInt/StringID of the snapshot/The error string.
OUTIntError code.

one.image.info

  • Description: Retrieves information for the image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.image.lock

  • Description: Locks an Image. Lock certain actions depending on blocking level
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.image.unlock

  • Description: Unlocks an Image.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.image.restore

  • Description: Restores a VM backup
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntDatastore ID to store the disk images restored from the backup
INStringTemplate (KEY=VALUE) with restore options:
: - NO_IP (YES/NO) to restore IP and MAC addresses
- NO_NIC (YES/NO) to restore NIC attributes
- NAME (string) name of the restored template and image
- INCREMENT_ID (int) id of the incremental backup
- DISK_ID (int) ID of the disk to restore, do not restore the template
OUTBooleantrue or false whenever is successful or not
OUTStringBlank separated list of restored objects IDs. The first one is the VM Template ID.
OUTIntError code.
OUTIntID of the object that caused the error.

one.imagepool.info

  • Description: Retrieves information for all or part of the images in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for Marketplace Management

one.market.allocate

  • Description: Allocates a new Marketplace in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the marketplace. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.market.delete

  • Description: Deletes the given Marketplace from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.market.update

  • Description: Replaces the Marketplace template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.market.chmod

  • Description: Changes the permission bits of a Marketplace.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.market.chown

  • Description: Changes the ownership of a Marketplace.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.market.rename

  • Description: Renames a Marketplace.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.market.enable

  • Description: Enable/disable the Marketplace.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Marketplace ID.
INBooleanTrue for enabling, false for disabling.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.market.info

  • Description: Retrieves information for the Marketplace.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketpool.info

  • Description: Retrieves information for all or part of the Marketplaces in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for MarketplaceApp Management

one.marketapp.allocate

  • Description: Allocates a new Marketplace app in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the marketplace app. Syntax can be the usual attribute=value or XML.
INIntThe Marketplace ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.marketapp.delete

  • Description: Deletes the given Marketplace app from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketapp.enable

  • Description: Enables or disables a Marketplace app.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe marketplace app ID.
INBooleanTrue for enabling, false for disabling.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe marketplace app ID / The error string.
OUTIntError code.
OUTIntID of the market that caused the error.

one.marketapp.update

  • Description: Replaces the Marketplace app template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.marketapp.chmod

  • Description: Changes the permission bits of a Marketplace app.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketapp.chown

  • Description: Changes the ownership of a Marketplace app.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketapp.rename

  • Description: Renames a Marketplace app.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketapp.info

  • Description: Retrieves information for the Marketplace app.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketapp.lock

  • Description: Locks a Marketplace app. Lock certain actions depending on blocking level
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.marketapp.unlock

  • Description: Unlocks a Marketplace app.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.marketapppool.info

  • Description: Retrieves information for all or part of the Marketplace apps in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for Virtual Routers Management

one.vrouter.allocate

  • Description: Allocates a new virtual router in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the virtual router contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.vrouter.delete

  • Description: Deletes the given virtual router from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleantrue to delete the virtual router plus any image defined in DISK.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vrouter.instantiate

  • Description: Instantiates a new Virtual Machine from a virtual router.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntNumber of VMs to instantiate.
INIntVM Template id to instantiate.
INStringName for the VM instances. If it is an empty string OpenNebula will set a default name. Wildcard %i can be used.
INBooleanFalse to create the VM on pending (default), True to create it on hold.
INStringA string containing an extra template to be merged with the one being instantiated. It can be empty. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringID of the Virtual Router that instantiated the VMs / The error string.
OUTIntError code.
OUTIntID of the Virtual Router that caused the error.

Sample template string:

MEMORY=4096\nCPU=4\nVCPU=4

one.vrouter.attachnic

  • Description: Attaches a new network interface to the virtual router and the Virtual Machines
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringA string containing a single NIC vector attribute. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the Virtual Router that caused the error.

one.vrouter.detachnic

  • Description: Detaches a network interface from the virtual router and the Virtual Machines
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe nic ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the VRouter that caused the error.

one.vrouter.update

  • Description: Replaces the template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vrouter.chmod

  • Description: Changes the permission bits of a virtual router.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vrouter.chown

  • Description: Changes the ownership of a virtual router.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vrouter.rename

  • Description: Renames a virtual router.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vrouter.info

  • Description: Retrieves information for the virtual router.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vrouter.lock

  • Description: Locks a virtual router. Lock certain actions depending on blocking level
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.vrouter.unlock

  • Description: Unlocks a virtual router.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vrouterpool.info

  • Description: Retrieves information for all or part of the resources in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for User Management

one.user.allocate

  • Description: Allocates a new user in OpenNebula
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringusername for the new user
INStringpassword for the new user
INStringauthentication driver for the new user. If it is an empty string, then the default (‘core’) is used
INArrayarray of Group IDs. The first ID will be used as the main group. This array can be empty, in which case the default group will be used
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated User ID / The error string.
OUTIntError code.
OUTIntID of the Group that caused the error.

one.user.delete

  • Description: Deletes the given user from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.user.passwd

  • Description: Changes the password for the given user.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new password
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe User ID / The error string.
OUTIntError code.

one.user.login

  • Description: Generates or sets a login token.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringThe user name to generate the token for
INStringThe token, if empty oned will generate one
INIntValid period in seconds; 0 reset the token and -1 for a non-expiring token.
INIntEffective GID to use with this token. To use the current GID and user groups set it to -1
OUTBooleantrue or false whenever is successful or not
OUTStringThe new token / The error string.
OUTIntError code.

one.user.update

  • Description: Replaces the user template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.user.chauth

  • Description: Changes the authentication driver and the password for the given user.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new authentication driver.
INStringThe new password. If it is an empty string, the password is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe User ID / The error string.
OUTIntError code.

one.user.quota

  • Description: Sets the user quota limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new quota template contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.user.chgrp

  • Description: Changes the group of the given user.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe User ID.
INIntThe Group ID of the new group.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe User ID / The error string.
OUTIntError code.

one.user.addgroup

  • Description: Adds the user to a secondary group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe User ID.
INIntThe Group ID of the new group.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe User ID / The error string.
OUTIntError code.

one.user.delgroup

  • Description: Removes the user from a secondary group
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe User ID.
INIntThe Group ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe User ID / The error string.
OUTIntError code.

one.user.enable

  • Description: Enables or disables a user.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe User ID.
INBooleanTrue for enabling, false for disabling.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the User that caused the error.

one.user.info

  • Description: Retrieves information for the user.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID. If it is -1, then the connected user’s own info info is returned
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.userpool.info

  • Description: Retrieves information for all the users in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.userquota.info

  • Description: Returns the default user quota limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe quota template contents / The error string.
OUTIntError code.

one.userquota.update

  • Description: Updates the default user quota limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringThe new quota template contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTStringThe quota template contents / The error string.
OUTIntError code.

Actions for Group Management

one.group.allocate

  • Description: Allocates a new group in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringName for the new group.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated Group ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.group.delete

  • Description: Deletes the given group from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.group.info

  • Description: Retrieves information for the group.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID. If it is -1, then the connected user’s group info info is returned
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.group.update

  • Description: Replaces the group template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.group.addadmin

  • Description: Adds a user to the Group administrators set
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe group ID.
INIntThe user ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.group.deladmin

  • Description: Removes a user from the Group administrators set
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe group ID.
INIntThe user ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.group.quota

  • Description: Sets the group quota limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new quota template contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the group that caused the error.

one.grouppool.info

  • Description: Retrieves information for all the groups in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.groupquota.info

  • Description: Returns the default group quota limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe quota template contents / The error string.
OUTIntError code.

one.groupquota.update

  • Description: Updates the default group quota limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringThe new quota template contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTStringThe quota template contents / The error string.
OUTIntError code.

Actions for VDC Management

one.vdc.allocate

  • Description: Allocates a new VDC in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the VDC. Only NAME attribute is supported.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.vdc.delete

  • Description: Deletes the given VDC from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vdc.update

  • Description: Replaces the VDC template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.rename

  • Description: Renames a VDC.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vdc.info

  • Description: Retrieves information for the VDC.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID. If it is -1, then the connected user’s VDC info info is returned
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vdcpool.info

  • Description: Retrieves information for all the VDCs in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vdc.addgroup

  • Description: Adds a group to the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe group ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.delgroup

  • Description: Deletes a group from the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe group ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.addcluster

  • Description: Adds a cluster to the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Cluster ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.delcluster

  • Description: Deletes a cluster from the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Cluster ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.addhost

  • Description: Adds a Host to the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Host ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.delhost

  • Description: Deletes a Host from the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Host ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.adddatastore

  • Description: Adds a datastore to the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Datastore ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.deldatastore

  • Description: Deletes a datastore from the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Datastore ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.addvnet

  • Description: Adds a vnet to the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Vnet ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vdc.delvnet

  • Description: Deletes a vnet from the VDC
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe VDC ID.
INIntThe Zone ID.
INIntThe Vnet ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

Actions for Zone Management

one.zone.allocate

  • Description: Allocates a new zone in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the template of the zone. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

one.zone.delete

  • Description: Deletes the given zone from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.enable

  • Description: Enable/disable the given zone.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe Zone ID.
INBooleanTrue for enabling, false for disabling.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.update

  • Description: Replaces the zone template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the Zone that caused the error.

one.zone.rename

  • Description: Renames a zone.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.addserver

  • Description: Add server to zone.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringA string containing the template of the server. Syntax can be the usual attribute=value or XML.
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.delserver

  • Description: Delete a server from zone.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe server ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.resetserver

  • Description: Reset follower log index. This should be trigger when a follower DB has been reset.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe server ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.info

  • Description: Retrieves information for the zone.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zone.raftstatus

  • Description: Retrieves raft status one servers.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.zonepool.info

  • Description: Retrieves information for all the zones in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for ACL Rules Management

one.acl.addrule

  • Description: Adds a new ACL rule.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringUser component of the new rule. A string containing a hex number.
INStringResource component of the new rule. A string containing a hex number.
INStringRights component of the new rule. A string containing a hex number.
INStringOptional zone component of the new rule. A string containing a hex number.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated ACL rule ID / The error string.
OUTIntError code.

To build the hex. numbers required to create a new rule we recommend you to read the ruby or java code.

one.acl.delrule

  • Description: Deletes an ACL rule.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntACL rule ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe ACL rule ID / The error string.
OUTIntError code.

one.acl.info

  • Description: Returns the complete ACL rule set.
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for Document Management

one.document.allocate

  • Description: Allocates a new document in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the document template contents. Syntax can be the usual attribute=value or XML.
INIntThe document type (*).
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.
OUTIntID of the Cluster that caused the error.

(*) Type is an integer value used to allow dynamic pools compartmentalization.

Let’s say you want to store documents representing Chef recipes, and EC2 security groups; you would allocate documents of each kind with a different type. This type is then used in the one.documentpool.info method to filter the results.

one.document.clone

  • Description: Clones an existing document.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe ID of the document to be cloned.
INStringName for the new document.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new document ID / The error string.
OUTIntError code.
OUTIntID of the original object that caused the error.

one.document.delete

  • Description: Deletes the given document from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.document.update

  • Description: Replaces the document template contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new document template contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.document.chmod

  • Description: Changes the permission bits of a document.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.document.chown

  • Description: Changes the ownership of a document.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.document.rename

  • Description: Renames a document.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.document.info

  • Description: Retrieves information for the document.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.document.lock

  • Description: Locks a document. Lock certain actions depending on blocking level:
  • USE: locks Admin, Manage and Use actions.
  • MANAGE: locks Manage and Use actions.
  • ADMIN: locks only Admin actions.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.document.unlock

  • Description: Unlocks a document.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.documentpool.info

  • Description: Retrieves information for all or part of the resources in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
INIntThe document type.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

System Methods

one.system.version

  • Description: Returns the OpenNebula core version
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe OpenNebula version, e.g. 4.4.0
OUTIntError code.

one.system.config

  • Description: Returns the OpenNebula configuration
  • Parameters
TypeData TypeDescription
INStringThe session string.
OUTBooleantrue or false whenever is successful or not
OUTStringThe loaded oned.conf file, in XML form
OUTIntError code.

Actions for Virtual Network Templates Management

one.vntemplate.allocate

  • Description: Allocates a new vntemplate in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the vntemplate contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.

one.vntemplate.clone

  • Description: Clones an existing Virtual Network template.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe ID of the vntemplate to be cloned.
INStringName for the new vntemplate.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new vntemplate ID / The error string.
OUTIntError code.
OUTIntID of the original object that caused the error.

one.vntemplate.delete

  • Description: Deletes the given vntemplate from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vntemplate.instantiate

  • Description: Instantiates a new Virtual Network from a vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringName for the new Virtual Network. If it is an empty string, OpenNebula will assign one automatically.
INStringA string containing an extra vntemplate to be merged with the one being instantiated. It can be empty. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe new virtual machine ID / The error string.
OUTIntError code.

Sample vntemplate string:

VN_MAD=bridge\nVLAN_ID=4

one.vntemplate.update

  • Description: Replaces the vntemplate contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new vntemplate contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: replace the whole vntemplate. 1: Merge new vntemplate with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.vntemplate.chmod

  • Description: Changes the permission bits of a vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vntemplate.chown

  • Description: Changes the ownership of a vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vntemplate.rename

  • Description: Renames a vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vntemplate.info

  • Description: Retrieves information for the vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vntemplate.lock

  • Description: Locks a vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.vntemplate.unlock

  • Description: Unlocks a vntemplate.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.vntemplatepool.info

  • Description: Retrieves information for all or part of the resources in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

Actions for Hook Management

one.hook.allocate

  • Description: Allocates a new hook in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the hook contents. Syntax can be the usual attribute=value or XML.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.

one.hook.delete

  • Description: Deletes the given hook from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.hook.update

  • Description: Replaces the hook contents.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new hook contents. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: replace the whole hook template. 1: Merge new hook template with the existing one.
OUTBooleantrue or false whenever is successful or not
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.hook.rename

  • Description: Renames a hook.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleantrue or false whenever is successful or not.
OUTInt/StringThe VM ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.hook.info

  • Description: Retrieves information for the hook.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanoptional flag to decrypt contained secrets, valid only for admin
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.hook.lock

  • Description: Locks a hook.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.hook.unlock

  • Description: Unlocks a hook.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.hook.retry

  • Description: Retries a hook execution.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe execution ID.
OUTBooleantrue or false whenever is successful or not
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.hookpool.info

  • Description: Retrieves information for all or part of the resources in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID.
Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the
last ID. For values < -1 this is the page size used for pagination.
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

one.hooklog.info

  • Description: Retrieves information from the hook execution log.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntMinimum date for filtering hook execution log records.
INIntMaximum date for filtering hook execution log records.
INIntHook id for filtering hook execution log records.
INIntHook execution return code (-1 ERROR, 0 ALL , 1 SUCCESS).
OUTBooleantrue or false whenever is successful or not
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

Actions for Backup Job Management

one.backupjob.allocate

  • Description: Allocates a new Backup Job in OpenNebula.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INStringA string containing the Backup Job contents. Syntax can be the usual attribute=value or XML.
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe allocated resource ID / The error string.
OUTIntError code.

one.backupjob.delete

  • Description: Deletes the given Backup Job from the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INBooleanDelete the Backup Job
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.info

  • Description: Retrieves information for the Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleanTrue or false whenever is successful or not.
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.update

  • Description: Replaces the Backup Job content.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new Backup Job content. Syntax can be the usual attribute=value or XML.
INIntUpdate type: 0: Replace the whole template. 1: Merge new template with the existing one.
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.

one.backupjob.rename

  • Description: Renames a Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringThe new name.
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.chown

  • Description: Changes the ownership of a Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe User ID of the new owner. If set to -1, the owner is not changed.
INIntThe Group ID of the new group. If set to -1, the group is not changed.
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.chmod

  • Description: Changes the permission bits of a Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntUSER USE bit. If set to -1, it will not change.
INIntUSER MANAGE bit. If set to -1, it will not change.
INIntUSER ADMIN bit. If set to -1, it will not change.
INIntGROUP USE bit. If set to -1, it will not change.
INIntGROUP MANAGE bit. If set to -1, it will not change.
INIntGROUP ADMIN bit. If set to -1, it will not change.
INIntOTHER USE bit. If set to -1, it will not change.
INIntOTHER MANAGE bit. If set to -1, it will not change.
INIntOTHER ADMIN bit. If set to -1, it will not change.
INBooleanTrue to chmod the template plus any image defined in DISK.
OUTBooleanTrue or false whenever is successful or not.
OUTInt/StringThe resource ID / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.lock

  • Description: Locks a Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntLock level: use (1), manage (2), admin (3), all (4)
INBooleanTest: check if the object is already locked to return an error
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.
OUTStringTimestamp when the object was locked in case of error when using test = true

one.backupjob.unlock

  • Description: Unlocks a Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.backup

  • Description: Executes a Backup Job, starts individual VM backups with respect to max backup limits.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.cancel

  • Description: Cancel ongoing Backup Job
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.retry

  • Description: Retry previously failed VM backups.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.priority

  • Description: Set new priority for Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntNew priority value, only oneadmin may set priority > 50
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.schedadd

  • Description: Add Scheduled Action to Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INStringA string containing the Scheduled Action contents. Syntax can be the usual attribute=value or XML.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.schedupdate

  • Description: Update Backup Job Scheduled Action.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe Scheduled Action ID.
INStringTemplate containing the updated Scheduled Action.. Syntax can be the usual attribute=value or XML.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjob.scheddelete

  • Description: Delete Scheduled Action from Backup Job.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntThe object ID.
INIntThe Scheduled Action ID.
OUTBooleanTrue or false whenever is successful or not.
OUTIntThe ID of the resource / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

one.backupjobpool.info

  • Description: Retrieves information for all or part of the Backup Jobs in the pool.
  • Parameters
TypeData TypeDescription
INStringThe session string.
INIntFilter flag

* -4: Resources belonging to the user’s primary group
* -3: Resources belonging to the user
* -2: All resources
* -1: Resources belonging to the user and any of his groups
* >= 0: UID User’s Resources
INIntWhen the next parameter is >= -1 this is the Range start ID. Can be -1. For smaller values this is the offset used for pagination.
INIntFor values >= -1 this is the Range end ID. Can be -1 to get until the last ID. For values < -1 this is the page size used for pagination.
OUTBooleanTrue or false whenever is successful or not.
OUTStringThe information string / The error string.
OUTIntError code.
OUTIntID of the object that caused the error.

The range can be used to retrieve a subset of the pool, from the ‘start’ to the ‘end’ ID. To retrieve the complete pool, use (-1, -1); to retrieve all the pool from a specific ID to the last one, use (<id>, -1), and to retrieve the first elements up to an ID, use (0, <id>).

XSD Reference

The XML schema files that describe the XML documents returned by the one.*.info methods can be found here.