Commit Graph

19 Commits

Author SHA1 Message Date
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
Tim Burke a9b8f0a0d1 Revert "Add Constraints support"
Per http://lists.openstack.org/pipermail/openstack-dev/2017-December/125348.html

> For many projects, tox_install.sh is not needed at all

Let's see if that holds for python-swiftclient!

This reverts commit f2f278fcbe.

Change-Id: I0462c50ec71d87bac226f83a0d0942871ef5a0e7
2018-01-17 11:13:59 -08:00
Tim Burke cb2778659e Make tox runnable in a directory with spaces
I noticed a disturbing lack of quote-wrapping in change
I7cb4b44952713752435e1faf0f63bf0d37e7dda6 but as I poked at it, I
realized that trouble runs rampant.

This seems to clean it all up, though I haven't tested *every*
environment we define.

Change-Id: I1454eb113e5bd9125d39f2e57e2ed96f6ddc42fc
2017-11-28 11:02:45 -08:00
Monty Taylor ae2dfaec36 Update tox_install.sh to align for sphinx jobs
The updates to the sphinx docs jobs in support of the updates to
the PTI wound up exposing an unintended interface. There are two flavors
of the tox_install.sh file out there, and we basically need to collapse
them into one flavor.

Update the tox_install.sh script to match the
constraints-as-first-argument form.

Change-Id: I7cb4b44952713752435e1faf0f63bf0d37e7dda6
2017-11-22 15:19:17 +00:00
Tony Breeds f2f278fcbe Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove python-swiftclient.

Change-Id: I3947a6165eaa9f5cb62a7df4f5a2c16065da2f1d
2016-12-27 15:47:18 -08:00
niu-zglinux 2d12f09c66 Rename requires files to standard names.
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: I9c1356f22f6527be44b4b3f6a77012156ff1637b
Fixes: bug #1179008
2013-05-30 22:14:28 +00:00
Jenkins af4109dd56 Merge "Switch to pbr for setup." 2013-05-15 08:15:39 +00:00
Pete Zaitcev 3196daf992 Eradicate eventlet and fix bug lp:959221
The bug is simple: whenever swift uploads to a Swift with SSL,
it uses 100% CPU. It happens because we use HTTPSConnection from
eventlet that loops like that, while holding the interpreter lock.

Now, it could be fixed in eventlet, but let's try something more
natural: drop the eventlet's HTTP client. We do not use green
threads in the client anymore, so it's not like we need it for that.

Note that in most cases clients do not use the BufferedHTTPConnection
either, because it's only installed on Swift server nodes, not on
workstations. Get rid of that too.

bug: 959221
Change-Id: I1eb932779d4171598b3efaa043f817b9c6c995c4
2013-05-10 21:33:17 -06:00
Monty Taylor 50f32bc803 Switch to pbr for setup.
Change-Id: Ifc2efa2bd7c2f030b51494ccb471f0c3e097c5ce
2013-05-01 12:23:12 -04:00
Monty Taylor 1eb2c29856 Switch to flake8.
Change-Id: Ib9ba1e7eed09c5a90c558a8365d0a87c3f4b5ee5
2013-05-01 12:23:01 -04:00
Flaper Fesp 4ac431a9a2 Print useful message when keystoneclient is not installed
client.py now prints a useful message when trying to use Auth version
2.0 and keystoneclient is not installed.

Fixes bug 1102322

Change-Id: I6ed83610fd6e8c79c2dc5cf05db377a843cab1d5
2013-02-05 10:13:56 +01:00
Monty Taylor bfeffb6366 Use testr instead of nose.
nose is invasive and can sometimes alter the outcome of a test run. testr,
on the other hand, keeps a distinction between running tests and displaying
results of the test runs. Additionally, it supports the stock python unittest
protocol.

Even better, testr supports parallel test running, which makes things faster,
and a command "testr run --failing" which will just re-run the latest failing
tests (often something one wants to do in iterative dev)

Part of blueprint grizzly-testtools

Change-Id: I0b3f1bcb5d4ff59c65eb3219b30a9e64f54d70bd
2013-01-18 16:13:27 -05:00
Monty Taylor e93d47a930 Use testtools as base class for test cases.
Part of blueprint grizzly-testtools

Change-Id: Iff9aac184a115df9b396e218209962e6897a32d9
2012-12-26 09:36:07 -06:00
Clark Boylan b0eb070655 Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: I4292ba27db9371d5a8dae4b901a46165b9ee6721
2012-08-21 14:40:00 -07:00
gholt 99b8253450 Make python-keystoneclient optional
A lot of us don't use Keystone.

Change-Id: Ifcd5fe609efbe950e935c0e0cfee200687b69eda
2012-08-14 15:07:54 +00:00
Chmouel Boudjnah c8163f4112 Use keystoneclient for authentication.
- This allows us to delegate all 2.0 authentication directly to the
  library without reimplementing ourselves.
- Support reusing a token / storage-url without re-authenticating every
  time via the switch os_storage_url os_auth_token.
- Allow auth via tenant_id instead of just tenant_name via the switch
  os_tenant_id.
- Refactor a bit to make it easier in the future to add new OS features
  (i.e: region).
- Implements blueprint use-keystoneclient-for-swiftclient.
- Fixes bug 1016641.

Change-Id: I532f38a68af884de25326aaac05a2050f5ffa1c7
2012-07-06 18:40:45 +00:00
Samuel Merritt c82773d3d1 Fix pep8 errors w/pep8==1.3.
Also lock down the version of pep8 in
tools/test-requires. python-swiftclient had a passing test suite
yesterday, but today a new and stricter version of pep8 came out, and
the test suite started to fail. Specifying a particular version of
pep8 will prevent that.

Change-Id: I9092d2225c01b99158229918c86b185cdac9d362
2012-06-15 12:18:08 -07:00
Chmouel Boudjnah deff7eca1c Adding fake_http_connect to test.utils.
- Copy fake_http_connect function from swift repository.
2012-05-21 12:51:54 +02:00
Monty Taylor 7df012329f Add openstack project infrastructure. 2012-05-16 17:30:46 -04:00