summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDarrell Bishop <darrell@swiftstack.com>2013-06-28 21:26:54 -0700
committerDarrell Bishop <darrell@swiftstack.com>2013-07-05 14:12:59 -0500
commit1d4d51b218ed14b85d1e46d3e7142fb52ea179d5 (patch)
tree1fdbf15ee1f10c10a72fc4d49d6e27addc19de89 /bin
parent6f7458a2903f6be2bf3271825e837d30b4e9f737 (diff)
downloadpython-swiftclient-1d4d51b218ed14b85d1e46d3e7142fb52ea179d5.tar.gz
Allow storage url override for both auth vers.
When --os-storage-url is specified on the command-line to bin/swift, it will override the used storage URL regardless of authentication for both authentication version 1 and version 2. This can be used to bypass a load-balancer to hit a specific proxy server for testing/debugging purposes. Within the client library, this feature is accessed by passing the desired storage URL into swiftclient.client.Conection.__init__() via the os_options keyword argument. For example: conn = Connection(auth_url, user, key, os_options={ 'object_storage_url': 'http://overridden.storage.url/AUTH_foo'}) This patch also adds a dependency on mock>=0.8.0, which is the same as openstack/swift. Change-Id: Id2a36ed6abffd65e7762b6beea5bbfc6c036e848
Diffstat (limited to 'bin')
-rwxr-xr-xbin/swift9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/swift b/bin/swift
index 416b183..9776d32 100755
--- a/bin/swift
+++ b/bin/swift
@@ -1277,10 +1277,10 @@ Commands:
%(st_delete_help)s
Examples:
- %%prog -A https://auth.api.rackspacecloud.com/v1.0 -U user -K key stat
+ %%prog -A https://auth.api.rackspacecloud.com/v1.0 -U user -K key stat -v
%%prog --os-auth-url https://api.example.com/v2.0 --os-tenant-name tenant \\
- --os-usernameuser --os-password password list
+ --os-username user --os-password password list
%%prog --os-auth-token 6ee5eb33efad4e45ab46806eac010566 \\
--os-storage-url https://10.1.5.2:8080/v1/AUTH_ced809b6a4baea7aeab61a \\
@@ -1357,8 +1357,9 @@ Examples:
default=environ.get('OS_STORAGE_URL'),
help='Openstack storage URL. '
'Defaults to env[OS_STORAGE_URL]. '
- 'Used with --os-auth-token to bypass the '
- 'usual username/password authentication.')
+ 'Overrides the storage url returned during auth. '
+ 'Will bypass authentication when used with '
+ '--os-auth-token.')
parser.add_option('--os_storage_url',
help=SUPPRESS_HELP)
parser.add_option('--os-region-name',