public class VirtualNetworkTemplate extends PoolElement
client, id, xml, xpath
Modifier | Constructor and Description |
---|---|
|
VirtualNetworkTemplate(int id,
Client client)
Creates a new VNTemplate representation.
|
protected |
VirtualNetworkTemplate(org.w3c.dom.Node xmlElement,
Client client) |
Modifier and Type | Method and Description |
---|---|
static OneResponse |
allocate(Client client,
java.lang.String description)
Allocates a new VNTemplate 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 vntemplate 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 vntemplate 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 vntemplate into a new one
|
OneResponse |
clone(java.lang.String name)
Clones this vntemplate into a new one
|
OneResponse |
delete()
Deletes the vntemplate from OpenNebula.
|
static OneResponse |
delete(Client client,
int id)
Deletes a VNTemplate from OpenNebula.
|
OneResponse |
info()
Retrieves the information of the VNTemplate.
|
OneResponse |
info(boolean extended)
Retrieves the information of the given VNTemplate.
|
static OneResponse |
info(Client client,
int id)
Retrieves the information of the given VNTemplate.
|
OneResponse |
instantiate()
Creates a VM instance from a VNTemplate
|
static OneResponse |
instantiate(Client client,
int id,
java.lang.String name,
java.lang.String template)
Creates a VNET instance from a VNTemplate
|
OneResponse |
instantiate(java.lang.String name)
Creates a VM instance from a VNTemplate
|
OneResponse |
instantiate(java.lang.String name,
java.lang.String template)
Creates a VNET instance from a VNTemplate
|
static OneResponse |
lock(Client client,
int id,
int level)
lock this VNtemplate
|
OneResponse |
lock(int level)
Lock this VNtemplate
|
OneResponse |
publish()
Publishes the vntemplate.
|
OneResponse |
publish(boolean publish)
Publishes or unpublishes the vntemplate.
|
static OneResponse |
publish(Client client,
int id,
boolean publish)
Publishes or unpublishes a VNTemplate.
|
static OneResponse |
rename(Client client,
int id,
java.lang.String name)
Renames this VNTemplate
|
OneResponse |
rename(java.lang.String name)
Renames this VNTemplate
|
OneResponse |
unlock()
Unlock this VNtemplate
|
static OneResponse |
unlock(Client client,
int id)
Unlock this vntemplate
|
OneResponse |
unpublish()
Unpublishes the vntemplate.
|
static OneResponse |
update(Client client,
int id,
java.lang.String new_template,
boolean append)
Replaces the VNTemplate contents.
|
OneResponse |
update(java.lang.String new_template)
Replaces the vntemplate contents.
|
OneResponse |
update(java.lang.String new_template,
boolean append)
Replaces the vntemplate contents.
|
public VirtualNetworkTemplate(int id, Client client)
id
- The VNtemplate id.client
- XML-RPC Client.protected VirtualNetworkTemplate(org.w3c.dom.Node xmlElement, Client client)
PoolElement
public static OneResponse allocate(Client client, java.lang.String description)
client
- XML-RPC Client.description
- A string containing the template of the vntemplate.public static OneResponse info(Client client, int id)
client
- XML-RPC Client.id
- The VNtemplate id for the VNtemplate to retrieve the information frompublic static OneResponse delete(Client client, int id)
client
- XML-RPC Client.id
- The vntemplate id of the target vntemplate we want to delete.public static OneResponse update(Client client, int id, java.lang.String new_template, boolean append)
client
- XML-RPC Client.id
- The vntemplate id of the target vntemplate we want to modify.new_template
- New vntemplate contents.append
- True to append new attributes instead of replace the whole vntemplatepublic static OneResponse publish(Client client, int id, boolean publish)
client
- XML-RPC Client.id
- The vntemplate id of the target vntemplate 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 vntemplate id of the target vntemplate 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 vntemplate id of the target vntemplate.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 changepublic 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. 640public 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. 640public static OneResponse instantiate(Client client, int id, java.lang.String name, java.lang.String template)
client
- XML-RPC Client.id
- The vntemplate id of the target vntemplate.name
- A string containing the name of the VM instance, can be empty.template
- User provided VNTemplate to merge with the one
being instantiatedpublic static OneResponse clone(Client client, int id, java.lang.String name)
client
- XML-RPC Client.id
- The vntemplate id of the target vntemplate.name
- Name for the new vntemplate.public static OneResponse rename(Client client, int id, java.lang.String name)
client
- XML-RPC Client.id
- The VNTemplate id of the target VNTemplate.name
- New name for the VNTemplate.public static OneResponse lock(Client client, int id, int level)
client
- XML-RPC Client.id
- The vntemplate id.level
- Lock level.public static OneResponse unlock(Client client, int id)
client
- XML-RPC Client.id
- The vntemplate id.public OneResponse info()
public OneResponse info(boolean extended)
extended
- optional flag to process the vntemplate and include
extended information, such as the SIZE for each DISKpublic OneResponse delete()
public OneResponse update(java.lang.String new_template)
new_template
- New VNtemplate contents.public OneResponse update(java.lang.String new_template, boolean append)
new_template
- New vntemplate contents.append
- True to append new attributes instead of replace the whole vntemplatepublic 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 changepublic OneResponse chmod(java.lang.String octet)
octet
- Permissions octed , e.g. 640public OneResponse chmod(int octet)
octet
- Permissions octed , e.g. 640public OneResponse instantiate(java.lang.String name, java.lang.String template)
name
- A string containing the name of the VM instance, can be empty.template
- User provided Template to merge with the one
being instantiatedpublic 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 vntemplate.public OneResponse rename(java.lang.String name)
name
- New name for the VNTemplate.public OneResponse lock(int level)
level
- Lock level.public OneResponse unlock()
Visit OpenNebula.org
Copyright 2002-2019 ©
OpenNebula Project, OpenNebula Systems.