4471 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
7a450b923d Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I96dac49894ef6dac31ffb6fd5a0f749b1b8b73d4
2015-07-29 06:34:10 +00:00
OpenStack Proposal Bot
15a29107b7 Updated from global requirements
Change-Id: I21b5aaaf59b89c179118c648d9a1d274322b99d1
2015-07-29 03:50:12 +00:00
Dan Smith
b38c8ddb85 Support using the version manifest for obj_make_compatible()
This adds a new method called obj_make_compatible_from_manifest() to
the base object. This is to be used by the newer backport method (which
receives a version manifest from the client) in order to perform a more
prescriptive run of obj_make_compatible(). Since the latter is part of our
public library API, this does a slightly hacky think of stashing the
manifest so that it is visible to lower layers. We cache other such data
on the object like this in other places, so there is precedent for this.
However, it would be good to see if we can clean this up via refactoring
the internals in a way that won't break people (and/or just make a change
in a major version bump later). For now, I think this is the least likely-
to-break-people change we can make.

Change-Id: I0c33a34a3cb454d6d35e2092d72ebd41d4c12729
2015-07-28 12:05:57 -07:00
OpenStack Proposal Bot
155287320d Updated from global requirements
Change-Id: I1d11b23387dec3ce07e2d4a805f3b491f5d6260b
2015-07-24 18:41:14 +00:00
Dan Smith
9a4c0060ca Implement multi-version object backport method
This adds a new backport method to the VersionedObjectSerializer
interface. The new method calculates a manifest of all the local-side
object versions expected to be needed during the backport request and
sends that to the server. Ideally this will replace the current
backport method that depends on the version relationship maps that
we maintain, and will limit the complexity involved with relationship
maps differing on older code.

Change-Id: I071c20b65d12df893c367d417ab6be09626a9955
2015-07-23 16:28:49 -07:00
Sylvain Bauza
1032134b58 Add a new DictOfListOfStrings type of field
In order to coerce correctly some fields that are primarly dictionaries having
either strings or list of strings as values, we need to provide a new field type
which would accept only list of strings as values for dicts so anyone who would
want to use that type would just have to make sure to hydrate all the items by
putting them into a single list.

Change-Id: I708860357e17bcc70733187c3289dd859b09c60b
2015-07-23 17:18:01 +02:00
Jenkins
c4e448eac7 Merge "Updated from global requirements" 2015-07-23 12:32:52 +00:00
OpenStack Proposal Bot
306870b04a Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I201131b252a4d51a43448dc18e80575bd3913a51
2015-07-23 06:09:43 +00:00
OpenStack Proposal Bot
50914091ec Updated from global requirements
Change-Id: I4fad1a2e80e068ea9536af18931378c56826437b
2015-07-23 04:42:13 +00:00
Sylvain Bauza
2e083bce6e Add a new VersionPredicate type of field
Providing a version string for a field means sometimes that we want to verify
that the string is correct for a versionpredicate.

By adding a new type of field coercing using VersionPredicate, we can make sure
that the field is correct.

Change-Id: I53213e8bfa1928936c0f6904e23dfa886233528b
2015-07-21 16:41:53 +02:00
Dan Smith
ae045234a1 Add obj_tree_get_versions() utility method
This adds a utility method that takes a top-level object and determines
all of the dependent object names and versions that could be nested
within. This can be later used to ask the indirection_api to backport
an object with this information instead of depending on its own mapping,
which may differ.

Change-Id: I04574ccd01e582b3eef8f98cac41f429c70debd8
2015-07-20 12:44:57 -07:00
OpenStack Proposal Bot
c6e6a55fef Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I975ab5730d021212f66f5c0b7309592f1b91025c
0.6.0
2015-07-18 06:08:03 +00:00
OpenStack Proposal Bot
501bfd6760 Updated from global requirements
Change-Id: Id7dc5a50e245793a148b70b3fbfaf3c35bd322be
2015-07-17 16:17:14 +00:00
Jenkins
28e1fd6fc5 Merge "Updated from global requirements" 2015-07-17 03:09:26 +00:00
Jenkins
927014c451 Merge "Fix serializer supported version reporting in object_backport" 2015-07-17 00:52:10 +00:00
OpenStack Proposal Bot
dc06d78dbe Updated from global requirements
Change-Id: I8a640c0b4eccec20d760d3c05f528db8b681e38b
2015-07-16 23:20:04 +00:00
Jenkins
c2d0701a56 Merge "Remove dict assumption from remotable decorator" 2015-07-16 21:54:28 +00:00
Jenkins
cc696576a3 Merge "Remove ununsed class in test.py" 2015-07-16 18:03:14 +00:00
Dan Smith
1fd69a8bdb Fix serializer supported version reporting in object_backport
The serializer needs to report the version of the toplevel object
that we were trying to deserialize when we encountered the incompatible
version. We depend on the implementor of the indirection_api to use
the object relationship mappings to return to us a fully-supported
object tree based on the version at the top.

This patch fixes the serializer to report the toplevel version instead of
the one that caused the fault.

Change-Id: I7ac03717e17cd7229abfeef6d9c7d9d8ec9be27a
Closes-Bug: #1475356
2015-07-16 10:21:47 -07:00
Dan Smith
58070642b5 Remove dict assumption from remotable decorator
The remotable decorator still has code that assumes we can use dict-like
accesses on our objects. This converts it to a setattr.

Change-Id: I45c6e3e9e7bde343a67aa3dfdbb3787b21641cd5
Closes-Bug: #1474952
2015-07-16 08:33:29 -07:00
Jenkins
57441a267c Merge "Replace 'hypervisor' with 'provided' version" 2015-07-16 14:28:10 +00:00
OpenStack Proposal Bot
0cb1af7d97 Updated from global requirements
Change-Id: I147bb8b7a5eea1bff9f68fb2484509a8194b4150
2015-07-15 01:36:50 +00:00
Davanum Srinivas
97aa084409 Remove ununsed class in test.py
There's a TimeFixture in oslo.utils if we really need it,
but we don't use this class anywhere

Change-Id: I37d7024550a33d14dff567f1f597b3870d2f2b5a
2015-07-13 22:30:12 -04:00
Jenkins
dd84829fb4 Merge "Updated from global requirements" 2015-07-14 01:02:31 +00:00
Joshua Harlow
e182ba6e54 Replace 'hypervisor' with 'provided' version
A hypervisor version is a nova concept and likely
doesn't belong in this library so tweak the wording
used.

Change-Id: Ia03d94334201e0229a339984ca0838911d4ee20d
2015-07-13 16:19:58 -07:00
Jenkins
93100cfe02 Merge "Compound fields now coerce their elements' values" 2015-07-13 22:46:45 +00:00
OpenStack Proposal Bot
ab6392cd26 Updated from global requirements
Change-Id: Id479adaf4cbff8e6e3a9a3ee9fa55f7cc1e333c4
2015-07-13 21:13:47 +00:00
Alexander Tivelkov
e14209d1af Compound fields now coerce their elements' values
Added a special datastructures (CoercedList, CoercedDict and CoercedSet)
which are able to coerce their values to appropriate element type.
The instances of these structures are returned when the values of
appropriate compound fields initially coerced. As a result, all
subsequent calls which are going to add new elements to the fields'
collections will be processed by the overridden methods of new
datastructures, thus the new elements will be coerced and the exceptions
risen if the coercing is not possible.
This also fixes a bug in TestObjMakeList which was specifying incorrect
obj_name for the elements in 'objects' collection of MyList test class.
It was not leading to failures as the items of this collection were not
being coerced  prior to this patch.

This patch restores the functionality of patch
2da963c3b313e14c4e60301e87f9c9260d7166cb which was reverted due
to found bug. This one fixes this bug by removing custom initializers for
coerced collections.

Change-Id: I9dc8fc408cefea921e4e27c0e75f98291674f867
Partial-Bug: #1469865
2015-07-13 19:07:21 +03:00
Doug Hellmann
3f9f2e1199 Move fixture dependencies to extras
Rather than always installing dependencies for the test tools included
in the library, define an extras called "test" and include the
dependencies there.

Add API documentation for the fixture module, and include notes about
installing the extra dependencies in the module documentation and
installation instructions.

Closes-Bug: #1440350
Depends-On: I78838dcd4da43b3c1d2610ac87a3ec55b9535646
Depends-On: Ibd2410e0153053b5121155474e99752256c7e4b8
Change-Id: I4e45c1bb4f08c9da510939514c5358e1575d3e0a
2015-07-12 18:08:01 +00:00
OpenStack Proposal Bot
087af703da Updated from global requirements
Change-Id: Ib2deae422c3c500d0c33e93d396c8720edae4b28
2015-07-12 15:21:46 +00:00
OpenStack Proposal Bot
33a4909989 Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I639d565f56583db84d9d7902f385b5942589f3da
2015-07-09 06:13:00 +00:00
Davanum Srinivas
adb66403bd Sort child versions before generating fingerprint
We need to sort the version dictionary to ensure py27
and py34 generate the same fingerprint.

Depends-On: I0f07858e96ea3baf46f8a453e253b9ed29c7f7e2
Depends-On: I33bd2d9dff9cb7dc1a50177db7286b7317966784
Change-Id: I0adc3d696c90dfe20d35bdf06f033eb3a2491fd0
0.5.2
2015-07-06 18:01:25 +00:00
Jenkins
520b4496fb Merge "Imported Translations from Transifex" 2015-07-06 17:06:53 +00:00
Jenkins
90914ab643 Merge "Manual update the requirements" 2015-07-06 16:50:52 +00:00
OpenStack Proposal Bot
24a2defacd Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ia26bc48ee64ee022ddccf28329574ef70e2b0946
2015-07-06 06:09:45 +00:00
Davanum Srinivas
3eea063f61 Manual update the requirements
According to the disscussion[1] we have to remove the requirements-PYN.txt

Took the opportunity to remove py33 and py26 from the tox targets as we
don't need them

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-July/068469.html

Depends-On: I0f07858e96ea3baf46f8a453e253b9ed29c7f7e2
Depends-On: I33bd2d9dff9cb7dc1a50177db7286b7317966784
Change-Id: I9cebc3d4e3a8eb73acb30c397e3ee20b5e91b1ac
2015-07-04 03:15:01 +00:00
Joshua Harlow
251e8690e6 Remove classifiers not supported
Python 2.6 support is being dropped and python 3.3
is not being CI/gate tested so neither seems like it
should be stated as being supported.

Depends-On: I54f6b1c174569a841d7322ab38b5922f13e23864

Change-Id: I55484fb8004367c165c3ebe8006e5557550df61d
2015-07-02 02:11:09 +00:00
OpenStack Proposal Bot
dbd94c04c7 Updated from global requirements
Change-Id: Ic0282ad3ccee00b0d12a71e025189b0457b35b83
2015-06-30 20:02:33 +00:00
Jenkins
505716e895 Merge "Revert "Compound fields now coerce their elements' values"" 0.5.1 2015-06-30 04:32:03 +00:00
Davanum Srinivas (dims)
b71b24e320 Revert "Compound fields now coerce their elements' values"
This reverts commit 2da963c3b313e14c4e60301e87f9c9260d7166cb.

Partial-Bug: #1469865
Change-Id: I8a52e6ccaf5cc1a7d006396806ee092a3e7e11d2
2015-06-30 02:28:59 +00:00
Davanum Srinivas
7e23ba854a Add oslo.config to requirements
Running "pip-missing-reqs" tox target showed these references
in our code. Since we refer to them directly, we should add
them to our requirements.

Change-Id: I5c46bbc1ea06fa7bea8a4afe78d35834e554b406
0.5.0
2015-06-26 07:36:01 -04:00
Davanum Srinivas
c17ea373ec Add tox target to find missing requirements
Change-Id: Ie171c0c7c4cba305092570fcf20b40c1735d1279
2015-06-26 07:35:38 -04:00
Jenkins
20e5ca83dc Merge "fields: allow subclasses in ObjectField/ListOfObjectsField" 2015-06-24 21:11:16 +00:00
Jenkins
35138d5049 Merge "Compound fields now coerce their elements' values" 2015-06-24 21:01:17 +00:00
OpenStack Proposal Bot
0907e25d8e Updated from global requirements
Change-Id: I8bb0f9d8f162058027e4b80fa2373dfb3cbd7624
2015-06-24 14:45:47 +00:00
Jenkins
c0d44a6d0f Merge "Updated from global requirements" 2015-06-23 15:36:35 +00:00
Jenkins
cf44278bc6 Merge "Decouple ObjectVersionChecker and VersionedObjectRegistry" 2015-06-23 15:33:45 +00:00
Jenkins
1b209b5b25 Merge "Fix "comparason" typo in doc for ComparableVersionedObject" 2015-06-23 15:33:38 +00:00
Daniel P. Berrange
28e2b4f004 fields: allow subclasses in ObjectField/ListOfObjectsField
The Object class currently does a direct comparison of the
'obj_name()' value of the thing being coerced, against the
internal _obj_name field it was initialized with.

This does not allow for creation of object fields which
allow arbitrary subclasses - only the base class passes
the check.

Introduce a new 'subclasses' parameter, defaulting to
False, which traverses the python class hierarchy,
checking the obj_name() value on all parent classes
of the value being coerced.

Change-Id: Ie56b94e57a6e18292c10c926836592938540e515
2015-06-23 14:58:29 +01:00
OpenStack Proposal Bot
85cf59e792 Updated from global requirements
Change-Id: Id72737065a8c045db565316b7607a04224e8bb41
2015-06-22 20:19:46 +00:00