mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
F-1540 Cold Migration variables
This commit is contained in:
commit
0979f85051
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,7 +28,7 @@ src/vmm_mad/remotes/lxd/tests/
|
||||
src/oca/python/pyone/bindings
|
||||
src/oca/python/build/
|
||||
src/oca/python/dist/
|
||||
src/oca/python/opennebula.egg-info/
|
||||
src/oca/python/pyone.egg-info/
|
||||
src/oca/python/doc/
|
||||
|
||||
src/docker_machine/pkg
|
||||
|
27
.travis.yml
Normal file
27
.travis.yml
Normal file
@ -0,0 +1,27 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
dist: xenial
|
||||
language: generic
|
||||
before_install:
|
||||
- sudo apt-get install -y libsystemd-dev bash-completion bison debhelper default-jdk flex javahelper libmysql++-dev libsqlite3-dev libssl-dev libws-commons-util-java libxml2-dev libxmlrpc3-client-java libxmlrpc3-common-java libxslt1-dev libcurl4-openssl-dev ruby scons libxmlrpc-c++8-dev npm libvncserver-dev
|
||||
- gem install rubocop
|
||||
- sudo npm install -g bower
|
||||
- sudo npm install -g grunt
|
||||
- sudo npm install -g grunt-cli
|
||||
- (cd src/sunstone/public && npm install && bower install)
|
||||
script:
|
||||
- set -o errexit; source .travis/smoke_tests.sh
|
10
.travis/README.md
Normal file
10
.travis/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
## Travis smoke tests
|
||||
|
||||
The `.travis/tests` directory contains scripts for each smoke test.
|
||||
|
||||
The smoke_test.sh script is called which iterates on each script, and it exits and logs on any failure. To add more tests, simply create a new file on `.travis/tests`.
|
||||
|
||||
Each test should:
|
||||
|
||||
- have a number as prefix to define the order. Renaming is allowed, the rule is to execute the less costly tests (in time) first
|
||||
- return 0 on success, other number on error
|
50
.travis/smoke_tests.sh
Executable file
50
.travis/smoke_tests.sh
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Smoke tests for OpenNebula, to be triggered by travis or manually
|
||||
# It executes all scripts in 'tests' folder and expects 0 exit code
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# default parameters values
|
||||
|
||||
LOG_FILE='smoke_tests.results'
|
||||
|
||||
check_test() {
|
||||
local TEST=$1
|
||||
|
||||
echo "Executing test $TEST" >> ${LOG_FILE}
|
||||
eval $TEST >> ${LOG_FILE} 2>&1
|
||||
RC=$?
|
||||
echo "RC for $TEST is $RC"
|
||||
return $RC
|
||||
}
|
||||
|
||||
for smoke_test in .travis/tests/*.sh; do
|
||||
check_test "$smoke_test" || break
|
||||
done
|
||||
|
||||
if [ $RC == 0 ]; then
|
||||
echo "All tests OK!"
|
||||
else
|
||||
echo "Test failed: "$smoke_test
|
||||
echo "Log follows:"
|
||||
cat $LOG_FILE
|
||||
fi
|
||||
|
||||
exit $RC
|
9
src/vmm_mad/remotes/vcenter/vcenterc → .travis/tests/01-rubocop.sh
Normal file → Executable file
9
src/vmm_mad/remotes/vcenter/vcenterc → .travis/tests/01-rubocop.sh
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2018, OpenNebula Project, OpenNebula Systems #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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 #
|
||||
@ -14,7 +14,6 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# No : VCENTER_IMPORTED attribute will be set on imported images
|
||||
# this attribute prevents the image to be deleted.
|
||||
# Yes : You can delete the images using OpenNebula.
|
||||
:delete_images: No
|
||||
# lint ruby code
|
||||
|
||||
ln -s share/linters/.rubocop.yml . && rubocop
|
19
.travis/tests/02-scons.sh
Executable file
19
.travis/tests/02-scons.sh
Executable file
@ -0,0 +1,19 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# check that OpenNebula compiles
|
||||
|
||||
scons sunstone=yes mysql=yes systemd=yes new_xmlrpc=yes
|
33
.travis/tests/03-oned.sh
Executable file
33
.travis/tests/03-oned.sh
Executable file
@ -0,0 +1,33 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# install oned system wide
|
||||
|
||||
sudo ./install.sh -u travis
|
||||
|
||||
# Set credentials
|
||||
mkdir $HOME/.one
|
||||
echo "oneadmin:opennebula" > $HOME/.one/one_auth
|
||||
|
||||
# Install gems
|
||||
/usr/share/one/install_gems --yes
|
||||
|
||||
# start oned
|
||||
|
||||
one start
|
||||
|
||||
# check it's up
|
||||
timeout 60 sh -c 'until nc -z $0 $1; do sleep 1; done' localhost 2633
|
30
.travis/tests/04-sunstone.sh
Executable file
30
.travis/tests/04-sunstone.sh
Executable file
@ -0,0 +1,30 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# start sunstone
|
||||
sunstone-server start
|
||||
|
||||
# check it's up
|
||||
RC=`timeout 60 sh -c 'until nc -z $0 $1; do sleep 1; done' localhost 9869`
|
||||
|
||||
echo "Sunstone log"
|
||||
cat /var/log/one/sunstone.log
|
||||
echo
|
||||
echo "Sunstone error log"
|
||||
cat /var/log/one/sunstone.error
|
||||
echo "---------"
|
||||
|
||||
exit $RC
|
@ -172,7 +172,7 @@ Support: https://opennebula.org/support
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2002-2018, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
|
||||
Copyright 2002-2019, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
|
||||
|
||||
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
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2018, OpenNebula Project, OpenNebula Systems #
|
||||
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# 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 #
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -83,7 +83,11 @@ public:
|
||||
* by the calling function.
|
||||
* @return a string (allocated in the heap) holding the attribute value.
|
||||
*/
|
||||
virtual string * to_xml() const = 0;
|
||||
virtual void to_xml(std::ostringstream& s) const = 0;
|
||||
|
||||
virtual void to_json(std::ostringstream& s) const = 0;
|
||||
|
||||
virtual void to_token(std::ostringstream& s) const = 0;
|
||||
|
||||
/**
|
||||
* Builds a new attribute from a string.
|
||||
@ -158,17 +162,31 @@ public:
|
||||
*
|
||||
* <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.
|
||||
* @paran s the stream to write the attribute.
|
||||
*/
|
||||
string * to_xml() const
|
||||
void to_xml(std::ostringstream& s) const
|
||||
{
|
||||
string * xml = new string;
|
||||
s << "<" << attribute_name << ">" << one_util::escape_xml(attribute_value)
|
||||
<< "</"<< attribute_name << ">";
|
||||
|
||||
*xml = "<" + name() + ">" + one_util::escape_xml(attribute_value) +
|
||||
"</"+ name() + ">";
|
||||
}
|
||||
|
||||
return xml;
|
||||
void to_json(std::ostringstream& s) const
|
||||
{
|
||||
one_util::escape_json(attribute_value, s);
|
||||
}
|
||||
|
||||
void to_token(std::ostringstream& s) const
|
||||
{
|
||||
if (attribute_name.empty() || attribute_value.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
one_util::escape_token(attribute_name, s);
|
||||
s << "=";
|
||||
one_util::escape_token(attribute_value, s);
|
||||
s << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -350,12 +368,11 @@ public:
|
||||
* The string MUST be freed by the calling function.
|
||||
* @return a string (allocated in the heap) holding the attribute value.
|
||||
*/
|
||||
string * to_xml() const;
|
||||
void to_xml(std::ostringstream& s) const;
|
||||
|
||||
/**
|
||||
* Same as above but the attribute is written in an string stream;
|
||||
*/
|
||||
void to_xml(ostringstream &oss) const;
|
||||
void to_json(std::ostringstream& s) const;
|
||||
|
||||
void to_token(std::ostringstream& s) const;
|
||||
|
||||
/**
|
||||
* Builds a new attribute from a string of the form:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -92,9 +92,19 @@ protected:
|
||||
return va->marshall(_sep);
|
||||
};
|
||||
|
||||
string * to_xml() const
|
||||
void to_xml(std::ostringstream& s) const
|
||||
{
|
||||
return va->to_xml();
|
||||
return va->to_xml(s);
|
||||
};
|
||||
|
||||
void to_json(std::ostringstream& s) const
|
||||
{
|
||||
return va->to_json(s);
|
||||
};
|
||||
|
||||
void to_token(std::ostringstream& s) const
|
||||
{
|
||||
return va->to_token(s);
|
||||
};
|
||||
|
||||
void unmarshall(const std::string& sattr, const char * _sep = 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -258,6 +258,10 @@ private:
|
||||
*/
|
||||
string& to_xml(string& xml, bool database) const;
|
||||
|
||||
string& to_json(string& json) const;
|
||||
|
||||
string& to_token(string& text) const;
|
||||
|
||||
/**
|
||||
* Rebuilds the object from an xml node
|
||||
* @param node The xml node pointer
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -191,6 +191,13 @@ public:
|
||||
return (persistent_img == 1);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return true if the image is in a locked state
|
||||
*/
|
||||
bool is_locked() const
|
||||
{
|
||||
return state == LOCKED || state == LOCKED_USED || state == LOCKED_USED_PERS;
|
||||
};
|
||||
/**
|
||||
* Check the PERSISTENT attribute in an image Template, if not set the
|
||||
* DEFAULT_IMAGE_PERSISTENT and DEFAULT_IMAGE_PERSISTENT_NEW are check in
|
||||
@ -549,7 +556,7 @@ public:
|
||||
|
||||
void revert_snapshot(int snap_id)
|
||||
{
|
||||
snapshots.active_snapshot(snap_id);
|
||||
snapshots.active_snapshot(snap_id, true);
|
||||
};
|
||||
|
||||
void set_target_snapshot(int snap_id)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -251,6 +251,11 @@ public:
|
||||
|
||||
int next_federated(int index);
|
||||
|
||||
bool fts_available()
|
||||
{
|
||||
return db->fts_available();
|
||||
}
|
||||
|
||||
protected:
|
||||
int exec(std::ostringstream& cmd, Callbackable* obj, bool quiet)
|
||||
{
|
||||
@ -416,6 +421,11 @@ public:
|
||||
return _logdb->limit_support();
|
||||
}
|
||||
|
||||
bool fts_available()
|
||||
{
|
||||
return _logdb->fts_available();
|
||||
}
|
||||
|
||||
protected:
|
||||
int exec(std::ostringstream& cmd, Callbackable* obj, bool quiet)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -84,6 +84,11 @@ public:
|
||||
*/
|
||||
bool limit_support();
|
||||
|
||||
/**
|
||||
* Return true if the backend allows FTS index
|
||||
*/
|
||||
bool fts_available();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Wraps the mysql_query function call
|
||||
@ -171,6 +176,8 @@ public:
|
||||
|
||||
bool limit_support(){return true;};
|
||||
|
||||
bool fts_available(){return false;};
|
||||
|
||||
protected:
|
||||
int exec(ostringstream& cmd, Callbackable* obj, bool quiet){return -1;};
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -362,7 +362,7 @@ public:
|
||||
*/
|
||||
static string code_version()
|
||||
{
|
||||
return "5.7.80"; // bump version
|
||||
return "5.7.85"; // bump version
|
||||
}
|
||||
|
||||
/**
|
||||
@ -371,7 +371,7 @@ public:
|
||||
*/
|
||||
static string shared_db_version()
|
||||
{
|
||||
return "5.7.80";
|
||||
return "5.6.0";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -578,6 +578,15 @@ public:
|
||||
return nebula_configuration->to_xml(xml);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the database backend type
|
||||
* @return database backend type
|
||||
*/
|
||||
string get_db_backend() const
|
||||
{
|
||||
return db_backend_type;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Default Quotas
|
||||
// -----------------------------------------------------------------------
|
||||
@ -695,7 +704,7 @@ private:
|
||||
"/DEFAULT_GROUP_QUOTAS/NETWORK_QUOTA",
|
||||
"/DEFAULT_GROUP_QUOTAS/IMAGE_QUOTA",
|
||||
"/DEFAULT_GROUP_QUOTAS/VM_QUOTA"),
|
||||
system_db(0), logdb(0), fed_logdb(0),
|
||||
system_db(0), db_backend_type("sqlite"), logdb(0), fed_logdb(0),
|
||||
vmpool(0), hpool(0), vnpool(0), upool(0), ipool(0), gpool(0), tpool(0),
|
||||
dspool(0), clpool(0), docpool(0), zonepool(0), secgrouppool(0),
|
||||
vdcpool(0), vrouterpool(0), marketpool(0), apppool(0), vmgrouppool(0),
|
||||
@ -819,6 +828,7 @@ private:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
SystemDB * system_db;
|
||||
string db_backend_type;
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Nebula Pools
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -208,6 +208,11 @@ namespace one_util
|
||||
{
|
||||
return escape(v, "'", "'");
|
||||
}
|
||||
|
||||
void escape_json(const std::string& str, std::ostringstream& s);
|
||||
|
||||
void escape_token(const std::string& str, std::ostringstream& s);
|
||||
|
||||
/**
|
||||
* Checks if a strings matches a regular expression
|
||||
*
|
||||
@ -236,7 +241,8 @@ namespace one_util
|
||||
const std::string& replacement);
|
||||
|
||||
template <class T>
|
||||
std::set<T> set_intersection(const std::set<T> &first, const std::set<T> &second)
|
||||
std::set<T> set_intersection(const std::set<T> &first, const std::set<T>
|
||||
&second)
|
||||
{
|
||||
std::set<T> output;
|
||||
|
||||
@ -247,48 +253,48 @@ namespace one_util
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Compress the input string unsing zlib
|
||||
* @param in input string
|
||||
* @param bool64 true to base64 encode output
|
||||
* @return pointer to the compressed sting (must be freed) or 0 in case
|
||||
* of error
|
||||
*/
|
||||
std::string * zlib_compress(const std::string& in, bool base64);
|
||||
std::string * zlib_compress(const std::string& in, bool base64);
|
||||
|
||||
/**
|
||||
/**
|
||||
* Decompress the input string unsing zlib
|
||||
* @param in input string
|
||||
* @param base64 true if the input is base64 encoded
|
||||
* @return pointer to the decompressed sting (must be freed) or 0 in case
|
||||
* of error
|
||||
*/
|
||||
std::string * zlib_decompress(const std::string& in, bool base64);
|
||||
std::string * zlib_decompress(const std::string& in, bool base64);
|
||||
|
||||
extern "C" void sslmutex_lock_callback(int mode, int type, char *file,
|
||||
int line);
|
||||
extern "C" void sslmutex_lock_callback(int mode, int type, char *file,
|
||||
int line);
|
||||
|
||||
extern "C" unsigned long sslmutex_id_callback();
|
||||
extern "C" unsigned long sslmutex_id_callback();
|
||||
|
||||
class SSLMutex
|
||||
{
|
||||
public:
|
||||
static void initialize();
|
||||
class SSLMutex
|
||||
{
|
||||
public:
|
||||
static void initialize();
|
||||
|
||||
static void finalize();
|
||||
static void finalize();
|
||||
|
||||
private:
|
||||
friend void sslmutex_lock_callback(int mode, int type, char *file,
|
||||
int line);
|
||||
private:
|
||||
friend void sslmutex_lock_callback(int mode, int type, char *file,
|
||||
int line);
|
||||
|
||||
SSLMutex();
|
||||
SSLMutex();
|
||||
|
||||
~SSLMutex();
|
||||
~SSLMutex();
|
||||
|
||||
static SSLMutex * ssl_mutex;
|
||||
static SSLMutex * ssl_mutex;
|
||||
|
||||
static std::vector<pthread_mutex_t *> vmutex;
|
||||
};
|
||||
static std::vector<pthread_mutex_t *> vmutex;
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* _NEBULA_UTIL_H_ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -251,6 +251,35 @@ public:
|
||||
static void oid_filter(int start_id,
|
||||
int end_id,
|
||||
string& filter);
|
||||
|
||||
/**
|
||||
* This function returns a legal SQL string that can be used in an SQL
|
||||
* statement. The string is encoded to an escaped SQL string, taking into
|
||||
* account the current character set of the connection.
|
||||
* @param str the string to be escaped
|
||||
* @return a valid SQL string or NULL in case of failure
|
||||
*/
|
||||
char * escape_str(const string& str)
|
||||
{
|
||||
return db->escape_str(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Frees a previously scaped string
|
||||
* @param str pointer to the str
|
||||
*/
|
||||
void free_str(char * str)
|
||||
{
|
||||
db->free_str(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if FTS is available.
|
||||
*/
|
||||
bool is_fts_available()
|
||||
{
|
||||
return db->fts_available();
|
||||
}
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2018, OpenNebula Project, OpenNebula Systems */
|
||||
/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* 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 */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user