mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-28 14:50:08 +03:00
Merge branch 'one-2.0' of dsa-research.org:one into one-2.0
This commit is contained in:
commit
6a190e7ba8
10
NOTICE
10
NOTICE
@ -3,16 +3,18 @@ Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org)
|
||||
-----------------------------------------
|
||||
|
||||
You can find more information about the project, release notes and
|
||||
documentation at www.OpenNebula.org
|
||||
documentation at www.OpenNebula.org
|
||||
|
||||
AUTHORS
|
||||
|
||||
- Ruben Santiago Montero (rubensm@dacya.ucm.es)
|
||||
- Ignacio Martín Llorente (llorente@dacya.ucm.es)
|
||||
- Ignacio Martin Llorente (llorente@dacya.ucm.es)
|
||||
|
||||
ACKNOWLEDGEMENTS
|
||||
|
||||
The following people have contributed to the development of the technology
|
||||
- Javier Fontán Muiños (jfontan@fdi.ucm.es)
|
||||
- Constantino Vázquez Blanco (tinova@fdi.ucm.es)
|
||||
- Javier Fontan Muiños (jfontan@fdi.ucm.es)
|
||||
- Constantino Vazquez Blanco (tinova@fdi.ucm.es)
|
||||
- Jaime Melis Bayo (j.melis@fdi.ucm.es)
|
||||
- Carlos Martin Sanchez (cmartins@fdi.ucm.es)
|
||||
- Daniel Molina Aranda (danmolin@pdi.ucm.es)
|
||||
|
5
README
5
README
@ -109,6 +109,11 @@ where **install_options** can be one or more of:
|
||||
-h prints installer help
|
||||
|
||||
|
||||
## CONFIGURATION
|
||||
|
||||
Information on how to configure OpenNebula is located at http://opennebula.org/documentation:rel2.0
|
||||
|
||||
|
||||
## CONTACT
|
||||
|
||||
OpenNebula web page: http://opennebula.org
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
Hook(const string &_name,
|
||||
const string &_cmd,
|
||||
const string &_args,
|
||||
HookType _ht,
|
||||
int _ht,
|
||||
bool _remote):
|
||||
name(_name), cmd(_cmd), args(_args), hook_type(_ht), remote(_remote){};
|
||||
|
||||
@ -63,7 +63,7 @@ public:
|
||||
/**
|
||||
* Returns the hook_type
|
||||
*/
|
||||
HookType type() const
|
||||
int type() const
|
||||
{
|
||||
return hook_type;
|
||||
}
|
||||
@ -93,7 +93,7 @@ protected:
|
||||
/**
|
||||
* The Hook Type
|
||||
*/
|
||||
HookType hook_type;
|
||||
int hook_type;
|
||||
|
||||
/**
|
||||
* True if the command is to be executed remotely
|
||||
|
@ -68,11 +68,12 @@ protected:
|
||||
{
|
||||
string str;
|
||||
const char * cstr;
|
||||
size_t retval;
|
||||
|
||||
str = os.str();
|
||||
cstr = str.c_str();
|
||||
|
||||
::write(nebula_mad_pipe, cstr, str.size());
|
||||
retval = ::write(nebula_mad_pipe, cstr, str.size());
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -203,7 +203,7 @@ public:
|
||||
|
||||
static string version()
|
||||
{
|
||||
return "OpenNebula 1.9.85";
|
||||
return "OpenNebula 2.0.0";
|
||||
};
|
||||
|
||||
void start();
|
||||
|
@ -68,7 +68,7 @@ protected:
|
||||
const string& cmd,
|
||||
const string& args,
|
||||
bool remote):
|
||||
Hook(name, cmd, args, Hook::UPDATE, remote){};
|
||||
Hook(name, cmd, args, Hook::UPDATE | Hook::ALLOCATE, remote){};
|
||||
|
||||
virtual ~VirtualMachineStateMapHook(){};
|
||||
|
||||
|
11
install.sh
11
install.sh
@ -602,7 +602,16 @@ MAN_FILES="share/man/oneauth.8.gz \
|
||||
share/man/oneimage.8.gz \
|
||||
share/man/oneuser.8.gz \
|
||||
share/man/onevm.8.gz \
|
||||
share/man/onevnet.8.gz"
|
||||
share/man/onevnet.8.gz \
|
||||
share/man/econe-describe-images.8.gz \
|
||||
share/man/econe-describe-instances.8.gz \
|
||||
share/man/econe-register.8.gz \
|
||||
share/man/econe-run-instances.8.gz \
|
||||
share/man/econe-terminate-instances.8.gz \
|
||||
share/man/econe-upload.8.gz \
|
||||
share/man/occi-compute.8.gz \
|
||||
share/man/occi-network.8.gz \
|
||||
share/man/occi-storage.8.gz"
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -35,7 +35,7 @@ VM_POLLING_INTERVAL = 600
|
||||
|
||||
#VM_DIR=/srv/cloud/one/var
|
||||
|
||||
SCRIPTS_REMOTE_DIR=/tmp/one
|
||||
SCRIPTS_REMOTE_DIR=/var/tmp/one
|
||||
|
||||
PORT=2633
|
||||
|
||||
|
BIN
share/man/econe-describe-images.8.gz
Normal file
BIN
share/man/econe-describe-images.8.gz
Normal file
Binary file not shown.
BIN
share/man/econe-describe-instances.8.gz
Normal file
BIN
share/man/econe-describe-instances.8.gz
Normal file
Binary file not shown.
BIN
share/man/econe-register.8.gz
Normal file
BIN
share/man/econe-register.8.gz
Normal file
Binary file not shown.
BIN
share/man/econe-run-instances.8.gz
Normal file
BIN
share/man/econe-run-instances.8.gz
Normal file
Binary file not shown.
BIN
share/man/econe-terminate-instances.8.gz
Normal file
BIN
share/man/econe-terminate-instances.8.gz
Normal file
Binary file not shown.
BIN
share/man/econe-upload.8.gz
Normal file
BIN
share/man/econe-upload.8.gz
Normal file
Binary file not shown.
BIN
share/man/occi-compute.8.gz
Normal file
BIN
share/man/occi-compute.8.gz
Normal file
Binary file not shown.
BIN
share/man/occi-network.8.gz
Normal file
BIN
share/man/occi-network.8.gz
Normal file
Binary file not shown.
BIN
share/man/occi-storage.8.gz
Normal file
BIN
share/man/occi-storage.8.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -45,6 +45,12 @@ COMMANDS_HELP=<<-EOT
|
||||
Usage:
|
||||
oneauth <command> [<parameters>]
|
||||
|
||||
|
||||
Description:
|
||||
|
||||
This command contains a set of utilities to manage authorization module.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* quota set (sets quota for a user)
|
||||
|
@ -31,7 +31,7 @@ Options:
|
||||
EOT
|
||||
|
||||
ONE_VERSION=<<-EOT
|
||||
OpenNebula 1.9.85
|
||||
OpenNebula 2.0.0
|
||||
Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -88,6 +88,14 @@ end
|
||||
class OneUPParse < CommandParse
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
|
||||
Description:
|
||||
|
||||
This command enables the OpenNebula administrator to manage clusters. The
|
||||
administrator can create, delete, as well as add and remove hosts from them.
|
||||
Any user can list available clusters.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* create (Creates a new user)
|
||||
|
@ -166,6 +166,14 @@ end
|
||||
class OnehostParse < CommandParse
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
|
||||
Description:
|
||||
|
||||
This command enables the user to manage hosts in the Open Nebula server. It
|
||||
provides functionality to allocate, get information and delete a particular
|
||||
host or to list all the available hosts.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* create (Adds a new machine to the pool)
|
||||
@ -191,6 +199,20 @@ Commands:
|
||||
|
||||
* sync (synchronizes probes with remote hosts)
|
||||
onehost sync
|
||||
|
||||
|
||||
Information Columns:
|
||||
|
||||
* HID Host ID
|
||||
* NAME Host name
|
||||
* RVM Number of running VMs
|
||||
* TCPU Total CPU (percentage)
|
||||
* FCPU Free CPU (percentage)
|
||||
* ACPU Available CPU (not allocated by VMs)
|
||||
* TMEM Total memory
|
||||
* FMEM Free memory
|
||||
* STAT Host status
|
||||
|
||||
|
||||
EOT
|
||||
|
||||
|
@ -199,6 +199,12 @@ end
|
||||
class OneImageParse < CommandParse
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
|
||||
Description:
|
||||
|
||||
This command enables the user to manage images.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* register (Registers an image, copying it to the repository if it applies)
|
||||
|
@ -92,6 +92,16 @@ end
|
||||
class OneUPParse < CommandParse
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
|
||||
Description:
|
||||
|
||||
This command enables the OpenNebula administrator to manage users, adding,
|
||||
listing and deleting them.
|
||||
|
||||
The create and passwd commands accept the [-r, –read-file] option. Use this
|
||||
option to store the contents of a file (without hashing it) as the password.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* create (Creates a new user)
|
||||
@ -106,6 +116,15 @@ Commands:
|
||||
* passwd (Changes the given user's password)
|
||||
oneuser passwd <id> password
|
||||
|
||||
|
||||
Information Columns:
|
||||
|
||||
* UID User ID
|
||||
* NAME Name of the user
|
||||
* PASSWORD SHA1 encrypted password
|
||||
* ENABLE Whether the user is enabled or not
|
||||
|
||||
|
||||
EOT
|
||||
|
||||
def text_commands
|
||||
|
@ -307,6 +307,14 @@ end
|
||||
class OnevmParse < CommandParse
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
|
||||
Description:
|
||||
|
||||
This command enables the user to manage virtual machines in the ONE server.
|
||||
The user can allocate, deploy, migrate, suspend, resume and shutdown a virtual
|
||||
machine with the functionality present in onevm.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* create (Submits a new virtual machine, adding it to the ONE VM pool)
|
||||
@ -363,7 +371,7 @@ Commands:
|
||||
a, all --> all the known VMs
|
||||
m, mine --> the VMs belonging to the user in ONE_AUTH
|
||||
uid --> VMs of the user identified by this uid
|
||||
user--> VMs of the user identified by the username
|
||||
user --> VMs of the user identified by the username
|
||||
|
||||
* show (Gets information about a specific VM)
|
||||
onevm show <vm_id>
|
||||
@ -376,6 +384,35 @@ Commands:
|
||||
|
||||
if no vm_id is provided it will list history for all known VMs
|
||||
|
||||
|
||||
Information Columns:
|
||||
|
||||
* ID ONE VM identifier
|
||||
* USER Username of the VM owner
|
||||
* NAME Name of the ONE
|
||||
* STAT Status of the VM
|
||||
* CPU CPU percentage used by the VM
|
||||
* MEM Memory used by the VM
|
||||
* HOSTNAME Host where the VM is being or was run
|
||||
* TIME Time since the submission of the VM (days hours:minutes:seconds)
|
||||
|
||||
|
||||
VM States:
|
||||
|
||||
* pend pending
|
||||
* hold VM on hold (not runnable)
|
||||
* stop stopped
|
||||
* susp suspended
|
||||
* done finished
|
||||
* prol prolog
|
||||
* boot booting
|
||||
* runn running
|
||||
* migr migrating
|
||||
* save saving the VM to disk
|
||||
* epil epilog
|
||||
* shut shutting down
|
||||
* fail failed
|
||||
|
||||
EOT
|
||||
|
||||
def text_commands
|
||||
|
@ -137,6 +137,14 @@ end
|
||||
class OneVNParse < CommandParse
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
|
||||
Description:
|
||||
|
||||
This command enables the user to manage virtual networks in the OpenNebula
|
||||
server. It provides functionality to create, get information and delete a
|
||||
particular network or to list available and used IP's.
|
||||
|
||||
|
||||
Commands:
|
||||
|
||||
* create (Creates a new virtual network)
|
||||
@ -159,11 +167,21 @@ Commands:
|
||||
* list (Lists virtual networks in the pool)
|
||||
onevnet list <filter_flag>
|
||||
where filter_flag can be
|
||||
a, all --> all the known VNs
|
||||
m, mine --> the VNs belonging to the user in ONE_AUTH
|
||||
and all the Public VNs
|
||||
uid --> VNs of the user identified by this uid
|
||||
user --> VNs of the user identified by the username
|
||||
a, all : all the known VNs
|
||||
m, mine : the VNs belonging to the user in ONE_AUTH
|
||||
and all the Public VNs
|
||||
uid : VNs of the user identified by this uid
|
||||
user : VNs of the user identified by the username
|
||||
|
||||
|
||||
Information columns:
|
||||
|
||||
* NID Network ID
|
||||
* NAME Name of the virtual network
|
||||
* TYPE Type of virtual network (0=ranged, 1=fixed)
|
||||
* BRIDGE Bridge associated to the virtual network
|
||||
* LEASES Number of leases used from this virtual network
|
||||
|
||||
EOT
|
||||
|
||||
def text_commands
|
||||
|
@ -135,4 +135,15 @@ module CloudCLI
|
||||
def cmd_name
|
||||
File.basename($0)
|
||||
end
|
||||
|
||||
def version_text
|
||||
version=<<EOT
|
||||
OpenNebula 2.0.0
|
||||
Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain
|
||||
a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
EOT
|
||||
end
|
||||
end
|
||||
|
@ -28,30 +28,28 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
-----------
|
||||
econe-describe-images
|
||||
econe-describe-images
|
||||
|
||||
List and describe previously uploaded images of a user to be
|
||||
used with an OpenNebula Cloud.
|
||||
List and describe previously uploaded images of a user to be
|
||||
used with an OpenNebula Cloud.
|
||||
|
||||
** Usage
|
||||
--------
|
||||
Usage:
|
||||
econe-describe-images [OPTIONS]
|
||||
|
||||
--help, -h:
|
||||
Options:
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--access-key <id>, -K <id>:
|
||||
--access-key <id>, -K <id>
|
||||
The username of the user
|
||||
|
||||
--secret-key <key>, -S <key>:
|
||||
--secret-key <key>, -S <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -U <url>:
|
||||
--url <url>, -U <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--headers, -H:
|
||||
--headers, -H
|
||||
Display column headers
|
||||
|
||||
EOT
|
||||
@ -65,6 +63,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -83,6 +82,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--access-key'
|
||||
access = arg
|
||||
when '--secret-key'
|
||||
|
@ -27,29 +27,28 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
-----------
|
||||
econe-describe-instances
|
||||
|
||||
List and describe running instances
|
||||
econe-describe-instances
|
||||
|
||||
** Usage
|
||||
--------
|
||||
List and describe running instances
|
||||
|
||||
Usage:
|
||||
econe-describe-instances [OPTIONS]
|
||||
|
||||
Options:
|
||||
|
||||
--help, -h:
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--access-key <id>, -K <id>:
|
||||
--access-key <id>, -K <id>
|
||||
The username of the user
|
||||
|
||||
--secret-key <key>, -S <key>:
|
||||
--secret-key <key>, -S <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -U <url>:
|
||||
--url <url>, -U <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--headers, -H:
|
||||
--headers, -H
|
||||
Display column headers
|
||||
|
||||
EOT
|
||||
@ -62,6 +61,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -80,6 +80,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--access-key'
|
||||
access = arg
|
||||
when '--secret-key'
|
||||
|
@ -27,34 +27,33 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
-----------
|
||||
econe-register
|
||||
|
||||
Register a previously uploaded image for use with an
|
||||
OpenNebula Cloud.
|
||||
econe-register
|
||||
|
||||
** Usage
|
||||
--------
|
||||
Register a previously uploaded image for use with an
|
||||
OpenNebula Cloud.
|
||||
|
||||
Usage:
|
||||
econe-register [OPTIONS] IMAGE-ID
|
||||
|
||||
--help, -h:
|
||||
Options:
|
||||
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--access-key <id>, -K <id>:
|
||||
--access-key <id>, -K <id>
|
||||
The username of the user
|
||||
|
||||
--secret-key <key>, -S <key>:
|
||||
--secret-key <key>, -S <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -U <url>:
|
||||
--url <url>, -U <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--headers, -H:
|
||||
--headers, -H
|
||||
Display column headers
|
||||
|
||||
IMAGE-ID: The image identification as returned by
|
||||
the econe-upload command
|
||||
IMAGE-ID: The image identification as returned by
|
||||
the econe-upload command
|
||||
|
||||
EOT
|
||||
|
||||
@ -66,6 +65,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -84,6 +84,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--access-key'
|
||||
access = arg
|
||||
when '--secret-key'
|
||||
|
@ -28,40 +28,39 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
-----------
|
||||
econe-run-instances
|
||||
|
||||
Runs an instance of a particular image
|
||||
econe-run-instances
|
||||
|
||||
** Usage
|
||||
--------
|
||||
Runs an instance of a particular image
|
||||
|
||||
Usage:
|
||||
econe-run-instances [OPTIONS] IMAGE-ID
|
||||
|
||||
--help, -h:
|
||||
Options:
|
||||
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--access-key <id>, -K <id>:
|
||||
--access-key <id>, -K <id>
|
||||
The username of the user
|
||||
|
||||
--secret-key <key>, -S <key>:
|
||||
--secret-key <key>, -S <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -U <url>:
|
||||
--url <url>, -U <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--type <type>, -t <type>:
|
||||
--type <type>, -t <type>
|
||||
OpenNebula template in which is based this instance
|
||||
|
||||
-–user-data, -d:
|
||||
--user-data, -d
|
||||
Specifies Base64-encoded MIME user data to be made
|
||||
available to the instance
|
||||
|
||||
--headers, -H:
|
||||
--headers, -H
|
||||
Display column headers
|
||||
|
||||
IMAGE-ID: The image identification as returned by
|
||||
the econe-upload command
|
||||
IMAGE-ID: The image identification as returned by
|
||||
the econe-upload command
|
||||
|
||||
EOT
|
||||
|
||||
@ -73,6 +72,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -95,6 +95,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--access-key'
|
||||
access = arg
|
||||
when '--secret-key'
|
||||
|
@ -28,30 +28,29 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
-----------
|
||||
econe-terminate-instances
|
||||
|
||||
Terminate the selected running instance
|
||||
econe-terminate-instances
|
||||
|
||||
** Usage
|
||||
--------
|
||||
Terminate the selected running instance
|
||||
|
||||
Usage:
|
||||
econe-register [OPTIONS] INSTANCE-ID
|
||||
|
||||
--help, -h:
|
||||
Options:
|
||||
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--access-key <id>, -K <id>:
|
||||
--access-key <id>, -K <id>
|
||||
The username of the user
|
||||
|
||||
--secret-key <key>, -S <key>:
|
||||
--secret-key <key>, -S <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -U <url>:
|
||||
--url <url>, -U <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
INSTANCE-ID: The instance identification as returned by
|
||||
the econe-run-instances command
|
||||
INSTANCE-ID: The instance identification as returned by
|
||||
the econe-run-instances command
|
||||
|
||||
EOT
|
||||
|
||||
@ -63,6 +62,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-U',GetoptLong::REQUIRED_ARGUMENT]
|
||||
@ -79,6 +79,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--access-key'
|
||||
access = arg
|
||||
when '--secret-key'
|
||||
|
@ -27,33 +27,32 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
-----------
|
||||
econe-upload
|
||||
|
||||
Uploads an image for use with an OpenNebula Cloud. This image should
|
||||
be later register with econe-register using the returned ImageId
|
||||
econe-upload
|
||||
|
||||
** Usage
|
||||
--------
|
||||
Uploads an image for use with an OpenNebula Cloud. This image should
|
||||
be later register with econe-register using the returned ImageId
|
||||
|
||||
Usage:
|
||||
econe-upload [OPTIONS] IMAGE-PATH
|
||||
|
||||
--help, -h:
|
||||
Options:
|
||||
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--access-key <id>, -K <id>:
|
||||
--access-key <id>, -K <id>
|
||||
The username of the user
|
||||
|
||||
--secret-key <key>, -S <key>:
|
||||
--secret-key <key>, -S <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -U <url>:
|
||||
--url <url>, -U <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--multipart, -M:
|
||||
--multipart, -M
|
||||
Use 'multipart-post' library instead of Curb/Curl
|
||||
|
||||
IMAGE-PATH: Path to the image to upload
|
||||
IMAGE-PATH: Path to the image to upload
|
||||
|
||||
EOT
|
||||
|
||||
@ -65,6 +64,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -83,6 +83,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--access-key'
|
||||
access = arg
|
||||
when '--secret-key'
|
||||
|
@ -29,51 +29,48 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
occi-compute
|
||||
occi-compute - Manages compute resources
|
||||
|
||||
Manages compute resources
|
||||
Usage:
|
||||
occi-compute <COMMAND> [OPTIONS] [ARGUMENTS]
|
||||
|
||||
** Usage
|
||||
occi-compute <COMMAND> [OPTIONS] [ARGUMENTS]
|
||||
Commands:
|
||||
|
||||
COMMANDS
|
||||
|
||||
create <occi xml file>
|
||||
* create <occi xml file>
|
||||
creates a new compute resource described by the provided
|
||||
<occi xml file>
|
||||
|
||||
list
|
||||
* list
|
||||
lists available compute resources
|
||||
|
||||
show <compute id>
|
||||
* show <compute id>
|
||||
retrieves the OCCI XML representation of the compute resource
|
||||
identified by <compute id>
|
||||
|
||||
update <occi xml file>
|
||||
* update <occi xml file>
|
||||
updates the representation of the compute resource represented by the
|
||||
provided <occi xml file>
|
||||
|
||||
delete <compute id>
|
||||
* delete <compute id>
|
||||
deletes the compute resource idenfitied by <compute id>
|
||||
|
||||
|
||||
OPTIONS
|
||||
Options:
|
||||
|
||||
--help, -h:
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--username <id>, -U <id>:
|
||||
--username <id>, -U <id>
|
||||
The username of the user
|
||||
|
||||
--password <key>, -P <key>:
|
||||
--password <key>, -P <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -R <url>:
|
||||
--url <url>, -R <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--timeout <seconds>, -T <seconds>
|
||||
Sets a timeout for the http connection
|
||||
Sets a timeout for the http connection
|
||||
|
||||
--debug, -D
|
||||
Enables verbosity
|
||||
@ -88,6 +85,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--username', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--password', '-P',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-R',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -108,6 +106,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--username'
|
||||
username = arg
|
||||
when '--password'
|
||||
|
@ -29,15 +29,12 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
occi-network
|
||||
occi-network - Manages virtual networks
|
||||
|
||||
Manages virtual networks
|
||||
Usage:
|
||||
occi-network <COMMAND> [OPTIONS] [ARGUMENTS]
|
||||
|
||||
** Usage
|
||||
occi-network <COMMAND> [OPTIONS] [ARGUMENTS]
|
||||
|
||||
COMMANDS
|
||||
Commands:
|
||||
|
||||
create <occi xml file>
|
||||
creates a new virtual network described by the provided
|
||||
@ -55,18 +52,18 @@ delete <network id>
|
||||
|
||||
|
||||
|
||||
OPTIONS
|
||||
Options:
|
||||
|
||||
--help, -h:
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--username <id>, -U <id>:
|
||||
--username <id>, -U <id>
|
||||
The username of the user
|
||||
|
||||
--password <key>, -P <key>:
|
||||
--password <key>, -P <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -R <url>:
|
||||
--url <url>, -R <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--timeout <seconds>, -T <seconds>
|
||||
@ -75,7 +72,7 @@ OPTIONS
|
||||
--debug, -D
|
||||
Enables verbosity
|
||||
|
||||
--multipart, -M:
|
||||
--multipart, -M
|
||||
Use 'multipart-post' library instead of Curb/Curl
|
||||
|
||||
EOT
|
||||
@ -89,6 +86,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--username', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--password', '-P',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-R',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -109,6 +107,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--username'
|
||||
username = arg
|
||||
when '--password'
|
||||
|
@ -29,15 +29,12 @@ $: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
||||
COMMANDS_HELP=<<-EOT
|
||||
** Synopsis
|
||||
occi-storage
|
||||
occi-storage - Manages OCCI storage resource
|
||||
|
||||
Manages OCCI storage resource
|
||||
Usage:
|
||||
occi-storage <COMMAND> [OPTIONS] [PARAMETERS]
|
||||
|
||||
** Usage
|
||||
occi-storage <COMMAND> [OPTIONS] [PARAMETERS]
|
||||
|
||||
COMMANDS
|
||||
Commands:
|
||||
|
||||
create <occi xml file>
|
||||
creates a new storage resource described by the provided
|
||||
@ -54,17 +51,18 @@ delete <storage id>
|
||||
deletes the storage resource idenfitied by <storage id>
|
||||
|
||||
|
||||
OPTIONS
|
||||
--help, -h:
|
||||
Options:
|
||||
|
||||
--help, -h
|
||||
Show help
|
||||
|
||||
--username <id>, -U <id>:
|
||||
--username <id>, -U <id>
|
||||
The username of the user
|
||||
|
||||
--password <key>, -P <key>:
|
||||
--password <key>, -P <key>
|
||||
The password of the user
|
||||
|
||||
--url <url>, -R <url>:
|
||||
--url <url>, -R <url>
|
||||
Set url as the web service url to use
|
||||
|
||||
--timeout <seconds>, -T <seconds>
|
||||
@ -73,7 +71,7 @@ OPTIONS
|
||||
--debug, -D
|
||||
Enables verbosity
|
||||
|
||||
--multipart, -M:
|
||||
--multipart, -M
|
||||
Use 'multipart-post' library instead of Curb/Curl
|
||||
|
||||
EOT
|
||||
@ -87,6 +85,7 @@ include CloudCLI
|
||||
|
||||
opts = GetoptLong.new(
|
||||
['--help', '-h',GetoptLong::NO_ARGUMENT],
|
||||
['--version', '-v',GetoptLong::NO_ARGUMENT],
|
||||
['--username', '-U',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--password', '-P',GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--url', '-R',GetoptLong::REQUIRED_ARGUMENT],
|
||||
@ -109,6 +108,9 @@ begin
|
||||
when '--help'
|
||||
puts COMMANDS_HELP
|
||||
return
|
||||
when '--version'
|
||||
puts CloudCLI.version_text
|
||||
exit 0
|
||||
when '--username'
|
||||
username = arg
|
||||
when '--password'
|
||||
|
42
src/cloud/occi/etc/templates/common.erb
Normal file
42
src/cloud/occi/etc/templates/common.erb
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# This template is processed by the OCCI Server to include specific data for the
|
||||
# instance, you should not need to modify the <% ... %> compounds.
|
||||
# You can add common attributes for your cloud templates (e.g. OS)
|
||||
#
|
||||
|
||||
NAME = "<%= @vm_info['NAME'] %>"
|
||||
|
||||
<% @vm_info.each('DISK') do |disk| %>
|
||||
<% if disk.attr('STORAGE','href') %>
|
||||
DISK = [ IMAGE_ID = <%= disk.attr('STORAGE','href').split('/').last %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% @vm_info.each('NIC') do |nic| %>
|
||||
<% if nic.attr('NETWORK','href') %>
|
||||
NIC = [ NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %>
|
||||
<% if nic['IP'] %>
|
||||
,IP = <%= nic['IP'] %>
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @vm_info.has_elements?('CONTEXT') %>
|
||||
CONTEXT = [
|
||||
<% first = true %>
|
||||
<% @vm_info.each('CONTEXT/*') do |cont| %>
|
||||
<% if cont.text %>
|
||||
<% if first %>
|
||||
<%= cont.name %> = "<%= cont.text %>"
|
||||
<% first = false %>
|
||||
<% else %>
|
||||
,<%= cont.name %> = "<%= cont.text %>"
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
|
||||
INSTANCE_TYPE = <%= @vm_info['INSTANCE_TYPE']%>
|
@ -1,34 +1,8 @@
|
||||
#
|
||||
# Virtual Machine Template generated for large instance types. Adjust this
|
||||
# by setting the desired capacity (CPU,MEMORY) or adding specific
|
||||
# attributes for your cloud (e.g. OS). You should not need to change the DISK
|
||||
# and NIC sections
|
||||
# attributes for your cloud (e.g. OS).
|
||||
#
|
||||
|
||||
CPU = 8
|
||||
MEMORY = 8192
|
||||
|
||||
NAME = "<%= @vm_info['NAME'] %>"
|
||||
|
||||
<% if @vm_info['DISK'] %>
|
||||
<% @vm_info.each('DISK') do |disk| %>
|
||||
<% if disk['STORAGE'] && disk.attr('STORAGE','href') %>
|
||||
DISK = [ IMAGE_ID = <%= disk.attr('STORAGE','href').split('/').last %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @vm_info['NIC'] %>
|
||||
<% @vm_info.each('NIC') do |nic| %>
|
||||
<% if nic['NETWORK'] && nic.attr('NETWORK','href') %>
|
||||
NIC = [ NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %>
|
||||
<% if nic['IP'] %>
|
||||
,IP = <%= nic['IP'] %>
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
INSTANCE_TYPE = <%= @vm_info['INSTANCE_TYPE']%>
|
@ -1,35 +1,9 @@
|
||||
#
|
||||
# Virtual Machine Template generated for medium instance types. Adjust this
|
||||
# by setting the desired capacity (CPU,MEMORY) or adding specific
|
||||
# attributes for your cloud (e.g. OS). You should not need to change the DISK
|
||||
# and NIC sections
|
||||
# attributes for your cloud (e.g. OS).
|
||||
#
|
||||
|
||||
CPU = 4
|
||||
MEMORY = 4096
|
||||
|
||||
NAME = "<%= @vm_info['NAME'] %>"
|
||||
|
||||
<% if @vm_info['DISK'] %>
|
||||
<% @vm_info.each('DISK') do |disk| %>
|
||||
<% if disk['STORAGE'] && disk.attr('STORAGE','href') %>
|
||||
DISK = [ IMAGE_ID = <%= disk.attr('STORAGE','href').split('/').last %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @vm_info['NIC'] %>
|
||||
<% @vm_info.each('NIC') do |nic| %>
|
||||
<% if nic['NETWORK'] && nic.attr('NETWORK','href') %>
|
||||
NIC = [ NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %>
|
||||
<% if nic['IP'] %>
|
||||
,IP = <%= nic['IP'] %>
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
INSTANCE_TYPE = <%= @vm_info['INSTANCE_TYPE']%>
|
||||
|
||||
|
@ -1,35 +1,9 @@
|
||||
#
|
||||
# Virtual Machine Template generated for small instance types. Adjust this
|
||||
# by setting the desired capacity (CPU,MEMORY) or adding specific
|
||||
# attributes for your cloud (e.g. OS). You should not need to change the DISK
|
||||
# and NIC sections
|
||||
# attributes for your cloud (e.g. OS).
|
||||
#
|
||||
|
||||
CPU = 1
|
||||
MEMORY = 1024
|
||||
|
||||
NAME = "<%= @vm_info['NAME'] %>"
|
||||
|
||||
<% if @vm_info['DISK'] %>
|
||||
<% @vm_info.each('DISK') do |disk| %>
|
||||
<% if disk['STORAGE'] && disk.attr('STORAGE','href') %>
|
||||
DISK = [ IMAGE_ID = <%= disk.attr('STORAGE','href').split('/').last %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @vm_info['NIC'] %>
|
||||
<% @vm_info.each('NIC') do |nic| %>
|
||||
<% if nic['NETWORK'] && nic.attr('NETWORK','href') %>
|
||||
NIC = [ NETWORK_ID = <%= nic.attr('NETWORK','href').split('/').last %>
|
||||
<% if nic['IP'] %>
|
||||
,IP = <%= nic['IP'] %>
|
||||
<% end %>
|
||||
]
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
INSTANCE_TYPE = <%= @vm_info['INSTANCE_TYPE']%>
|
||||
|
||||
|
@ -27,17 +27,14 @@ class VirtualMachineOCCI < VirtualMachine
|
||||
<INSTANCE_TYPE><%= self['TEMPLATE/INSTANCE_TYPE'] %></INSTANCE_TYPE>
|
||||
<% end %>
|
||||
<STATE><%= self.state_str %></STATE>
|
||||
<% if self['TEMPLATE/DISK'] %>
|
||||
<% self.each('TEMPLATE/DISK') do |disk| %>
|
||||
<% self.each('TEMPLATE/DISK') do |disk| %>
|
||||
<DISK>
|
||||
<STORAGE href="<%= base_url %>/storage/<%= disk['IMAGE_ID'] %>" name="<%= disk['IMAGE'] %>"/>
|
||||
<TYPE><%= disk['TYPE'] %></TYPE>
|
||||
<TARGET><%= disk['TARGET'] %></TARGET>
|
||||
</DISK>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if self['TEMPLATE/NIC'] %>
|
||||
<% self.each('TEMPLATE/NIC') do |nic| %>
|
||||
<% self.each('TEMPLATE/NIC') do |nic| %>
|
||||
<NIC>
|
||||
<NETWORK href="<%= base_url %>/network/<%= nic['NETWORK_ID'] %>" name="<%= nic['NETWORK'] %>"/>
|
||||
<% if nic['IP'] %>
|
||||
@ -47,32 +44,41 @@ class VirtualMachineOCCI < VirtualMachine
|
||||
<MAC><%= nic['MAC'] %></MAC>
|
||||
<% end %>
|
||||
</NIC>
|
||||
<% end %>
|
||||
<% if self['TEMPLATE/CONTEXT'] %>
|
||||
<CONTEXT>
|
||||
<% self.each('TEMPLATE/CONTEXT/*') do |cont| %>
|
||||
<% if cont.text %>
|
||||
<<%= cont.name %>><%= cont.text %></<%= cont.name %>>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</CONTEXT>
|
||||
<% end %>
|
||||
</COMPUTE>
|
||||
}
|
||||
|
||||
|
||||
# Class constructor
|
||||
def initialize(xml, client, xml_info = nil, types=nil, base=nil)
|
||||
def initialize(xml, client, xml_info=nil, types=nil, base=nil)
|
||||
super(xml, client)
|
||||
@vm_info = nil
|
||||
@template = nil
|
||||
|
||||
@common_template = base + '/common.erb' if base
|
||||
|
||||
if xml_info != nil
|
||||
xmldoc = XMLElement.build_xml(xml_info, 'COMPUTE')
|
||||
@vm_info = XMLElement.new(xmldoc) if xmldoc != nil
|
||||
end
|
||||
|
||||
|
||||
if @vm_info != nil
|
||||
itype = @vm_info['INSTANCE_TYPE']
|
||||
|
||||
|
||||
if itype != nil and types[itype] != nil
|
||||
@template = base + "/#{types[itype]['TEMPLATE']}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def mk_action(action_str)
|
||||
case action_str.downcase
|
||||
when "stopped"
|
||||
@ -92,31 +98,31 @@ class VirtualMachineOCCI < VirtualMachine
|
||||
error = OpenNebula::Error.new(error_msg)
|
||||
return error
|
||||
end
|
||||
|
||||
|
||||
return rc
|
||||
end
|
||||
|
||||
|
||||
def to_one_template()
|
||||
if @vm_info == nil
|
||||
error_msg = "Missing COMPUTE section in the XML body"
|
||||
return OpenNebula::Error.new(error_msg), 400
|
||||
end
|
||||
|
||||
|
||||
if @template == nil
|
||||
return OpenNebula::Error.new("Bad instance type"), 500
|
||||
end
|
||||
|
||||
|
||||
begin
|
||||
template = ERB.new(File.read(@template))
|
||||
template_text = template.result(binding)
|
||||
template = ERB.new(File.read(@common_template)).result(binding)
|
||||
template << ERB.new(File.read(@template)).result(binding)
|
||||
rescue Exception => e
|
||||
error = OpenNebula::Error.new(e.message)
|
||||
return error
|
||||
end
|
||||
|
||||
return template_text
|
||||
|
||||
return template
|
||||
end
|
||||
|
||||
|
||||
# Creates the VMI representation of a Virtual Machine
|
||||
def to_occi(base_url)
|
||||
begin
|
||||
@ -127,6 +133,7 @@ class VirtualMachineOCCI < VirtualMachine
|
||||
return error
|
||||
end
|
||||
|
||||
|
||||
return occi_vm_text.gsub(/\n\s*/,'')
|
||||
end
|
||||
end
|
||||
|
@ -39,6 +39,7 @@ Mad::~Mad()
|
||||
char buf[]="FINALIZE\n";
|
||||
int status;
|
||||
pid_t rp;
|
||||
size_t retval;
|
||||
|
||||
if ( pid==-1)
|
||||
{
|
||||
@ -46,7 +47,7 @@ Mad::~Mad()
|
||||
}
|
||||
|
||||
// Finish the driver
|
||||
::write(nebula_mad_pipe, buf, strlen(buf));
|
||||
retval = ::write(nebula_mad_pipe, buf, strlen(buf));
|
||||
|
||||
close(mad_nebula_pipe);
|
||||
close(nebula_mad_pipe);
|
||||
@ -67,6 +68,7 @@ int Mad::start()
|
||||
{
|
||||
int ne_mad_pipe[2];
|
||||
int mad_ne_pipe[2];
|
||||
size_t retval;
|
||||
|
||||
map<string,string>::iterator it;
|
||||
|
||||
@ -189,7 +191,7 @@ int Mad::start()
|
||||
fcntl(nebula_mad_pipe, F_SETFD, FD_CLOEXEC);
|
||||
fcntl(mad_nebula_pipe, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
::write(nebula_mad_pipe, buf, strlen(buf));
|
||||
retval = ::write(nebula_mad_pipe, buf, strlen(buf));
|
||||
|
||||
do
|
||||
{
|
||||
@ -289,10 +291,11 @@ int Mad::reload()
|
||||
int status;
|
||||
int rc;
|
||||
pid_t rp;
|
||||
size_t retval;
|
||||
|
||||
// Finish the driver
|
||||
|
||||
::write(nebula_mad_pipe, buf, strlen(buf));
|
||||
retval = ::write(nebula_mad_pipe, buf, strlen(buf));
|
||||
|
||||
close(nebula_mad_pipe);
|
||||
close(mad_nebula_pipe);
|
||||
|
@ -147,6 +147,7 @@ int MadManager::add(Mad *mad)
|
||||
{
|
||||
char buf = 'A';
|
||||
int rc;
|
||||
size_t retval;
|
||||
|
||||
if ( mad == 0 )
|
||||
{
|
||||
@ -166,7 +167,7 @@ int MadManager::add(Mad *mad)
|
||||
|
||||
mads.push_back(mad);
|
||||
|
||||
write(pipe_w, &buf, sizeof(char));
|
||||
retval = write(pipe_w, &buf, sizeof(char));
|
||||
|
||||
unlock();
|
||||
|
||||
@ -215,6 +216,7 @@ void MadManager::listener()
|
||||
int greater;
|
||||
unsigned int i,j;
|
||||
int rc,mrc;
|
||||
size_t retval;
|
||||
|
||||
char c;
|
||||
|
||||
@ -262,7 +264,7 @@ void MadManager::listener()
|
||||
{
|
||||
if ( fd == pipe_r ) // Driver added, update the fd vector
|
||||
{
|
||||
read(fd, (void *) &c, sizeof(char));
|
||||
retval = read(fd, (void *) &c, sizeof(char));
|
||||
|
||||
lock();
|
||||
|
||||
|
343
src/oca/java/test/oned.conf
Normal file
343
src/oca/java/test/oned.conf
Normal file
@ -0,0 +1,343 @@
|
||||
#*******************************************************************************
|
||||
# OpenNebula Configuration file
|
||||
#*******************************************************************************
|
||||
|
||||
#*******************************************************************************
|
||||
# Daemon configuration attributes
|
||||
#-------------------------------------------------------------------------------
|
||||
# HOST_MONITORING_INTERVAL: Time in seconds between host monitorization
|
||||
#
|
||||
# VM_POLLING_INTERVAL: Time in seconds between virtual machine monitorization.
|
||||
# (use 0 to disable VM monitoring).
|
||||
#
|
||||
# VM_DIR: Remote path to store the VM images, it should be shared between all
|
||||
# the cluster nodes to perform live migrations. This variable is the default
|
||||
# for all the hosts in the cluster.
|
||||
#
|
||||
# PORT: Port where oned will listen for xmlrpc calls.
|
||||
#
|
||||
# DB: Configuration attributes for the database backend
|
||||
# backend : can be sqlite or mysql (default is sqlite)
|
||||
# server : (mysql) host name or an IP address for the MySQL server
|
||||
# user : (mysql) user's MySQL login ID
|
||||
# passwd : (mysql) the password for user
|
||||
# db_name : (mysql) the database name
|
||||
#
|
||||
# VNC_BASE_PORT: VNC ports for VMs can be automatically set to VNC_BASE_PORT +
|
||||
# VMID
|
||||
#
|
||||
# DEBUG_LEVEL: 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG
|
||||
#*******************************************************************************
|
||||
|
||||
HOST_MONITORING_INTERVAL = 600
|
||||
|
||||
VM_POLLING_INTERVAL = 600
|
||||
|
||||
#VM_DIR=/srv/cloud/one/var
|
||||
|
||||
SCRIPTS_REMOTE_DIR=/tmp/one
|
||||
|
||||
PORT=2666
|
||||
|
||||
DB = [ backend = "sqlite" ]
|
||||
|
||||
# Sample configuration for MySQL
|
||||
# DB = [ backend = "mysql",
|
||||
# server = "localhost",
|
||||
# user = "oneadmin",
|
||||
# passwd = "oneadmin",
|
||||
# db_name = "opennebula" ]
|
||||
|
||||
VNC_BASE_PORT = 5900
|
||||
|
||||
DEBUG_LEVEL=3
|
||||
|
||||
#*******************************************************************************
|
||||
# Physical Networks configuration
|
||||
#*******************************************************************************
|
||||
# NETWORK_SIZE: Here you can define the default size for the virtual networks
|
||||
#
|
||||
# MAC_PREFIX: Default MAC prefix to be used to create the auto-generated MAC
|
||||
# addresses is defined here (this can be overrided by the Virtual Network
|
||||
# template)
|
||||
#*******************************************************************************
|
||||
|
||||
NETWORK_SIZE = 254
|
||||
|
||||
MAC_PREFIX = "02:00"
|
||||
|
||||
#*******************************************************************************
|
||||
# Image Repository Configuration
|
||||
#*******************************************************************************
|
||||
# IMAGE_REPOSITORY_PATH: Define the path to the image repository, by default
|
||||
# is set to $ONE_LOCATION/var
|
||||
#
|
||||
# DEFAULT_IMAGE_TYPE: This can take values
|
||||
# OS Image file holding an operating system
|
||||
# CDROM Image file holding a CDROM
|
||||
# DATABLOCK Image file holding a datablock,
|
||||
# always created as an empty block
|
||||
# DEFAULT_DEVICE_PREFIX: This can be set to
|
||||
# hd IDE prefix
|
||||
# sd SCSI
|
||||
# xvd XEN Virtual Disk
|
||||
# vd KVM virtual disk
|
||||
#*******************************************************************************
|
||||
|
||||
#IMAGE_REPOSITORY_PATH = /srv/cloud/var/images
|
||||
DEFAULT_IMAGE_TYPE = "OS"
|
||||
DEFAULT_DEVICE_PREFIX = "hd"
|
||||
|
||||
#*******************************************************************************
|
||||
# Information Driver Configuration
|
||||
#*******************************************************************************
|
||||
# You can add more information managers with different configurations but make
|
||||
# sure it has different names.
|
||||
#
|
||||
# name : name for this information manager
|
||||
#
|
||||
# executable: path of the information driver executable, can be an
|
||||
# absolute path or relative to $ONE_LOCATION/lib/mads (or
|
||||
# /usr/lib/one/mads/ if OpenNebula was installed in /)
|
||||
#
|
||||
# arguments : for the driver executable, usually a probe configuration file,
|
||||
# can be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#*******************************************************************************
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# KVM Information Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [
|
||||
name = "im_kvm",
|
||||
executable = "one_im_ssh",
|
||||
arguments = "kvm" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# XEN Information Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#IM_MAD = [
|
||||
# name = "im_xen",
|
||||
# executable = "one_im_ssh",
|
||||
# arguments = "xen" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# EC2 Information Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#IM_MAD = [
|
||||
# name = "im_ec2",
|
||||
# executable = "one_im_ec2",
|
||||
# arguments = "im_ec2/im_ec2.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dummy Information Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [ name="im_dummy", executable="one_im_dummy"]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
# Virtualization Driver Configuration
|
||||
#*******************************************************************************
|
||||
# You can add more virtualization managers with different configurations but
|
||||
# make sure it has different names.
|
||||
#
|
||||
# name : name of the virtual machine manager driver
|
||||
#
|
||||
# executable: path of the virtualization driver executable, can be an
|
||||
# absolute path or relative to $ONE_LOCATION/lib/mads (or
|
||||
# /usr/lib/one/mads/ if OpenNebula was installed in /)
|
||||
#
|
||||
# arguments : for the driver executable
|
||||
#
|
||||
# default : default values and configuration parameters for the driver, can
|
||||
# be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#
|
||||
# type : driver type, supported drivers: xen, kvm, xml
|
||||
#*******************************************************************************
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# KVM Virtualization Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
VM_MAD = [
|
||||
name = "vmm_kvm",
|
||||
executable = "one_vmm_ssh",
|
||||
arguments = "kvm",
|
||||
default = "vmm_ssh/vmm_ssh_kvm.conf",
|
||||
type = "kvm" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# XEN Virtualization Driver Manager Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#VM_MAD = [
|
||||
# name = "vmm_xen",
|
||||
# executable = "one_vmm_ssh",
|
||||
# arguments = "xen",
|
||||
# default = "vmm_ssh/vmm_ssh_xen.conf",
|
||||
# type = "xen" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# EC2 Virtualization Driver Manager Configuration
|
||||
# arguments: default values for the EC2 driver, can be an absolute path or
|
||||
# relative to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was
|
||||
# installed in /).
|
||||
#-------------------------------------------------------------------------------
|
||||
#VM_MAD = [
|
||||
# name = "vmm_ec2",
|
||||
# executable = "one_vmm_ec2",
|
||||
# arguments = "vmm_ec2/vmm_ec2.conf",
|
||||
# type = "xml" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dummy Virtualization Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
VM_MAD = [ name="vmm_dummy", executable="one_vmm_dummy", type="xml" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
# Transfer Manager Driver Configuration
|
||||
#*******************************************************************************
|
||||
# You can add more transfer managers with different configurations but make
|
||||
# sure it has different names.
|
||||
# name : name for this transfer driver
|
||||
#
|
||||
# executable: path of the transfer driver executable, can be an
|
||||
# absolute path or relative to $ONE_LOCATION/lib/mads (or
|
||||
# /usr/lib/one/mads/ if OpenNebula was installed in /)
|
||||
#
|
||||
# arguments : for the driver executable, usually a commands configuration file
|
||||
# , can be an absolute path or relative to $ONE_LOCATION/etc (or
|
||||
# /etc/one/ if OpenNebula was installed in /)
|
||||
#*******************************************************************************
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# NFS Transfer Manager Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
TM_MAD = [
|
||||
name = "tm_nfs",
|
||||
executable = "one_tm",
|
||||
arguments = "tm_nfs/tm_nfs.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SSH Transfer Manager Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#TM_MAD = [
|
||||
# name = "tm_ssh",
|
||||
# executable = "one_tm",
|
||||
# arguments = "tm_ssh/tm_ssh.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dummy Transfer Manager Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
TM_MAD = [
|
||||
name = "tm_dummy",
|
||||
executable = "one_tm",
|
||||
arguments = "tm_dummy/tm_dummy.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# LVM Transfer Manager Driver Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#TM_MAD = [
|
||||
# name = "tm_lvm",
|
||||
# executable = "one_tm",
|
||||
# arguments = "tm_lvm/tm_lvm.conf" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
# Hook Manager Configuration
|
||||
#*******************************************************************************
|
||||
# The Driver (HM_MAD), used to execute the Hooks
|
||||
# executable: path of the hook driver executable, can be an
|
||||
# absolute path or relative to $ONE_LOCATION/lib/mads (or
|
||||
# /usr/lib/one/mads/ if OpenNebula was installed in /)
|
||||
#
|
||||
# arguments : for the driver executable, can be an absolute path or relative
|
||||
# to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was installed
|
||||
# in /)
|
||||
#
|
||||
# Virtual Machine Hooks (VM_HOOK) defined by:
|
||||
# name : for the hook, useful to track the hook (OPTIONAL)
|
||||
# on : when the hook should be executed,
|
||||
# - CREATE, when the VM is created (onevm create)
|
||||
# - RUNNING, after the VM is successfully booted
|
||||
# - SHUTDOWN, after the VM is shutdown
|
||||
# - STOP, after the VM is stopped (including VM image transfers)
|
||||
# - DONE, after the VM is deleted or shutdown
|
||||
# command : path can be absolute or relative to $ONE_LOCATION/share/hooks
|
||||
# case of self-contained installation or relative to
|
||||
# /usr/share/one/hooks in case of system-wide installation
|
||||
# arguments : for the hook. You can access to VM template variables with $
|
||||
# - $ATTR, the value of an attribute e.g. $NAME or $VMID
|
||||
# - $ATTR[VAR], the value of a vector e.g. $NIC[MAC]
|
||||
# - $ATTR[VAR, COND], same of previous but COND select between
|
||||
# multiple ATTRs e.g. $NIC[MAC, NETWORK="Public"]
|
||||
# remote : values,
|
||||
# - YES, The hook is executed in the host where the VM was
|
||||
# allocated
|
||||
# - NO, The hook is executed in the OpenNebula server (default)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
HM_MAD = [
|
||||
executable = "one_hm" ]
|
||||
|
||||
#-------------------------------- Image Hook -----------------------------------
|
||||
# This hook is used to handle image saving and overwriting when virtual machines
|
||||
# reach the DONE state after being shutdown.
|
||||
|
||||
VM_HOOK = [
|
||||
name = "image",
|
||||
on = "DONE",
|
||||
command = "image.rb",
|
||||
arguments = "$VMID" ]
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------- Hook Examples --------------------------------
|
||||
#VM_HOOK = [
|
||||
# name = "dhcp",
|
||||
# on = "create",
|
||||
# command = "/bin/echo",
|
||||
# arguments = "$NAME > /tmp/test.$VMID" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
#VM_HOOK = [
|
||||
# name = "ebtables",
|
||||
# on = "running",
|
||||
# command = "/usr/local/one/bin/set_net",
|
||||
# arguments = '$NIC[MAC, Network = "Private"]',
|
||||
# remote = "yes" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
#VM_HOOK = [
|
||||
# name = "mail",
|
||||
# on = "running",
|
||||
# command = "/usr/local/one/bin/send_mail",
|
||||
# arguments = "$VMID $NAME",
|
||||
# remote = "no" ]
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#*******************************************************************************
|
||||
# Auth Manager Configuration
|
||||
#*******************************************************************************
|
||||
# The Driver (AUTHM_MAD) that will be used to authenticate and authorize
|
||||
# OpenNebula requests. If not defined OpenNebula will use the built-in auth
|
||||
# policies
|
||||
# executable: path of the auth driver executable, can be an
|
||||
# absolute path or relative to $ONE_LOCATION/lib/mads (or
|
||||
# /usr/lib/one/mads/ if OpenNebula was installed in /)
|
||||
#
|
||||
# arguments : for the driver executable, can be an absolute path or relative
|
||||
# to $ONE_LOCATION/etc (or /etc/one/ if OpenNebula was installed
|
||||
# in /)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#AUTH_MAD = [
|
||||
# executable = "one_auth_mad" ]
|
||||
|
@ -5,13 +5,19 @@
|
||||
JUNIT_JAR="/usr/share/java/junit4.jar"
|
||||
ONEDB="$ONE_LOCATION/var/one.db"
|
||||
|
||||
PID=$$
|
||||
|
||||
oned -f &
|
||||
|
||||
oned
|
||||
sleep 4s;
|
||||
|
||||
java -cp ../lib/*:../jar/*:$JUNIT_JAR:. org.junit.runner.JUnitCore $1
|
||||
|
||||
pkill oned;
|
||||
CODE=$?
|
||||
|
||||
pkill -P $PID oned
|
||||
sleep 4s;
|
||||
pkill -9 oned;
|
||||
pkill -9 -P $PID oned
|
||||
rm $ONEDB
|
||||
|
||||
exit $CODE
|
@ -154,9 +154,7 @@ module OpenNebula
|
||||
#
|
||||
########################################################################
|
||||
def move(path, source)
|
||||
if source.nil? or path.nil?
|
||||
return OpenNebula::Error.new("copy Image: missing parameters.")
|
||||
elsif File.identical?(path,source)
|
||||
if source.nil? || path.nil? || File.identical?(path,source)
|
||||
return nil
|
||||
end
|
||||
|
||||
@ -217,23 +215,21 @@ module OpenNebula
|
||||
#
|
||||
########################################################################
|
||||
def remove(source)
|
||||
if File.exists?(source)
|
||||
if !File.exists?(source)
|
||||
return nil
|
||||
end
|
||||
|
||||
begin
|
||||
if File.directory?(source)
|
||||
begin
|
||||
FileUtils.rmdir(source)
|
||||
rescue Exception => e
|
||||
return OpenNebula::Error.new(e.message)
|
||||
end
|
||||
FileUtils.rmdir(source)
|
||||
else
|
||||
begin
|
||||
FileUtils.rm(source)
|
||||
rescue Exception => e
|
||||
return OpenNebula::Error.new(e.message)
|
||||
end
|
||||
FileUtils.rm(source)
|
||||
end
|
||||
rescue Exception => e
|
||||
return OpenNebula::Error.new(e.message)
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -8,7 +8,6 @@ module OpenNebula
|
||||
NOKOGIRI=false
|
||||
end
|
||||
|
||||
|
||||
###########################################################################
|
||||
# The XMLElement class provides an abstraction of the underlying
|
||||
# XML parser engine. It provides XML-related methods for the Pool and
|
||||
@ -112,6 +111,28 @@ module OpenNebula
|
||||
end
|
||||
end
|
||||
|
||||
def name
|
||||
@xml.name
|
||||
end
|
||||
|
||||
def text
|
||||
if NOKOGIRI
|
||||
@xml.content
|
||||
else
|
||||
@xml.text
|
||||
end
|
||||
end
|
||||
|
||||
def has_elements?(xpath_str)
|
||||
if NOKOGIRI
|
||||
element = @xml.xpath(xpath_str.to_s.upcase)
|
||||
return element != nil && element.children.size > 0
|
||||
else
|
||||
element = @xml.elements[xpath_str.to_s]
|
||||
return element != nil && element.has_elements?
|
||||
end
|
||||
end
|
||||
|
||||
def template_str(indent=true)
|
||||
template_like_str('TEMPLATE', indent)
|
||||
end
|
||||
@ -199,5 +220,3 @@ module OpenNebula
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
@ -24,11 +24,11 @@ module OpenNebula
|
||||
if user.id == 0
|
||||
user.name.should eql('oneadmin')
|
||||
user['PASSWORD'].should eql('f13a1234833436f71ab846572d251c0d40391e72')
|
||||
user['ENABLED'].should eql('True')
|
||||
user['ENABLED'].should eql('1')
|
||||
elsif user.id == 1
|
||||
user.name.should eql('dan')
|
||||
user['PASSWORD'].should eql('d22a12348334v33f71ba846572d25250d40701e72')
|
||||
user['ENABLED'].should eql('False')
|
||||
user['ENABLED'].should eql('0')
|
||||
end
|
||||
}
|
||||
end
|
||||
@ -53,11 +53,11 @@ module OpenNebula
|
||||
if user.id == 0
|
||||
user.name.should eql('oneadmin')
|
||||
user['PASSWORD'].should eql('f13a1234833436f71ab846572d251c0d40391e72')
|
||||
user['ENABLED'].should eql('True')
|
||||
user['ENABLED'].should eql('1')
|
||||
elsif user.id == 1
|
||||
user.name.should eql('dan')
|
||||
user['PASSWORD'].should eql('d22a12348334v33f71ba846572d25250d40701e72')
|
||||
user['ENABLED'].should eql('False')
|
||||
user['ENABLED'].should eql('0')
|
||||
end
|
||||
}
|
||||
end
|
||||
|
2
src/oca/ruby/test/fixtures/userpool.xml
vendored
2
src/oca/ruby/test/fixtures/userpool.xml
vendored
@ -3,7 +3,7 @@
|
||||
<ID>0</ID>
|
||||
<NAME>oneadmin</NAME>
|
||||
<PASSWORD>f13a1234833436f71ab846572d251c0d40391e72</PASSWORD>
|
||||
<ENABLED>0</ENABLED>
|
||||
<ENABLED>1</ENABLED>
|
||||
</USER>
|
||||
<USER>
|
||||
<ID>1</ID>
|
||||
|
@ -57,6 +57,7 @@ void RequestManager::VirtualMachinePoolInfo::execute(
|
||||
break;
|
||||
default:
|
||||
paramList.verifyEnd(4);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the parameters
|
||||
|
@ -149,14 +149,11 @@ error_vm_get_disk_id:
|
||||
|
||||
error_authenticate:
|
||||
oss.str(authenticate_error(method_name));
|
||||
goto error_common_lock;
|
||||
goto error_common;
|
||||
|
||||
error_authorize:
|
||||
oss.str(authorization_error(method_name, "MANAGE", "VM/IMAGE", rc, vm_id));
|
||||
goto error_common_lock;
|
||||
|
||||
error_common_lock:
|
||||
vm->unlock();
|
||||
goto error_common;
|
||||
|
||||
error_common:
|
||||
arrayData.push_back(xmlrpc_c::value_boolean(false));
|
||||
|
@ -55,5 +55,5 @@ http://*)
|
||||
;;
|
||||
esac
|
||||
|
||||
exec_and_log "chmod a+w $DST_PATH"
|
||||
exec_and_log "chmod a+rw $DST_PATH"
|
||||
|
||||
|
@ -171,7 +171,11 @@ void VirtualMachineManager::do_action(const string &action, void * arg)
|
||||
if ( arg == 0)
|
||||
{
|
||||
if ( action != ACTION_TIMER && action != ACTION_FINALIZE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
vid = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user