"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/common/sql/upgrades.py" between
keystone-16.0.1.tar.gz and keystone-17.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Ussuri" series (latest release).

upgrades.py  (keystone-16.0.1):upgrades.py  (keystone-17.0.0)
skipping to change at line 24 skipping to change at line 24
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import os import os
import migrate import migrate
from migrate import exceptions from migrate import exceptions
from migrate.versioning import api as versioning_api from migrate.versioning import api as versioning_api
from oslo_db import exception as db_exception from oslo_db import exception as db_exception
from oslo_db.sqlalchemy import migration from oslo_db.sqlalchemy import migration
import six
import sqlalchemy import sqlalchemy
from keystone.common import sql from keystone.common import sql
from keystone import exception from keystone import exception
from keystone.i18n import _ from keystone.i18n import _
USE_TRIGGERS = True USE_TRIGGERS = True
LEGACY_REPO = 'migrate_repo' LEGACY_REPO = 'migrate_repo'
EXPAND_REPO = 'expand_repo' EXPAND_REPO = 'expand_repo'
skipping to change at line 182 skipping to change at line 181
if oldest < 1: if oldest < 1:
return None return None
# The initial version is one less # The initial version is one less
return oldest - 1 return oldest - 1
def _assert_not_schema_downgrade(version=None): def _assert_not_schema_downgrade(version=None):
if version is not None: if version is not None:
try: try:
current_ver = int(six.text_type(get_db_version())) current_ver = int(str(get_db_version()))
if int(version) < current_ver: if int(version) < current_ver:
raise migration.exception.DBMigrationError( raise migration.exception.DBMigrationError(
_("Unable to downgrade schema")) _("Unable to downgrade schema"))
except exceptions.DatabaseNotControlledError: # nosec except exceptions.DatabaseNotControlledError: # nosec
# NOTE(morganfainberg): The database is not controlled, this action # NOTE(morganfainberg): The database is not controlled, this action
# cannot be a downgrade. # cannot be a downgrade.
pass pass
def offline_sync_database_to_version(version=None): def offline_sync_database_to_version(version=None):
"""Perform and off-line sync of the database. """Perform and off-line sync of the database.
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)