Merge branch 'master' of git.opennebula.org:one

This commit is contained in:
Tino Vazquez committed 2012-10-04 16:48:46 +02:00
commit f7b77ed139
87 files changed
+1618 -1169

No files matched your search

+2 -2
View File
@@ -274,12 +274,12 @@ public:
static string version()
{
return "OpenNebula 3.7.0";
return "OpenNebula 3.7.80";
};
static string db_version()
{
return "3.7.0";
return "3.7.80";
}
void start();
+42
View File
@@ -74,6 +74,7 @@ protected:
string gname; /**< name of the user's group */
string session; /**< Session from ONE XML-RPC API */
int req_id; /**< Request ID for log messages */
xmlrpc_c::value * retval; /**< Return value from libxmlrpc-c */
@@ -311,6 +312,47 @@ protected:
RequestAttributes& att,
PoolObjectAuth& perms,
string& name);
/**
* Logs the method invocation, including the arguments
*
* @param att the specific request attributes
* @param paramList list of XML parameters
*/
virtual void log_method_invoked(
const RequestAttributes& att,
const xmlrpc_c::paramList& paramList);
/**
* Logs the method result, including the output data or error message
*
* @param att the specific request attributes
*/
virtual void log_result(
const RequestAttributes& att);
/**
* Formats and adds a xmlrpc_c::value input parameter to oss.
*
* @param v value to format
* @param oss stream to write v
* @param index parameter index
*/
virtual void log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index);
/**
* Formats and adds a xmlrpc_c::value to oss.
*
* @param v value to format
* @param oss stream to write v
*/
virtual void log_xmlrpc_value(
const xmlrpc_c::value& v,
ostringstream& oss);
private:
/* ------------- Functions to manage user and group quotas -------------- */
+5
View File
@@ -304,6 +304,11 @@ public:
int& id,
string& error_str,
RequestAttributes& att);
void log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index);
};
/* ------------------------------------------------------------------------- */
+67
View File
@@ -0,0 +1,67 @@
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2012, 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 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
#ifndef REQUEST_MANAGER_SYSTEM_H
#define REQUEST_MANAGER_SYSTEM_H
#include "Request.h"
using namespace std;
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
class RequestManagerSystem: public Request
{
protected:
RequestManagerSystem( const string& method_name,
const string& help,
const string& params)
:Request(method_name,params,help)
{};
~RequestManagerSystem(){};
/* -------------------------------------------------------------------- */
virtual void request_execute(xmlrpc_c::paramList const& _paramList,
RequestAttributes& att) = 0;
};
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
class SystemVersion : public RequestManagerSystem
{
public:
SystemVersion():
RequestManagerSystem("SystemVersion",
"Returns the OpenNebula version",
"A:s")
{};
~SystemVersion(){};
void request_execute(xmlrpc_c::paramList const& _paramList,
RequestAttributes& att);
};
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
#endif
+10
View File
@@ -74,6 +74,11 @@ public:
int user_action(int user_id,
xmlrpc_c::paramList const& _paramList,
string& err);
void log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index);
};
/* ------------------------------------------------------------------------- */
@@ -95,6 +100,11 @@ public:
int user_action(int user_id,
xmlrpc_c::paramList const& _paramList,
string& err);
void log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index);
};
/* ------------------------------------------------------------------------- */
+43 -23
View File
@@ -1,36 +1,56 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula econe-describe-images
.SH SYNOPSIS
.B econe-describe-images
[\fIOPTIONS\fR]
.SH DESCRIPTION
econe\-describe\-images
## SYNOPSIS
.PP
econe\-describe\-images [OPTIONS]
.PP
List and describe previously uploaded images of a user to be
used with an OpenNebula Cloud.
.SH OPTIONS
.HP
\fB\-\-help\fR, \fB\-h\fR
.IP
Show help
.HP
\fB\-\-access\-key\fR <id>, \fB\-K\fR <id>
.IP
.PP
## OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose mode
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version and copyright information
.TP
\fB\-K\fR, \fB\-\-access\-key\fR id
The username of the user
.HP
\fB\-\-secret\-key\fR <key>, \fB\-S\fR <key>
.IP
The password of the user
.HP
\fB\-\-url\fR <url>, \fB\-U\fR <url>
.IP
.TP
\fB\-S\fR, \fB\-\-sercret\-key\fR key
The sha1 hashed password of the user
.TP
\fB\-U\fR, \fB\-\-url\fR url
Set url as the web service url to use
.HP
\fB\-\-headers\fR, \fB\-H\fR
.PP
## ARGUMENT FORMATS
.TP
\fBfile\fR
.IP
Display column headers
Path to a file
.TP
\fBrange\fR
.IP
List of id's in the form 1,8..15
.TP
\fBtext\fR
.IP
String
.PP
## LICENSE
OpenNebula 3.7.80
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
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
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+43 -24
View File
@@ -1,36 +1,55 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula econe-describe-instances
.SH SYNOPSIS
.B econe-describe-instances
[\fIOPTIONS\fR]
.SH DESCRIPTION
econe\-describe\-instances
## SYNOPSIS
.PP
econe\-describe\-instances [OPTIONS]
.PP
List and describe running instances
.SH OPTIONS
.HP
\fB\-\-help\fR, \fB\-h\fR
.IP
Show help
.HP
\fB\-\-access\-key\fR <id>, \fB\-K\fR <id>
.IP
.PP
## OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose mode
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version and copyright information
.TP
\fB\-K\fR, \fB\-\-access\-key\fR id
The username of the user
.HP
\fB\-\-secret\-key\fR <key>, \fB\-S\fR <key>
.IP
The password of the user
.HP
\fB\-\-url\fR <url>, \fB\-U\fR <url>
.IP
.TP
\fB\-S\fR, \fB\-\-sercret\-key\fR key
The sha1 hashed password of the user
.TP
\fB\-U\fR, \fB\-\-url\fR url
Set url as the web service url to use
.HP
\fB\-\-headers\fR, \fB\-H\fR
.PP
## ARGUMENT FORMATS
.TP
\fBfile\fR
.IP
Display column headers
Path to a file
.TP
\fBrange\fR
.IP
List of id's in the form 1,8..15
.TP
\fBtext\fR
.IP
String
.PP
## LICENSE
OpenNebula 3.7.80
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
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
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+49 -29
View File
@@ -1,40 +1,60 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula econe-register
.SH SYNOPSIS
.B econe-register
[\fIOPTIONS\fR] \fIIMAGE-ID\fR
.SH DESCRIPTION
econe\-register
## SYNOPSIS
.PP
Register a previously uploaded image for use with an
OpenNebula Cloud.
.SH OPTIONS
.HP
\fB\-\-help\fR, \fB\-h\fR
.IP
Show help
.HP
\fB\-\-access\-key\fR <id>, \fB\-K\fR <id>
.IP
econe\-register [OPTIONS] IMAGE\-ID
.PP
<<\-EOT
Register a previously uploaded image for use with an OpenNebula Cloud.
IMAGE\-ID: The image identification as returned by the econe\-upload command
EOT
.PP
## OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose mode
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version and copyright information
.TP
\fB\-K\fR, \fB\-\-access\-key\fR id
The username of the user
.HP
\fB\-\-secret\-key\fR <key>, \fB\-S\fR <key>
.IP
The password of the user
.HP
\fB\-\-url\fR <url>, \fB\-U\fR <url>
.IP
.TP
\fB\-S\fR, \fB\-\-sercret\-key\fR key
The sha1 hashed password of the user
.TP
\fB\-U\fR, \fB\-\-url\fR url
Set url as the web service url to use
.HP
\fB\-\-headers\fR, \fB\-H\fR
.IP
Display column headers
.PP
IMAGE\-ID: The image identification as returned by
the econe\-upload command
<public_ip> <instance_id>
.PP
## ARGUMENT FORMATS
.TP
\fBfile\fR
.IP
Path to a file
.TP
\fBrange\fR
.IP
List of id's in the form 1,8..15
.TP
\fBtext\fR
.IP
String
.PP
## LICENSE
OpenNebula 3.7.80
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
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
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+56 -38
View File
@@ -1,48 +1,66 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula econe-run-instances
.SH SYNOPSIS
.B econe-run-instances
[\fIOPTIONS\fR] \fIIMAGE-ID\fR
.SH DESCRIPTION
econe\-run\-instances
## SYNOPSIS
.PP
econe\-run\-instances [OPTIONS] IMAGE\-ID
.PP
Runs an instance of a particular image
.SH OPTIONS
.HP
\fB\-\-help\fR, \fB\-h\fR
.IP
Show help
.HP
\fB\-\-access\-key\fR <id>, \fB\-K\fR <id>
.IP
The username of the user
.HP
\fB\-\-secret\-key\fR <key>, \fB\-S\fR <key>
.IP
The password of the user
.HP
\fB\-\-url\fR <url>, \fB\-U\fR <url>
.IP
Set url as the web service url to use
.HP
\fB\-\-type\fR <type>, \fB\-t\fR <type>
.IP
OpenNebula template in which is based this instance
.HP
\fB\-\-user\-data\fR, \fB\-d\fR
.IP
Specifies Base64\-encoded MIME user data to be made
available to the instance
.HP
\fB\-\-headers\fR, \fB\-H\fR
.IP
Display column headers
IMAGE\-ID: The image identification as returned by the econe\-upload command
.PP
IMAGE\-ID: The image identification as returned by
the econe\-upload command
## OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose mode
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version and copyright information
.TP
\fB\-K\fR, \fB\-\-access\-key\fR id
The username of the user
.TP
\fB\-S\fR, \fB\-\-sercret\-key\fR key
The sha1 hashed password of the user
.TP
\fB\-U\fR, \fB\-\-url\fR url
Set url as the web service url to use
.TP
\fB\-d\fR, \fB\-\-user\-data\fR data
Specifies Base64\-encoded MIME user data to be made
.IP
available to the instance
.TP
\fB\-t\fR, \fB\-\-type\fR type
OpenNebula template in which is based this instance
.PP
<image_id>
.PP
## ARGUMENT FORMATS
.TP
\fBfile\fR
.IP
Path to a file
.TP
\fBrange\fR
.IP
List of id's in the form 1,8..15
.TP
\fBtext\fR
.IP
String
.PP
## LICENSE
OpenNebula 3.7.80
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
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
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+46 -23
View File
@@ -1,35 +1,58 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula econe-terminate-instances
.SH SYNOPSIS
.B econe-register
[\fIOPTIONS\fR] \fIINSTANCE-ID\fR
.SH DESCRIPTION
econe\-terminate\-instances
## SYNOPSIS
.PP
econe\-terminate\-instances [OPTIONS] INSTANCE\-ID
.PP
Terminate the selected running instance
.SH OPTIONS
.HP
\fB\-\-help\fR, \fB\-h\fR
.IP
Show help
.HP
\fB\-\-access\-key\fR <id>, \fB\-K\fR <id>
.IP
INSTANCE\-ID: The instance identification as returned by the econe\-run\-instances command
.PP
## OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose mode
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version and copyright information
.TP
\fB\-K\fR, \fB\-\-access\-key\fR id
The username of the user
.HP
\fB\-\-secret\-key\fR <key>, \fB\-S\fR <key>
.IP
The password of the user
.HP
\fB\-\-url\fR <url>, \fB\-U\fR <url>
.IP
.TP
\fB\-S\fR, \fB\-\-sercret\-key\fR key
The sha1 hashed password of the user
.TP
\fB\-U\fR, \fB\-\-url\fR url
Set url as the web service url to use
.PP
INSTANCE\-ID: The instance identification as returned by
the econe\-run\-instances command
<instance_id>
.PP
## ARGUMENT FORMATS
.TP
\fBfile\fR
.IP
Path to a file
.TP
\fBrange\fR
.IP
List of id's in the form 1,8..15
.TP
\fBtext\fR
.IP
String
.PP
## LICENSE
OpenNebula 3.7.80
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
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
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+48 -25
View File
@@ -1,39 +1,62 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula econe-upload
.SH SYNOPSIS
.B econe-upload
[\fIOPTIONS\fR] \fIIMAGE-PATH\fR
.SH DESCRIPTION
econe\-upload
## SYNOPSIS
.PP
econe\-upload [OPTIONS] IMAGE\-PATH
.PP
Uploads an image for use with an OpenNebula Cloud. This image should
be later register with econe\-register using the returned ImageId
.SH OPTIONS
.HP
\fB\-\-help\fR, \fB\-h\fR
.IP
Show help
.HP
\fB\-\-access\-key\fR <id>, \fB\-K\fR <id>
.IP
IMAGE\-PATH: Path to the image to upload
.PP
## OPTIONS
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose mode
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version and copyright information
.TP
\fB\-K\fR, \fB\-\-access\-key\fR id
The username of the user
.HP
\fB\-\-secret\-key\fR <key>, \fB\-S\fR <key>
.IP
The password of the user
.HP
\fB\-\-url\fR <url>, \fB\-U\fR <url>
.IP
.TP
\fB\-S\fR, \fB\-\-sercret\-key\fR key
The sha1 hashed password of the user
.TP
\fB\-U\fR, \fB\-\-url\fR url
Set url as the web service url to use
.HP
\fB\-\-multipart\fR, \fB\-M\fR
.IP
.TP
\fB\-M\fR, \fB\-\-multipart\fR
Use 'multipart\-post' library instead of Curb/Curl
.PP
IMAGE\-PATH: Path to the image to upload
<file>
.PP
## ARGUMENT FORMATS
.TP
\fBfile\fR
.IP
Path to a file
.TP
\fBrange\fR
.IP
List of id's in the form 1,8..15
.TP
\fBtext\fR
.IP
String
.PP
## LICENSE
OpenNebula 3.7.80
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
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
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+9 -1
View File
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula occi-compute
.SH SYNOPSIS
@@ -60,6 +60,14 @@ provided <occi xml file>
\fBdelete\fR <compute id>
.IP
deletes the compute resource idenfitied by <compute id>
.TP
\fBattachdisk\fR <compute id> <storage id>
.IP
attaches an storage to a given compute
.TP
\fBdetachdisk\fR <compute id> <disk id>
.IP
detaches the target disk form the compute
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+1 -1
View File
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula occi-network
.SH SYNOPSIS
+6 -1
View File
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH OPENNEBULA "1" "July 2012" "OpenNebula 3.7.0" "User Commands"
.TH OPENNEBULA "1" "October 2012" "OpenNebula 3.7.80" "User Commands"
.SH NAME
OpenNebula \- OpenNebula occi-storage
.SH SYNOPSIS
@@ -68,6 +68,11 @@ provided <occi xml file>
\fBdelete\fR <storage id>
.IP
deletes the storage resource idenfitied by <storage id>
.TP
\fBclone\fR <storage id> <name>
.IP
clones the storage resource idenfitied by <storage id> in a new one
using the given <name>
.SH COPYRIGHT
Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula.org)
.PP
+2 -2
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEACCT" "1" "September 2012" "" "oneacct(1) -- OpenNebula Accountin Tool"
.TH "ONEACCT" "1" "October 2012" "" "oneacct(1) -- OpenNebula Accountin Tool"
.
.SH "NAME"
\fBoneacct\fR
@@ -75,7 +75,7 @@ String
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+4 -3
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEACL" "1" "July 2012" "" "oneacl(1) -- manages OpenNebula ACLs"
.TH "ONEACL" "1" "October 2012" "" "oneacl(1) -- manages OpenNebula ACLs"
.
.SH "NAME"
\fBoneacl\fR
@@ -14,6 +14,7 @@
.nf
\-x, \-\-xml Show the resource in xml format
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -58,7 +59,7 @@ list
.nf
Lists the ACL rule set
valid options: xml
valid options: xml, describe
.
.fi
.
@@ -128,7 +129,7 @@ Comma\-separated list of OpenNebula ACL names or ids
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+4 -3
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONECLUSTER" "1" "July 2012" "" "onecluster(1) -- manages OpenNebula clusters"
.TH "ONECLUSTER" "1" "October 2012" "" "onecluster(1) -- manages OpenNebula clusters"
.
.SH "NAME"
\fBonecluster\fR
@@ -17,6 +17,7 @@
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -61,7 +62,7 @@ list
.nf
Lists Clusters in the pool
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -301,7 +302,7 @@ OpenNebula DATASTORE name or id
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+4 -3
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEDATASTORE" "1" "July 2012" "" "onedatastore(1) -- manages OpenNebula datastores"
.TH "ONEDATASTORE" "1" "October 2012" "" "onedatastore(1) -- manages OpenNebula datastores"
.
.SH "NAME"
\fBonedatastore\fR
@@ -18,6 +18,7 @@
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -105,7 +106,7 @@ list
.nf
Lists Datastores in the pool
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -261,7 +262,7 @@ OpenNebula USER name or id
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+1 -1
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEDB" "1" "July 2012" "" "onedb(1) -- OpenNebula database migration tool"
.TH "ONEDB" "1" "October 2012" "" "onedb(1) -- OpenNebula database migration tool"
.
.SH "NAME"
\fBonedb\fR
+19 -3
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEGROUP" "1" "July 2012" "" "onegroup(1) -- manages OpenNebula groups"
.TH "ONEGROUP" "1" "October 2012" "" "onegroup(1) -- manages OpenNebula groups"
.
.SH "NAME"
\fBonegroup\fR
@@ -17,6 +17,7 @@
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -61,7 +62,7 @@ list
.nf
Lists Groups in the pool
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -97,6 +98,21 @@ will be launched to modify the current quotas\.
.
.IP "" 0
.
.IP "\(bu" 4
batchquota \fIrange|groupid_list\fR [\fIfile\fR]
.
.IP "" 4
.
.nf
Sets the quota limits in batch for various groups\. If a path is not
provided the editor will be launched to create new quotas\.
.
.fi
.
.IP "" 0
.
.IP "" 0
.
@@ -175,7 +191,7 @@ Comma\-separated list of OpenNebula GROUP names or ids
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+4 -3
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEHOST" "1" "July 2012" "" "onehost(1) -- manages OpenNebula hosts"
.TH "ONEHOST" "1" "October 2012" "" "onehost(1) -- manages OpenNebula hosts"
.
.SH "NAME"
\fBonehost\fR
@@ -22,6 +22,7 @@
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-k, \-\-kilobytes Show units in kilobytes
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -126,7 +127,7 @@ list
.nf
Lists Hosts in the pool
valid options: list, delay, xml, numeric, kilobytes
valid options: list, delay, xml, numeric, kilobytes, describe
.
.fi
.
@@ -254,7 +255,7 @@ Comma\-separated list of OpenNebula HOST names or ids
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+39 -7
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEIMAGE" "1" "July 2012" "" "oneimage(1) -- manages OpenNebula images"
.TH "ONEIMAGE" "1" "October 2012" "" "oneimage(1) -- manages OpenNebula images"
.
.SH "NAME"
\fBoneimage\fR
@@ -14,10 +14,23 @@
.nf
\-d, \-\-datastore id|name Selects the datastore
\-\-name name Name of the new image
\-\-description description Description for the new Image
\-\-type type Type of the new Image: OS, CDROM or DATABLOCK
\-\-persistent Tells if the image will be persistent
\-\-prefix prefix Device prefix for the disk (eg\. hd, sd, xvd or vd)
\-\-target target Device the disk will be attached to
\-\-path path Path of the image file
\-\-driver driver Driver to use image (raw, qcow2, tap:aio:\.\.\.)
\-\-disk_type disk_type Type of the image (BLOCK, CDROM or FILE)
\-\-source source Source to be used\. Useful for not file\-based images
\-\-size size Size in MB\. Used for DATABLOCK type
\-\-fstype fstype Type of file system to be built\. This can be any value understood by mkfs unix command\.
\-l, \-\-list x,y,z Selects columns to display with list command
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -27,14 +40,33 @@
.SH "COMMANDS"
.
.IP "\(bu" 4
create \fIfile\fR
create [\fIfile\fR]
.
.IP "" 4
.
.nf
Creates a new Image from the given template file
valid options: datastore
Creates a new Image
Examples:
\- using a template description file:
oneimage create \-d default centOS\.tmpl
\- new image "arch" using a path of type centOS:
oneimage create \-d default \-\-name arch \-\-path /tmp/arch\.img
\- new persistent image, OS type and qcow2 format:
oneimage create \-d 1 \-\-name ubuntu \-\-path /tmp/ubuntu\.qcow2 \e
\-\-prefix sd \-\-type OS \-\-driver qcow2 \e
\-\-description "A OS plain installation"
\- a datablock image of 400MB:
oneimage create \-d 1 \-\-name data \-\-type DATABLOCK \-\-size 400 \e
\-\-fstype ext2
valid options: datastore, name, description, type, persistent, prefix, target, path, driver, disk_type, source, size, fstype
.
.fi
.
@@ -237,7 +269,7 @@ list [\fIfilterflag\fR]
.nf
Lists Images in the pool
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -267,7 +299,7 @@ top [\fIfilterflag\fR]
.nf
Lists Images continuously
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -398,7 +430,7 @@ user IMAGE of the user identified by the username
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+30 -7
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONETEMPLATE" "1" "July 2012" "" "onetemplate(1) -- manages OpenNebula templates"
.TH "ONETEMPLATE" "1" "October 2012" "" "onetemplate(1) -- manages OpenNebula templates"
.
.SH "NAME"
\fBonetemplate\fR
@@ -13,7 +13,14 @@
.
.nf
\-n, \-\-name vm_name Name of the new Virtual Machine\. When instantiating
\-\-name name Name for the VM
\-\-cpu cpu CPU percentage reserved for the VM (1=100% one CPU)
\-\-arch arch Architecture of the VM, e\.g\.: i386 or x86_64
\-\-memory memory Memory ammount given to the VM
\-\-disk disk0,disk1 Disks to attach\. To use a disk owned by other user use user[disk]
\-\-network network0,network1 Networks to attach\. To use a network owned by other user use user[network]
\-\-raw string Raw string to add to the template\. Not to be confused with the RAW attribute
\-\-name vm_name Name of the new Virtual Machine\. When instantiating
multiple VMs you can use the"%i" wildcard to produce
different names such as vm\-0, vm\-1\.\.\.
@@ -22,6 +29,7 @@
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -31,13 +39,28 @@
.SH "COMMANDS"
.
.IP "\(bu" 4
create \fIfile\fR
create [\fIfile\fR]
.
.IP "" 4
.
.nf
Creates a new Template from the given template file
Creates a new VM Template from the given description
Examples:
\- using a VM Template description file:
onetemplate create vm_description\.tmpl
\- new VM Template named "arch vm" with a disk and a nic:
onetemplate create \-\-name "arch vm" \-\-memory 128 \-\-cpu 1 \-\-disk arch \e
\-\-network private_lan
\- using two disks:
onevm create \-\-name "test vm" \-\-memory 128 \-\-cpu 1 \-\-disk arch,data
valid options: name, cpu, arch, memory, disk, network, raw
.
.fi
.
@@ -184,7 +207,7 @@ list [\fIfilterflag\fR]
.nf
Lists Templates in the pool
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -214,7 +237,7 @@ top [\fIfilterflag\fR]
.nf
Lists Templates continuously
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -345,7 +368,7 @@ user VMTEMPLATE of the user identified by the username
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+25 -5
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEUSER" "1" "July 2012" "" "oneuser(1) -- manages OpenNebula users"
.TH "ONEUSER" "1" "October 2012" "" "oneuser(1) -- manages OpenNebula users"
.
.SH "NAME"
\fBoneuser\fR
@@ -27,6 +27,7 @@
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -85,6 +86,21 @@ will be launched to modify the current quotas\.
.
.IP "" 0
.
.IP "\(bu" 4
batchquota \fIrange|userid_list\fR [\fIfile\fR]
.
.IP "" 4
.
.nf
Sets the quota limits in batch for various users\. If a path is not
provided the editor will be launched to create new quotas\.
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
login \fIusername\fR
@@ -96,8 +112,10 @@ login \fIusername\fR
Creates the Login token for authentication
Examples:
oneuser login my_user \-\-ssh \-\-key /tmp/id_rsa \-\-time 72000
oneuser login my_user \-\-x509 \-\-cert /tmp/my_cert\.pem \-\-key /tmp/my_key\.pk \-\-time 72000
oneuser login my_user \-\-x509_proxy \-\-proxy /tmp/my_cert\.pem \-\-time 72000
oneuser login my_user \-\-x509 \-\-cert /tmp/my_cert\.pem
\-\-key /tmp/my_key\.pk \-\-time 72000
oneuser login my_user \-\-x509_proxy \-\-proxy /tmp/my_cert\.pem
\-\-time 72000
valid options: ssh, x509, x509_proxy, key, cert, proxy, time
.
.fi
@@ -112,6 +130,8 @@ key
.
.nf
DEPRECATED, use login to generate auth files\.
Shows a public key from a private SSH key\. Use it as password
for the SSH authentication mechanism\.
valid options: key
@@ -194,7 +214,7 @@ list
.nf
Lists Users in the pool
valid options: list, delay, xml, numeric
valid options: list, delay, xml, numeric, describe
.
.fi
.
@@ -335,7 +355,7 @@ User password
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+2 -2
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEVDC" "1" "July 2012" "" "onevdc(1) -- manages OpenNebula Virtual DataCenters"
.TH "ONEVDC" "1" "October 2012" "" "onevdc(1) -- manages OpenNebula Virtual DataCenters"
.
.SH "NAME"
\fBonevdc\fR
@@ -178,7 +178,7 @@ VDC ID
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+57 -18
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEVM" "1" "July 2012" "" "onevm(1) -- manages OpenNebula virtual machines"
.TH "ONEVM" "1" "October 2012" "" "onevm(1) -- manages OpenNebula virtual machines"
.
.SH "NAME"
\fBonevm\fR
@@ -14,15 +14,23 @@
.nf
\-m, \-\-multiple x Instance multiple VMs
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-k, \-\-kilobytes Show units in kilobytes
\-\-name name Name for the VM
\-\-cpu cpu CPU percentage reserved for the VM (1=100% one CPU)
\-\-arch arch Architecture of the VM, e\.g\.: i386 or x86_64
\-\-memory memory Memory ammount given to the VM
\-\-disk disk0,disk1 Disks to attach\. To use a disk owned by other user use user[disk]
\-\-network network0,network1 Networks to attach\. To use a network owned by other user use user[network]
\-\-raw string Raw string to add to the template\. Not to be confused with the RAW attribute
\-t, \-\-type type Type of the new Image
\-f, \-\-file file Selects the template file
\-i, \-\-image id|name Selects the image
\-t, \-\-target type Device where the image will be attached
\-l, \-\-list x,y,z Selects columns to display with list command
\-d, \-\-delay x Sets the delay in seconds for top command
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-k, \-\-kilobytes Show units in kilobytes
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -32,16 +40,30 @@
.SH "COMMANDS"
.
.IP "\(bu" 4
create \fIfile\fR
create [\fIfile\fR]
.
.IP "" 4
.
.nf
Creates a new VM from the given template file\. This command bypasses
the Template pool, which is the preferred way to instantiate new VMs\.
See \'onetemplate create\' and \'onetemplate instantiate\'
valid options: multiple, xml, numeric, kilobytes
Creates a new VM from the given description instead of using a previously
defined template (see \'onetemplate create\' and \'onetemplate instantiate\')\.
Examples:
\- using a template description file:
onevm create vm_description\.tmpl
\- new VM named "arch vm" with a disk and a nic
onevm create \-\-name "arch vm" \-\-memory 128 \-\-cpu 1 \-\-disk arch \e
\-\-network private_lan
\- a vm with two disks
onevm create \-\-name "test vm" \-\-memory 128 \-\-cpu 1 \-\-disk arch,data
valid options: multiple, name, cpu, arch, memory, disk, network, raw
.
.fi
.
@@ -105,8 +127,8 @@ saveas \fIvmid\fR \fIdiskid\fR \fIimg_name\fR
.nf
Sets the specified VM disk to be saved in a new Image\. The Image is
created inmediately, but the contents are saved only if the VM is
shut down gracefuly (i\.e\., using \'onevm shutdown\' and not
created immediately, but the contents are saved only if the VM is
shut down gracefully (i\.e\., using \'onevm shutdown\' and not
\'onevm delete\')
States: ANY
@@ -124,7 +146,24 @@ shutdown \fIrange|vmid_list\fR
.
.nf
Shuts down the given VM\.
Shuts down the given VM\. The VM life cycle will end\.
States: RUNNING
.
.fi
.
.IP "" 0
.
.IP "\(bu" 4
poweroff \fIrange|vmid_list\fR
.
.IP "" 4
.
.nf
Powers off the given VM\. The VM will remain in the poweroff state, and
can be powered on with the \'onevm restart\' command\.
States: RUNNING
.
@@ -223,9 +262,9 @@ restart \fIrange|vmid_list\fR
.
.nf
Forces a re\-deployment of the given VM, issuing a boot action\.
Boots the given VM\.
States: UNKNOWN, BOOT
States: UNKNOWN, BOOT, POWEROFF
.
.fi
.
@@ -239,9 +278,9 @@ resubmit \fIrange|vmid_list\fR
.
.nf
Resubmits the VM to PENDING state\. This is intented for VMs stuck in a
Resubmits the VM to PENDING state\. This is intended for VMs stuck in a
transient state\. To re\-deploy a fresh copy of the same VM, create a
Template and instantiante it, see \'onetemplate instantiate\'
Template and instantiate it, see \'onetemplate instantiate\'
States: ANY, except SUSPENDED or DONE
.
@@ -435,7 +474,7 @@ list [\fIfilterflag\fR]
.nf
Lists VMs in the pool
valid options: list, delay, xml, numeric, kilobytes
valid options: list, delay, xml, numeric, kilobytes, describe
.
.fi
.
@@ -624,7 +663,7 @@ Integer
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+4 -3
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEVNET" "1" "July 2012" "" "onevnet(1) -- manages OpenNebula networks"
.TH "ONEVNET" "1" "October 2012" "" "onevnet(1) -- manages OpenNebula networks"
.
.SH "NAME"
\fBonevnet\fR
@@ -19,6 +19,7 @@
\-x, \-\-xml Show the resource in xml format
\-n, \-\-numeric Do not translate user and group IDs
\-k, \-\-kilobytes Show units in kilobytes
\-\-describe Describe list columns
\-v, \-\-verbose Verbose mode
\-h, \-\-help Show this message
\-V, \-\-version Show version and copyright information
@@ -193,7 +194,7 @@ list [\fIfilterflag\fR]
.nf
Lists Virtual Networks in the pool
valid options: list, delay, xml, numeric, kilobytes
valid options: list, delay, xml, numeric, kilobytes, describe
.
.fi
.
@@ -354,7 +355,7 @@ user VNET of the user identified by the username
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+2 -2
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ONEZONE" "1" "July 2012" "" "onezone(1) -- manages OpenNebula zones"
.TH "ONEZONE" "1" "October 2012" "" "onezone(1) -- manages OpenNebula zones"
.
.SH "NAME"
\fBonezone\fR
@@ -148,7 +148,7 @@ Zone ID
.IP "" 0
.
.SH "LICENSE"
OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
OpenNebula 3\.7\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org)
.
.P
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
+7
View File
@@ -87,6 +87,13 @@ AclManager::AclManager(SqlDB * _db) : db(_db), lastOID(-1)
PoolObjectSQL::HOST,
AuthRequest::MANAGE,
error_str);
add_rule(AclRule::ALL_ID,
AclRule::ALL_ID |
PoolObjectSQL::DOCUMENT,
AuthRequest::CREATE,
error_str);
}
}
+8 -6
View File
@@ -441,12 +441,14 @@ module CommandParser
opts.on(*args) do |o|
if e[:proc]
rc = e[:proc].call(o, @options)
if rc.instance_of?(Array) && rc[0] == 0
options[e[:name].to_sym] = rc[1]
else
puts rc[1]
puts "option #{e[:name]}: Parsing error"
exit -1
if rc.instance_of?(Array)
if rc[0] == 0
options[e[:name].to_sym] = rc[1]
else
puts rc[1]
puts "option #{e[:name]}: Parsing error"
exit -1
end
end
elsif e[:name]=="help"
print_help
+15
View File
@@ -83,6 +83,13 @@ EOT
'CPU percentage reserved for the VM (1=100% one CPU)',
:format => Float
},
{
:name => 'arch',
:large => '--arch arch',
:description =>
'Architecture of the VM, e.g.: i386 or x86_64',
:format => String
},
{
:name => 'memory',
:large => '--memory memory',
@@ -118,6 +125,12 @@ EOT
:large => '--network network0,network1',
:description => 'Networks to attach. To use a network owned by other user use user[network]',
:format => Array
},
{
:name => 'raw',
:large => '--raw string',
:description => 'Raw string to add to the template. Not to be confused with the RAW attribute',
:format => String
}
]
@@ -552,8 +565,10 @@ EOT
template=''
template<<"NAME=\"#{options[:name]}\"\n" if options[:name]
template<<"OS = [ ARCH = \"#{options[:arch]}\" ]\n" if options[:arch]
template<<"CPU=#{options[:cpu]}\n" if options[:cpu]
template<<"MEMORY=#{options[:memory]}\n" if options[:memory]
template<<"#{options[:raw]}\n" if options[:raw]
if options[:disk]
res=create_disk_net(options[:disk], 'DISK', 'IMAGE')
+3 -1
View File
@@ -22,6 +22,8 @@ require 'net/https'
require "rexml/document"
require 'ostruct'
begin
require 'rexml/formatters/pretty'
REXML_FORMATTERS=true
@@ -50,7 +52,7 @@ end
module CloudClient
# OpenNebula version
VERSION = '3.7.0'
VERSION = '3.7.80'
# #########################################################################
# Default location for the authentication file
+1
View File
@@ -40,6 +40,7 @@ CommandParser::CmdParser.new(ARGV) do
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+2 -1
View File
@@ -45,6 +45,7 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
@@ -68,4 +69,4 @@ EOT
exit_with_code 0
end
end
end
end
+56 -109
View File
@@ -23,125 +23,72 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-attach-volume
Attaches a DATABLOCK to a running instance and exposes it as the specified device.
Usage:
econe-attach-volume [OPTIONS] VOLUME-ID
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--url <url>, -U <url>
Set url as the web service url to use
--instance <instance_id>, -i <instance_id>
The ID of the instance to attach the volume to
--device <device>, -d <device
Specifies the device name to expose to the instance.
Example: -d /dev/sdf
--headers, -H
Display column headers
VOLUME-ID: The ID of the DATABLOCK
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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],
['--instance', '-i',GetoptLong::REQUIRED_ARGUMENT],
['--device', '-d',GetoptLong::REQUIRED_ARGUMENT],
['--headers', '-H',GetoptLong::NO_ARGUMENT]
)
INSTANCE = {
:name => "instance_id",
:short => "-i instance_id",
:large => "--instance instance_id",
:description => "The ID of the instance to attach the volume to",
:format => String
}
headers = false
url = nil
access = nil
secret = nil
instance = nil
device = nil
DEVICE = {
:name => "device",
:short => "-d device",
:large => "--device device",
:description => "Specifies the device name to expose to the instance." <<
" Example: -d /dev/sdf",
:format => String
}
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--instance'
instance = arg
when '--headers'
headers = true
when '--device'
device = arg
CommandParser::CmdParser.new(ARGV) do
usage "econe-attach-volume [OPTIONS] VOLUME-ID"
version CloudCLI.version_text
description <<-EOT
Attaches a DATABLOCK to a running instance and exposes it as the specified device.
VOLUME-ID: The ID of the DATABLOCK
EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL,
INSTANCE,
DEVICE
]
main :volume_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
exit_with_code -1, "#{cmd_name}: #{e.message}"
end
rc = ec2_client.attach_volume(args[0], options[:instance_id], options[:device])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
puts "volumeId: #{rc['volumeId']}"
puts "instanceId: #{rc['instanceId']}"
puts "status: #{rc['status']}"
puts "device: #{rc['device']}"
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
volume_id = ARGV.shift
if !volume_id
puts "#{cmd_name}: missing VOLUME-ID parameter"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.attach_volume(volume_id, instance, device)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
fmt = "%-15s %-15s %-10s %s"
if headers
puts fmt % ["volumeId", "instanceId", "status", "device"]
puts "------------------------------------------------------------------------------"
end
puts fmt % [rc['volumeId'], rc['instanceId'], rc['status'], rc['device']]
exit 0
+1
View File
@@ -44,6 +44,7 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+42 -97
View File
@@ -23,113 +23,58 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-create-volume
Create a new DATABLOCK
Usage:
econe-create-volume [OPTIONS]
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--url <url>, -U <url>
Set url as the web service url to use
--size <size>, -s <size>
The ID of the instance to attach the volume to
--headers, -H
Display column headers
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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],
['--size', '-s',GetoptLong::REQUIRED_ARGUMENT],
['--headers', '-H',GetoptLong::NO_ARGUMENT]
)
SIZE = {
:name => "size",
:short => "-s size",
:large => "--size size",
:description => "The size of the volume, in GiBs.",
:format => String
}
headers = false
url = nil
access = nil
secret = nil
size = nil
CommandParser::CmdParser.new(ARGV) do
usage "econe-create-volume [OPTIONS]"
version CloudCLI.version_text
description "Create a new VOLUME"
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--size'
size = arg
when '--headers'
headers = true
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL,
SIZE
]
main :volume_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
exit_with_code -1, "#{cmd_name}: #{e.message}"
end
rc = ec2_client.create_volume(options[:size])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
puts "volumeId: #{rc['volumeId']}"
puts "size: #{rc['size']}"
puts "createTime: #{rc['createTime']}"
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
if !size
puts "#{cmd_name}: missing --size option"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.create_volume(size)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
fmt = "%-15s %-10s %s"
if headers
puts fmt % ["volumeId", "size", "createTime"]
puts "------------------------------------------------------------------------------"
end
puts fmt % [rc['volumeId'], rc['size'], rc['createTime']]
exit 0
+1
View File
@@ -44,6 +44,7 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+33 -85
View File
@@ -23,101 +23,49 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-delete-volume
Deletes a DATABLOCK
Usage:
econe-delete-volume [OPTIONS] VOLUME-ID
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--url <url>, -U <url>
Set url as the web service url to use
--headers, -H
Display column headers
VOLUME-ID: The ID of the DATABLOCK
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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],
['--headers', '-H',GetoptLong::NO_ARGUMENT]
)
CommandParser::CmdParser.new(ARGV) do
usage "econe-delete-volume [OPTIONS] VOLUME-ID"
version CloudCLI.version_text
description <<-EOT
Deletes the targe VOLUME
VOLUME-ID: The ID of the DATABLOCK
EOT
headers = false
url = nil
access = nil
secret = nil
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
]
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--headers'
headers = true
main :volume_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
exit_with_code -1, "#{cmd_name}: #{e.message}"
end
rc = ec2_client.delete_volume(args[0])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
volume_id = ARGV.shift
if !volume_id
puts "#{cmd_name}: missing VOLUME-ID parameter"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.delete_volume(volume_id)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
exit 0
+7 -5
View File
@@ -34,15 +34,15 @@ require 'econe/EC2QueryClient'
include CloudCLI
TABLE = CLIHelper::ShowTable.new(nil, self) do
column :publicIP, "publicIP", :size=>10 do |d|
d["publicIP"]
column :publicIp, "publicIp", :size=>10 do |d|
d["publicIp"]
end
column :instanceID, "instanceID", :size=>25 do |d|
d["instanceID"]
column :instanceId, "instanceId", :size=>25 do |d|
d["instanceId"]
end
default :publicIP, :instanceID
default :publicIp, :instanceId
end
@@ -54,6 +54,7 @@ CommandParser::CmdParser.new(ARGV) do
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
@@ -74,6 +75,7 @@ CommandParser::CmdParser.new(ARGV) do
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
puts rc
if rc.empty? || rc['addressesSet'].nil? || rc['addressesSet']['item'].nil?
addrs = []
else
+1
View File
@@ -66,6 +66,7 @@ used with an OpenNebula Cloud."
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
@@ -64,6 +64,7 @@ CommandParser::CmdParser.new(ARGV) do
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+2 -1
View File
@@ -37,7 +37,7 @@ TABLE = CLIHelper::ShowTable.new(nil, self) do
d["keyName"]
end
column :keyFingerprint, "keyFingerprint", :left, :size=>65 do |d|
column :keyFingerprint, "keyFingerprint", :left, :size=>60 do |d|
d["keyFingerprint"]
end
@@ -52,6 +52,7 @@ CommandParser::CmdParser.new(ARGV) do
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+65 -96
View File
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
ONE_LOCATION=ENV["ONE_LOCATION"]
if !ONE_LOCATION
@@ -23,116 +22,86 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-describe-volumes
Describes your Amazon EBS volumes
Usage:
econe-describe-volumes [OPTIONS]
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--url <url>, -U <url>
Set url as the web service url to use
--headers, -H
Display column headers
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
include CloudCLI
TABLE = CLIHelper::ShowTable.new(nil, self) do
column :volumeId, "volumeId", :size=>12 do |d|
d["volumeId"]
end
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],
['--headers', '-H',GetoptLong::NO_ARGUMENT]
)
column :size, "size", :size=>6 do |d|
d["size"]
end
headers = false
url = nil
access = nil
secret = nil
column :status, "status", :size=>10 do |d|
d["status"]
end
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--headers'
headers = true
column :createTime, "createTime", :size=>28 do |d|
d['createTime']
end
column :instanceId, "instanceId", :size=>12 do |d|
if d['attachmentSet'] && d['attachmentSet']['item']
d['attachmentSet']['item'][0]['instanceId']
end
end
rescue Exception => e
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.describe_volumes
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
volumes = []
if rc['volumeSet']
volumes = rc['volumeSet']['item']
end
fmt = "%-15s %-10s %s"
if headers
puts fmt % ["volumeId", "size", "instanceId"]
puts "------------------------------------------------------------------------------"
end
volumes.each { |vol|
instances = ""
if vol['attachmentSet'] && vol['attachmentSet']['item']
instances = vol['attachmentSet']['item'].collect{ |item|
item['instanceId']
}.join(',')
column :device, "device", :size=>8 do |d|
if d['attachmentSet'] && d['attachmentSet']['item']
d['attachmentSet']['item'][0]['device']
end
end
puts fmt % [vol['volumeId'], vol['size'], instances]
}
default :volumeId, :size, :status, :createTime, :instanceId, :device
end
exit 0
CommandParser::CmdParser.new(ARGV) do
usage "econe-describe-volumes [OPTIONS]"
version CloudCLI.version_text
description "List and describe volumes"
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
]
main do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
exit_with_code -1, "#{cmd_name}: #{e.message}"
end
rc = ec2_client.describe_volumes
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
if rc.empty? || rc['volumeSet'].nil? || rc['volumeSet']['item'].nil?
vols = []
else
vols = rc['volumeSet']['item']
end
TABLE.show(vols)
exit_with_code 0
end
end
end
+57 -110
View File
@@ -23,126 +23,73 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-detach-volume
Detaches an Amazon EBS volume from an instance. Make sure to unmount any
file systems on the device within your operating system before detaching the volume
Usage:
econe-detach-volume [OPTIONS] VOLUME-ID
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--url <url>, -U <url>
Set url as the web service url to use
--instance <instance_id>, -i <instance_id>
The ID of the instance to attach the volume to
--device <device>, -d <device
Specifies the device name to expose to the instance.
Example: -d /dev/sdf
--headers, -H
Display column headers
VOLUME-ID: The ID of the DATABLOCK
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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],
['--instance', '-i',GetoptLong::REQUIRED_ARGUMENT],
['--device', '-d',GetoptLong::REQUIRED_ARGUMENT],
['--headers', '-H',GetoptLong::NO_ARGUMENT]
)
INSTANCE = {
:name => "instance_id",
:short => "-i instance_id",
:large => "--instance instance_id",
:description => "The ID of the instance to attach the volume to",
:format => String
}
headers = false
url = nil
access = nil
secret = nil
instance = nil
device = nil
DEVICE = {
:name => "device",
:short => "-d device",
:large => "--device device",
:description => "Specifies the device name to expose to the instance." <<
" Example: -d /dev/sdf",
:format => String
}
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--instance'
instance = arg
when '--headers'
headers = true
when '--device'
device = arg
CommandParser::CmdParser.new(ARGV) do
usage "econe-detach-volume [OPTIONS] VOLUME-ID"
version CloudCLI.version_text
description <<-EOT
Detaches a volume from an instance. Make sure to unmount any file systems
on the device within your operating system before detaching the volume
VOLUME-ID: The ID of the DATABLOCK
EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL,
INSTANCE,
DEVICE
]
main :volume_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
exit_with_code -1, "#{cmd_name}: #{e.message}"
end
rc = ec2_client.detach_volume(args[0], options[:instance_id], options[:device])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
puts "volumeId: #{rc['volumeId']}"
puts "instanceId: #{rc['instanceId']}"
puts "status: #{rc['status']}"
puts "device: #{rc['device']}"
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
volume_id = ARGV.shift
if !volume_id
puts "#{cmd_name}: missing VOLUME-ID parameter"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.detach_volume(volume_id, instance, device)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
fmt = "%-15s %-15s %-10s %s"
if headers
puts fmt % ["volumeId", "instanceId", "status", "device"]
puts "------------------------------------------------------------------------------"
end
puts fmt % [rc['volumeId'], rc['instanceId'], rc['status'], rc['device']]
exit 0
@@ -44,6 +44,7 @@ EOT"
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+36 -84
View File
@@ -23,100 +23,52 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-reboot-instances
reboot the selected running instance
Usage:
econe-register [OPTIONS] INSTANCE-ID
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--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
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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]
)
url = nil
access = nil
secret = nil
CommandParser::CmdParser.new(ARGV) do
usage "econe-reboot-instances [OPTIONS] INSTANCE-ID"
version CloudCLI.version_text
description <<-EOT
Reboot the selected running instance
INSTANCE-ID: The instance identification as returned by the econe-run-instances command
EOT
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--headers'
headers = true
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
]
main :instance_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.reboot_instances(args[0])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
puts "Success: Rebooting"
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
instance = ARGV.shift
if !instance
puts "#{cmd_name}: missing INSTANCE-ID parameter"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.reboot_instances(instance)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
puts "Success: Reboting"
exit 0
+1
View File
@@ -44,6 +44,7 @@ EOT"
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
+2 -6
View File
@@ -44,6 +44,7 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
@@ -66,12 +67,7 @@ EOT
[-1, "#{cmd_name}: #{rc.message}"]
else
exit_code 0
if options[:headers]
CLIHelper.print_header("publicIP")
end
puts rc['publicIP']
puts "publicIP: #{rc['publicIP']}"
end
end
end
+1
View File
@@ -89,6 +89,7 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL,
+38 -85
View File
@@ -23,101 +23,54 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-start-instances
Start the selected running instance
Usage:
econe-register [OPTIONS] INSTANCE-ID
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--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
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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]
)
url = nil
access = nil
secret = nil
CommandParser::CmdParser.new(ARGV) do
usage "econe-start-instances [OPTIONS] INSTANCE-ID"
version CloudCLI.version_text
description <<-EOT
Start the selected stopped instance
INSTANCE-ID: The instance identification as returned by the econe-run-instances command
EOT
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--headers'
headers = true
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
]
main :instance_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.start_instances(args[0])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
result = rc['instancesSet']['item'][0]
puts "Success: Starting #{result['instanceId']} in " <<
"#{result['previousState']['name']} state"
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
instance = ARGV.shift
if !instance
puts "#{cmd_name}: missing INSTANCE-ID parameter"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.start_instances(instance)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
result = rc['instancesSet']['item'][0]
puts "Success: Starting #{result['instanceId']} in #{result['previousState']['name']} state"
exit 0
+38 -85
View File
@@ -23,101 +23,54 @@ else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
econe-stop-instances
Stop the selected running instance
Usage:
econe-register [OPTIONS] INSTANCE-ID
Options:
--help, -h
Show help
--access-key <id>, -K <id>
The username of the user
--secret-key <key>, -S <key>
The password of the user
--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
EOT
require 'cli/command_parser'
require 'cli/cli_helper'
require 'econe/EC2QueryClient'
require 'CloudClient'
require 'getoptlong'
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]
)
url = nil
access = nil
secret = nil
CommandParser::CmdParser.new(ARGV) do
usage "econe-stop-instances [OPTIONS] INSTANCE-ID"
version CloudCLI.version_text
description <<-EOT
Stop the selected running instance
INSTANCE-ID: The instance identification as returned by the econe-run-instances command
EOT
begin
opts.each do |opt, arg|
case opt
when '--help'
puts COMMANDS_HELP
return
when '--version'
puts CloudCLI.version_text
exit 0
when '--access-key'
access = arg
when '--secret-key'
secret = arg
when '--url'
url = arg
when '--headers'
headers = true
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL
]
main :instance_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
options[:secret_key],
options[:url])
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.stop_instances(args[0])
if CloudClient::is_error?(rc)
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
result = rc['instancesSet']['item'][0]
puts "Success: Stopping #{result['instanceId']} in " <<
"#{result['previousState']['name']} state"
exit_with_code 0
end
end
rescue Exception => e
exit -1
end
instance = ARGV.shift
if !instance
puts "#{cmd_name}: missing INSTANCE-ID parameter"
exit -1
end
begin
ec2_client = EC2QueryClient::Client.new(access, secret, url)
rescue Exception => e
puts "#{cmd_name}: #{e.message}"
exit -1
end
rc = ec2_client.stop_instances(instance)
if CloudClient::is_error?(rc)
puts "#{cmd_name}: #{rc.message}"
exit -1
end
result = rc['instancesSet']['item'][0]
puts "Success: Stopping #{result['instanceId']} in #{result['previousState']['name']} state"
exit 0
+6 -7
View File
@@ -45,14 +45,13 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL,
USER_DATA,
TYPE
EC2QueryClient::URL
]
main :image_id do
main :instance_id do
begin
ec2_client = EC2QueryClient::Client.new(
options[:access_key],
@@ -69,9 +68,9 @@ EOT
exit_with_code -1, "#{cmd_name}: #{rc.message}"
else
result = rc['instancesSet']['item'][0]
puts "Success: Terminating #{result['instanceId']} in \
#{result['previousState']['name']} state"
puts "Success: Terminating #{result['instanceId']} in " <<
"#{result['previousState']['name']} state"
exit_with_code 0
end
end
end
end
+2 -2
View File
@@ -53,11 +53,11 @@ EOT
option [
CommandParser::VERBOSE,
CommandParser::HELP,
CommandParser::VERSION,
EC2QueryClient::ACCESS_KEY,
EC2QueryClient::SECRET_KEY,
EC2QueryClient::URL,
USER_DATA,
TYPE
MULTIPART
]
main :file do
+1
View File
@@ -252,6 +252,7 @@ module EC2QueryClient
connection = Curl::Easy.new(@uri.to_s)
connection.multipart_form_post = true
connection.ssl_verify_peer = false
connection.http_post(*post_fields)
+5 -35
View File
@@ -63,6 +63,11 @@ end
###############################################################################
class EC2QueryServer < CloudServer
include ElasticIP
include Keypair
include EBS
include Instance
############################################################################
#
#
@@ -78,18 +83,6 @@ class EC2QueryServer < CloudServer
else
@base_url="http://#{config[:server]}:#{config[:port]}"
end
# ----------- Load EC2 API modules ------------
if @config[:elasticips_vnet_id].nil?
logger.error { 'ElasticIP module not loaded' }
else
extend ElasticIP
end
extend Keypair
extend EBS
extend Instance
end
###########################################################################
@@ -166,29 +159,6 @@ class EC2QueryServer < CloudServer
return response.result(binding), 200
end
###########################################################################
# Provide defaults for Elastic IP if not loaded
###########################################################################
def allocate_address(params)
return OpenNebula::Error.new('Unsupported')
end
def release_address(params)
return OpenNebula::Error.new('Unsupported')
end
def describe_addresses(params)
return OpenNebula::Error.new('Unsupported')
end
def associate_address(params)
return OpenNebula::Error.new('Unsupported')
end
def disassociate_address(params)
return OpenNebula::Error.new('Unsupported')
end
###########################################################################
# Helper functions
###########################################################################
+4
View File
@@ -165,6 +165,10 @@ module Instance
rc = block.call(vm)
if OpenNebula::is_error?(rc)
return rc
end
vm.info
erb_current_state = render_state(vm)
+1 -1
View File
@@ -93,7 +93,7 @@ module Keypair
erb_ssh_public_key = erb_public_key.ssh_type <<
" " <<
[ erb_public_key.to_blob ].pack('m0') <<
[ erb_public_key.to_blob ].pack('m0').gsub(/\n/, '') <<
" " <<
erb_keyname
kp[erb_keyname] = {
+1 -1
View File
@@ -53,7 +53,7 @@
</form>
</div>
<div id="footer" style="overflow:visible;">
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.0</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.80</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
</div>
</body>
</html>
+1 -1
View File
@@ -81,7 +81,7 @@
</div>
<div id="footer" style="overflow:visible;" class="ui-layout-south">
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.0</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.80</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
</div>
@@ -119,6 +119,16 @@ public class Client{
return new OneResponse(success, msg);
}
/**
* Calls OpenNebula and retrieves oned version
*
* @return The server's xml-rpc response encapsulated
*/
public OneResponse get_version()
{
return call("system.version");
}
//--------------------------------------------------------------------------
// PRIVATE ATTRIBUTES AND METHODS
//--------------------------------------------------------------------------
@@ -491,6 +491,15 @@ public class VirtualMachine extends PoolElement{
return action("shutdown");
}
/**
* Powers off a running VM.
* @return If an error occurs the error message contains the reason.
*/
public OneResponse poweroff()
{
return action("poweroff");
}
/**
* Reboots a running VM.
* @return If an error occurs the error message contains the reason.
+5 -1
View File
@@ -52,7 +52,7 @@ require 'OpenNebula/DocumentPool'
module OpenNebula
# OpenNebula version
VERSION = '3.7.0'
VERSION = '3.7.80'
# The Error Class represents a generic error in the OpenNebula
# library. It contains a readable representation of the error.
@@ -167,5 +167,9 @@ module OpenNebula
Error.new(e.message)
end
end
def get_version()
call("system.version")
end
end
end
+86 -3
View File
@@ -28,7 +28,90 @@ module Migrator
def up
########################################################################
# Bug #1335
# Feature #1522: Allow users to create Documents by default
########################################################################
# Insert rule "* DOCUMENT/* CREATE"
last_oid = 0
@db.fetch("SELECT last_oid FROM pool_control WHERE tablename='acl'") do |row|
last_oid = row[:last_oid].to_i
end
@db[:acl].insert(
:oid => (last_oid + 1).to_s,
:user => 0x400000000.to_s,
:resource => 0x400400000000.to_s,
:rights => 0x8.to_s)
@db.run("UPDATE pool_control SET last_oid=#{last_oid + 1} WHERE tablename='acl';")
########################################################################
# Bugs #1363: Make sure all VMs have CPU (float) & MEM (int)
########################################################################
# NOTE: The VM memory and CPU are modified, but the sum in
# HOST/HOST_SHARE is not. A onedb fsck is required
@db.run "ALTER TABLE vm_pool RENAME TO old_vm_pool;"
@db.run "CREATE TABLE vm_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body TEXT, uid INTEGER, gid INTEGER, last_poll INTEGER, state INTEGER, lcm_state INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER);"
@db.fetch("SELECT * FROM old_vm_pool") do |row|
if ( row[:state] == 6 )
body = row[:body]
else
vm_doc = Document.new(row[:body])
memory = nil
vm_doc.root.each_element("TEMPLATE/MEMORY") { |e|
memory = e.text.to_i
memory = 0 if memory < 0
e.text = memory.to_s
}
if memory.nil?
vm_doc.root.each_element("TEMPLATE") { |e|
e.add_element("MEMORY").text = "0"
}
end
cpu = nil
vm_doc.root.each_element("TEMPLATE/CPU") { |e|
# truncate to 2 decimals
cpu = (e.text.to_f * 100).to_i / 100.0
cpu = 0 if cpu < 0
e.text = cpu.to_s
}
if cpu.nil?
vm_doc.root.each_element("TEMPLATE") { |e|
e.add_element("CPU").text = "0"
}
end
body = vm_doc.root.to_s
end
@db[:vm_pool].insert(
:oid => row[:oid],
:name => row[:name],
:body => body,
:uid => row[:uid],
:gid => row[:gid],
:last_poll => row[:last_poll],
:state => row[:state],
:lcm_state => row[:lcm_state],
:owner_u => row[:owner_u],
:group_u => row[:group_u],
:other_u => row[:other_u])
end
@db.run "DROP TABLE old_vm_pool;"
########################################################################
# Bug #1335: Add suspended VMs resoureces to Host usage
########################################################################
@db.fetch("SELECT * FROM vm_pool WHERE state = 5") do |row|
@@ -41,7 +124,7 @@ module Migrator
cpu = 0
vm_doc.root.each_element("TEMPLATE/CPU") { |e|
cpu = e.text.to_i
cpu = e.text.to_f
}
hid = -1
@@ -188,7 +271,7 @@ module Migrator
mem_used = 0
vms_used = 0
@db.fetch("SELECT body FROM vm_pool WHERE #{where_filter} AND state!=6") do |vm_row|
@db.fetch("SELECT body FROM vm_pool WHERE #{where_filter} AND state<>6") do |vm_row|
vmdoc = Document.new(vm_row[:body])
# VM quotas
+1 -1
View File
@@ -65,7 +65,7 @@
</div>
<div id="footer" style="overflow:visible;" class="ui-layout-south">
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.0</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.80</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
</div>
<div id="dialogs">
+1 -1
View File
@@ -49,7 +49,7 @@
</form>
</div>
<div id="footer" style="overflow:visible;">
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.0</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.80</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
</div>
</body>
</html>
+153 -9
View File
@@ -19,7 +19,6 @@
#include "PoolObjectAuth.h"
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@@ -31,17 +30,20 @@ void Request::execute(
att.retval = _retval;
att.session = xmlrpc_c::value_string (_paramList.getString(0));
att.req_id = rand() % 1000;
Nebula& nd = Nebula::instance();
UserPool* upool = nd.get_upool();
NebulaLog::log("ReM",Log::DEBUG, method_name + " method invoked");
bool authenticated = upool->authenticate( att.session,
att.uid,
att.gid,
att.uname,
att.gname);
if ( upool->authenticate(att.session,
att.uid,
att.gid,
att.uname,
att.gname) == false )
log_method_invoked(att, _paramList);
if ( authenticated == false )
{
failure_response(AUTHENTICATION, authenticate_error(), att);
}
@@ -49,11 +51,155 @@ void Request::execute(
{
request_execute(_paramList, att);
}
log_result(att);
};
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
void Request::log_method_invoked(
const RequestAttributes& att,
const xmlrpc_c::paramList& paramList)
{
ostringstream oss;
oss << "[" << att.req_id << "] ";
if ( att.uid != -1 )
{
oss << "[" << att.uid << " " << att.uname << "] ";
}
else
{
oss << "[- -] ";
}
oss << "[" << method_name << "] method invoked";
for (unsigned int i=1; i<paramList.size(); i++)
{
log_xmlrpc_param(paramList[i], oss, i);
}
NebulaLog::log("ReM",Log::DEBUG, oss);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
void Request::log_result(
const RequestAttributes& att)
{
ostringstream oss;
oss << "[" << att.req_id << "] ";
if ( att.uid != -1 )
{
oss << "[" << att.uid << " " << att.uname << "] ";
}
else
{
oss << "[- -] ";
}
oss << "[" << method_name << "] ";
xmlrpc_c::value_array array1(*att.retval);
vector<xmlrpc_c::value> const vvalue(array1.vectorValueValue());
if ( static_cast<bool>(xmlrpc_c::value_boolean(vvalue[0])) )
{
oss << "SUCCESS";
for (unsigned int i=1; i<vvalue.size()-1; i++)
{
log_xmlrpc_value(vvalue[i], oss);
}
NebulaLog::log("ReM",Log::DEBUG, oss);
}
else
{
oss << "FAILURE "
<< static_cast<string>(xmlrpc_c::value_string(vvalue[1]));
NebulaLog::log("ReM",Log::ERROR, oss);
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
void Request::log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index)
{
log_xmlrpc_value(v, oss);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
void Request::log_xmlrpc_value(
const xmlrpc_c::value& v,
ostringstream& oss)
{
size_t st_limit = 20;
size_t st_newline;
switch (v.type())
{
case xmlrpc_c::value::TYPE_INT:
oss << ", " << static_cast<int>(xmlrpc_c::value_int(v));
break;
case xmlrpc_c::value::TYPE_BOOLEAN:
oss << ", ";
if ( static_cast<bool>(xmlrpc_c::value_boolean(v)) )
{
oss << "true";
}
else
{
oss << "false";
}
break;
case xmlrpc_c::value::TYPE_STRING:
st_newline =
static_cast<string>(xmlrpc_c::value_string(v)).find("\n");
if ( st_newline < st_limit )
{
st_limit = st_newline;
}
oss << ", \"" <<
static_cast<string>(xmlrpc_c::value_string(v)).substr(0,st_limit);
if ( static_cast<string>(xmlrpc_c::value_string(v)).size() > st_limit )
{
oss << "...";
}
oss << "\"";
break;
case xmlrpc_c::value::TYPE_DOUBLE:
oss << ", "
<< static_cast<double>(xmlrpc_c::value_double(v));
break;
default:
oss << ", unknown param type";
break;
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
bool Request::basic_authorization(int oid,
AuthRequest::Operation op,
RequestAttributes& att)
@@ -338,8 +484,6 @@ void Request::failure_response(ErrorCode ec, const string& str_val,
xmlrpc_c::value_array arrayresult(arrayData);
*(att.retval) = arrayresult;
NebulaLog::log("ReM",Log::ERROR,str_val);
}
/* -------------------------------------------------------------------------- */
+10
View File
@@ -37,6 +37,8 @@
#include "RequestManagerCluster.h"
#include "RequestManagerGroup.h"
#include "RequestManagerSystem.h"
#include <sys/signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -362,6 +364,9 @@ void RequestManager::register_xml_methods()
xmlrpc_c::methodPtr cluster_addvnet(new ClusterAddVNet());
xmlrpc_c::methodPtr cluster_delvnet(new ClusterDelVNet());
// System Methods
xmlrpc_c::methodPtr system_version(new SystemVersion());
/* VM related methods */
RequestManagerRegistry.addMethod("one.vm.deploy", vm_deploy);
RequestManagerRegistry.addMethod("one.vm.action", vm_action);
@@ -490,6 +495,11 @@ void RequestManager::register_xml_methods()
RequestManagerRegistry.addMethod("one.document.clone", doc_clone);
RequestManagerRegistry.addMethod("one.documentpool.info",docpool_info);
/* System related methods */
RequestManagerRegistry.addMethod("one.system.version", system_version);
};
/* -------------------------------------------------------------------------- */
+17
View File
@@ -546,6 +546,23 @@ int UserAllocate::pool_allocate(xmlrpc_c::paramList const& paramList,
return upool->allocate(&id,ugid,uname,ugname,passwd,driver,true,error_str);
}
/* -------------------------------------------------------------------------- */
void UserAllocate::log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index)
{
if ( index == 2 ) // password argument
{
oss << ", ****";
}
else
{
Request::log_xmlrpc_param(v, oss, index);
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
+39
View File
@@ -0,0 +1,39 @@
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2012, 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 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
#include "RequestManagerSystem.h"
#include "Nebula.h"
using namespace std;
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
void SystemVersion::request_execute(xmlrpc_c::paramList const& paramList,
RequestAttributes& att)
{
// TODO: request_execute will not be executed if the session string
// is not authenticated in Request::execute.
// Should we make the version call accessible even
// if no user is provided?
success_response(Nebula::instance().db_version(), att);
return;
}
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
+34
View File
@@ -86,6 +86,23 @@ int UserChangePassword::user_action(int user_id,
return rc;
}
/* -------------------------------------------------------------------------- */
void UserChangePassword::log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index)
{
if ( index == 2 ) // password argument
{
oss << ", ****";
}
else
{
Request::log_xmlrpc_param(v, oss, index);
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
@@ -133,6 +150,23 @@ int UserChangeAuth::user_action(int user_id,
return rc;
}
/* -------------------------------------------------------------------------- */
void UserChangeAuth::log_xmlrpc_param(
const xmlrpc_c::value& v,
ostringstream& oss,
const int& index)
{
if ( index == 3 ) // password argument
{
oss << ", ****";
}
else
{
Request::log_xmlrpc_param(v, oss, index);
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
+2 -1
View File
@@ -40,7 +40,8 @@ source_files=[
'RequestManagerAcl.cc',
'RequestManagerChmod.cc',
'RequestManagerCluster.cc',
'RequestManagerClone.cc'
'RequestManagerClone.cc',
'RequestManagerSystem.cc'
]
# Build library
+1 -1
View File
@@ -94,7 +94,7 @@
</div>
</div>
<div id="footer" style="overflow:visible;" class="ui-layout-south">
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.0</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.80</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
</div>
+1 -1
View File
@@ -36,7 +36,7 @@
<div id="footer" style="overflow:visible;">
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.0</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
<a href="http://opennebula.org" target="_blank">OpenNebula 3.7.80</a> by <a href="http://c12g.com" target="_blank">C12G Labs</a>.
</div>
</body>
</html>
+7 -3
View File
@@ -41,13 +41,17 @@ fi
#-------------------------------------------------------------------------------
# Set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
SRC_PATH="../../${SRC_PATH##"$DS_DIR/"}"
DST_PATH=`arg_path $DST`
DST_HOST=`arg_host $DST`
DST_DIR=`dirname $DST_PATH`
SRC_ARG_PATH=`arg_path $SRC`
DST_DS_PATH="$(dirname $(dirname $(dirname $DST_PATH)))"
SRC_DS_PATH="$(dirname $(dirname $SRC_ARG_PATH))"
SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}"
ssh_make_path $DST_HOST $DST_DIR
#-------------------------------------------------------------------------------
+8 -6
View File
@@ -38,17 +38,19 @@ fi
. $TMCOMMON
set_ds_location
#-------------------------------------------------------------------------------
# Set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
DST_PATH=`arg_path $DST`
DST_PATH="$RMT_DS_DIR/${DST_PATH##"$DS_DIR/"}"
SRC_HOST=`arg_host $SRC`
SRC_DIR=`dirname $SRC_PATH`
DST_ARG_PATH=`arg_path $DST`
SRC_DS_PATH="$(dirname $(dirname $(dirname $SRC_PATH)))"
DST_DS_PATH="$(dirname $(dirname $DST_ARG_PATH))"
DST_PATH="${SRC_DS_PATH}${DST_ARG_PATH##$DST_DS_PATH}"
#-------------------------------------------------------------------------------
# Move the image back to the datastore
+7 -3
View File
@@ -41,13 +41,17 @@ fi
#-------------------------------------------------------------------------------
# Set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
SRC_PATH="../../${SRC_PATH##"$DS_DIR/"}"
DST_PATH=`arg_path $DST`
DST_HOST=`arg_host $DST`
DST_DIR=`dirname $DST_PATH`
SRC_ARG_PATH=`arg_path $SRC`
DST_DS_PATH="$(dirname $(dirname $(dirname $DST_PATH)))"
SRC_DS_PATH="$(dirname $(dirname $SRC_ARG_PATH))"
SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}"
ssh_make_path $DST_HOST $DST_DIR
#-------------------------------------------------------------------------------
+18 -21
View File
@@ -41,46 +41,43 @@ fi
#-------------------------------------------------------------------------------
# Set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
SRC_PATH="../../${SRC_PATH##"$DS_DIR/"}"
DST_PATH=`arg_path $DST`
DST_HOST=`arg_host $DST`
DST_DIR=`dirname $DST_PATH`
SRC_ARG_PATH=`arg_path $SRC`
DST_DS_PATH="$(dirname $(dirname $(dirname $DST_PATH)))"
SRC_DS_PATH="$(dirname $(dirname $SRC_ARG_PATH))"
SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}"
#-------------------------------------------------------------------------------
# Link (ln) SRC into DST
#-------------------------------------------------------------------------------
# Is it a file or a folder (VMware)?
if [ -d `arg_path $SRC` ]; then
ssh_make_path $DST_HOST $DST_PATH
ssh_make_path $DST_HOST $DST_PATH
# It's a folder, make links for all elements
SRC_FOLDER_NAME=`basename $SRC_PATH`
SRC_WITH_NO_FOLDER=`dirname $SRC_PATH`
SRC_DS_NAME=`basename $SRC_WITH_NO_FOLDER`
REL_SRC_PATH="../../../$SRC_DS_NAME/$SRC_FOLDER_NAME"
log "Link all files in $SRC_PATH to $DST_PATH"
log "Link all files in $SRC_PATH to $DST_PATH"
LINK_SCRIPT=$(cat <<EOF
for file in \$(cd $DST_DIR ; find $SRC_PATH -type f); do
FNAME=\$(basename \$file)
(cd $DST_PATH ; ln -sf $REL_SRC_PATH/\$FNAME $DST_PATH/$FNAME)
for file in \$(find $SRC_PATH -type f); do
(cd $DST_PATH ; ln -sf \$file)
done
EOF
)
ssh_exec_and_log $DST_HOST "$LINK_SCRIPT" "Could not link dir files from source DS to system DS"
ssh_exec_and_log $DST_HOST "$LINK_SCRIPT" "Could not link dir files from source DS to system DS"
else
ssh_make_path $DST_HOST $DST_DIR
ssh_make_path $DST_HOST $DST_DIR
# Just link a file
log "Linking $SRC_PATH in $DST"
# Just link a file
log "Linking $SRC_PATH in $DST"
ssh_exec_and_log $DST_HOST \
"cd $DST_DIR; rm $DST_PATH ; ln -s $SRC_PATH $DST_PATH" \
"Error linking $SRC to $DST"
ssh_exec_and_log $DST_HOST \
"cd $DST_DIR; rm $DST_PATH ; ln -s $SRC_PATH $DST_PATH" \
"Error linking $SRC to $DST"
fi
+8 -6
View File
@@ -38,17 +38,19 @@ fi
. $TMCOMMON
set_ds_location
#-------------------------------------------------------------------------------
# Set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
DST_PATH=`arg_path $DST`
DST_PATH="$RMT_DS_DIR/${DST_PATH##"$DS_DIR/"}"
SRC_HOST=`arg_host $SRC`
SRC_DIR=`dirname $SRC_PATH`
DST_ARG_PATH=`arg_path $DST`
SRC_DS_PATH="$(dirname $(dirname $(dirname $SRC_PATH)))"
DST_DS_PATH="$(dirname $(dirname $DST_ARG_PATH))"
DST_PATH="${SRC_DS_PATH}${DST_ARG_PATH##$DST_DS_PATH}"
#-------------------------------------------------------------------------------
# Move the image back to the datastore
+1 -13
View File
@@ -38,22 +38,10 @@ fi
. $TMCOMMON
set_ds_location
#-------------------------------------------------------------------------------
# Set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
DST_PATH=`arg_path $DST`
DST_PATH="$RMT_DS_DIR/${DST_PATH##"$DS_DIR/"}"
SRC_HOST=`arg_host $SRC`
#-------------------------------------------------------------------------------
# Move the image back to the datastore
#-------------------------------------------------------------------------------
log "Moving $SRC_PATH to datastore as $DST_PATH"
log "Moving $SRC to datastore as $DST"
exec_and_log "$SCP -r $SRC $DST" "Error copying $SRC to $DST"
exit 0
-9
View File
@@ -53,15 +53,6 @@ function arg_path
fix_dir_slashes "$ARG_PATH"
}
#Return the DATASTORE_LOCATION from OpenNebula configuration
function set_ds_location
{
RMT_DS_DIR=`$GREP '^DATASTORE_LOCATION=' $ONE_LOCAL_VAR/config | cut -d= -f2`
RMT_DS_DIR=`fix_dir_slashes $RMT_DS_DIR`
export RMT_DS_DIR
}
#Return 1 if the first argument is a disk
function is_disk
{
+15 -18
View File
@@ -42,13 +42,17 @@ source $(dirname $0)/tm_vmfs.conf
#-------------------------------------------------------------------------------
# Retrieve needed information, set dst path and dir
#-------------------------------------------------------------------------------
SRC_PATH=`arg_path $SRC`
SRC_PATH="../../${SRC_PATH##"$DS_DIR/"}"
DST_PATH=`arg_path $DST`
DST_HOST=`arg_host $DST`
DST_DIR=`dirname $DST_PATH`
SRC_ARG_PATH=`arg_path $SRC`
DST_DS_PATH="$(dirname $(dirname $(dirname $DST_PATH)))"
SRC_DS_PATH="$(dirname $(dirname $SRC_ARG_PATH))"
SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}"
USE_SSH=$(get_tm_use_ssh $DSID)
#-------------------------------------------------------------------------------
@@ -56,28 +60,21 @@ USE_SSH=$(get_tm_use_ssh $DSID)
#-------------------------------------------------------------------------------
if [ "$USE_SSH" == "yes" ]; then
ssh_make_path $DST_HOST $DST_PATH
ssh_make_path $DST_HOST $DST_PATH
# It's a folder, make links for all elements
SRC_FOLDER_NAME=`basename $SRC_PATH`
SRC_WITH_NO_FOLDER=`dirname $SRC_PATH`
SRC_DS_NAME=`basename $SRC_WITH_NO_FOLDER`
REL_SRC_PATH="../../../$SRC_DS_NAME/$SRC_FOLDER_NAME"
log "Link all files in $SRC_PATH to $DST_PATH"
log "Link all files in $SRC_PATH to $DST_PATH"
LINK_SCRIPT=$(cat <<EOF
for file in \$(cd $DST_DIR ; find $SRC_PATH -type f); do
FNAME=\$(basename \$file)
(cd $DST_PATH ; ln -sf $REL_SRC_PATH/\$FNAME $DST_PATH/$FNAME)
for file in \$(find $SRC_PATH -type f); do
(cd $DST_PATH ; ln -sf \$file)
done
EOF
)
ssh_exec_and_log $DST_HOST "$LINK_SCRIPT" \
"Could not link dir files from source DS to system DS"
ssh_exec_and_log $DST_HOST "$LINK_SCRIPT" \
"Could not link dir files from source DS to system DS"
else
log "Cannot link files without SSH enabled on the ESX hosts, calling clone"
exec $(dirname $0)/clone $*
log "Cannot link files without SSH enabled on the ESX hosts, calling clone"
exec $(dirname $0)/clone $*
fi
exit 0
-2
View File
@@ -41,8 +41,6 @@ fi
. $TMCOMMON
source $(dirname $0)/tm_vmfs.conf
set_ds_location
#-------------------------------------------------------------------------------
# Retrieve needed information, set dst path and dir
#-------------------------------------------------------------------------------
+2 -1
View File
@@ -37,7 +37,8 @@ COMMANDS = {
:vconfig => "sudo /sbin/vconfig",
:virsh => "virsh -c qemu:///system",
:xm => "sudo /usr/sbin/xm",
:ovs_vsctl=> "sudo /usr/local/bin/ovs-vsctl",
:ovs_vsctl=> "sudo /usr/bin/ovs-vsctl",
:ovs_ofctl=> "sudo /usr/bin/ovs-ofctl",
:lsmod => "/sbin/lsmod"
}
+113 -10
View File
@@ -17,7 +17,11 @@
require 'OpenNebulaNetwork'
class OpenvSwitchVLAN < OpenNebulaNetwork
XPATH_FILTER = "TEMPLATE/NIC[VLAN='YES']"
FIREWALL_PARAMS = [:black_ports_tcp,
:black_ports_udp,
:icmp]
XPATH_FILTER = "TEMPLATE/NIC"
def initialize(vm, deploy_id = nil, hypervisor = nil)
super(vm,XPATH_FILTER,deploy_id,hypervisor)
@@ -25,18 +29,117 @@ class OpenvSwitchVLAN < OpenNebulaNetwork
def activate
process do |nic|
if nic[:vlan_id]
vlan = nic[:vlan_id]
else
vlan = CONF[:start_vlan] + nic[:network_id].to_i
end
@nic = nic
cmd = "#{COMMANDS[:ovs_vsctl]} set Port #{nic[:tap]} "
cmd << "tag=#{vlan}"
# Apply VLAN
tag_vlan if @nic[:vlan] == "YES"
OpenNebula.exec_and_log(cmd)
# Prevent Mac-spoofing
mac_spoofing
# Apply Firewall
configure_fw if FIREWALL_PARAMS & @nic.keys != []
end
return 0
end
def deactivate
process do |nic|
@nic = nic
# Remove flows
del_flows
end
end
def tag_vlan
if @nic[:vlan_id]
vlan = @nic[:vlan_id]
else
vlan = CONF[:start_vlan] + @nic[:network_id].to_i
end
cmd = "#{COMMANDS[:ovs_vsctl]} set Port #{@nic[:tap]} "
cmd << "tag=#{vlan}"
run cmd
end
def mac_spoofing
add_flow("in_port=#{port},dl_src=#{@nic[:mac]}",:normal,40000)
add_flow("in_port=#{port}",:drop,39000)
end
def configure_fw
# TCP
if range = @nic[:black_ports_tcp]
if range? range
range.split(",").each do |p|
add_flow("tcp,dl_dst=#{@nic[:mac]},tp_dst=#{p}",:drop)
end
end
end
# UDP
if range = @nic[:black_ports_udp]
if range? range
range.split(",").each do |p|
add_flow("udp,dl_dst=#{@nic[:mac]},tp_dst=#{p}",:drop)
end
end
end
# ICMP
if @nic[:icmp]
if %w(no drop).include? @nic[:icmp].downcase
add_flow("icmp,dl_dst=#{@nic[:mac]}",:drop)
end
end
end
def del_flows
in_port = ""
dump_flows = "#{COMMANDS[:ovs_ofctl]} dump-flows #{@nic[:bridge]}"
`#{dump_flows}`.lines do |flow|
next unless flow.match("#{@nic[:mac]}")
flow = flow.split.select{|e| e.match(@nic[:mac])}.first
if in_port.empty? and (m = flow.match(/in_port=(\d+)/))
in_port = m[1]
end
del_flow flow
end
del_flow "in_port=#{in_port}" if !in_port.empty?
end
def add_flow(filter,action,priority=nil)
priority = (priority.to_s.empty? ? "" : "priority=#{priority},")
run "#{COMMANDS[:ovs_ofctl]} add-flow " <<
"#{@nic[:bridge]} #{filter},#{priority}actions=#{action}"
end
def del_flow(filter)
filter.gsub!(/priority=(\d+)/,"")
run "#{COMMANDS[:ovs_ofctl]} del-flows " <<
"#{@nic[:bridge]} #{filter}"
end
def run(cmd)
OpenNebula.exec_and_log(cmd)
end
def port
return @nic[:port] if @nic[:port]
dump_ports = `#{COMMANDS[:ovs_ofctl]} \
dump-ports #{@nic[:bridge]} #{@nic[:tap]}`
@nic[:port] = dump_ports.scan(/^\s*port\s*(\d+):/).flatten.first
end
def range?(range)
!range.match(/^\d+(,\d+)*$/).nil?
end
end
+4 -4
View File
@@ -19,9 +19,9 @@
$: << File.dirname(__FILE__)
$: << File.join(File.dirname(__FILE__), "..")
require 'OpenNebulaNetwork'
require 'Firewall'
require 'OpenvSwitch'
fw = OpenNebulaFirewall.from_base64(ARGV[0])
template64 = ARGV[0]
fw.deactivate
ovs = OpenvSwitchVLAN.from_base64(template64)
ovs.deactivate
+2 -8
View File
@@ -20,15 +20,9 @@ $: << File.dirname(__FILE__)
$: << File.join(File.dirname(__FILE__), "..")
require 'OpenvSwitch'
require 'Firewall'
template64 = ARGV[0]
deploy_id = ARGV[1]
onevlan = OpenvSwitchVLAN.from_base64(template64, deploy_id)
onevlan.activate
fw = OpenNebulaFirewall.from_base64(template64, deploy_id)
fw.activate
ovs = OpenvSwitchVLAN.from_base64(template64, deploy_id)
ovs.activate