A number of configuration errors prevent the successful creation of code
coverage. This corrects the .coveragerc source/omit setup and the tox
package name generation.
Change-Id: Ie55159304b8633acd6b06ba94d0cb8507a337504
Add an entry point to make the configuration options defined in the
library discoverable for the sample configuration generator.
Add the configuration options to the library documentation.
Change-Id: I5b49fef1d0363d8887a84cdc3cec242efe1b9084
If a field is defined to be DateTimeField, obj_get_change() returns a
datetime.datetime object with timezone awareness.
Change-Id: Ia38189f65c187769f0bab35c421d76a4a693b068
This adds documentation for how the process of fingerprint generation
works when using the ObjectVersionChecker.
Change-Id: Ie21746f6c2bab447a187b0b7507acdcea3d88c14
When we call obj_to_primitive() on an object, we need to be able to
pass in the version_manifest so that the backport happens according
to those versions. This merely adds an optional argument which, if
present, calls the new interface.
Change-Id: I016a8061825507751168b6a59e092c9db5b0b19f
following change id replaced timeutils.isotime(dt) with dt.isoformat():
Ied2643d3d891600e0e5cd31c7ef1ff6107e3a777
However this change breaks existing contract between Nova components
on the wire, so we need to resurrect a bit of the older code.
Change-Id: I151e889258a33fe6ce961b514c3967f521a218cf
When an exception is raised, we do "some stuff" and re-raise that
original exception. This uses oslo_util's
excutils.save_and_reraise_exception to do this, to handle the case
where "some stuff" might cause the exception context to be cleared
(which would have resulted in None being attempted to be re-raised).
Change-Id: I91234797ab71399f6f9bac3a3ab35a6eeb2a87f3
In obj_make_compatible() of List objects, only child_versions is used.
If obj_relationships is set on a List object, obj_make_compatible()
should also take that into consideration.
This change pulls out common code for finding the desired child version
for backporting, and then changes ObjectListBase's obj_make_compatible()
to check for child_versions first, and if that is empty, will use
obj_relationships for finding the child version.
Change-Id: I89217f1721c896bd2660354d4f4283e2e12ebe98
Closes-Bug: #1470617
Change I0c33a34a3cb454d6d35e2092d72ebd41d4c12729 introduced the use of a
manifest for improving the backporting of objects. That change switched
over the compat code for regular objects to use the manifest. It also
sent the manifest in for lists, but did not switch the function to use
obj_make_compatible_from_manifest().
Change-Id: I1b7eb45335b5edb5f85ea991e96ea0b99f9d11a3
Closes-Bug: #1484133
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Commit b38c8ddb8508ac0eddbed77ab72afc50beb8ae2a introduced backporting
via manifest, but didn't include a test to make sure that subobjects were
also backported using the manifest. This adds that test.
Change-Id: I332c665e7fae01ae28080f821161b00f1886cc09
oslo_utils.timeutils.isotime() is deprecated as of 1.6 so we need
to stop using it.
This patch replaces timeutils.isotime(dt) with dt.isoformat() as
the deprecation message suggests in oslo_utils.timeutils.
However this might be a backward incompatible change as
timeutils.isotime() produced '1955-11-05T18:00:00Z' format
but datetime.isoformat() produces '1955-11-05T18:00:00+00:00'
format.
Change-Id: Ied2643d3d891600e0e5cd31c7ef1ff6107e3a777
The following patch fixes field.Object's from_primitive()
to call a given object's obj_from_primitive() instead of
VersionedObject's obj_from_primitive(). By using the given
object instead of VersionedObject, the appropriate
OBJ_PROJECT_NAMESPACE is passed down to obj_from_primitive(),
and allows support for other projects namespaces.
Change-Id: I02e733f29ce2ee221270577f6dafdda706c74eb2
Closes-Bug: #1479041
Signed-off-by: Thang Pham <thang.g.pham@gmail.com>
This patch add validation on the target_version arg as following:
1. When target_version == object version don't call obj_make_compatible
2. When target_version > object version raise exception
Change-Id: I0f8dbe3cbdb86752f026f3692d4badc9f6e693c3
* Replace dict.iteritems() with dict.items() in code handling errors in
the exception module to fix Python 3 support.
* Add new unit tests on the exception module
Change-Id: Ib958421dbdd73fb442e17a8d0654c9eab8b7b70e