1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

Feature #3167, #3169: fix compilation

This commit is contained in:
Carlos Martín 2014-09-03 12:49:31 +02:00
parent efe97e0ade
commit 2bfdae1c07
5 changed files with 17 additions and 7 deletions

View File

@ -163,13 +163,16 @@ public:
VectorAttribute * disk,
const vector<string>& inherit_attrs);
/**
* Replace template for this object. Object should be updated
* after calling this method
* @param tmpl string representation of the template
* @param tmpl_str new contents
* @param keep_restricted If true, the restricted attributes of the
* current template will override the new template
* @param error string describing the error if any
* @return 0 on success
*/
int replace_template(const string& tmpl_str, string& error);
int replace_template(const string& tmpl_str, bool keep_restricted, string& error);
/**
* Set monitor information for the Datastore

View File

@ -358,9 +358,13 @@ public:
/**
* Replace the template of the virtual network it also updates the BRIDGE,
* PHY_DEV, VLAN_ID and VLAN attributes.
* @param tmpl string representation of the template
* @param tmpl_str new contents
* @param keep_restricted If true, the restricted attributes of the
* current template will override the new template
* @param error string describing the error if any
* @return 0 on success
*/
int replace_template(const string& tmpl_str, string& error);
int replace_template(const string& tmpl_str, bool keep_restricted, string& error);
/**
* Gets a string based attribute (single) from an address range. If the

View File

@ -584,7 +584,8 @@ int Datastore::from_xml(const string& xml)
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int Datastore::replace_template(const string& tmpl_str, string& error_str)
int Datastore::replace_template(
const string& tmpl_str, bool keep_restricted, string& error_str)
{
string new_ds_mad;
string new_tm_mad;

View File

@ -38,6 +38,7 @@ sched_env.Prepend(LIBS=[
'nebula_common',
'nebula_core',
'nebula_template',
'nebula_vm',
'crypto',
'xml2'
])

View File

@ -206,7 +206,8 @@ error_common:
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
int VirtualNetwork::replace_template(const string& tmpl_str, string& error_str)
int VirtualNetwork::replace_template(
const string& tmpl_str, bool keep_restricted, string& error_str)
{
string new_bridge;
bool b_vlan;