Package org.opennebula.client.vdc
Class Vdc
java.lang.Object
org.opennebula.client.PoolElement
org.opennebula.client.vdc.Vdc
This class represents an OpenNebula vdc.
It also offers static XML-RPC call wrappers.
-
Field Summary
Fields inherited from class org.opennebula.client.PoolElement
client, id, xml, xpath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCluster
(int zoneId, int clusterId) Adds a cluster to this VDCstatic OneResponse
addCluster
(Client client, int id, int zoneId, int clusterId) Adds a cluster to this VDCaddDatastore
(int zoneId, int datastoreId) Adds a datastore to this VDCstatic OneResponse
addDatastore
(Client client, int id, int zoneId, int datastoreId) Adds a datastore to this VDCaddGroup
(int groupId) Adds a group to this VDCstatic OneResponse
Adds a group to this VDCaddHost
(int zoneId, int hostId) Adds a host to this VDCstatic OneResponse
Adds a host to this VDCaddVnet
(int zoneId, int vnetId) Adds a vnet to this VDCstatic OneResponse
Adds a vnet to this VDCstatic OneResponse
Allocates a new vdc in OpenNebuladelCluster
(int zoneId, int clusterId) Deletes a cluster from this VDCstatic OneResponse
delCluster
(Client client, int id, int zoneId, int clusterId) Deletes a cluster from this VDCdelDatastore
(int zoneId, int datastoreId) Deletes a datastore from this VDCstatic OneResponse
delDatastore
(Client client, int id, int zoneId, int datastoreId) Deletes a datastore from this VDCdelete()
Deletes the vdc from OpenNebula.static OneResponse
Deletes a vdc from OpenNebula.delGroup
(int groupId) Deletes a group from this VDCstatic OneResponse
Deletes a group from this VDCdelHost
(int zoneId, int hostId) Deletes a host from this VDCstatic OneResponse
Deletes a host from this VDCdelVnet
(int zoneId, int vnetId) Deletes a vnet from this VDCstatic OneResponse
Deletes a vnet from this VDCinfo()
Loads the xml representation of the vdc.static OneResponse
Retrieves the information of the given vdc.static OneResponse
Retrieves the information of the given VDC.Renames this Vdcstatic OneResponse
Renames this vdcReplaces the template contents.Replaces the template contents.static OneResponse
Replaces the template contents.
-
Constructor Details
-
Vdc
Creates a new Vdc representation.- Parameters:
id
- The vdc id.client
- XML-RPC Client.
-
Vdc
- See Also:
-
-
Method Details
-
allocate
Allocates a new vdc in OpenNebula- Parameters:
client
- XML-RPC Client.description
- A string containing the template of the vdc.- Returns:
- If successful the message contains the associated id generated for this vdc.
-
info
Retrieves the information of the given vdc.- Parameters:
client
- XML-RPC Client.id
- The vdc id.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
info
Retrieves the information of the given VDC.- Parameters:
client
- XML-RPC Client.id
- The VDC id for the VDC to retrieve the information fromdecrypt
- If true decrypt sensitive attributes- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
delete
Deletes a vdc from OpenNebula.- Parameters:
client
- XML-RPC Client.id
- The vdc id.- Returns:
- A encapsulated response.
-
update
Replaces the template contents.- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdc we want to modify.new_template
- New template contentsappend
- True to append new attributes instead of replace the whole template- Returns:
- If successful the message contains the vdc id.
-
rename
Renames this vdc- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdcname
- New name for the vdc.- Returns:
- If an error occurs the error message contains the reason.
-
addGroup
Adds a group to this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdcgroupId
- The group to add- Returns:
- If an error occurs the error message contains the reason.
-
delGroup
Deletes a group from this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdcgroupId
- The group to delete- Returns:
- If an error occurs the error message contains the reason.
-
addCluster
Adds a cluster to this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The cluster's zoneclusterId
- The cluster to add- Returns:
- If an error occurs the error message contains the reason.
-
delCluster
Deletes a cluster from this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The cluster's zoneclusterId
- The cluster to delete- Returns:
- If an error occurs the error message contains the reason.
-
addHost
Adds a host to this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The host's zonehostId
- The host to add- Returns:
- If an error occurs the error message contains the reason.
-
delHost
Deletes a host from this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The host's zonehostId
- The host to delete- Returns:
- If an error occurs the error message contains the reason.
-
addVnet
Adds a vnet to this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The vnet's zonevnetId
- The vnet to add- Returns:
- If an error occurs the error message contains the reason.
-
delVnet
Deletes a vnet from this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The vnet's zonevnetId
- The vnet to delete- Returns:
- If an error occurs the error message contains the reason.
-
addDatastore
Adds a datastore to this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The datastore's zonedatastoreId
- The datastore to add- Returns:
- If an error occurs the error message contains the reason.
-
delDatastore
Deletes a datastore from this VDC- Parameters:
client
- XML-RPC Client.id
- The vdc id of the target vdczoneId
- The datastore's zonedatastoreId
- The datastore to delete- Returns:
- If an error occurs the error message contains the reason.
-
info
Loads the xml representation of the vdc. The info is also stored internally.- See Also:
-
delete
Deletes the vdc from OpenNebula.- See Also:
-
update
Replaces the template contents.- Parameters:
new_template
- New template contents- Returns:
- If successful the message contains the vdc id.
-
update
Replaces the template contents.- Parameters:
new_template
- New template contentsappend
- True to append new attributes instead of replace the whole template- Returns:
- If successful the message contains the vdc id.
-
rename
Renames this Vdc- Parameters:
name
- New name for the vdc.- Returns:
- If an error occurs the error message contains the reason.
-
addGroup
Adds a group to this VDC- Parameters:
groupId
- The group to add- Returns:
- If an error occurs the error message contains the reason.
-
delGroup
Deletes a group from this VDC- Parameters:
groupId
- The group to delete- Returns:
- If an error occurs the error message contains the reason.
-
addCluster
Adds a cluster to this VDC- Parameters:
zoneId
- The cluster's zoneclusterId
- The cluster to add- Returns:
- If an error occurs the error message contains the reason.
-
delCluster
Deletes a cluster from this VDC- Parameters:
zoneId
- The cluster's zoneclusterId
- The cluster to delete- Returns:
- If an error occurs the error message contains the reason.
-
addHost
Adds a host to this VDC- Parameters:
zoneId
- The host's zonehostId
- The host to add- Returns:
- If an error occurs the error message contains the reason.
-
delHost
Deletes a host from this VDC- Parameters:
zoneId
- The host's zonehostId
- The host to delete- Returns:
- If an error occurs the error message contains the reason.
-
addVnet
Adds a vnet to this VDC- Parameters:
zoneId
- The vnet's zonevnetId
- The vnet to add- Returns:
- If an error occurs the error message contains the reason.
-
delVnet
Deletes a vnet from this VDC- Parameters:
zoneId
- The vnet's zonevnetId
- The vnet to delete- Returns:
- If an error occurs the error message contains the reason.
-
addDatastore
Adds a datastore to this VDC- Parameters:
zoneId
- The datastore's zonedatastoreId
- The datastore to add- Returns:
- If an error occurs the error message contains the reason.
-
delDatastore
Deletes a datastore from this VDC- Parameters:
zoneId
- The datastore's zonedatastoreId
- The datastore to delete- Returns:
- If an error occurs the error message contains the reason.
-