Change I3febb95bb2b3dd8f10da4f01ffa705e39cb20520 wasn't passing pylint
gate because of missing objects_ignore_messages entries in linstack.py.
This commits adds these entries.
Change-Id: I9e42a065d6584b445f2fed8995de32adbea7739b
Closes-Bug: 1493905
When importing backup metadata only required fields were being imported,
and all other fields were being ignored.
This led to some serious problems when importing backups back, since
you would lose not only the original Volume ID, but also relevant parent
id information needed to restore incremental backups.
This patch fixes this by importing everything back and creating backup
records with the right ID.
Closes-Bug: #1455043
Closes-Bug: #1476416
Depends-On: Id7ab6e174c1fe85772477f03059c4f457c5c8b17
Change-Id: Ia42ba73e9078d993c63f8e16308151ad11721ea9
Add versionedobjects abstraction layer to services. Distinguish time
zone aware DateTime fields. The object derives from
CinderObjectDictCompat, so it supports both object (obj.prop) and dict
(obj['prop']) syntax to access properties. Complete move to object
notation will be made in a follow up clean up patch.
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: I09f593f9f9aa8befa40d989b731159b78a429071
Partial-Implements: blueprint cinder-objects
SQLite doesn't support 'drop constraint' statament. So it notifies:
SAWarning: Table 'encryption' specifies columns 'volume_type_id'
as primary_key=True, not matching locally specified columns
'encryption_id'; setting the current primary key columns to
'encryption_id'. This warning may become an exception in a future
release.
Add new strategy for sqlite upgrade: table is renamed to temporary
name, new table is created followed by INSERT statements, and
renamed to original one.
Change-Id: I723fdadb946f6944dde03954409899a9ddc3ee0e
Closes-Bug: #1431374
This patch adds VersionedObjects abstraction layer to volume backups.
The object derives from CinderObjectDictCompat, so it supports both
object (obj.prop) and dict (obj['prop']) syntax to access properties.
Complete move to object notation will be made in a follow up clean up
patch.
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>
Change-Id: Icff37261b367463b71a1268be16f9c97f595bf0c
Partial-Implements: blueprint cinder-objects
The following patch switches direct db calls in
volume/api.py get_all_snapshots to use SnapshotList
instead.
Partial-Implements: blueprint cinder-objects
Change-Id: Ifdccc81a087f9797fcfbf098d3ecea3875ad7bd9
Abstract volumes and volume snapshots into objects.
Get, create, and delete snapshot APIs were changed to
use new snapshot objects. A skeleton volume object was
created, but cinder internals were not changed to use
the volume object, although volume is referenced and
used by the snapshot object. The internals will be
changed to use volume object in a subsequent patch.
Change-Id: I387018e80c8539565e99454db65d976030002c0f
Implements: blueprint cinder-objects
This patch is to insert the objects code base, currently based
on nova.objects. It will be later based on
oslo_versionedobjects once it is available. This is done
to make progress on changing cinder internals to use objects,
since nova.objects and oslo.versionedobjects are similar.
Inserted objects code base into cinder and modified cinder services
to use object-aware serializer.
Change-Id: I42a6cc43da19ca29db4cfb33cbf794afed18f758
Implements: blueprint cinder-objects
The following pylint error was found:
cinder/backup/drivers/swift.py:486: [E1101, SwiftBackupDriver.backup]
Module 'hashlib' has no 'sha256' member
Affected patch:
https://review.openstack.org/#/c/110068/
A similar pylint error "Module 'hashlib' has no 'sha224' member"
was also generated.
However, both 'sha256' and 'sha224' are functions in 'hashlib'. So
these errors should be ignored.
Change-Id: I84690813b6c6a15e661e27acdf97149996951978
To keep Python 3.x compatibility, use six.moves.urllib.parse to
replace urlparse. tools/lintstack is changed to pass pylint test.
Partial-Bug: #1279611
Change-Id: I0ceaaccbf6c67b45609b4f2f5639c362b32d10ad
to keep Python 3.x compatibility, use six.moves.cStringIO to
replace StringIO
Change-Id: Id89c6156d9bba0007e8b16cd2cc28413a7cc5fd3
Closes-Bug: #1280964
The new auto-pulled requirements files exposed
python 3 compat issues in a number of modules.
We added these to tox.ini ignore temporarily,
this change updates the print routines in bin/cinder
and removes the debug cruft that was in the unit tests.
Will update requirements and test-requirements
appropriately in a follow up patch.
Change-Id: I76ea24f4dc1f61c4f8a1d202b0554c90daf2c9cc
lintstack is a pylint-based static analysis tool to find bugs
in Python code.
To run the test via tox: $ tox -e pylint
To run the test directly: $ tools/lintstack.sh
Change-Id: If155f47ed84eb820ac505ee741bdd18edd41b1eb