908 Commits

Author SHA1 Message Date
ZhijunWei
2ff36fde57 Update hacking version
1. update hacking version to latest
2. fix pep8 failed

Change-Id: Ifc3bfeff4038c93d8c8cf2c9d7814c3003e73504
2019-01-03 13:09:22 +08:00
Zuul
4e4f57a5fc Merge "Add delimiter to get_account()." 2018-12-06 04:27:42 +00:00
sunjia
0e6c63dfd4 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I3193f2d12f75c36b59881a51b605d25274b335e0
2018-12-03 22:02:00 -05:00
Timur Alperovich
edfeae3723 Add delimiter to get_account().
Exposes the delimiter parameter, which the Swift API supports for
container listings.

Change-Id: Id8dfce01a9b64de9d1222aab9a4a682ce9e0f2b7
2018-11-30 22:58:36 +00:00
qingszhao
8a42281468 Add Python 3.6 classifier to setup.cfg
Change-Id: If3b2cdcd009136286d68fe07b14e06261b3069a0
2018-11-30 07:32:03 +00:00
Thiago da Silva
fc128672f6 update .functests to run stestr
Updated .functests script to run similar to how it's defined
in tox.ini

Change-Id: I17df28d8cbe0e10e48b26c2f9737308552ea88db
2018-11-24 08:12:15 -05:00
Zuul
8778c91c71 Merge "Stop leaking quite so many connections" 2018-11-09 23:18:16 +00:00
Zuul
2d8836333b Merge "Update reno for stable/rocky" 2018-11-09 23:18:15 +00:00
0197a0f9ca Update reno for stable/rocky
Change-Id: I840f4363dfdb3b485dbaf768c71fbcc5227c330f
2018-11-09 10:24:47 -08:00
Tim Burke
411ef48e5b Stop leaking quite so many connections
While investigating the failures when you move func tests to py3, I
noticed a whole bunch of

   ResourceWarning: unclosed <socket.socket ...>

noise. This should fix it.

While we're at it, make get_capabilities less stupid.

Change-Id: I3913e9334090b04a78143e0b70f621aad30fc642
Related-Change: I86d24104033b490a35178fc504d88c1e4a566628
2018-11-09 09:55:30 -08:00
Vu Cong Tuan
9acdfe0b46 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ic098f8560599554e0b6bb16ae326d4d30a8a5504
2018-11-05 09:52:03 +07:00
Zuul
5b6e3822c5 Merge "Stop lazy importing keystoneclient" 2018-10-18 18:58:15 +00:00
John Dickinson
a6baf00e24 py2 functional testing
Change-Id: I24ff8fb28969a0b074313bc9491b299afac3b49c
2018-09-27 13:28:05 -07:00
Zuul
2fca5dc390 Merge "fix tox python3 overrides" 2018-09-27 02:00:05 +00:00
Tim Burke
d1e1f8d8d6 Stop lazy importing keystoneclient
There were two basic problems:

  - We'd try to import on every attempt at getting auth, even when we
    already know keystoneclient isn't available.
  - Sometimes devs would hit some crazy import race involving (some
    combination of?) greenthreads and OS threads.

So let's just try the imports *once*, at import time, and have None
sentinels if it fails. Try both versions separately to decouple
failures; this should let us support a wider range of keystoneclient
versions.

Change-Id: I2367310aac74f1b7c5ea0cb1a822a491e4ba8e68
2018-09-07 16:56:13 -07:00
Tim Burke
70e20b62e6 Use Swift's in-tree DSVM test
While we're at it, make a new job that inherits from it to bring the
legacy-swiftclient-dsvm-functional testing in-tree, too.

For naming, follow naming policy and remove "dsvm" from names.

Remove legacy jobs, they are not needed anymore.

Change-Id: I919c0b77ac4888350194f55a9c12e0742845024f
Depends-On: https://review.openstack.org/589270
2018-09-06 22:06:10 +02:00
Doug Hellmann
37ee6459cd 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: I86d24104033b490a35178fc504d88c1e4a566628
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-05 05:46:52 +00:00
Zuul
4330d036cd Merge "Make py36 unit test job voting" 2018-09-04 21:08:14 +00:00
Zuul
7fbbd93593 Merge "Add release note link in README" 2018-09-01 00:37:49 +00:00
Tim Burke
edbc5d8e21 Make py36 unit test job voting
Change-Id: I42cd4e19bba89c9dd4d7d20c75ee59217b9ea75d
2018-08-31 16:37:41 +00:00
Nguyen Hai
5aee0732ff 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:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I6fd051fd0b01a308d16734c5b12e11a12a38c3be
Story: #2002586
Task: #24337
2018-08-31 04:34:43 +00:00
Nguyen Hai
420be0c99e 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:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I510e70f2222006df661c6a3d9e26af57b68be835
Story: #2002586
Task: #24337
2018-08-31 04:34:28 +00:00
Nguyen Hai
bd6a12c751 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
repository.

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
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I59f4cbc0a21b8be3a1cae28a64f90d5adcf6be24
Story: #2002586
Task: #24337
2018-08-28 17:40:25 +00:00
zhubx007
79e00ea0d6 Add .idea into .gitignore
Generated by IDE PyCharm

Change-Id: Ifc99b34aae581221ae4b8d2533adfc21e91cd291
2018-08-10 17:42:19 +08:00
Zuul
1cf074f4da Merge "Remove unnecessary calls to parse_header_string()." 2018-07-25 00:25:15 +00:00
Zuul
1711f0d6bd Merge "authors/changelog update for 3.6.0" 2018-07-24 23:27:06 +00:00
Zuul
d80f24f2fd Merge "Back out some version bumps" 2018-07-24 23:12:51 +00:00
Timur Alperovich
e28b12a1f2 Remove unnecessary calls to parse_header_string().
Since we define the getheader() method on the response from
HTTPConnection, we don't have to call parse_header_string, as the values
will already be converted properly.

Change-Id: Ia81e8674b828b3ff1f014454126b469e41adfc23
2018-07-24 11:53:25 -07:00
John Dickinson
172a09a401 authors/changelog update for 3.6.0
Change-Id: I471d3d56d98915804aaf848f7ff98d91f586d572
2018-07-24 09:41:17 -07:00
Zuul
6872b95560 Merge "Properly handle unicode headers." 2018-07-24 06:52:54 +00:00
Timur Alperovich
f4a2b16c2c Properly handle unicode headers.
Fix unicode handling in Python 3 and Python 2. There are currently two
failure modes. In python 2, swiftclient fails to log in debug mode if
the account name has a non-ASCII character. This is because the account
name will appear in the storage URL, which we attempt to pass to the
logger as a byte string (whereas it should be a unicode string). This
patch changes the behavior to convert the path strings into unicode by
calling the parse_header_string() function.

The second failure mode is with Python 3, where http_lib returns headers
that are latin-1 encoded, but swiftclient expects UTF-8. The patch
automatically converts headers from latin-1 (iso-8859-1) to UTF-8, so
that we can properly handle non-ASCII headers in responses.

Change-Id: Ifa7f3d5af71bde8127129f1f8603772d80d063c1
2018-07-23 14:38:40 -07:00
Timur Alperovich
02b08aaa10 Add close() to _RetryBody.
Allows clients to give up on reading the rest of the server response,
if they so choose.

Change-Id: Iccc95b1b5e7d066470966ee0c62a3beb260846e5
2018-07-20 12:31:06 -07:00
Zuul
23d29eda8d Merge "Stop mutating header dicts" 2018-07-17 01:05:14 +00:00
Zuul
531dc5be7b Merge "Drop py34 target in tox.ini" 2018-07-17 00:46:54 +00:00
Matthew Oliver
45ed21c6c4 Add bash_completion to swiftclient
This patch basically follows the bash completion
model that other OpenStack clients use. It creates
a new command to swiftclient called `bash_completion`.

The `bash_completion` command by default will print
all base flags and exsiting commands. If you pass
it a command, it'll print out all base flags and
any flags that command accepts. So as you type out
your swift command and auto-complete, only the current
available flags are offered to you.

This is used by the swift.bash_completion script to
allow swift commands to be bash completed.

To make it work, place the swift.bash_completion file
into /etc/bash_completion.d and source it:

  cp tools/swift.bash_completion /etc/bash_completion.d/swift
  source /etc/bash_completion.d/swift

Because swiftclient itself is creating this flag/command output
it should automatically add anything we add to the swiftclient
CLI.

Change-Id: I5609a19018269762b4640403daae5827bb9ad724
2018-07-13 11:24:24 -07:00
Zuul
25e23988b3 Merge "Treat 404 as success when deleting segments" 2018-07-12 01:46:49 +00:00
Tim Burke
da362a653e Back out some version bumps
I'm giving up on trying to back out all of the test-requirements
up-revs, but let's try to stay compatibile with old requests/six.

As part of that, only disable some requests warnings on new-enough requests.

Note that we should now be compatible with distro packages back to
Ubuntu 16.04 and CentOS 6. Our six is still too new for Trusty, but
hey, there's less than a year left on that anyway, right?

Change-Id: Iccb23638393616f9ec3da660dd5e39ea4ea94220
Related-Change: I2a8f465c8b08370517cbec857933b08fca94ca38
2018-07-11 13:09:00 -07:00
mmcardle
47fb18c41b Add ability to generate a temporary URL with an
IP range restriction

Change-Id: I4734599886e4f4a563162390d0ff3bb1ef639db4
2018-07-10 15:23:30 +01:00
Zuul
c2c5af603f Merge "Add option for user to enter password" 2018-06-30 00:51:05 +00:00
Zuul
eb97c69a3c Merge "Make OS_AUTH_URL work in DevStack by default" 2018-06-29 07:37:39 +00:00
wu.chunyang
c1e896c861 Add release note link in README
Change-Id: Ie282f4a731e333b5d21490a8fb59e1c7e8640821
2018-06-28 14:07:56 +08:00
Zuul
e8bb5f5e5d Merge "Remove some pointless code" 2018-06-23 03:20:20 +00:00
Tim Burke
85bb28eab4 Remove some pointless code
Change-Id: I3163834c330c5ea44c1096e83127588c88f0d761
2018-06-22 16:23:57 -07:00
Clay Gerrard
1190825054 Make OS_AUTH_URL work in DevStack by default
An earlier change added support for versionless authurls, but the
huristic to detect them didn't work for some configurations I've
encountered.

Now we use a little bit tighter pattern matching and support auth_url
values with more than one path component.

Change-Id: I5a99c7b4e957ee7c8a5b5470477db49ab2ddba4b
Related-Change-Id: If7ecb67776cb77828f93ad8278cc5040015216b7
2018-06-20 13:25:46 +00:00
Alistair Coles
33ad9fd4cc Add option for user to enter password
Add the --prompt option for the CLI which will cause the user to be
prompted to enter a password. Any password otherwise specified by
--key, --os-password or an environment variable will be ignored.

The swift client will exit with a warning if the password cannot be
entered without its value being echoed.

Closes-Bug: #1357562
Change-Id: I513647eed460007617f129691069c6fb1bfe62d7
2018-06-11 17:25:21 +01:00
Chen
2312182241 Remove PyPI downloads
According to official site,
https://packaging.python.org/guides/analyzing-pypi-package-downloads/
PyPI package download statistics is no longer maintained and thus
should be removed.

Change-Id: I05e7d48d191bdaaf029f0ad1373a9c7c8b22e81e
2018-06-07 22:38:41 +08:00
Zuul
11c5bb887f Merge "Use a valid default for auth_version" 2018-06-06 04:11:31 +00:00
Zuul
ae30659ce9 Merge "show option per line" 2018-06-05 17:42:23 +00:00
Zuul
453544aece Merge "Make swiftclient respect region_name when using sessions" 2018-06-01 00:18:46 +00:00
Nguyen Hai
78b8390072 Switch from oslosphinx to openstackdocstheme
openstackdocstheme is a theme and extension support for
Sphinx documentation that is published to docs.openstack.org
and developer.openstack.org.

Change-Id: I37d1d50fb88b35e72b017d5dfbf148c35ac7e323
2018-05-23 01:54:48 +00:00