1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-27 10:50:10 +03:00

F #3064: Add decrypt option for GOCA and JAVA (#3772)

This commit is contained in:
Christian González 2019-10-01 14:18:35 +02:00 committed by Ruben S. Montero
parent cfac3ad57c
commit 9ed1d12dbb
46 changed files with 322 additions and 84 deletions

View File

@ -44,7 +44,7 @@ func (c *Controller) Cluster(id int) *ClusterController {
func (c *ClustersController) ByName(name string) (int, error) {
var id int
clusterPool, err := c.Info()
clusterPool, err := c.Info(false)
if err != nil {
return 0, err
}
@ -69,8 +69,8 @@ func (c *ClustersController) ByName(name string) (int, error) {
// Info returns a cluster pool. A connection to OpenNebula is
// performed.
func (cc *ClustersController) Info() (*cluster.Pool, error) {
response, err := cc.c.Client.Call("one.clusterpool.info")
func (cc *ClustersController) Info(decrypt bool) (*cluster.Pool, error) {
response, err := cc.c.Client.Call("one.clusterpool.info", decrypt)
if err != nil {
return nil, err
}

View File

@ -86,8 +86,8 @@ func (dc *DatastoresController) Info() (*datastore.Pool, error) {
}
// Info retrieves information for the datastore.
func (dc *DatastoreController) Info() (*datastore.Datastore, error) {
response, err := dc.c.Client.Call("one.datastore.info", dc.ID)
func (dc *DatastoreController) Info(decrypt bool) (*datastore.Datastore, error) {
response, err := dc.c.Client.Call("one.datastore.info", dc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -108,8 +108,8 @@ func (dc *DocumentsController) Info(args ...int) (*document.Pool, error) {
}
// Info retrieves information for the document.
func (dc *DocumentController) Info() (*document.Document, error) {
response, err := dc.c.Client.Call("one.document.info", dc.ID)
func (dc *DocumentController) Info(decrypt bool) (*document.Document, error) {
response, err := dc.c.Client.Call("one.document.info", dc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -85,8 +85,8 @@ func (gc *GroupsController) Info() (*group.Pool, error) {
}
// Info retrieves information for the group.
func (gc *GroupController) Info() (*group.Group, error) {
response, err := gc.c.Client.Call("one.group.info", gc.ID)
func (gc *GroupController) Info(decrypt bool) (*group.Group, error) {
response, err := gc.c.Client.Call("one.group.info", gc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -54,7 +54,7 @@ func GetUserGroup(t *testing.T, user string) (string, error) {
}
// Get User Info
u, err := testCtrl.User(uid).Info()
u, err := testCtrl.User(uid).Info(false)
if err != nil {
t.Error("Cannot retreive caller user Info")
}

View File

@ -84,8 +84,8 @@ func (hc *HooksController) Info() (*hook.Pool, error) {
}
// Info retrieves information for the hook from ID
func (hc *HookController) Info() (*hook.Hook, error) {
response, err := hc.c.Client.Call("one.hook.info", hc.ID)
func (hc *HookController) Info(decrypt bool) (*hook.Hook, error) {
response, err := hc.c.Client.Call("one.hook.info", hc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -40,7 +40,7 @@ func createHook(t *testing.T) (*hk.Hook, int) {
}
// Get Hook Network by ID
hook, err := testCtrl.Hook(id).Info()
hook, err := testCtrl.Hook(id).Info(false)
if err != nil {
t.Error(err)
}
@ -67,7 +67,7 @@ func TestHook(t *testing.T) {
}
hookC := testCtrl.Hook(id)
hook, err = hookC.Info()
hook, err = hookC.Info(false)
if err != nil {
t.Error(err)
}
@ -81,11 +81,11 @@ func TestHook(t *testing.T) {
currentExecs := len(hook.Log.ExecutionRecords)
//triger the hook
testCtrl.Zone(0).Info()
testCtrl.Zone(0).Info(false)
time.Sleep(2 * time.Second)
hook, err = hookC.Info()
hook, err = hookC.Info(false)
if (len(hook.Log.ExecutionRecords) <= currentExecs) {
t.Errorf("Hook have not been triggered")
@ -98,7 +98,7 @@ func TestHook(t *testing.T) {
time.Sleep(2 * time.Second)
hook, err = hookC.Info()
hook, err = hookC.Info(false)
if (len(hook.Log.ExecutionRecords) <= currentExecs) {
t.Errorf("Hook execution have not been retried")

View File

@ -83,8 +83,8 @@ func (hc *HostsController) Info() (*host.Pool, error) {
}
// Info retrieves information for the host from ID
func (hc *HostController) Info() (*host.Host, error) {
response, err := hc.c.Client.Call("one.host.info", hc.ID)
func (hc *HostController) Info(decrypt bool) (*host.Host, error) {
response, err := hc.c.Client.Call("one.host.info", hc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -108,8 +108,8 @@ func (ic *ImagesController) Info(args ...int) (*image.Pool, error) {
}
// Info connects to OpenNebula and fetches the information of the Image
func (ic *ImageController) Info() (*image.Image, error) {
response, err := ic.c.Client.Call("one.image.info", ic.ID)
func (ic *ImageController) Info(decrypt bool) (*image.Image, error) {
response, err := ic.c.Client.Call("one.image.info", ic.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -31,7 +31,7 @@ TYPE = "DATABLOCK"
func ImageExpectState(imageC *ImageController, state string) func() bool {
return func() bool {
image, err := imageC.Info()
image, err := imageC.Info(false)
if err != nil {
return false
}
@ -58,7 +58,7 @@ func createImage(t *testing.T) (*image.Image, int) {
}
// Get Image by ID
image, err := testCtrl.Image(id).Info()
image, err := testCtrl.Image(id).Info(false)
if err != nil {
t.Error(err)
}
@ -85,7 +85,7 @@ func TestImage(t *testing.T) {
}
imageCtrl := testCtrl.Image(id)
image, err = imageCtrl.Info()
image, err = imageCtrl.Info(false)
if err != nil {
t.Error(err)
}
@ -107,7 +107,7 @@ func TestImage(t *testing.T) {
t.Error(err)
}
image, err = imageCtrl.Info()
image, err = imageCtrl.Info(false)
if err != nil {
t.Error(err)
}
@ -140,7 +140,7 @@ func TestImage(t *testing.T) {
t.Error(err)
}
image, err = imageCtrl.Info()
image, err = imageCtrl.Info(false)
if err != nil {
t.Error(err)
}

View File

@ -106,8 +106,8 @@ func (mc *MarketPlacesController) Info(args ...int) (*marketplace.Pool, error) {
}
// Info retrieves information for the marketplace.
func (mc *MarketPlaceController) Info() (*marketplace.MarketPlace, error) {
response, err := mc.c.Client.Call("one.market.info", mc.ID)
func (mc *MarketPlaceController) Info(decrypt bool) (*marketplace.MarketPlace, error) {
response, err := mc.c.Client.Call("one.market.info", mc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -44,7 +44,7 @@ func TestMarketplace(t *testing.T) {
}
marketCtrl := testCtrl.MarketPlace(market_id)
market, err = marketCtrl.Info()
market, err = marketCtrl.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -64,7 +64,7 @@ func TestMarketplace(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
market, err = marketCtrl.Info()
market, err = marketCtrl.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -90,7 +90,7 @@ func TestMarketplace(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
market, err = marketCtrl.Info()
market, err = marketCtrl.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -109,7 +109,7 @@ func TestMarketplace(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
market, err = marketCtrl.Info()
market, err = marketCtrl.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -136,7 +136,7 @@ func TestMarketplace(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
market, err = marketCtrl.Info()
market, err = marketCtrl.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}

View File

@ -105,8 +105,8 @@ func (mc *MarketPlaceAppsController) Info(args ...int) (*marketplaceapp.Pool, er
}
// Info retrieves information for the marketplace app.
func (mc *MarketPlaceAppController) Info() (*marketplaceapp.MarketPlaceApp, error) {
response, err := mc.c.Client.Call("one.marketapp.info", mc.ID)
func (mc *MarketPlaceAppController) Info(decrypt bool) (*marketplaceapp.MarketPlaceApp, error) {
response, err := mc.c.Client.Call("one.marketapp.info", mc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -47,7 +47,7 @@ func TestMarketplaceApp(t *testing.T) {
WaitResource(func() bool {
id, _ := testCtrl.Images().ByName("test_img_go")
img, _ := testCtrl.Image(id).Info()
img, _ := testCtrl.Image(id).Info(false)
state, _ := img.State()
@ -81,7 +81,7 @@ func TestMarketplaceApp(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
mkt_app, err = testCtrl.MarketPlaceApp(app_id).Info()
mkt_app, err = testCtrl.MarketPlaceApp(app_id).Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}

View File

@ -105,8 +105,8 @@ func (sc *SecurityGroupsController) Info(args ...int) (*securitygroup.Pool, erro
}
// Info retrieves information for the security group.
func (sc *SecurityGroupController) Info() (*securitygroup.SecurityGroup, error) {
response, err := sc.c.Client.Call("one.secgroup.info", sc.ID)
func (sc *SecurityGroupController) Info(decrypt bool) (*securitygroup.SecurityGroup, error) {
response, err := sc.c.Client.Call("one.secgroup.info", sc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -39,7 +39,7 @@ func TestSGAllocate(t *testing.T) {
}
sgC := testCtrl.SecurityGroup(sg_id)
sg, err = sgC.Info()
sg, err = sgC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -59,7 +59,7 @@ func TestSGAllocate(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
sg, err = sgC.Info()
sg, err = sgC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -91,7 +91,7 @@ func TestSGAllocate(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
clone, err := testCtrl.SecurityGroup(clone_id).Info()
clone, err := testCtrl.SecurityGroup(clone_id).Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -111,7 +111,7 @@ func TestSGAllocate(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
sg, err = sgC.Info()
sg, err = sgC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -130,7 +130,7 @@ func TestSGAllocate(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
sg, err = sgC.Info()
sg, err = sgC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -156,7 +156,7 @@ func TestSGAllocate(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
sg, err = sgC.Info()
sg, err = sgC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}

View File

@ -101,8 +101,8 @@ func (tc *TemplatesController) Info(args ...int) (*template.Pool, error) {
}
// Info connects to OpenNebula and fetches the information of the Template
func (tc *TemplateController) Info() (*template.Template, error) {
response, err := tc.c.Client.Call("one.template.info", tc.ID)
func (tc *TemplateController) Info(extended, decrypt bool) (*template.Template, error) {
response, err := tc.c.Client.Call("one.template.info", tc.ID, extended, decrypt)
if err != nil {
return nil, err
}

View File

@ -40,7 +40,7 @@ func createTemplate(t *testing.T) (*template.Template, int) {
}
// Get template by ID
template, err := testCtrl.Template(id).Info()
template, err := testCtrl.Template(id).Info(false, false)
if err != nil {
t.Error(err)
@ -66,7 +66,7 @@ func TestTemplateCreateAndDelete(t *testing.T) {
t.Fatal(err)
}
template, err = testCtrl.Template(id).Info()
template, err = testCtrl.Template(id).Info(false, false)
if err != nil {
t.Error(err)
}
@ -130,7 +130,7 @@ func TestTemplateUpdate(t *testing.T) {
// Update
templateCtrl.Update(tpl.String(), 1)
template, err := templateCtrl.Info()
template, err := templateCtrl.Info(false, false)
if err != nil {
t.Error(err)
}

View File

@ -85,8 +85,8 @@ func (uc *UsersController) Info() (*user.Pool, error) {
}
// Info retrieves information for the user from ID
func (uc *UserController) Info() (*user.User, error) {
response, err := uc.c.Client.Call("one.user.info", uc.ID)
func (uc *UserController) Info(decrypt bool) (*user.User, error) {
response, err := uc.c.Client.Call("one.user.info", uc.ID, decrypt)
if err != nil {
return nil, err
}
@ -131,9 +131,9 @@ func (uc *UserController) Passwd(password string) error {
// * timeSeconds: Valid period in seconds; 0 reset the token and -1 for a non-expiring token.
// * effectiveGID: Effective GID to use with this token. To use the current GID and user groups set it to -1
func (uc *UserController) Login(token string, timeSeconds int, effectiveGID int) error {
user, err := uc.Info()
user, err := uc.Info(false)
if err != nil {
if err != nil {
return err
}
_, err = uc.c.Client.Call("one.user.login", user.Name, token, timeSeconds, effectiveGID)

View File

@ -85,8 +85,8 @@ func (vc *VDCsController) Info() (*vdc.Pool, error) {
}
// Info retrieves information for the VDC.
func (vc *VDCController) Info() (*vdc.VDC, error) {
response, err := vc.c.Client.Call("one.vdc.info", vc.ID)
func (vc *VDCController) Info(decrypt bool) (*vdc.VDC, error) {
response, err := vc.c.Client.Call("one.vdc.info", vc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -104,8 +104,8 @@ func (vc *VirtualNetworksController) Info(args ...int) (*vn.Pool, error) {
}
// Info retrieves information for the virtual network.
func (vc *VirtualNetworkController) Info() (*vn.VirtualNetwork, error) {
response, err := vc.c.Client.Call("one.vn.info", vc.ID)
func (vc *VirtualNetworkController) Info(decrypt bool) (*vn.VirtualNetwork, error) {
response, err := vc.c.Client.Call("one.vn.info", vc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -40,7 +40,7 @@ func createVirtualNetwork(t *testing.T) (*vn.VirtualNetwork, int) {
}
// Get Virtual Network by ID
vnet, err := testCtrl.VirtualNetwork(id).Info()
vnet, err := testCtrl.VirtualNetwork(id).Info(false)
if err != nil {
t.Error(err)
}
@ -67,7 +67,7 @@ func TestVirtualNetwork(t *testing.T) {
}
vnetC := testCtrl.VirtualNetwork(id)
vnet, err = vnetC.Info()
vnet, err = vnetC.Info(false)
if err != nil {
t.Error(err)
}
@ -83,7 +83,7 @@ func TestVirtualNetwork(t *testing.T) {
t.Error(err)
}
vnet, err = vnetC.Info()
vnet, err = vnetC.Info(false)
if err != nil {
t.Error(err)
}
@ -116,7 +116,7 @@ func TestVirtualNetwork(t *testing.T) {
t.Error(err)
}
vnet, err = vnetC.Info()
vnet, err = vnetC.Info(false)
if err != nil {
t.Error(err)
}

View File

@ -101,8 +101,8 @@ func (vc *VirtualRoutersController) Info(args ...int) (*vr.Pool, error) {
}
// Info connects to OpenNebula and fetches the information of the VirtualRouter
func (vc *VirtualRouterController) Info() (*vr.VirtualRouter, error) {
response, err := vc.c.Client.Call("one.vrouter.info", vc.ID)
func (vc *VirtualRouterController) Info(decrypt bool) (*vr.VirtualRouter, error) {
response, err := vc.c.Client.Call("one.vrouter.info", vc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -39,7 +39,7 @@ func TestVirtualRouter(t *testing.T) {
}
vrC := testCtrl.VirtualRouter(vr_id)
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -59,7 +59,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -89,7 +89,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -108,7 +108,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -135,7 +135,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -188,7 +188,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -221,7 +221,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}
@ -241,7 +241,7 @@ func TestVirtualRouter(t *testing.T) {
t.Errorf("Test failed:\n" + err.Error())
}
vr, err = vrC.Info()
vr, err = vrC.Info(false)
if err != nil {
t.Errorf("Test failed:\n" + err.Error())
}

View File

@ -135,8 +135,8 @@ func (vc *VMsController) InfoExtended(filterFlag, startID, endID, state int) (*v
}
// Info connects to OpenNebula and fetches the information of the VM
func (vc *VMController) Info() (*vm.VM, error) {
response, err := vc.c.Client.Call("one.vm.info", vc.ID)
func (vc *VMController) Info(decrypt bool) (*vm.VM, error) {
response, err := vc.c.Client.Call("one.vm.info", vc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -83,7 +83,7 @@ func (s *VMSuite) TearDownSuite(c *C) {
func VMExpectState(c *C, vmID int, state, lcmState string) func() bool {
return func() bool {
vm, err := testCtrl.VM(vmID).Info()
vm, err := testCtrl.VM(vmID).Info(false)
if err != nil {
return false
}
@ -130,7 +130,7 @@ func (s *VMSuite) TestVMUpdate(c *C) {
err := vmC.Update("A=B", 1)
c.Assert(err, IsNil)
vm, err := vmC.Info()
vm, err := vmC.Info(false)
c.Assert(err, IsNil)
val := vm.UserTemplate.Dynamic.GetContentByName("A")
@ -206,7 +206,7 @@ func (s *VMSuite) TestVMResize(c *C) {
expectHostState := func(hostID int) func() bool {
return func() bool {
hostC := testCtrl.Host(hostID)
host, err := hostC.Info()
host, err := hostC.Info(false)
c.Assert(err, IsNil)
state, err := host.StateString()
c.Assert(err, IsNil)
@ -234,7 +234,7 @@ func (s *VMSuite) TestVMResize(c *C) {
c.Assert(err, IsNil)
c.Assert(WaitResource(VMExpectState(c, s.vmID, "ACTIVE", "RUNNING")), Equals, true)
vm, err := vmC.Info()
vm, err := vmC.Info(false)
c.Assert(err, IsNil)
c.Assert(vm.Template.CPU, Equals, 2.5)

View File

@ -105,8 +105,8 @@ func (vc *VMGroupsController) Info(args ...int) (*vmgroup.Pool, error) {
}
// Info retrieves information for the vm group.
func (vc *VMGroupController) Info() (*vmgroup.VMGroup, error) {
response, err := vc.c.Client.Call("one.vmgroup.info", vc.ID)
func (vc *VMGroupController) Info(decrypt bool) (*vmgroup.VMGroup, error) {
response, err := vc.c.Client.Call("one.vmgroup.info", vc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -104,8 +104,8 @@ func (vc *VNTemplatesController) Info(args ...int) (*vntemplate.Pool, error) {
}
// Info connects to OpenNebula and fetches the information of the VNTemplate
func (vc *VNTemplateController) Info() (*vntemplate.VNTemplate, error) {
response, err := vc.c.Client.Call("one.vntemplate.info", vc.ID)
func (vc *VNTemplateController) Info(decrypt bool) (*vntemplate.VNTemplate, error) {
response, err := vc.c.Client.Call("one.vntemplate.info", vc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -85,8 +85,8 @@ func (zc *ZonesController) Info() (*zone.Pool, error) {
}
// Info retrieves information for the zone.
func (zc *ZoneController) Info() (*zone.Zone, error) {
response, err := zc.c.Client.Call("one.zone.info", zc.ID)
func (zc *ZoneController) Info(decrypt bool) (*zone.Zone, error) {
response, err := zc.c.Client.Call("one.zone.info", zc.ID, decrypt)
if err != nil {
return nil, err
}

View File

@ -89,6 +89,20 @@ public class Cluster extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given cluster.
*
* @param client XML-RPC Client.
* @param id The Cluster id for the Cluster to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a cluster from OpenNebula.
*

View File

@ -110,6 +110,20 @@ public class Datastore extends PoolElement
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Datastore.
*
* @param client XML-RPC Client.
* @param id The Datastore id for the Datastore to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a datastore from OpenNebula.
*

View File

@ -86,6 +86,20 @@ public class Group extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Group.
*
* @param client XML-RPC Client.
* @param id The Group id for the Group to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a group from OpenNebula.
*

View File

@ -144,6 +144,20 @@ public class Host extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Host.
*
* @param client XML-RPC Client.
* @param id The Host id for the Host to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a host from OpenNebula.
*

View File

@ -133,6 +133,20 @@ public class Image extends PoolElement
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Image.
*
* @param client XML-RPC Client.
* @param id The Image id for the Image to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes an image from OpenNebula.
*

View File

@ -84,6 +84,20 @@ public class MarketPlace extends PoolElement
return client.call(INFO, id);
}
/**
* Retrieves the information of the given MarketPlace.
*
* @param client XML-RPC Client.
* @param id The MarketPlace id for the MarketPlace to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a MarketPlace from OpenNebula.
*

View File

@ -104,6 +104,20 @@ public class MarketPlaceApp extends PoolElement
return client.call(INFO, id);
}
/**
* Retrieves the information of the given App.
*
* @param client XML-RPC Client.
* @param id The App id for the App to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes an MarketPlaceApp from OpenNebula.
*

View File

@ -92,6 +92,20 @@ public class SecurityGroup extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Security Group.
*
* @param client XML-RPC Client.
* @param id The Security Group id for the Security Group to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a security group from OpenNebula.
*

View File

@ -104,6 +104,20 @@ public class Template extends PoolElement
return client.call(INFO, id, extended);
}
/**
* Retrieves the information of the given Template.
*
* @param client XML-RPC Client.
* @param id The template id for the template to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean extended, boolean decrypt)
{
return client.call(INFO, id, extended, decrypt);
}
/**
* Deletes a template from OpenNebula.
*

View File

@ -116,6 +116,20 @@ public class User extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given User.
*
* @param client XML-RPC Client.
* @param id The User id for the User to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a user from OpenNebula.
*

View File

@ -95,6 +95,20 @@ public class Vdc extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given VDC.
*
* @param client XML-RPC Client.
* @param id The VDC id for the VDC to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a vdc from OpenNebula.
*

View File

@ -323,6 +323,20 @@ public class VirtualMachine extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given VM.
*
* @param client XML-RPC Client.
* @param id The VM id for the VM to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Changes the owner/group
*

View File

@ -92,6 +92,20 @@ public class VMGroup extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given VMGroup.
*
* @param client XML-RPC Client.
* @param id The VMGroup id for the VMGroup to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a vmgroup from OpenNebula.
*

View File

@ -119,6 +119,20 @@ public class VirtualNetwork extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Virtual Network.
*
* @param client XML-RPC Client.
* @param id The Virtual Network id for the Virtual Network to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a network from OpenNebula.
*

View File

@ -89,6 +89,20 @@ public class VirtualNetworkTemplate extends PoolElement
return client.call(INFO, id, false);
}
/**
* Retrieves the information of the given VNTemplate.
*
* @param client XML-RPC Client.
* @param id The VNtemplate id for the VNtemplate to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a VNTemplate from OpenNebula.
*

View File

@ -90,6 +90,20 @@ public class VirtualRouter extends PoolElement
return client.call(INFO, id);
}
/**
* Retrieves the information of the given VRouter.
*
* @param client XML-RPC Client.
* @param id The VRouter id for the VRouter to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Creates VM instances from a VM Template. New VMs will be associated
* to this Virtual Router, and its Virtual Networks

View File

@ -84,6 +84,20 @@ public class Zone extends PoolElement{
return client.call(INFO, id);
}
/**
* Retrieves the information of the given Zone.
*
* @param client XML-RPC Client.
* @param id The Zone id for the Zone to retrieve the information from
* @param decrypt If true decrypt sensitive attributes
* @return If successful the message contains the string
* with the information returned by OpenNebula.
*/
public static OneResponse info(Client client, int id, boolean decrypt)
{
return client.call(INFO, id, decrypt);
}
/**
* Deletes a zone from OpenNebula.
*