| 
OpenNebula Cloud API  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennebula.client.PoolElement
org.opennebula.client.template.Template
public class Template
This class represents an OpenNebula template. It also offers static XML-RPC call wrappers.
| Field Summary | 
|---|
| Fields inherited from class org.opennebula.client.PoolElement | 
|---|
client, id, xml, xpath | 
| Constructor Summary | |
|---|---|
  | 
Template(int id,
         Client client)
Creates a new Template representation.  | 
protected  | 
Template(org.w3c.dom.Node xmlElement,
         Client client)
 | 
| Method Summary | |
|---|---|
static OneResponse | 
allocate(Client client,
         java.lang.String description)
Allocates a new Template in OpenNebula.  | 
 OneResponse | 
chgrp(int gid)
Changes the group  | 
static OneResponse | 
chmod(Client client,
      int id,
      int octet)
Changes the permissions  | 
static OneResponse | 
chmod(Client client,
      int id,
      int owner_u,
      int owner_m,
      int owner_a,
      int group_u,
      int group_m,
      int group_a,
      int other_u,
      int other_m,
      int other_a)
Changes the template permissions  | 
static OneResponse | 
chmod(Client client,
      int id,
      java.lang.String octet)
Changes the permissions  | 
 OneResponse | 
chmod(int octet)
Changes the permissions  | 
 OneResponse | 
chmod(int owner_u,
      int owner_m,
      int owner_a,
      int group_u,
      int group_m,
      int group_a,
      int other_u,
      int other_m,
      int other_a)
Changes the template permissions  | 
 OneResponse | 
chmod(java.lang.String octet)
Changes the permissions  | 
static OneResponse | 
chown(Client client,
      int id,
      int uid,
      int gid)
Changes the owner/group  | 
 OneResponse | 
chown(int uid)
Changes the owner  | 
 OneResponse | 
chown(int uid,
      int gid)
Changes the owner/group  | 
static OneResponse | 
clone(Client client,
      int id,
      java.lang.String name)
Clones this template into a new one  | 
 OneResponse | 
clone(java.lang.String name)
Clones this template into a new one  | 
 OneResponse | 
delete()
Deletes the template from OpenNebula.  | 
static OneResponse | 
delete(Client client,
       int id)
Deletes a template from OpenNebula.  | 
 OneResponse | 
info()
Retrieves the information of the Template.  | 
static OneResponse | 
info(Client client,
     int id)
Retrieves the information of the given Template.  | 
 OneResponse | 
instantiate()
Creates a VM instance from a Template  | 
static OneResponse | 
instantiate(Client client,
            int id,
            java.lang.String name)
Creates a VM instance from a Template  | 
 OneResponse | 
instantiate(java.lang.String name)
Creates a VM instance from a Template  | 
 OneResponse | 
publish()
Publishes the template.  | 
 OneResponse | 
publish(boolean publish)
Publishes or unpublishes the template.  | 
static OneResponse | 
publish(Client client,
        int id,
        boolean publish)
Publishes or unpublishes a template.  | 
 OneResponse | 
unpublish()
Unpublishes the template.  | 
static OneResponse | 
update(Client client,
       int id,
       java.lang.String new_template)
Replaces the template contents.  | 
 OneResponse | 
update(java.lang.String new_template)
Replaces the template contents.  | 
| Methods inherited from class org.opennebula.client.PoolElement | 
|---|
chmod, chmod, chmod, getId, getName, gid, id, processInfo, state, uid, xpath | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Template(int id,
                Client client)
id - The template id.client - XML-RPC Client.
protected Template(org.w3c.dom.Node xmlElement,
                   Client client)
PoolElement| Method Detail | 
|---|
public static OneResponse allocate(Client client,
                                   java.lang.String description)
client - XML-RPC Client.description - A string containing the template of the template.
public static OneResponse info(Client client,
                               int id)
client - XML-RPC Client.id - The template id for the template to retrieve the information from
public static OneResponse delete(Client client,
                                 int id)
client - XML-RPC Client.id - The template id of the target template we want to delete.
public static OneResponse update(Client client,
                                 int id,
                                 java.lang.String new_template)
client - XML-RPC Client.id - The template id of the target template we want to modify.new_template - New template contents.
public static OneResponse publish(Client client,
                                  int id,
                                  boolean publish)
client - XML-RPC Client.id - The template id of the target template we want to modify.publish - True for publishing, false for unpublishing.
public static OneResponse chown(Client client,
                                int id,
                                int uid,
                                int gid)
client - XML-RPC Client.id - The template id of the target template we want to modify.uid - The new owner user ID. Set it to -1 to leave the current one.gid - The new group ID. Set it to -1 to leave the current one.
public static OneResponse chmod(Client client,
                                int id,
                                int owner_u,
                                int owner_m,
                                int owner_a,
                                int group_u,
                                int group_m,
                                int group_a,
                                int other_u,
                                int other_m,
                                int other_a)
client - XML-RPC Client.id - The template id of the target template.owner_u - 1 to allow, 0 deny, -1 do not changeowner_m - 1 to allow, 0 deny, -1 do not changeowner_a - 1 to allow, 0 deny, -1 do not changegroup_u - 1 to allow, 0 deny, -1 do not changegroup_m - 1 to allow, 0 deny, -1 do not changegroup_a - 1 to allow, 0 deny, -1 do not changeother_u - 1 to allow, 0 deny, -1 do not changeother_m - 1 to allow, 0 deny, -1 do not changeother_a - 1 to allow, 0 deny, -1 do not change
public static OneResponse chmod(Client client,
                                int id,
                                java.lang.String octet)
client - XML-RPC Client.id - The id of the target object.octet - Permissions octed , e.g. 640
public static OneResponse chmod(Client client,
                                int id,
                                int octet)
client - XML-RPC Client.id - The id of the target object.octet - Permissions octed , e.g. 640
public static OneResponse instantiate(Client client,
                                      int id,
                                      java.lang.String name)
client - XML-RPC Client.id - The template id of the target template.name - A string containing the name of the VM instance, can be empty.
public static OneResponse clone(Client client,
                                int id,
                                java.lang.String name)
client - XML-RPC Client.id - The template id of the target template.name - Name for the new template.
public OneResponse info()
public OneResponse delete()
public OneResponse update(java.lang.String new_template)
new_template - New template contents.
public OneResponse publish(boolean publish)
publish - True for publishing, false for unpublishing.
public OneResponse publish()
public OneResponse unpublish()
public OneResponse chown(int uid,
                         int gid)
uid - The new owner user ID. Set it to -1 to leave the current one.gid - The new group ID. Set it to -1 to leave the current one.
public OneResponse chown(int uid)
uid - The new owner user ID.
public OneResponse chgrp(int gid)
gid - The new group ID.
public OneResponse chmod(int owner_u,
                         int owner_m,
                         int owner_a,
                         int group_u,
                         int group_m,
                         int group_a,
                         int other_u,
                         int other_m,
                         int other_a)
owner_u - 1 to allow, 0 deny, -1 do not changeowner_m - 1 to allow, 0 deny, -1 do not changeowner_a - 1 to allow, 0 deny, -1 do not changegroup_u - 1 to allow, 0 deny, -1 do not changegroup_m - 1 to allow, 0 deny, -1 do not changegroup_a - 1 to allow, 0 deny, -1 do not changeother_u - 1 to allow, 0 deny, -1 do not changeother_m - 1 to allow, 0 deny, -1 do not changeother_a - 1 to allow, 0 deny, -1 do not change
public OneResponse chmod(java.lang.String octet)
octet - Permissions octed , e.g. 640
public OneResponse chmod(int octet)
octet - Permissions octed , e.g. 640
public OneResponse instantiate(java.lang.String name)
name - A string containing the name of the VM instance, can be empty.
public OneResponse instantiate()
public OneResponse clone(java.lang.String name)
name - Name for the new template.
  | 
OpenNebula Cloud API  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||