Commit Graph

1574 Commits (23afb2d631608a0a422e5b3b0b8dcedda9f5c285)

Author SHA1 Message Date
Zuul 23afb2d631 Merge "add python 3.7 unit test job" 2019-03-02 00:04:21 +00:00
Zuul d66a63b4e5 Merge "Drop py35 jobs" 2019-03-01 22:16:32 +00:00
Vishakha Agarwal 33a804a288 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release.
The current target py3 runtime for Stein is Python 3.6,
so there is no reason to keep testing against the older version. Also
correct setup.cfg and tox.ini to reflect the current supported Python

Change-Id: I9d1b57b981269fea3afe39cf524350f3c4a7d944
2019-03-01 11:32:50 +01:00
Zuul 0828f7048e Merge "Add support for client-side rate limiting" 2019-03-01 01:58:36 +00:00
Monty Taylor 09934718f7 Add support for client-side rate limiting
shade/openstacksdk has implemented client-side rate limiting on top of
keystoneauth for ages and uses it extensively in nodepool. As part of an
effort to refactor that code a new approach was devised which was much
simpler and therfore suitable for inclusion in keystoneauth directly.

The underlying goal is two-fold, but fundamentally is about allowing a
user to add some settings so that they can avoid slamming their cloud.
First, allow a user to express that they never want to exceed a given
rate. Second, allow a user to limit the number of concurrent requests
allowed to be in flight.

The settings and logic are added to Adapter and not Session so that the
settings can easily be per-service. There is no need to block requests
to nova on a neutron rate limit, after all.

Co-Authored-By: Ian Wienand <>
Change-Id: Ic831e03a37d804f45b7ee58c87f92fa0f4411ad8
2019-02-28 22:14:24 +00:00
Zuul 7f9ff9585d Merge "Expose app creds and new attrs in fixtures" 2019-02-27 19:23:38 +00:00
Colleen Murphy 8ea9bee56c Expose app creds and new attrs in fixtures
To help enable testing authenticating with application credentials in
keystonemiddleware we need the keystoneauth token fixtures to support
application credentials. This change adds application credentials to the
fixtures along with mocking of the new access rules attribute. Additionally,
add support for the new attribute in the AccessInfoV3 object so that
it will fully represent the new structure.

bp whitelist-extension-for-app-creds

Change-Id: Ia6fece77390942ac012be1c80691ba86dc1e49b4
2019-02-25 00:35:00 +01:00
Zuul e155bed14e Merge "Expose application credentials in AccessInfoV3" 2019-02-23 00:38:20 +00:00
Monty Taylor 26b41b2e82 Remove shade jobs
We're co-gating with openstacksdk, also doing so with shade is a
bit excessive.

Change-Id: I0c192b96f01844d4ebce49dc1efc76c193afa6d2
2019-02-22 16:28:08 +00:00
Corey Bryant a96cf6ed75 add python 3.7 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.7.

See ML discussion here [1] for context.


Change-Id: Idb2fb5bf8633c5980132e701157715690f22546f
Story: #2004073
Task: #27422
2019-02-14 08:18:50 -05:00
Colleen Murphy 759a9a5f59 Expose application credentials in AccessInfoV3
Since application credentials are used in some tokens it is important
to expose those attributes in the AccessInfoV3 object in the same way we
expose other token data.

Change-Id: I36a0b8dd275df8fcee556ed305c34c16a90384e8
2019-02-10 21:34:36 +01:00
Andreas Jaeger 299bebc14d Use template for lower-constraints
Small cleanups:

* Use openstack-lower-constraints-jobs template, remove individual
* Sort list of templates

Change-Id: Ib3faad6ed1a286376d5b60ce33f8cb757a9eda6b
2018-12-20 21:03:51 +01:00
Vieri f2ad956f82 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: Ifd1ee825acd098a6525b5c5f3932ce200cfe730e
2018-12-05 03:38:39 +00:00
Monty Taylor 4960c48aec
Fix version discovery for clouds with int project_ids
On a cloud that has inaccessible version discovery documents AND uses
integer project ids, the discovery fallback logic can fail because the
project id parses as a (very large) version.

Check to see that the url segment in the fallback code begins with a v,
so that we're only attempting to parse versions from actual candidate

Closes-Bug: #1806109
Change-Id: Id90b3b9e4852494a4678b0a9bb67362babdc971c
2018-11-30 13:09:32 -06:00
Zuul d8cee933fe Merge "Replacing the HTTP protocal with HTTPS in using-sessions.rst." 2018-11-18 19:56:40 +00:00
zhouxinyong 7939dc7ab9 Replacing the HTTP protocal with HTTPS in using-sessions.rst.
Change-Id: Ib4712414c48ed922ea62460730a4cd5749a3d481
2018-11-17 02:52:04 +00:00
Zuul 618908919b Merge "Add py36 tox environment" 2018-11-17 00:58:18 +00:00
Colleen Murphy 0db112c4a6 Add py36 tox environment
We already run python3.6 unit tests in CI. Add the py36 environment to
the tox file so that developers with python3.6 available locally can opt
into running that version too.

Change-Id: I499db960450b9628636d503a4d7f1cc163d38e3a
2018-11-06 12:57:12 +01:00
wangqiangbj b134b696f3 fix wrong spelling of "unnecessary"
Change-Id: I1db36cab2a3dce4c1ae1c1de0d17c945e779bd9d
2018-10-30 18:40:53 +08:00
Monty Taylor c6e87c8209
Add missing release note for ironic discovery fix
Change-Id: I3f0a6047ecb0569553d17eb7a066ac7023817c66
2018-10-24 03:52:20 +01:00
Dmitry Tantsur 72288d3b18 Make new-style single endpoint version discovery actually work for ironic
For (unclear) historical reasons the root single version endpoint also
contains "id" and "links" fields. This makes the current workaround
for old-style endpoints take priority over the correct algorithm.
This change reorders the code, so that if "version" is present, it
always take priority over the workaround.

The unit tests are updated to be closer to real output from ironic.

Change-Id: I743b954c6c5b2f986c213acb6ec6af7e08c9f5f8
2018-10-23 14:26:34 +02:00
Sean McGinnis 87ca0d72fa Update sphinx extension logging
Sphinx 1.6 deprecated using the application object to perform logging
and it will be removed in the upcoming 2.0 release. This updates our
extensions to use the recommended sphinx.util.logging instead.

Change-Id: I3abce4e3c147befd0235820cb8850fe18f6dee42
Signed-off-by: Sean McGinnis <>
2018-10-16 14:21:45 -05:00
Monty Taylor e878df1a16
Reformat Adapter docstring
Typing docstrings for the next patch was annoying. Reformat the
docstrings to wrap at the front rather than in visual blocks.

Change-Id: I08fc1e45e032197f3bb0b8311c032b471494ef80
2018-09-25 05:54:06 -05:00
Monty Taylor 106d91fb41
Cache root urls with and without trailing slashes
The trailng slash on a pathless url is not meaningful, but we were
treating the url given to the discovery cache as if it were. In some
circumstances, such as an endpoint_override that didn't match the
found discovery document perfectly, a double-request could be made.
Normalize root urls in the caching code so that and would be the same.

Change-Id: I70a5911cf0f213a7816fe8d58c6cca4702ff71bb
2018-09-23 10:23:03 -05:00
Zuul 58ac4c059a Merge "Protect against endpoint_data not existing" 2018-09-12 05:29:29 +00:00
Zuul 4009253643 Merge "Add support for ironic single-version responses" 2018-09-12 05:29:29 +00:00
Monty Taylor 2585047ffc
Protect against endpoint_data not existing
It's possible in get_api_major_version that the endpoint in question is
not found at all. In that case, we are documented to return None, but
what we do instead is throw an exception trying to get data off of the
None object.

Change-Id: I06ad497854f4e95a1a2a4a93241b244fc476b139
2018-09-11 16:18:40 -06:00
Monty Taylor c40eb2951d
Add support for ironic single-version responses
The ironic payload looks like:

  {'id': 'v1',
   'links': [{"href": "",
              "rel": "self"}]}

This does not have version info in it, nor min/max ranges for
microversion discovery. We can't really get any useful information from
this document, but we can at least not fail when trying to deal with it.
This should then be upwards-compatible with ironic adding version discovery
information to the document that is returned.

Change-Id: I47e0f9b295c24ef168f4a033faf573b953025d4c
2018-09-06 15:49:38 -05:00
Zuul c8c2ab404d Merge "Remove os-testr from requirements" 2018-09-06 20:38:25 +00:00
Colleen Murphy 3569aa8dd1 Remove os-testr from requirements
keystoneauth is switched to stestr, we don't need to depend on os-testr

Change-Id: Ie3fc5e5b03f5c0865bf3f499666f504703cd0b0d
2018-09-05 13:04:16 +02:00
Doug Hellmann ff2d346f4f add lib-forward-testing-python3 test job
This is a mechanically generated patch to add a functional test job
running under Python 3 as part of the python3-first goal.

See the python3-first goal document for details:

Change-Id: I4af5c3a4abea74e371f8656535c80fc79e1e442c
Story: #2002586
Task: #24304
2018-08-29 16:04:58 -04:00
Doug Hellmann d0466f640c add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:

Change-Id: I01201d3866201a04ab36c8cf92413ef6de5e8511
Story: #2002586
Task: #24304
2018-08-29 16:04:54 -04:00
Doug Hellmann d829d3d69b switch documentation job to new PTI
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.

See the python3-first goal document for details:

Change-Id: I30f3bc0f5b68190f72b015ae5a14251c91eeee42
Story: #2002586
Task: #24304
2018-08-29 16:04:48 -04:00
Doug Hellmann cf83ba0ae3 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are

See the python3-first goal document for details:

Change-Id: Iab3d02dbf7b6df016bf44f7be7b27c01f498601e
Story: #2002586
Task: #24304
2018-08-29 16:03:36 -04:00
Colleen Murphy 3c9746ae34 Add Keystone2Keystone example
Since we removed the keystoneauth example in the main docs in favor of
an openstackclient example[1] add an example of using the
Keystone2Keystone auth plugin.


Change-Id: I5815fecbfe53d8a191a8a64912dac17e66ca928a
2018-08-21 14:49:13 +02:00
Zuul e0f1f792ce Merge "add release notes to readme.rst" 2018-08-18 07:00:05 +00:00
Gage Hugo ccf6cb7903 Change log hashing to SHA256
With the recent Bandit update[0], the usage of SHA1 is now being
tagged as an issue. This changes the hashing of logs to SHA256
instead of SHA1.

Change-Id: Icde62b8d5ff78b4155e9df8231d63be3ecc53520
2018-08-17 12:35:47 -05:00
liushuobj c51c7fe64c add release notes to readme.rst
Change-Id: Ib63209b676fe9d0d949fff3ba975bcd99d98ea6b
2018-08-15 15:47:52 +08:00
OpenStack Release Bot 8c02fd763a Update reno for stable/rocky
Change-Id: I4bd8f5afed5fc6488144e509afe2f5c7f5df5669
2018-07-26 12:34:02 +00:00
Zuul 171f6bd2e7 Merge "Add ability to filter version data by service-type" 2018-07-24 18:22:43 +00:00
Monty Taylor 83be7453fa
Add ability to filter version data by service-type
The get_all_version_data method is useful for getting a full listing of
what's going on with version discovery on a cloud. Sometimes though
people just want to see the versions for a specific service. Add a
filter to allow skipping making the version discovery call in the first
place, instead of needing to do that as a post-filtering step.

Change-Id: Ia3ca4be2976d1a5e7914fa8f2adbf7297e8cb1e1
2018-07-23 18:41:18 -05:00
wangxiyuan 323f4e4bc4 Add netloc and version check for version discovery
If the url netloc in the catalog and service's response
are not the same, we should choose the catalog's and
add the version info to it if needed.

Change-Id: If78d368bd505156a5416bb9cbfaf988204925c79
Closes-bug: #1733052
2018-07-19 10:18:44 +08:00
wangxiyuan ebe781a3ea Add minimum version for requirements
OpenStack requirements now checks the minimum
verion for each requirements library[1].

This patch added the missing one to let the CI happy.


Change-Id: I0deaa8f2b3248955d5a7baa7b2cb531516343ffe
2018-06-15 08:51:15 +00:00
Eric Fried 51bfa030b1 raise_exc default in Adapter
It can be annoying to have to say raise_exc=False (or use try/except) on
every call when talking to an API where 4xx response codes are
useful/normal/informative or where the preferred coding style is to use
conditionals rather than try/except.

With this change, the Adapter constructor takes a new kwarg, raise_exc.
It defaults to None, and the existing behavior is unchanged.  If set to
a boolean value, that is used as the default for requests.  Specifying
raise_exc to the primitives (get, head, put, post, patch, delete,
request) at any point along the chain will still take precedence.

Change-Id: Ie291c3cb891467728d8ca33cf62afdab37c82f34
Closes-Bug: #1776501
2018-06-12 10:48:39 -05:00
Zuul 36ed4c11cb Merge "fix tox python3 overrides" 2018-06-09 04:24:09 +00:00
Doug Hellmann 3cca1f4eb0 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: I2db130183c0a657b281e0990593fb86be6bef017
Signed-off-by: Doug Hellmann <>
2018-06-06 15:27:00 -04:00
Dmitry Tantsur 3c2cf44e1c Add optional support for retrying certain HTTP codes
Ironic commonly returns HTTP 409 when a node is locked by another routine
and HTTP 503 when the conductor has no free threads to process the request.
Currently it is managed by custom code in ironicclient and openstacksdk,
this change will allow to move it to Session itself.

Change-Id: I04e356e7856b020cd20aa598e291ef31e02730d2
2018-05-29 14:54:56 +02:00
Zuul db5aa8b3ae Merge "Expose version_between as a real function" 2018-05-17 21:06:53 +00:00
Zuul c3ef1a11b5 Merge "Add oslo.config option for split-loggers" 2018-05-17 21:06:52 +00:00
Zuul cc912f0500 Merge "Collect timing information for API calls" 2018-05-17 21:06:52 +00:00