diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-08-14 16:44:18 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-08-14 16:44:18 +0000 |
commit | f2ee0d9495c074befbac94e25d7110ce307b22d5 (patch) | |
tree | 1cde7f374f43987e3d70cf7f7584ef6944c2db44 | |
parent | 33d7bbf6e3eb6855d5ccbcb63fee71f2dc5ddc3b (diff) | |
parent | 62fa2d499f4fe0d645f455f02685e29d9d0f78a5 (diff) | |
download | zuul-f2ee0d9495c074befbac94e25d7110ce307b22d5.tar.gz |
Merge "Make swiftclient an optional dependency"
-rw-r--r-- | doc/source/zuul.rst | 10 | ||||
-rw-r--r-- | zuul/lib/swift.py | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst index 7f9382612..cdab4b789 100644 --- a/doc/source/zuul.rst +++ b/doc/source/zuul.rst @@ -187,8 +187,11 @@ swift """"" To send (optional) swift upload instructions this section must be -present. Multiple destinations can be defined in the :ref:`jobs` -section of the layout. +present. Multiple destinations can be defined in the :ref:`jobs` section +of the layout. + +If you are sending the temp-url-key or fetching the x-storage-url, you +will need the python-swiftclient module installed. **X-Account-Meta-Temp-Url-Key** (optional) This is the key used to sign the HMAC message. If you do not set a @@ -199,12 +202,13 @@ section of the layout. you have set up the appropriate credentials in ``authurl`` below. This isn't necessary if you know and have set your X-Account-Meta-Temp-Url-Key. + If set, Zuul requires the python-swiftclient module. ``default: true`` **X-Storage-Url** (optional) The storage URL is the destination to upload files into. If you do not set this the ``authurl`` credentials are used to fetch the url - from swift. + from swift and Zuul will requires the python-swiftclient module. **authurl** (optional) The (keystone) Auth URL for swift. diff --git a/zuul/lib/swift.py b/zuul/lib/swift.py index 88cd9053a..5781a4d82 100644 --- a/zuul/lib/swift.py +++ b/zuul/lib/swift.py @@ -20,7 +20,6 @@ import os import random import six import string -import swiftclient import urlparse @@ -111,6 +110,7 @@ class Swift(object): if self.config.has_option('swift', os_option): os_options[os_option] = self.config.get('swift', os_option) + import swiftclient self.connection = swiftclient.client.Connection( authurl=authurl, user=user, key=key, retries=retries, preauthurl=preauthurl, preauthtoken=preauthtoken, snet=snet, |