|
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.vnet.VirtualNetwork
public class VirtualNetwork
This class represents an OpenNebula virtual network. It also offers static XML-RPC call wrappers.
Field Summary |
---|
Fields inherited from class org.opennebula.client.PoolElement |
---|
client, id, xml, xpath |
Constructor Summary | |
---|---|
|
VirtualNetwork(int id,
Client client)
Creates a new virtual network representation. |
protected |
VirtualNetwork(org.w3c.dom.Node xmlElement,
Client client)
|
Method Summary | |
---|---|
static OneResponse |
addAr(Client client,
int id,
java.lang.String template)
Adds an Address Range to the VirtualNetwork |
OneResponse |
addAr(java.lang.String template)
Adds an Address Range to the VirtualNetwork |
static OneResponse |
allocate(Client client,
java.lang.String description)
Allocates a new virtual network in OpenNebula. |
static OneResponse |
allocate(Client client,
java.lang.String description,
int clusterId)
Allocates a new virtual network 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 VirtualNetwork 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 VirtualNetwork 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 |
OneResponse |
delete()
Deletes the network from OpenNebula. |
static OneResponse |
delete(Client client,
int id)
Deletes a network from OpenNebula. |
static OneResponse |
free(Client client,
int id,
int arId)
Removes an Address Range from the VirtualNetwork |
OneResponse |
free(int arId)
Removes an Address Range from the VirtualNetwork |
static OneResponse |
hold(Client client,
int id,
java.lang.String template)
Holds a VirtualNetwork lease, marking it as used |
OneResponse |
hold(java.lang.String ip)
Holds a VirtualNetwork lease, marking it as used |
OneResponse |
hold(java.lang.String ip,
int arId)
Holds a VirtualNetwork lease, marking it as used |
OneResponse |
info()
Loads the xml representation of the virtual network. |
static OneResponse |
info(Client client,
int id)
Retrieves the information of the given virtual network |
OneResponse |
publish()
Publishes the virtual network. |
OneResponse |
publish(boolean publish)
Publishes or unpublishes the virtual network. |
static OneResponse |
publish(Client client,
int id,
boolean publish)
Publishes or unpublishes a virtual network. |
static OneResponse |
release(Client client,
int id,
java.lang.String template)
Releases a VirtualNetwork lease on hold |
OneResponse |
release(java.lang.String ip)
Releases a VirtualNetwork lease on hold |
OneResponse |
release(java.lang.String ip,
int arId)
Releases a VirtualNetwork lease on hold |
static OneResponse |
rename(Client client,
int id,
java.lang.String name)
Renames this VirtualNetwork |
OneResponse |
rename(java.lang.String name)
Renames this VirtualNetwork |
static OneResponse |
reserve(Client client,
int id,
java.lang.String template)
Reserve a set of addresses from this virtual network |
OneResponse |
reserve(java.lang.String template)
Reserve a set of addresses from this virtual network |
static OneResponse |
rmAr(Client client,
int id,
int arId)
Removes an Address Range from the VirtualNetwork |
OneResponse |
rmAr(int arId)
Removes an Address Range from the VirtualNetwork |
OneResponse |
unpublish()
Unpublishes the virtual network. |
static OneResponse |
update(Client client,
int id,
java.lang.String new_template,
boolean append)
Replaces the VirtualNetwork template contents. |
OneResponse |
update(java.lang.String new_template)
Replaces the VirtualNetwork template contents. |
OneResponse |
update(java.lang.String new_template,
boolean append)
Replaces the VirtualNetwork template contents. |
static OneResponse |
updateAr(Client client,
int id,
java.lang.String template)
Upates an Address Range from the VirtualNetwork |
OneResponse |
updateAr(java.lang.String template)
Upates an Address Range from the VirtualNetwork |
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 VirtualNetwork(int id, Client client)
id
- The virtual network id (nid) .client
- XML-RPC Client.protected VirtualNetwork(org.w3c.dom.Node xmlElement, Client client)
PoolElement
Method Detail |
---|
public static OneResponse allocate(Client client, java.lang.String description, int clusterId)
client
- XML-RPC Client.description
- A string containing the template
of the virtual network.clusterId
- The cluster ID. If it is -1, this virtual network
won't be added to any cluster.
public static OneResponse allocate(Client client, java.lang.String description)
client
- XML-RPC Client.description
- A string containing the template
of the virtual network.
public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- the virtual network id (nid) for the network to
retrieve the information from.
public static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.
public static OneResponse publish(Client client, int id, boolean publish)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.publish
- True for publishing, false for unpublishing.
public static OneResponse addAr(Client client, int id, java.lang.String template)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.template
- AR to add, example:
AR = [
TYPE = IP4,
IP = 192.168.0.5,
SIZE = 10 ]
public static OneResponse rmAr(Client client, int id, int arId)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.arId
- Id of the Address Range to remove
public static OneResponse updateAr(Client client, int id, java.lang.String template)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.template
- AR to update, example:
AR = [
AR_ID = 3,
TYPE = IP4,
IP = 192.168.0.5,
SIZE = 10 ]
public static OneResponse hold(Client client, int id, java.lang.String template)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.template
- Address to hold, examples:
LEASES = [ IP = 192.168.0.5 ] LEASES = [ MAC = 02:00:0a:00:00:96 ] LEASES = [ IP = 192.168.0.5, AR_ID = 3 ]
public static OneResponse release(Client client, int id, java.lang.String template)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.template
- Address to release, examples:
LEASES = [ IP = 192.168.0.5 ] LEASES = [ MAC = 02:00:0a:00:00:96 ] LEASES = [ IP = 192.168.0.5, AR_ID = 3 ]
public static OneResponse chown(Client client, int id, int uid, int gid)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.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 virtual network id (nid) of the target network.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 update(Client client, int id, java.lang.String new_template, boolean append)
client
- XML-RPC Client.id
- The vnet id of the target vnet we want to modify.new_template
- New template contents.append
- True to append new attributes instead of replace the whole template
public static OneResponse rename(Client client, int id, java.lang.String name)
client
- XML-RPC Client.id
- The VirtualNetwork id of the target VirtualNetwork.name
- New name for the VirtualNetwork.
public static OneResponse reserve(Client client, int id, java.lang.String template)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.template
- of the reservation. Examples:
SIZE = 10 SIZE = 10 AR_ID = 3 NAME = "new_network" SIZE = 10 IP = 192.168.10.50 NETWORK_ID = 9
public static OneResponse free(Client client, int id, int arId)
client
- XML-RPC Client.id
- The virtual network id (nid) of the target network.arId
- Id of the Address Range to remove
public OneResponse info()
info(Client, int)
public OneResponse delete()
public OneResponse publish(boolean publish)
publish
- True for publishing, false for unpublishing.
public OneResponse publish()
public OneResponse unpublish()
public OneResponse addAr(java.lang.String template)
template
- AR to add, example:
AR = [ TYPE = IP4, IP = 192.168.0.5, SIZE = 10 ]
public OneResponse rmAr(int arId)
arId
- Id of the Address Range to remove
public OneResponse updateAr(java.lang.String template)
template
- AR to update, example:
AR = [ AR_ID = 3, TYPE = IP4, IP = 192.168.0.5, SIZE = 10 ]
public OneResponse hold(java.lang.String ip)
ip
- IP or MAC to hold, e.g. "192.168.0.5", "02:00:0a:00:00:96"
public OneResponse hold(java.lang.String ip, int arId)
ip
- IP or MAC to hold, e.g. "192.168.0.5", "02:00:0a:00:00:96"arId
- Id of the Address Range to hold the lease from
public OneResponse release(java.lang.String ip)
ip
- IP or MAC to hold, e.g. "192.168.0.5", "02:00:0a:00:00:96"
public OneResponse release(java.lang.String ip, int arId)
ip
- IP or MAC to hold, e.g. "192.168.0.5", "02:00:0a:00:00:96"arId
- Id of the Address Range to release the lease from
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 update(java.lang.String new_template)
new_template
- New template contents.
public OneResponse update(java.lang.String new_template, boolean append)
new_template
- New template contents.append
- True to append new attributes instead of replace the whole template
public OneResponse rename(java.lang.String name)
name
- New name for the VirtualNetwork.
public OneResponse reserve(java.lang.String template)
template
- of the reservation. Examples:
SIZE = 10 SIZE = 10 AR_ID = 3 NAME = "new_network" SIZE = 10 IP = 192.168.10.50 NETWORK_ID = 9
public OneResponse free(int arId)
arId
- Id of the Address Range to remove
|
OpenNebula Cloud API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |