|
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.image.Image
public class Image
This class represents an OpenNebula image. It also offers static XML-RPC call wrappers.
Field Summary |
---|
Fields inherited from class org.opennebula.client.PoolElement |
---|
client, id, xml, xpath |
Constructor Summary | |
---|---|
|
Image(int id,
Client client)
Creates a new Image representation. |
protected |
Image(org.w3c.dom.Node xmlElement,
Client client)
|
Method Summary | |
---|---|
static OneResponse |
allocate(Client client,
java.lang.String description)
Allocates a new Image in OpenNebula. |
OneResponse |
chgrp(int gid)
Changes the group |
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 |
OneResponse |
delete()
Deletes the image from OpenNebula. |
static OneResponse |
delete(Client client,
int id)
Deletes an image from OpenNebula. |
OneResponse |
disable()
Disables the image. |
OneResponse |
enable()
Enables the image. |
OneResponse |
enable(boolean enable)
Enables or disables the image. |
static OneResponse |
enable(Client client,
int id,
boolean enable)
Enables or disables an image. |
OneResponse |
info()
Retrieves the information of the Image. |
static OneResponse |
info(Client client,
int id)
Retrieves the information of the given Image. |
boolean |
isEnabled()
Returns true if the image is enabled. |
boolean |
isPublic()
Returns true if the image is public. |
OneResponse |
publish()
Publishes the image. |
OneResponse |
publish(boolean publish)
Publishes or unpublishes the image. |
static OneResponse |
publish(Client client,
int id,
boolean publish)
Publishes or unpublishes an image. |
java.lang.String |
shortStateStr()
Returns the short length string state of the Image. |
java.lang.String |
shortTypeStr()
Returns the type of the Image as a short String. |
java.lang.String |
stateString()
Returns the state of the Image. |
int |
type()
Returns the type of the Image. |
java.lang.String |
typeStr()
Returns the type of the Image as a String. |
OneResponse |
unpublish()
Unpublishes the image. |
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 |
---|
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 Image(int id, Client client)
id
- The image id.client
- XML-RPC Client.protected Image(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 image.
public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- The image id for the image to retrieve the information from
public static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The image id of the target image we want to delete.
public static OneResponse update(Client client, int id, java.lang.String new_template)
client
- XML-RPC Client.id
- The image id of the target image we want to modify.new_template
- New template contents
public static OneResponse enable(Client client, int id, boolean enable)
client
- XML-RPC Client.id
- The image id of the target image we want to modify.enable
- True for enabling, false for disabling.
public static OneResponse publish(Client client, int id, boolean publish)
client
- XML-RPC Client.id
- The image id of the target image 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 image id of the target image 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 OneResponse info()
public OneResponse delete()
public OneResponse update(java.lang.String new_template)
new_template
- New template contents
public OneResponse enable(boolean enable)
enable
- True for enabling, false for disabling.
public OneResponse enable()
public OneResponse disable()
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 java.lang.String stateString()
info()
must be called before.
public java.lang.String shortStateStr()
info()
must be called before.
public int type()
public java.lang.String typeStr()
public java.lang.String shortTypeStr()
public boolean isEnabled()
public boolean isPublic()
|
OpenNebula Cloud API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |