__author__ = "Alfonso Tierno, Leonardo Mirabal"
__date__ = "$06-Feb-2017 12:07:15$"
+__version__ = "0.5.8-r524"
+version_date = "March 2017"
+database_version = "0.15" #expected database schema version
import threading
import vim_db
self.config['db_host']) )
return db
+ @staticmethod
+ def get_version():
+ return __version__
+
+ @staticmethod
+ def get_version_date():
+ return version_date
+
+ @staticmethod
+ def get_database_version():
+ return database_version
+
@staticmethod
def _check_dhcp_data_integrity(network):
"""
Start ovim services
:return:
"""
+ global database_version
# if self.running_info:
# return #TODO service can be checked and rebuild broken threads
r = self.db.get_db_version()
if r[0] < 0:
raise ovimException("DATABASE is not a VIM one or it is a '0.0' version. Try to upgrade to version '{}' with "\
- "'./database_utils/migrate_vim_db.sh'".format(self.config["database_version"]) )
- elif r[1] != self.config["database_version"]:
+ "'./database_utils/migrate_vim_db.sh'".format(database_version) )
+ elif r[1] != database_version:
raise ovimException("DATABASE wrong version '{}'. Try to upgrade/downgrade to version '{}' with "\
- "'./database_utils/migrate_vim_db.sh'".format(r[1], self.config["database_version"]) )
+ "'./database_utils/migrate_vim_db.sh'".format(r[1], database_version) )
# create database connection for openflow threads
self.db_of = self._create_database_connection()