Commit Graph

146 Commits

Author SHA1 Message Date
Zuul e9fdb572f2 Merge "Use template for lower-constraints" 2019-05-30 16:13:49 +00:00
huang.zhiping 6a4445eb6c fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ic4edafbbcb57454c2592483b6348d46138320ab5
2019-05-30 09:59:14 +00:00
OpenDev Sysadmins 5dbfadcb48 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:51:15 +00:00
Andreas Jaeger 18e3168113 Use template for lower-constraints
Use openstack-lower-constraints-jobs template, remove individual
jobs.

Change-Id: Ie9c1cb7c37d75a8abe7450c295a9d6372b3b941b
Needed-By: https://review.openstack.org/623229
2018-12-20 20:45:17 +01:00
Doug Hellmann 72b3b91247 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I70b61c30b6901058d05d5e035547b2b1fe8bec83
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 08:58:13 -04:00
Andreas Jaeger 41254a3578 Update requirements manually
The global requirments sync for this repo fails since it lists
packages that are not in the global list. Manually sync requirements.

Failure log from requirements sync:
http://logs.openstack.org/d8/d89aad257d43fe02e42e44b2a0187dbd9f505c36/post/propose-update-requirements/15a7777/job-output.txt.gz#_2018-01-31_06_47_53_939490

Errors are:
'jsonpickle' is not in global-requirements.txt or blacklist.txt
'mongomock' is not in global-requirements.txt or blacklist.txt

Change-Id: I4c99bca201da092d872ead25e96c41f0d8c94ddf
2018-01-31 09:16:51 +01:00
melissaml 6a4c5ed448 Remove obsolete tempest-lib
tempest-lib has been reintegrated into tempest and this repository
already uses tempest instead of tempest-lib. Replace requirements for
tempest-lib with requirements for tempest.

See also
https://specs.openstack.org/openstack/qa-specs/specs/tempest/implemented/reintegrate-tempest-lib.html

Change-Id: I81f67d6cad8d289803ea32e2d3f62a3e2b73413d
2018-01-22 11:34:01 +08:00
Vu Cong Tuan 655515bc97 Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike
and will be removed in version Queens:ad
* manager > os_primary [1]
* admin_manager > os_admin [2]
* os_adm > os_admin [3]
* os > os_primary [4]
* alt_manager > os_alt [5]

[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/467852/
[3] https://review.openstack.org/#/c/467605/
[4] https://review.openstack.org/#/c/466991/
[5] https://review.openstack.org/#/c/457555/

Closes-Bug: 1720000
Change-Id: I141c36c785bf4e8dcd5b538444afa6d2fc91e8c3
2017-10-16 15:38:56 +07:00
Jenkins 047ecdffd7 Merge "Add processed field with current time" 2017-08-14 14:35:55 +00:00
Marc Aubry 94d277c7ed DeprecationWarning os_adm becoming os_admin
Change-Id: Ibdd7530644ad4dfa36482e99d4587b82cd6653e8
2017-08-08 09:20:26 -04:00
Marc Aubry 082b29aa36 Add processed field with current time
Change-Id: I6deddefc3cb7fb85726f9958fce8e26ca50d578c
2017-08-07 19:32:26 -04:00
luke.li 9e9fd41071 Enable some off-by-default checks
Some of the available checks are diskabled by default, like:
[H106] Don't put vim configuration in source files;
[H203] Use assertIs(Not)None to check for None.

Change-Id: Ie3d5ff0766515e68398b60519d00eeee2199be84
2017-06-22 10:57:36 +08:00
Vu Cong Tuan add74e4b01 Define hacking rules to ensure code quality
Enforce following codestyle rules:

* no xrange
* no LOG.warn usage (deprecated in favour of LOG.warning)
* usage of assertTrue(x) instead assertEqual(True, x)
* usage of assertIsNone(x) instead assertEqual(None, x)
* usage of assertIsNotNone(x) instead assertNotEqual(None, x)
  or assertIsNot(None, x)

Change-Id: I356a9c77986557a36144f503852fac5d6ba4bc20
2017-06-14 18:44:22 +07:00
Vu Cong Tuan d11423673f Replace oslo_utils.timeutils.isotime
Function 'oslo_utils.timeutils.isotime()' is deprecated in version '1.6'
and will be removed in a future version. We use
datetime.datetime.isoformat() instead.

For more informations:
https://docs.openstack.org/developer/oslo.utils/api/timeutils.html#oslo_utils.timeutil

Change-Id: Ie9161bbe036e24c657717b379f79bc64737587e2
2017-06-02 14:52:26 +07:00
Frédéric Guillot ef8897f58b Add API versioning
- All OpenStack projects have API versioning
- Existing endpoints are now prefixed with /v1
- Still fully backward compatible with old endpoints
- No HTTP redirects is used to avoid unexpected behaviors with
existing clients

Change-Id: If51f3291c44615991b3378b711dffacc1bd2591f
2017-05-12 14:53:12 -04:00
Paul Millette 3392b59188 Fix two typos in docs
Change-Id: I2368b2c6e88f977577c317951948d67eea3ead24
2017-04-18 10:51:51 -04:00
Jenkins ed9f99ae0a Merge "Write doc without flask autodoc" 2017-04-18 14:20:11 +00:00
Frédéric Guillot c22dc7babe Write doc without flask autodoc
- remove inline docs from routes.py
- correct certain response payloads
- add all api docs to index.rst

Change-Id: I58bb24f1a8ce173264ab9c1607cbe3af8d936fdb
2017-04-18 09:31:50 -04:00
Frédéric Guillot e1428c042f Do not try to stop failed listeners
Change-Id: Ic60e9330da7fa74e66d581bf01f6e901f8d5d4ed
2017-04-13 10:14:22 -04:00
Frédéric Guillot 2e56cf802e Upgrade Kombu to fix breaking change in oslo messaging
Change-Id: I2e0aa6bbfc0d49d2a3d9d5a97d53e09aade4fdae
See: 631ade59bc
2017-04-12 13:07:23 -04:00
Frédéric Guillot de22d48ad0 Add option to override default thread pool size
Change-Id: I1e9d4909c65092a2976f2b344c16a52fd3a95801
2017-04-05 09:47:31 -04:00
liangcui d1798c92f8 Replaces uuid.uuid4 with uuidutils.generate_uuid()
Openstack common has a wrapper for generating uuids.
We should only use that function when generating uuids for consistency.

Change-Id: I03a683f02ef0bb98afce2c91d4186ce63522dbeb
2017-03-24 17:17:27 +08:00
Ken'ichi Ohmichi 2bd049d1af Switch to use stable data_utils
Tempest provides stable library interfaces under tempest.lib.
This patch switches to use it for data_utils.

Change-Id: Id42ef764130b6fd82e089486775acdd4e709ecfc
2017-03-09 21:12:13 +00:00
Frédéric Guillot 4429e77ad3 Update code to latest changes in olso.messaging and tempest
See 94c818dc98 (diff-60d9d920c907281c0886983986a46a84)

Change-Id: I9483c15fb4fdf2763e9c891162713a5465fea020
2017-03-09 14:38:06 -05:00
Frédéric Guillot 262586195d Handle instances deleted before completion
This change avoid sending notification to critical queue
when instances are deleted before their completion.

Since we are never going to receive the create.end event,
we use a 15 minutes window to assume the instance was never
created. This check is made only if the entity is not found.

- Add more flexible filters system
- For now, filters are only for on delete events
- Add date helper to manipulate and parse date

Change-Id: Iba97f050bf6e164bf0d83035a884cdbe023d92fc
2017-02-22 16:27:50 +00:00
Anh Tran 45e76f87d4 Remove unused logging import
Change-Id: I17e56b7aadc8e66dd9c0341ef2e8542d696d68af
2017-02-22 13:58:36 +00:00
Frédéric Guillot b9893d4d82 Remove image metadata during teardown
Change-Id: I6194336a696ad524f67fbcdc9702619189ff1d95
2017-02-21 16:19:50 -05:00
Marc Aubry dcef52bbd3 Handle instance being rebuild causing integration-test failure
Tempest now have only 1 image instead of two.  This address the
concern by setting the metadata to all images and returning the
first one instead of assuming there is two.

Change-Id: I8ea8ae85d06c8dcc7373c9cf8cd5a9c978b15e28
2017-02-16 12:53:48 -05:00
Frédéric Guillot d888655fc7 Stdlib imports are always first
Change-Id: I219fda2121e8a3607dfcf42fb6ea3b3756c3614a
2017-01-20 09:11:41 -05:00
Frédéric Guillot 04c4fcf900 Fix wrong logic in notification error handling
Notifications are sent indefinitely to the error queue instead
of being sent again on info queue.

Change-Id: Ie8e946fdbe8a6c977a869fb4d58fb764effc2c35
2017-01-19 13:27:45 -05:00
Frédéric Guillot 4fbb9d7b56 Handle deletion of errored instances
When a new instance is created and the state is in error,
the event "compute.instance.create.end" is never sent.

However, when we delete an errored instance the deletion event is
sent, but the entity doesn't exists in te database.

This fix avoid false positives in the critical queue.

Change-Id: I70a4ae92bda37909cfd6021e0311a69b7ad189bc
2017-01-18 16:29:20 -05:00
Frédéric Guillot f66cc7ef44 Ignore unrelated notifications sent on error queue
- Nova can send notifications directly on the error queue.
- We should handle only notifications reported as error by Almanach.

Change-Id: Ic41e7115dd7d4f99d72d3319af67b204a0b62122
2017-01-18 13:40:55 -05:00
Frédéric Guillot 0f11fff0a9 Update Kombu requirement
Change-Id: I1875f85fa1556c30aebe47552090757a6f62435c
2017-01-13 14:52:24 -05:00
Paul Millette c024e7061c Remove last usages of flexmock
Change-Id: I4993bea250b96cc4f8fadabf03349ac9fcb6271a
2017-01-13 10:25:02 -05:00
Frédéric Guillot 53812aeb40 Fix broken logging
Allow-us to log to files.

Change-Id: I6864a7968967be6362d142b3d7ffee74abce9dc2
2017-01-12 16:28:13 -05:00
Paul Millette 308a04d678 Remove all remaining usages of hamcrest
Change-Id: Ia6ebcf8be699c378c812c3a4771d20d62e7c8235
2017-01-12 13:40:12 -05:00
Paul Millette 00ff775da4 Remove hamcrest from all api test classes
- required for removal of the last occurence of flexmock
- bit of a big bang change but all must be changed at the same time

Change-Id: Ib329056e5904b726490173d5e43a0ac74592722f
2017-01-12 10:22:31 -05:00
Frédéric Guillot 54b56940db Handle multiple listeners
The collector service can now receive notifications
from multiple RabbitMQ servers.

Change-Id: Ie06cae29ed929ea46397a76796a6b575a859bce7
2017-01-11 21:25:47 +00:00
Jenkins 3d8c3d5f68 Merge "Fix tempest tests" 2017-01-11 18:30:21 +00:00
Frédéric Guillot 50d9681854 Fix tempest tests
- The argument service doesn't exists anymore and
set the value of the variable scope to None instead.
- Make tests a little bit less flaky by using waiters
inspired by tempest waiters

Change-Id: Ic376f22d9244d3ddb8d9e8ed0e00c4a64f5cede5
2017-01-11 12:38:33 -05:00
Paul Millette ad1104de6e Use builtin-mock in Api MixedAuth
Change-Id: I25428a7eed5aa1596490f2b13a295c2f7a72a5bd
2017-01-11 11:14:36 -05:00
Paul Millette 2f6e86049b Restore entity controller test call
Change-Id: Id32a0c7afab93eac4b96b301cccc71acfb8e5383
2017-01-06 15:10:03 -05:00
Paul Millette 3d175cdae4 Entity controller unit test use built-in mock
Change-Id: Icbdf9eb1a6bfeefe06e7da774b1e1cf138f9d9a4
2017-01-06 13:42:12 -05:00
Jenkins 6593961855 Merge "Volume controller unit test use built-in mock" 2017-01-06 16:18:56 +00:00
Paul Millette 4732b22f42 Instance controller unit test use built-in mock
Change-Id: I2534455ec87376cc89c5829d8fb4108a21461cc6
2017-01-06 10:24:54 -05:00
Paul Millette a41d3d982f Volume controller unit test use built-in mock
Change-Id: Ie6e0fca86ca7285d01c2bf40a1db48942cdfcedb
2017-01-06 08:56:16 -05:00
Frédéric Guillot c344ad0d80 Add unit test for application controller
Change-Id: I3b663b39d94f2b56559faf753e3b46d47a1ca000
2016-12-29 11:15:03 -05:00
Frédéric Guillot 4793264851 Use same naming convention everywhere for test classes
Change-Id: If619973f203a811dedd5fdfd9a6c32373e3afe85
2016-12-29 10:35:08 -05:00
Frédéric Guillot 1f62249bae Models refactoring
- Add unit tests for models
- Avoid default method arguments with mutable values
- Simplify object serialization/unserialization
- Model objects are self-contained and do not use global functions
- Do not hardcode specific image metadata in the code
- Rename "os" key to the standard name "image_meta"
- Both keys "os" and "image_meta" are stored in the db for backward compatibility
- List of image metadata is configurable in config file

Change-Id: I2826713e438de63a49aae71cf7100288bde6bee1
2016-12-29 10:16:03 -05:00
Jenkins 44baec339f Merge "Update setup.cfg" 2016-12-27 21:19:29 +00:00