public class Cluster extends PoolElement
client, id, xml, xpath
Modifier | Constructor and Description |
---|---|
|
Cluster(int id,
Client client)
Creates a new Cluster representation.
|
protected |
Cluster(org.w3c.dom.Node xmlElement,
Client client) |
Modifier and Type | Method and Description |
---|---|
static OneResponse |
addDatastore(Client client,
int id,
int dsId)
Adds a Datastore to this Cluster
|
OneResponse |
addDatastore(int dsId)
Adds a Datastore to this Cluster
|
static OneResponse |
addHost(Client client,
int id,
int hid)
Adds a Host to this Cluster
|
OneResponse |
addHost(int hid)
Adds a Host to this Cluster
|
static OneResponse |
addVnet(Client client,
int id,
int vnetId)
Adds a VNet to this Cluster
|
OneResponse |
addVnet(int vnetId)
Adds a VNet to this Cluster
|
static OneResponse |
allocate(Client client,
java.lang.String name)
Allocates a new cluster in OpenNebula
|
boolean |
containsDatastore(int id)
Returns whether or not the datastore is part of this cluster
|
boolean |
containsHost(int id)
Returns whether or not the host is part of this cluster
|
boolean |
containsVnet(int id)
Returns whether or not the vnet is part of this cluster
|
static OneResponse |
delDatastore(Client client,
int id,
int dsId)
Deletes a Datastore from this Cluster
|
OneResponse |
delDatastore(int dsId)
Deletes a Datastore from this Cluster
|
OneResponse |
delete()
Deletes the cluster from OpenNebula.
|
static OneResponse |
delete(Client client,
int id)
Deletes a cluster from OpenNebula.
|
static OneResponse |
delHost(Client client,
int id,
int hid)
Deletes a Host from this Cluster
|
OneResponse |
delHost(int hid)
Deletes a Host from this Cluster
|
static OneResponse |
delVnet(Client client,
int id,
int vnetId)
Deletes a VNet from this Cluster
|
OneResponse |
delVnet(int vnetId)
Deletes a VNet from this Cluster
|
OneResponse |
info()
Loads the xml representation of the cluster.
|
static OneResponse |
info(Client client,
int id)
Retrieves the information of the given cluster.
|
static OneResponse |
rename(Client client,
int id,
java.lang.String name)
Renames this Cluster.
|
OneResponse |
rename(java.lang.String name)
Renames this Cluster
|
static OneResponse |
update(Client client,
int id,
java.lang.String new_template,
boolean append)
Replaces the cluster contents.
|
OneResponse |
update(java.lang.String new_template)
Replaces the cluster template.
|
OneResponse |
update(java.lang.String new_template,
boolean append)
Replaces the cluster template.
|
public Cluster(int id, Client client)
id
- The cluster id.client
- XML-RPC Client.protected Cluster(org.w3c.dom.Node xmlElement, Client client)
PoolElement
public static OneResponse allocate(Client client, java.lang.String name)
client
- XML-RPC Client.name
- Name for the new cluster.public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- The cluster id.public static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The cluster id.public static OneResponse update(Client client, int id, java.lang.String new_template, boolean append)
client
- XML-RPC Client.id
- The id of the target cluster we want to modify.new_template
- New template contents.append
- True to append new attributes instead of replace the whole templatepublic static OneResponse addHost(Client client, int id, int hid)
client
- XML-RPC Client.id
- The cluster id.hid
- Host ID.public static OneResponse delHost(Client client, int id, int hid)
client
- XML-RPC Client.id
- The cluster id.hid
- Host ID.public static OneResponse addDatastore(Client client, int id, int dsId)
client
- XML-RPC Client.id
- The cluster id.dsId
- Datastore ID.public static OneResponse delDatastore(Client client, int id, int dsId)
client
- XML-RPC Client.id
- The cluster id.dsId
- Datastore ID.public static OneResponse addVnet(Client client, int id, int vnetId)
client
- XML-RPC Client.id
- The cluster id.vnetId
- VNet ID.public static OneResponse delVnet(Client client, int id, int vnetId)
client
- XML-RPC Client.id
- The cluster id.vnetId
- VNet ID.public static OneResponse rename(Client client, int id, java.lang.String name)
client
- XML-RPC Client.id
- The image id of the target host we want to modify.name
- New name for the Clusterpublic OneResponse info()
info(Client, int)
public OneResponse delete()
delete(Client, int)
public OneResponse update(java.lang.String new_template)
new_template
- New cluster template.public OneResponse update(java.lang.String new_template, boolean append)
new_template
- New cluster template.append
- True to append new attributes instead of replace the whole templatepublic OneResponse addHost(int hid)
hid
- Host ID.public OneResponse delHost(int hid)
hid
- Host ID.public OneResponse addDatastore(int dsId)
dsId
- Datastore ID.public OneResponse delDatastore(int dsId)
dsId
- Datastore ID.public OneResponse addVnet(int vnetId)
vnetId
- VNet ID.public OneResponse delVnet(int vnetId)
vnetId
- VNet ID.public OneResponse rename(java.lang.String name)
name
- New name for the Cluster.public boolean containsHost(int id)
id
- The host ID.public boolean containsDatastore(int id)
id
- The datastore ID.public boolean containsVnet(int id)
id
- The vnet ID.Visit OpenNebula.org
Copyright 2002-2013 ©
OpenNebula Project (OpenNebula.org), C12G Labs.