Log zone serial on fetch and update

Change-Id: I6046162af6073166b7a7fdcf81d286824ead8ef9
This commit is contained in:
Federico Ceratto 2016-02-24 16:30:47 +00:00
parent 79714fc08b
commit e2f83c96c5
1 changed files with 6 additions and 0 deletions

View File

@ -247,6 +247,9 @@ class SQLAlchemyStorage(sqlalchemy_base.SQLAlchemy, storage_base.Storage):
zone.obj_reset_changes(['masters', 'attributes'])
# TODO(Federico) refactor part of _find_zones into _find_zone, move
# _load_relations out
if one:
_load_relations(zones)
else:
@ -254,6 +257,8 @@ class SQLAlchemyStorage(sqlalchemy_base.SQLAlchemy, storage_base.Storage):
for d in zones:
_load_relations(d)
if one:
LOG.debug("Fetched zone %s", zones)
return zones
def create_zone(self, context, zone):
@ -301,6 +306,7 @@ class SQLAlchemyStorage(sqlalchemy_base.SQLAlchemy, storage_base.Storage):
tenant_id_changed = True
# Don't handle recordsets for now
LOG.debug("Updating zone %s", zone)
updated_zone = self._update(
context, tables.zones, zone, exceptions.DuplicateZone,
exceptions.ZoneNotFound,