mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
build strings to pass to OneClient methods
git-svn-id: http://svn.opennebula.org/one/trunk@435 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
19289a455b
commit
839da81bff
@ -88,12 +88,14 @@ int c_oneMigrate(int vmid, int hid, int flag)
|
||||
int c_oneAllocate(char* vm_template)
|
||||
{
|
||||
string info;
|
||||
string template_file(vm_template);
|
||||
|
||||
int vmid;
|
||||
|
||||
if (!client)
|
||||
return -1;
|
||||
|
||||
if( (client->allocate(vm_template,vmid, info)) <0)
|
||||
if( (client->allocate(template_file,vmid, info)) <0)
|
||||
{
|
||||
cerr<<info<<endl;
|
||||
return -1;
|
||||
@ -107,12 +109,14 @@ int c_oneAllocate(char* vm_template)
|
||||
int c_oneAllocateTemplate(char* vm_template)
|
||||
{
|
||||
string info;
|
||||
string template_str(vm_template);
|
||||
|
||||
int vmid;
|
||||
|
||||
if (!client)
|
||||
return -1;
|
||||
|
||||
if( (client->allocate_template(vm_template,vmid, info)) <0)
|
||||
if( (client->allocate_template(template_str,vmid, info)) <0)
|
||||
{
|
||||
cerr<<info<<endl;
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user