Commit Graph

1655 Commits (112bcae1fbec355fcb58da07ae1d9f1adf8b77ba)
 

Author SHA1 Message Date
Goutham Pacha Ravi 112bcae1fb Specify manila microversion header
Manila API honors a "X-OpenStack-Manila-API-Version"
header to specify microversions.

It may support the OpenStack-API-Version header
in a future release, however, we'll need to maintain
backwards compatibility with the existing API.

Change-Id: Ia2e62d3a11a08adeb6d488b7c9b365f7ff2be3c8
2 years ago
Zuul 6a662719ce Merge "Update master for stable/victoria" 3 years ago
Dmitry Tantsur d21c52867f Provide the default get_auth_ref implementation
osc-lib tries to call it, failing for e.g. http_basic.

Change-Id: Iacfba0940beda4dce2a9be0c863cb506d4013e2f
3 years ago
OpenStack Release Bot d441f33cd5 Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: Iee8f7c760fb33a5bc54724e50104eb638adff527
Sem-Ver: feature
3 years ago
Zuul c2d2e7af29 Merge "Correct major version discovery for non-keystone plugins" 3 years ago
Dmitry Tantsur 981a19bba1 Correct major version discovery for non-keystone plugins
When a non-keystone plugin is used together with an unversioned endpoint,
we give up on discovery before figuring out both major version and
the correct endpoint. This is because get_endpoint_data is called with
discover_versions=False, so discovery assumes we have all information
already. It may be an issue in discovery itself, but I'm afraid to
touch that code. Instead, if get_endpoint_data returns no API version
with discover_versions=False, try with discover_versions=True, which
matches what the identity plugins do.

Also increase the unit test coverage.

Change-Id: Ie623931b150748d7759cf276e0023a2f06a8d4db
3 years ago
Zuul fda522ae10 Merge "Fix get_endpoint_data for non-keystone plugins" 3 years ago
Monty Taylor a4ac1ea193 Fix docs builds for modern stevedors
We have a custom doc build extension that scans module names, but
the api for that changed.

Change-Id: If8c08d22dde3e570cdc6fb7092bc131e2e3bcc18
3 years ago
Monty Taylor b95a89e3ff Fix get_endpoint_data for non-keystone plugins
We expect endpoint_override, but these plugins won't necessary
have it, they have endpoint instead.

Co-Authored-By: Dmitry Tantsur <dtantsur@protonmail.com>
Change-Id: Iead4b95c1f5b8d84cec705da32f41049e2eea641
3 years ago
Zuul dab8e1057a Merge "Drop python 3.5 support" 3 years ago
Zuul e0f1d314f4 Merge "Update lower-constraints versions" 3 years ago
Monty Taylor 4aaa2e52b0 Drop python 3.5 support
Now that we released ussuri, we have a stable release that supports
3.5. That means if needed we can backport changes needed for
zuul and nodepool, so it should be safe to go ahead and drop 3.5
support.

Change-Id: Iaaba139009f2b49815c29717d71b9182a6bec2ab
3 years ago
Steve Baker ff68663217 Implement HTTP Basic client support in keystoneauth1
A new basic auth plugin is added which enables HTTP Basic
authentication for standalone services. Like the noauth plugin, the
endpoint needs to be specified explicitly, along with the
username and password.

An example of a standalone server implementing HTTP Basic can be seen
in Ironic change https://review.opendev.org/#/c/727467/

Change-Id: Ib3f0a9c518d031a67f9605cf64a8a9cc81131ed3
Story: 2007656
Task: 39741
3 years ago
Sean McGinnis 8915fabc38
Update lower-constraints versions
This updates lower constraints to versions that will work with py38 so
that when we move to running on focal nodes, which has py38 as its
default py3 runtime, the lower-constraints job will continue to pass.

It also cleans out some secondary requirements that are no longer needed
due to our direct dependencies being updated.

Linters are removed that are kept in the global requirements blacklist
as those are not version tracked and are not relevant for our
lower-constraints unit test runs.

Change-Id: I228212d8347a33a6bc2735a8506acffe58bee2ec
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
3 years ago
Sean McGinnis 646192d7fd
Remove mox3 from local upper-constraints
The py35-upper-constraints.txt file listed mox3, but mox3 is not
actually used by the project. This cleans up the list to make sure it
only lists packages that are actually needed.

Change-Id: I8f28e69cdcdd96e927c9cf5b9ed718448513118f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
3 years ago
Zuul 94314329e9 Merge "Replace assertItemsEqual with assertCountEqual" 3 years ago
Zuul e96c2102ad Merge "Use unittest.mock instead of third party mock" 3 years ago
Zuul 5445f779ed Merge "Add in-tree upper-constraints for py35 job" 3 years ago
Zuul 1f0412a042 Merge "Make header Case Insensitive" 3 years ago
Joel Capitao 1fe8df2bc8 Replace assertItemsEqual with assertCountEqual
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
Credits to [5].

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
[5] - https://review.opendev.org/#/c/732393/

Change-Id: Ib1db7694a8f0f59d8762b02acbb4ef16e5176098
3 years ago
Ghanshyam Mann c1e843b0cd Add in-tree upper-constraints for py35 job
It is difficult to keep the py35 upper constraints on reqiorements
repo's upper-constarint.txt file as update-constraint tools generate
the new file everytime with official supported python version only
which is py3.6 and py3.8 for Victoria cycle
- https://review.opendev.org/#/c/730428

Let's keep the py3.5 constraints in-tree which can be used in py35
unit test job.

Change-Id: Iec2eaa2b7e8df777b6988c2134e7771b9b1fb5b5
3 years ago
Ghanshyam Mann c00fca4a09 Make header Case Insensitive
In case of global-request-id request, Adapter
send two global request id header
 - "X-OpenStack-Request-ID"
 - "X-Openstack-Request-Id".

Example: https://zuul.opendev.org/t/openstack/build/c5b1debf78df4aa3bdda34f0b4c53c37/log/testrepository.subunit#2385

This is becasue of the header not being Case Insensitive
and end up with two different name of same header with difference
of cap 'D'.

Unit test for whether request global-request-id has precedence
over adapter fail many times because of how different python version
treat the dict. py3.6 and above are all good as dict maintain the
insertion ordered but py3.5 can fail it any time.

We can see consistent failure in py35 jobs:
- https://review.opendev.org/#/c/730687/

Let's make the headers always Case Insensitive which is
what RFC says.

Change-Id: Iba707dd0506d22e144aca4fdfc9b140c8e37ae02
Closes-Bug: #1881351
3 years ago
Zuul 7d03b2b2f4 Merge "Switch to newer openstackdocstheme and reno versions" 3 years ago
Sean McGinnis edc2ae4249
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I07d61e1a8f18d65acdf86cdd61f7d9e28157f1d7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
3 years ago
zhangboye 38374adab6 Add py38 package metadata
Change-Id: I6ec1530d9ddc844f3ba687fe94f5fcdd3670122f
3 years ago
Lance Bragstad ad46262148 Inject /v3 in token path for v3 plugins
Without this, it's possible to get HTTP 404 errors from keystone if
OS_AUTH_URL isn't versioned (e.g., https://keystone.example.com/ instead
of https://keystone.example.com/v3), even if OS_IDENTITY_API is set to
3.

This commit works around this issue by checking the AUTH_URL before
building the token_url and appending '/v3' to the URL before sending the
request.

Closes-Bug: 1876317

Change-Id: Ic75f0c9b36022b884105b87bfe05f4f8292d53b2
3 years ago
Ghanshyam Mann fdd4078202 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

Cap pycodestyle also  as flake8-import-order does not cap the pycodestyle
and pull its latest version and break things.

Also removing the pycodestyle from lower-constraints file
as theose are blacklisted requirements and does not need to be present
there.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I003f8f63e06c5263ef88df9dab90bbd74cb62ea5
3 years ago
Monty Taylor 4743b7f8e4 Fix E741 pep8 failure
Depends-On: https://review.opendev.org/730148
Change-Id: I5ab94b07a5fc64a6ab662cccb63ef25486982ca6
3 years ago
Andreas Jaeger 5b98e12acb Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I23798a960616d53d1cc54342640e670fc677738d
3 years ago
Zuul 1bffde3315 Merge "Re-add python3.5 testing" 3 years ago
Zuul f2790340bd Merge "Cleanup py27 support" 3 years ago
Monty Taylor ae534646b3 Re-add python3.5 testing
keystoneauth is a little special in the world, in that it's an user
facing library and takes pride in staying compatible. As such it
doesn't change much, so the likelihood that patches will land that
break python3.5 is really low in the first place.

Although the overall openstack python3 support goal puts a min of
python3.6 - which is a great choice, keystoneauth has a big user,
OpenStackSDK, that is keeping python3.5 because OpenStackSDK has
a big user - Zuul, that still supports python3.5.

To be friendly to everyone, keep the py35 unit tests just to make
sure nobody lands f-strings or anything.

Once Zuul drops python3.5 we can circle back around and drop it
here too.

Remove openstackdocstheme from test-requirements.txt. It only
needs to be in doc/requirements.txt.

Change-Id: If380bbf77b757655b1dc55322f4636ef83986fe5
3 years ago
Andreas Jaeger 1accaf2d8a Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme and Sphinx versions
- Remove install_command from tox.ini, the default is fine
- Remove hacking from doc/requirements, we don't need to autodoc it.
- Remove Babel, this repo does not use it.

Change-Id: I8ad7b5e6ef11ea51c587ff58bfc54aee4fcda9da
3 years ago
OpenStack Release Bot c7ff533fdb Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Ia506af26cca82e96f157bc777521fd82d39a74f5
Sem-Ver: feature
3 years ago
Andreas Jaeger c096099416 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, those are not
needed for co-installing.

Change-Id: I59f0854c089a6ed4f0c4dad7755f946dc95ada3a
3 years ago
Ben Nemec 1fd67089f7 Remove universal wheel configuration
Now that we've dropped py2 support we shouldn't be setting this
anymore.

Change-Id: Ief8adcc693ff9bb4625f3bad1cbb38c55719d9ef
3 years ago
Guang Yee 81f9e07879 fix bandit complains
Since 'access_token' literal is not an actual token, we can safely
mark it as false positive so bandit can stop chirping.

Change-Id: Ib035b67fe8ec9185507929bf982cf18636411c08
3 years ago
Vishakha Agarwal aafc90a9c2 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

keystoneauth is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I76ad66b76a85db9609aebc08e1f26a74219402f0
3 years ago
zhangboye 1c77ad193a Switch to Ussuri jobs
Change-Id: Ia1862dbafeef9f03feca6deb41c4dbde8ba189d3
4 years ago
Zuul de53f90bf9 Merge "Fetch discovery documents with auth when needed" 4 years ago
Zuul ed9309480f Merge "Update master for stable/train" 4 years ago
Zuul 5e5185f80f Merge "Allow initializing session with connection retries" 4 years ago
Zuul 46835f19b8 Merge "Make tests pass in 2020" 4 years ago
Zuul c102a7e9f5 Merge "Cleanup session on delete" 4 years ago
Monty Taylor 26ad02db0f Fetch discovery documents with auth when needed
Some services, like Nova, default to requiring auth for their
versioned discovery documents. This means strict discovery
does not work on them, because discovery as it is now defaults
to not sending auth. Just changing the default would be a behavior
change resulting in sending unneeded data with *every* request.
Instead, respond to Unauthorized exceptions by retrying the request
with auth token. This way discovery will work for services that
are otherwise blocking unauthenticated access, and will get more
efficient over time as those services improve.

Depends-On: https://review.opendev.org/#/c/685999
Change-Id: I8a33e8a05bed0f18e4e42431f6d16b8a6a5270ef
4 years ago
Bernhard M. Wiedemann 4461358098 Make tests pass in 2020
This issue was found while working on reproducible builds for openSUSE.

This solves it similar to change I73bde68be53afff4e8dff12d756b8381f34b2adb

Changed month to February to avoid races around new year.

Change-Id: I2a28f3f4eaabaa772df395f3f5d55b6fd78f8968
4 years ago
Vishakha Agarwal 0c34f0f8ff Generate pdf documentation
This commit adds a new tox target to build pdf documentation.

Change-Id: I8defd8cb18316956f3f8fdc1af743a4a1123b0a9
4 years ago
Colleen Murphy 249d1e9924 Follow the PTI for docs
Use sphinx-build instead of the pbr sphinx extention for building docs
as instructed by the PTI[1].

This requires using the sphinxcontrib-apidoc plugin rather than the
autodoc pbr extention. We also remove the reference to the ChangeLog
file that is usually generated by pbr and instead refer to the published
reno release notes. Also fixes the header formatting for the index page,
as the headers weren't rendering at all.

[1] https://governance.openstack.org/tc/reference/pti/python.html

Change-Id: Iec8b99fa89877e357cf2e754abad77c9032acad1
4 years ago
OpenStack Release Bot 8289f1501f Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I66c0ab254ad9dc0427d4fbdbeea0ffb623284588
Sem-Ver: feature
4 years ago
Q.hongtao b59ef48a35 Fix misspell word
Change-Id: I485c36b7722fe1738a6fb1d4c5cdea5c65cfc91e
4 years ago