Commit Graph

4512 Commits

Author SHA1 Message Date
OpenDev Sysadmins 266cd4b2e5 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:53 +00:00
Jenkins 9e59ba8993 Merge "Fix to_json_schema() call" 2016-08-11 14:20:49 +00:00
OpenStack Proposal Bot ac4d396468 Updated from global requirements
Change-Id: Ia95431e7e84b980cd2c749de4ed2ebbd54637a60
2016-08-08 10:47:18 +00:00
tengqm 0146734e7e Fix to_json_schema() call
The to_json_schema() method now has the 'required_fields' incorrectly
placed outside of the 'data_key' dict. This patch moves it inside that
dict.

Change-Id: Id50a75bc27198576b615c4e76c046a53008d20bc
Closes-Bug: #1608870
2016-08-02 05:32:29 -04:00
OpenStack Proposal Bot 67ba3a0840 Updated from global requirements
Change-Id: Ie3cc0ecc7d63e4c548e00198bf1d4455add1fb00
2016-07-29 02:34:08 +00:00
ChangBo Guo(gcb) def295f482 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I846a4e8cd80e4330203120e782c9071070abb0cb
2016-07-12 17:02:51 +08:00
OpenStack Proposal Bot b6410fe931 Updated from global requirements
Change-Id: I0a671e27624129be049f039e06d760083a1600b5
2016-07-09 19:26:10 +00:00
Jenkins 8e9c8c8759 Merge "Extend test_hashes to allow extra info gathering" 2016-07-05 19:45:59 +00:00
Jenkins fb819b8b87 Merge "Improved error message for Object.coerce" 2016-07-05 19:45:51 +00:00
Jenkins f53f6626a5 Merge "JSON schema get_schema implementation for common fields" 2016-07-05 19:26:37 +00:00
OpenStack Proposal Bot c6eaf00620 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: If2bd01f9740762a2c9e1b10385be33a09f83a0fc
2016-07-03 08:07:35 +00:00
Julian Sy e80ab966e0 JSON schema get_schema implementation for common fields
This implements the get_schema method of common Field and FieldType classes.
This method will be used by the to_json_schema method in Versioned objects
to partially generate the schema of the object's fields.
Fields implemented in this patch: string, enum, integer, float, boolean, list

This also fixes check for default value for Field.

Implements blueprint json-schema-for-versioned-object

Change-Id: Ibd84cb4e33c375044611c6ffa137ee67d21a93e5
2016-06-30 21:37:35 +00:00
OpenStack Proposal Bot cf2838f6f4 Updated from global requirements
Change-Id: Ic88c0575f1cc73201f3620f2719e330681725701
2016-06-30 18:48:42 +00:00
Julian Sy 92e7ac7108 JSON schema generation for versioned objects
This adds a method that generates a versioned object's fields
in json schema. In addition, each field would also generate
its respective json schema property.

Implements blueprint json-schema-for-versioned-object

Change-Id: I5914606e4db79a15b573cfc4a6b9b8807199e402
2016-06-28 19:53:54 +00:00
Jenkins e7b1be0e26 Merge "Updated from global requirements" 2016-06-27 12:56:30 +00:00
Balazs Gibizer cf28125447 Extend test_hashes to allow extra info gathering
ObjectVersionChecker.get_hashes() already support extra data collection
for fingerprint generation via the extra_data_func parameter.
However this cannot be used from test_hashes().

Nova versioned notification work depends on this extra data gathering
support. See nova bug #1595575

Change-Id: I7f4d0f37e638de6fcef7211280cedd7d1f09ab74
Closes-Bug: #1595552
2016-06-23 16:37:16 +02:00
OpenStack Proposal Bot f5fdfc2f51 Updated from global requirements
Change-Id: Ic70fb3e311a009fbcd02cae076cbcf3b552c0a9b
2016-06-21 18:04:42 +00:00
John Perkins 238fd1954a Improved error message for Object.coerce
Include the full path to the module in the error message
for both the expected and actual object.

Change-Id: I2b5ff3afdbc622a66ba9f78cf8ed61d892694793
Closes-Bug: 1592625
2016-06-21 09:48:33 -06:00
OpenStack Proposal Bot 1500618f52 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ic7533c96c252a87e25190c0047fb02dac6f0087a
2016-06-17 07:01:31 +00:00
Jenkins 0bb46f0a2c Merge "Add objectify decorator for readability" 2016-06-16 00:04:03 +00:00
OpenStack Proposal Bot 38f790f020 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: If44c041cf317e9022c8d443cc1c02107bf10b777
2016-06-13 06:42:57 +00:00
OpenStack Proposal Bot 1d0e199c10 Updated from global requirements
Change-Id: I2eb18096a27508fcb3eb01a20c1e35583c4d3c63
2016-06-08 22:03:16 +00:00
Thang Pham 91184e1047 Fix ComparableVersionedObject in python 3.4
There is a difference when __eq__ is called and not called
in python 2.7 and 3.4.  In python 3.4, when an object is
compared to something else, e.g. obj != None, the __eq__
is called to do the comparison, whereas in python 2.7,
it does not.  The following patch allows
ComparableVersionedObject to be used in python 3.4 by
checking if the object has obj_to_primitive() as an
attribute.

Change-Id: I9b989bb07505842651bc73c2ccc1552b14307a68
Closes-Bug: #1469864
2016-06-07 14:01:24 +00:00
Jenkins cccbcf9fbd Merge "Add a pci address field" 2016-06-07 07:48:35 +00:00
OpenStack Proposal Bot be2038f255 Updated from global requirements
Change-Id: I511a63682aecc045adb020fe30f0425187012702
2016-06-03 18:18:18 +00:00
OpenStack Proposal Bot a439291043 Updated from global requirements
Change-Id: I186b2eb26a4d97a8635f74a2b62063d8eb5414e3
2016-05-19 22:14:27 +00:00
Ryan Rossiter 9403927de4 Add objectify decorator for readability
Because it isn't inherently clear what register_if(False) does on top of
a class, a functionally equivalent objectify decorator is added to make
things a little more readable.

The register_if() decorator was also cleaned up a little bit to reuse
the register() decorator. Unit tests were also added for the register()
functions to ensure none of the functionality is changing.

Change-Id: I0bec8e7e587b81dc0484a7b39f0cf57308d3b3d4
2016-05-19 21:14:53 +00:00
Jenkins 05d98a8432 Merge "Fix a typo in Enum error path" 2016-05-19 19:55:54 +00:00
Jenkins 885abcb894 Merge "Replace safe_utils.getcallargs with inspect.getcallargs" 2016-05-19 19:10:20 +00:00
Jenkins 4af33ee76a Merge "Fix compare_obj() to obey missing/unset fields" 2016-05-19 19:02:10 +00:00
Jenkins 72dad26004 Merge "Fix issue with coercing valid_values to a tuple" 2016-05-10 20:02:10 +00:00
OpenStack Proposal Bot ad5d78d205 Updated from global requirements
Change-Id: I79e1c4121e8561ce3282c77c4a5d99546c61c129
2016-04-30 18:07:57 +00:00
Dan Smith 59ac1d009d Fix a typo in Enum error path
This fixes a bug that I found while making another change, along with
a test that exercises the code that pokes it.

Change-Id: Ibb1ca5e171c6329a46a5d853a3ab8613f58d067f
2016-04-25 08:36:33 -07:00
Dan Smith f7e5f8e67a Fix issue with coercing valid_values to a tuple
A recent patch exposed valid_values via property, and cocerced the
result to a tuple to convey the immutable nature of them. This was
a good thought, but unfortunately breaks __repr__ stability, which
we use in the fixture to calculate the object hashes.

We could make the __repr__ dig into the raw types on the field
instead of using the property, but this is probably not the best and
smallest change at this point. If we can get everyone to start using
tuples for their value_values list, then we could land a change to
coerce and enforce that. Right now, we just need to fix the
unexpected regression.

Change-Id: I09b78e7f816fc26c69a3e9435c9d92d5acb5821b
2016-04-25 08:33:47 -07:00
Jenkins 730659ed6f Merge "Imported Translations from Zanata" 2016-04-19 16:34:12 +00:00
ChangBo Guo(gcb) 50618882d5 Replace safe_utils.getcallargs with inspect.getcallargs
safe_utils.getcallargs was written to support python2.6 which did not
have inspect.getcallargs.  Now that support for python2.6 has been
dropped it should be replaced with inspect.getcallargs.

Note:The interface that safe_utils.getcallargs provides did not match
inspect.getcallargs around the handling of the self parameter needing to
be passed in. It should be brought inline with inspect.getcallargs so
that it can be dropped. Nova fixed in 2910d75b28afd909af3b4ac392729ac3d5e64b65.

Change-Id: I2fbec0cc4d43b2fc424460b176bf26700f05f44a
2016-04-19 19:38:58 +08:00
OpenStack Proposal Bot 1541c5409c Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I961fe66d293b6b472ada3ae87db1028e0a8bd477
2016-04-19 06:12:23 +00:00
Joshua Harlow 592c3cec07 Remove direct dependency on babel
The dependency on oslo.i18n already forces this requirement.

Change-Id: I92488e99227c6dad0a898d477b70b8e3a4501e9e
2016-04-18 13:38:35 -07:00
Jenkins c82c899c2f Merge "Expose object context thru a public property" 2016-04-18 10:18:55 +00:00
Jenkins aa0c3c6f9a Merge "Imported Translations from Zanata" 2016-04-16 13:22:01 +00:00
OpenStack Proposal Bot d12a32bde9 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I8f2d79efe27319f1de70440e5740f25da4ffd430
2016-04-16 06:11:46 +00:00
Ihar Hrachyshka 85dcf71f22 Introduce fixture to enforce sorted order for object changes
In unit tests, sometimes you want to compare that JSON representation of
an object is identical to a JSON blob. Sadly, it may not work for
objects with changes made, since those changes are represented in the
object as a set, and hence end up in unstable order in JSON blobs.

To facilitate smooth object representation comparison for objects using
__eq__, this fixture enforces sorting for object changes.

Note: this code is directly ripped from Nova tree, with tiny
modifications:

https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/fixtures.py?id=dd36b6474ee9d70636fd4bc5f30237de2151fc45#n571
https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/test_fixtures.py?id=dd36b6474ee9d70636fd4bc5f30237de2151fc45#n425

Co-Authored-By: Dan Smith <dansmith@redhat.com>
Change-Id: Ib24eea4af863078d39f8969a7890b5d9d2e11405
Closes-Bug: #1552676
2016-04-15 08:50:12 +02:00
Ihar Hrachyshka bb1fe93ece Expose object context thru a public property
This is useful for consuming projects to cary on the context in base
class without duplicating it in their own base classes.

Change-Id: I28f49740b82a3063709c3c239b5199e901ad898e
2016-04-15 08:33:39 +02:00
OpenStack Proposal Bot 761b9d75f3 Updated from global requirements
Change-Id: Ib150725d5b0f6d7c7fcfd900b0ee1bb526a27ff5
2016-04-13 12:47:46 +00:00
Ryan Rossiter 52545273d9 Fix compare_obj() to obey missing/unset fields
When comparing objects to dicts, if a field is unset on both, they
should still be counted as equal. If something is unset on one, but not
on the other, they should be counted as unequal. In any of these
situations, if the field is set in allow_missing, all of the equality
checks should just be skipped.

Change-Id: I3e5143bc872ab4cb645d09c7e969fd1cf9c7985c
Closes-Bug: #1566398
2016-04-11 14:11:20 +00:00
OpenStack Proposal Bot 50ac4b7534 Updated from global requirements
Change-Id: Ib775074436896499b6a1b968b82e8476e1e2327f
2016-04-08 00:32:25 +00:00
OpenStack Proposal Bot 09a39be1da Updated from global requirements
Change-Id: I3585f39beb13f9fa9c5a3574684085cab8da85d2
2016-04-07 17:13:32 +00:00
Jenkins 60e1bdf588 Merge "Add BaseEnumField valid_values introspection" 2016-04-06 16:08:08 +00:00
OpenStack Proposal Bot 480cae47ed Updated from global requirements
Change-Id: Ica07d628433b2e09117a5010b6d00b55b0f1531a
2016-04-05 13:41:53 +00:00
OpenStack Proposal Bot 3d188b8953 Updated from global requirements
Change-Id: I5241d69651ad4a157aac58b8be944c9f34f02559
2016-04-02 16:16:36 +00:00