1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-21 18:03:38 +03:00

Trunk now is OpenNebula 1.3. New raw XML vmm drvier type. updated date in license

git-svn-id: http://svn.opennebula.org/one/trunk@330 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
Rubén S. Montero 2009-01-26 18:25:15 +00:00
parent 4c0b32d83c
commit 60aff2d402
49 changed files with 186 additions and 48 deletions

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */
@ -73,6 +73,13 @@ public:
* @return a string (allocated in the heap) holding the attribute value. * @return a string (allocated in the heap) holding the attribute value.
*/ */
virtual string * marshall(const char * _sep = 0) = 0; virtual string * marshall(const char * _sep = 0) = 0;
/**
* Write the attribute using a simple XML format. The string MUST be freed
* by the calling function.
* @return a string (allocated in the heap) holding the attribute value.
*/
virtual string * to_xml() const = 0;
/** /**
* Builds a new attribute from a string. * Builds a new attribute from a string.
@ -135,7 +142,25 @@ public:
return rs; return rs;
}; };
/**
* Write the attribute using a simple XML format:
*
* <attribute_name>attribute_value</attribute_name>
*
* The string MUST be freed by the calling function.
* @return a string (allocated in the heap) holding the attribute value.
*/
string * to_xml() const
{
string * xml = new string;
*xml = "<" + name() + ">" + attribute_value
+ "</"+ name() + ">";
return xml;
}
/** /**
* Builds a new attribute from a string. * Builds a new attribute from a string.
*/ */
@ -204,6 +229,20 @@ public:
* @return a string (allocated in the heap) holding the attribute value. * @return a string (allocated in the heap) holding the attribute value.
*/ */
string * marshall(const char * _sep = 0); string * marshall(const char * _sep = 0);
/**
* Write the attribute using a simple XML format:
*
* <attribute_name>
* <val_name_1>val_value_1</val_name_1>
* ...
* <val_name_n>val_value_n</val_name_n>
* </attribute_name>
*
* The string MUST be freed by the calling function.
* @return a string (allocated in the heap) holding the attribute value.
*/
string * to_xml() const;
/** /**
* Builds a new attribute from a string of the form: * Builds a new attribute from a string of the form:

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,3 +1,20 @@
/* -------------------------------------------------------------------------- */
/* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.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 LIBVIRT_DRIVER_H_ #ifndef LIBVIRT_DRIVER_H_
#define LIBVIRT_DRIVER_H_ #define LIBVIRT_DRIVER_H_

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */
@ -211,7 +211,7 @@ public:
static string version() static string version()
{ {
return "ONE1.1.85"; return "OpenNebula 1.3.0";
}; };
void start(); void start();

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */
@ -74,6 +74,20 @@ public:
* @param delim to separate attributes * @param delim to separate attributes
*/ */
void marshall(string &str, const char delim='\n'); void marshall(string &str, const char delim='\n');
/**
* Writes the template in a simple xml string:
* <template>
* <single>value</single>
* <vector>
* <attr>value</attr>
* ...
* </vector>
* ...
* </template>
* @param xml string that hold the xml template representation
*/
void to_xml(string& xml) const;
/** /**
* Sets a new attribute, the attribute MUST BE ALLOCATED IN THE HEAP, and * Sets a new attribute, the attribute MUST BE ALLOCATED IN THE HEAP, and

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */
@ -537,6 +537,15 @@ public:
vm_template.get(str,value); vm_template.get(str,value);
} }
/**
* Generates a XML string for the template of the VM
* @param xml the string to store the XML description.
*/
void template_to_xml(string &xml) const
{
vm_template.to_xml(xml);
}
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// States // States
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -1,5 +1,5 @@
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Copyright 2002-2008, Distributed Systems Architecture Group, Universidad */ /* Copyright 2002-2009, Distributed Systems Architecture Group, Universidad */
/* Complutense de Madrid (dsa-research.org) */ /* Complutense de Madrid (dsa-research.org) */
/* */ /* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */

View File

@ -33,7 +33,7 @@ Options:
EOT EOT
ONE_VERSION=<<-EOT ONE_VERSION=<<-EOT
OpenNebula release 1.1.80 (2008/12/02) OpenNebula 1.3.0
Copyright 2002-2008, Distributed Systems Architecture Group, Universidad Copyright 2002-2008, Distributed Systems Architecture Group, Universidad
Complutense de Madrid (dsa-research.org) Complutense de Madrid (dsa-research.org)

View File

@ -61,6 +61,33 @@ string * VectorAttribute::marshall(const char * _sep)
return rs; return rs;
} }
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
string * VectorAttribute::to_xml() const
{
map<string,string>::const_iterator it;
ostringstream oss;
string * xml;
oss << "<" << name() << ">";
for (it=attribute_value.begin();it!=attribute_value.end();it++)
{
oss << "<" << it->first << ">" << it->second
<< "</"<< it->first << ">";
}
oss << "</"<< name() << ">";
xml = new string;
*xml = oss.str();
return xml;
}
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */

View File

@ -255,6 +255,31 @@ void Template::get(
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
void Template::to_xml(string& xml) const
{
multimap<string,Attribute *>::const_iterator it;
ostringstream oss;
string * s;
oss << "<template>";
for ( it = attributes.begin(); it!=attributes.end(); it++)
{
s = it->second->to_xml();
oss << *s;
delete s;
}
oss << "</template>";
xml = oss.str();
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
ostream& operator << (ostream& os, Template& t) ostream& operator << (ostream& os, Template& t)
{ {
multimap<string,Attribute *>::iterator it; multimap<string,Attribute *>::iterator it;
@ -274,3 +299,4 @@ ostream& operator << (ostream& os, Template& t)
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */

View File

@ -27,7 +27,8 @@ source_files=[
'VirtualMachineManagerDriver.cc', 'VirtualMachineManagerDriver.cc',
'XenDriver.cc', 'XenDriver.cc',
'LibVirtDriver.cc', 'LibVirtDriver.cc',
'EC2Driver.cc' 'EC2Driver.cc',
'XMLDriver.cc'
] ]
# Build library # Build library

View File

@ -18,6 +18,7 @@
#include "VirtualMachineManager.h" #include "VirtualMachineManager.h"
#include "Nebula.h" #include "Nebula.h"
#include "XenDriver.h" #include "XenDriver.h"
#include "XMLDriver.h"
#include "LibVirtDriver.h" #include "LibVirtDriver.h"
#include "EC2Driver.h" #include "EC2Driver.h"
#include <time.h> #include <time.h>
@ -794,7 +795,11 @@ void VirtualMachineManager::load_mads(int uid)
else if ( type == "EC2" ) else if ( type == "EC2" )
{ {
vmm_driver = new EC2Driver(uid, vattr->value(),(uid != 0),vmpool); vmm_driver = new EC2Driver(uid, vattr->value(),(uid != 0),vmpool);
} }
else if ( type == "XML" )
{
vmm_driver = new XMLDriver(uid, vattr->value(),(uid != 0),vmpool);
}
else else
{ {
oss.str(""); oss.str("");