Hello community,
here is the log from the commit of package python-barbicanclient for
openSUSE:Factory checked in at 2017-02-21 13:42:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-barbicanclient (Old)
and /work/SRC/openSUSE:Factory/.python-barbicanclient.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-barbicanclient"
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-barbicanclient/python-barbicanclient.changes
2016-09-30 15:28:36.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python-barbicanclient.new/python-barbicanclient.changes
2017-02-21 13:42:50.255872879 +0100
@@ -1,0 +2,34 @@
+Mon Feb 13 10:44:33 UTC 2017 - [email protected]
+
+- update to version 4.2.0:
+ - Update Order Create Type Help Dialog
+ - Remove redundant space in docstring
+ - Replaced bare except
+ - Fix order of arguments in assertEqual
+ - Removed openstack/common from tox.in
+ - Using assertEqual instead of assertEquals
+ - Validate key order meta fields.
+ - Fix bug when uploading secret using unified CLI
+ - Remove discover from test-requirements
+ - Use 'code-block' for pieces of code
+ - Accept 'pass_phrase' for AsymmetricOrder constructor
+ - Support upper-constraints in tox.ini
+ - Skip order with 'None' payload content type
+ - Add missing param to certificate order initialization
+ - Fix argument order for assertEqual to (expected, observed)
+ - Fix error in doc
+ - Add Python 3.5 classifier and venv
+ - Use international logging message
+ - Using assertTrue/False() instead of assertEqual(True/False)
+ - Use keystoneauth
+ - Remove imported but unused
+ - Fix CLI message in CA module
+ - Add plug-in summary for osc doc
+ - Cast sets to lists in acl functional tests
+ - Handle container list command correctly
+ - Add oslo.config to requirements
+ - Do not write except:, use except Exception instead
+ - Updated from global requirements
+ - Remove invalid smoke test that is failing in the gate
+
+-------------------------------------------------------------------
Old:
----
python-barbicanclient-4.1.0.tar.gz
New:
----
python-barbicanclient-4.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-barbicanclient.spec ++++++
--- /var/tmp/diff_new_pack.4WsSVd/_old 2017-02-21 13:42:51.099753828 +0100
+++ /var/tmp/diff_new_pack.4WsSVd/_new 2017-02-21 13:42:51.103753264 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-barbicanclient
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%global sname python-barbicanclient
Name: python-barbicanclient
-Version: 4.1.0
+Version: 4.2.0
Release: 0
Summary: Client for the Barbican Key Management API
License: Apache-2.0
@@ -26,22 +26,22 @@
Url: http://launchpad.net/%{sname}
Source0:
https://pypi.io/packages/source/p/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
-BuildRequires: python-cliff >= 1.15.0
+BuildRequires: python-cliff >= 2.3.0
BuildRequires: python-devel
-BuildRequires: python-keystoneclient >= 2.0.0
+BuildRequires: python-keystoneclient >= 3.8.0
BuildRequires: python-mock >= 2.0
-BuildRequires: python-pbr >= 1.6
+BuildRequires: python-pbr >= 1.8
BuildRequires: python-requests >= 2.10.0
-BuildRequires: python-requests-mock >= 1.0
+BuildRequires: python-requests-mock >= 1.1
BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testscenarios >= 0.4
BuildRequires: python-testtools >= 1.4.0
-Requires: python-cliff >= 1.15.0
-Requires: python-keystoneclient >= 2.0.0
+Requires: python-cliff >= 2.3.0
+Requires: python-keystoneclient >= 3.8.0
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.serialization >= 1.10.0
-Requires: python-oslo.utils >= 3.16.0
-Requires: python-pbr >= 1.6
+Requires: python-oslo.utils >= 3.18.0
+Requires: python-pbr >= 1.8
Requires: python-requests >= 2.10.0
Requires: python-six >= 1.9.0
BuildArch: noarch
@@ -58,14 +58,15 @@
Summary: Documentation for OpenStack Key Management API Client
Group: Documentation
BuildRequires: python-Sphinx
-BuildRequires: python-oslosphinx >= 2.5.0
+BuildRequires: python-oslosphinx >= 4.7.0
%description doc
Documentation for the client library for interacting with
Openstack Key Management API
%prep
-%setup -q -n %{name}-%{version}
+%autosetup -n %{name}-%{version}
+%py_req_cleanup
# Remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.4WsSVd/_old 2017-02-21 13:42:51.143747622 +0100
+++ /var/tmp/diff_new_pack.4WsSVd/_new 2017-02-21 13:42:51.143747622 +0100
@@ -1,13 +1,12 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/python-barbicanclient/python-barbicanclient.spec.j2</param>
+ <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/ocata/openstack/python-barbicanclient/python-barbicanclient.spec.j2</param>
<param name="output-name">python-barbicanclient.spec</param>
- <param
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-requirements.txt</param>
+ <param
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/ocata/global-requirements.txt</param>
+ <param name="changelog-email">[email protected]</param>
+ <param name="changelog-provider">gh,openstack,python-barbicanclient</param>
</service>
<service mode="disabled" name="download_files">
- <param name="changesgenerate">enable</param>
- </service>
- <service name="refresh_patches" mode="disabled">
- <param name="changesgenerate">enable</param>
</service>
+ <service name="format_spec_file" mode="disabled"/>
</services>
++++++ python-barbicanclient-4.1.0.tar.gz -> python-barbicanclient-4.2.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/AUTHORS
new/python-barbicanclient-4.2.0/AUTHORS
--- old/python-barbicanclient-4.1.0/AUTHORS 2016-09-01 13:38:50.000000000
+0200
+++ new/python-barbicanclient-4.2.0/AUTHORS 2017-01-26 11:25:24.000000000
+0100
@@ -3,6 +3,7 @@
Alex Gaynor <[email protected]>
Anderson Mesquita <[email protected]>
Andreas Jaeger <[email protected]>
+Anh Tran <[email protected]>
Arash Ghoreyshi <[email protected]>
Arun Kant <[email protected]>
Arun Kant <[email protected]>
@@ -10,30 +11,37 @@
Chris Solis <[email protected]>
Christian Berendt <[email protected]>
Christopher Solis <[email protected]>
+Clenimar Filemon <[email protected]>
Craig Tracey <[email protected]>
Cyril Roelandt <[email protected]>
Dave McCowan <[email protected]>
+Deepak <[email protected]>
Donald Stufft <[email protected]>
Doug Hellmann <[email protected]>
Douglas Mendizábal <[email protected]>
Elvin Tubillara <[email protected]>
Fernando Diaz <[email protected]>
Gregory Haynes <[email protected]>
+Gábor Antal <[email protected]>
Jamie Lennox <[email protected]>
Jamie Lennox <[email protected]>
Jarret Raim <[email protected]>
+Jeremy Liu <[email protected]>
Jeremy Stanley <[email protected]>
+Jiong Liu <[email protected]>
Joe Gordon <[email protected]>
John Vrbanac <[email protected]>
John Wood <[email protected]>
Juan Antonio Osorio <[email protected]>
Juan Antonio Osorio Robles <[email protected]>
Juan Antonio Osorio Robles <[email protected]>
+KATO Tomoyuki <[email protected]>
Kaitlin Farr <[email protected]>
Laurent Luce <[email protected]>
LiuNanke <[email protected]>
Martin Geisler <[email protected]>
Max Abidi <[email protected]>
+Michael Perng <[email protected]>
Monty Taylor <[email protected]>
Nathan Reller <[email protected]>
Oleksii Chuprykov <[email protected]>
@@ -49,14 +57,20 @@
Thomas Herve <[email protected]>
Thomas Herve <[email protected]>
Tin Lam <[email protected]>
+Tony Breeds <[email protected]>
+Tony Xu <[email protected]>
Wyllys Ingersoll <[email protected]>
+Yushiro FURUKAWA <[email protected]>
ZhiQiang Fan <[email protected]>
chadlung <[email protected]>
+hongzhezheng <[email protected]>
liujiong <[email protected]>
reedip <[email protected]>
rico.lin <[email protected]>
ricolin <[email protected]>
sonu.kumar <[email protected]>
+ting.wang <[email protected]>
tsv <[email protected]>
venkatamahesh <[email protected]>
+weiweigu <[email protected]>
“Fernando <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/ChangeLog
new/python-barbicanclient-4.2.0/ChangeLog
--- old/python-barbicanclient-4.1.0/ChangeLog 2016-09-01 13:38:50.000000000
+0200
+++ new/python-barbicanclient-4.2.0/ChangeLog 2017-01-26 11:25:24.000000000
+0100
@@ -1,11 +1,49 @@
CHANGES
=======
+4.2.0
+-----
+
+* Updated from global requirements
+* Skip order with 'None' payload content type
+* Remove invalid smoke test that is failing in the gate
+* Updated from global requirements
+* Remove discover from test-requirements
+* Accept 'pass_phrase' for AsymmetricOrder constructor
+* Updated from global requirements
+* Add missing param to certificate order initialization
+* Fix error in doc
+* Removed openstack/common from tox.in
+* Updated from global requirements
+* Updated from global requirements
+* Add Python 3.5 classifier and venv
+* Updated from global requirements
+* Use keystoneauth
+* Fix bug when uploading secret using unified CLI
+* Fix order of arguments in assertEqual
+* Add plug-in summary for osc doc
+* Support upper-constraints in tox.ini
+* Updated from global requirements
+* Use 'code-block' for pieces of code
+* Remove redundant space in docstring
+* Using assertTrue/False() instead of assertEqual(True/False)
+* Using assertEqual instead of assertEquals
+* Remove imported but unused
+* Add oslo.config to requirements
+* Handle container list command correctly
+* Fix CLI message in CA module
+* Replaced bare except
+* Cast sets to lists in acl functional tests
+* Validate key order meta fields
+* Use international logging message
+
4.1.0
-----
* Updated from global requirements
* Fix jenkins failing on coverage report
+* Do not write except:, use except Exception instead
+* Fix argument order for assertEqual to (expected, observed)
* Fixed python-barbicanclient functional tests
* Updated from global requirements
* Remove unused import
@@ -33,6 +71,7 @@
* Replace deprecated keystoneclient...exceptions
* Update typos
* Remove unused import logging
+* Update Order Create Type Help Dialog
* Removes MANIFEST.in as it is not needed explicitely by PBR
* Deprecated tox -downloadcache option removed
* Remove py26 support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/PKG-INFO
new/python-barbicanclient-4.2.0/PKG-INFO
--- old/python-barbicanclient-4.1.0/PKG-INFO 2016-09-01 13:38:51.000000000
+0200
+++ new/python-barbicanclient-4.2.0/PKG-INFO 2017-01-26 11:25:25.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-barbicanclient
-Version: 4.1.0
+Version: 4.2.0
Summary: Client Library for OpenStack Barbican Key Management API
Home-page: http://docs.openstack.org/developer/python-barbicanclient
Author: OpenStack
@@ -235,3 +235,4 @@
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/barbican.py
new/python-barbicanclient-4.2.0/barbicanclient/barbican.py
--- old/python-barbicanclient-4.1.0/barbicanclient/barbican.py 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/barbican.py 2017-01-26
11:22:58.000000000 +0100
@@ -26,12 +26,14 @@
from cliff import commandmanager
from cliff import complete
from cliff import help
-from keystoneclient.auth.identity import v3
-from keystoneclient.auth.identity import v2
-from keystoneclient import session
+from keystoneauth1.identity import v2
+from keystoneauth1.identity import v3
+from keystoneauth1 import loading
+from keystoneauth1 import session
import six
from barbicanclient import client
+from barbicanclient._i18n import _LW
from barbicanclient import version
@@ -317,7 +319,7 @@
help='Defaults to env[BARBICAN_API_VERSION].')
parser.epilog = ('See "barbican help COMMAND" for help '
'on a specific command.')
- session.Session.register_cli_options(parser)
+ loading.register_session_argparse_arguments(parser)
return parser
def prepare_to_run_command(self, cmd):
@@ -340,9 +342,9 @@
def main(argv=sys.argv[1:]):
logging.basicConfig()
- LOG.warning("This Barbican CLI interface has been deprecated and will be "
- "removed in the O release. Please use the openstack unified "
- "client instead.")
+ LOG.warning(_LW("This Barbican CLI interface has been deprecated and "
+ "will be removed in the O release. Please use the "
+ "openstack unified client instead."))
barbican_app = Barbican()
return barbican_app.run(argv)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/barbican_cli/acls.py
new/python-barbicanclient-4.2.0/barbicanclient/barbican_cli/acls.py
--- old/python-barbicanclient-4.1.0/barbicanclient/barbican_cli/acls.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/barbican_cli/acls.py
2017-01-26 11:22:58.000000000 +0100
@@ -253,7 +253,9 @@
acl_users = server_acl.users
acl_users = set(acl_users).difference(input_acl.users)
del server_acl.users[:]
- server_acl.users = acl_users
+ # Python sets are not JSON serializable.
+ # Cast acl_users to a list.
+ server_acl.users = list(acl_users)
server_entity.submit() # apply changes to server
server_entity.load_acls_data()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/barbican_cli/cas.py
new/python-barbicanclient-4.2.0/barbicanclient/barbican_cli/cas.py
--- old/python-barbicanclient-4.1.0/barbicanclient/barbican_cli/cas.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/barbican_cli/cas.py
2017-01-26 11:22:58.000000000 +0100
@@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
-Command-line interface sub-commands related to secrets.
+Command-line interface sub-commands related to cas.
"""
from cliff import lister
from cliff import show
@@ -47,7 +47,7 @@
'(default: %(default)s)',
type=int)
parser.add_argument('--name', '-n', default=None,
- help='specify the secret name '
+ help='specify the ca name '
'(default: %(default)s)')
return parser
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/barbican_cli/orders.py
new/python-barbicanclient-4.2.0/barbicanclient/barbican_cli/orders.py
--- old/python-barbicanclient-4.1.0/barbicanclient/barbican_cli/orders.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/barbican_cli/orders.py
2017-01-26 11:22:58.000000000 +0100
@@ -25,7 +25,9 @@
def get_parser(self, prog_name):
parser = super(CreateOrder, self).get_parser(prog_name)
- parser.add_argument('type', help='the type of the order to create.')
+ parser.add_argument('type', help='the type of the order '
+ '(key, asymmetric, certificate)'
+ ' to create.')
parser.add_argument('--name', '-n',
help='a human-friendly name.')
parser.add_argument('--algorithm', '-a', default='aes',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/barbicanclient/base.py
new/python-barbicanclient-4.2.0/barbicanclient/base.py
--- old/python-barbicanclient-4.1.0/barbicanclient/base.py 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/base.py 2017-01-26
11:22:58.000000000 +0100
@@ -39,7 +39,7 @@
try:
_, entity_uuid = ref.rstrip('/').rsplit('/', 1)
uuid.UUID(entity_uuid)
- except:
+ except Exception:
raise ValueError('{0} incorrectly specified.'.format(entity))
return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/barbicanclient/client.py
new/python-barbicanclient-4.2.0/barbicanclient/client.py
--- old/python-barbicanclient-4.1.0/barbicanclient/client.py 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/client.py 2017-01-26
11:22:58.000000000 +0100
@@ -16,8 +16,8 @@
import logging
import os
-from keystoneclient import adapter
-from keystoneclient import session as ks_session
+from keystoneauth1 import adapter
+from keystoneauth1 import session as ks_session
from barbicanclient import acls
from barbicanclient import cas
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/common/config.py
new/python-barbicanclient-4.2.0/barbicanclient/common/config.py
--- old/python-barbicanclient-4.1.0/barbicanclient/common/config.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/common/config.py
2017-01-26 11:22:58.000000000 +0100
@@ -17,9 +17,6 @@
Configuration setup for Barbican Client.
"""
-import os
-import sys
-
from barbicanclient.version import __version__
from oslo_config import cfg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/containers.py
new/python-barbicanclient-4.2.0/barbicanclient/containers.py
--- old/python-barbicanclient-4.1.0/barbicanclient/containers.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/containers.py
2017-01-26 11:22:58.000000000 +0100
@@ -53,7 +53,7 @@
formatted_consumers = None
if self.secrets:
formatted_secrets = '\n'.join((
- '='.join((name, secret_ref))
+ '='.join((name, secret_ref)) if name else secret_ref
for name, secret_ref in six.iteritems(self.secret_refs)
))
if self.consumers:
@@ -114,7 +114,8 @@
def _fill_secrets_from_secret_refs(self):
if self._secret_refs:
self._cached_secrets = dict(
- (name.lower(), self._secret_manager.get(secret_ref=secret_ref))
+ (name.lower() if name else "",
+ self._secret_manager.get(secret_ref=secret_ref))
for name, secret_ref in six.iteritems(self._secret_refs)
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/barbicanclient/orders.py
new/python-barbicanclient-4.2.0/barbicanclient/orders.py
--- old/python-barbicanclient-4.1.0/barbicanclient/orders.py 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/orders.py 2017-01-26
11:22:58.000000000 +0100
@@ -251,6 +251,8 @@
KeyOrders can be used to request random key material from Barbican
"""
_type = 'key'
+ _validMeta = (u'name', u'algorithm', u'mode', u'bit_length', u'expiration',
+ u'payload_content_type')
def __init__(self, api, name=None, algorithm=None, bit_length=None,
mode=None, expiration=None, payload_content_type=None,
@@ -296,7 +298,7 @@
_type = 'asymmetric'
def __init__(self, api, name=None, algorithm=None, bit_length=None,
- mode=None, passphrase=None, expiration=None,
+ mode=None, passphrase=None, pass_phrase=None, expiration=None,
payload_content_type=None, status=None, created=None,
updated=None, order_ref=None, container_ref=None,
error_status_code=None, error_reason=None, sub_status=None,
@@ -313,6 +315,10 @@
self._container_ref = container_ref
if passphrase:
self._meta['pass_phrase'] = passphrase
+ elif pass_phrase:
+ # NOTE(jaosorior): Needed for backwards compatibility.
+ # See bug #1635213
+ self._meta['pass_phrase'] = pass_phrase
@property
def container_ref(self):
@@ -342,7 +348,8 @@
sub_status=None, sub_status_message=None, creator_id=None,
request_type=None, subject_dn=None,
source_container_ref=None, ca_id=None, profile=None,
- request_data=None):
+ request_data=None, requestor_name=None, requestor_email=None,
+ requestor_phone=None):
super(CertificateOrder, self).__init__(
api, self._type, status=status, created=created, updated=updated,
meta={
@@ -352,8 +359,11 @@
'container_ref': source_container_ref,
'ca_id': ca_id,
'profile': profile,
- 'request_data': request_data
- }, order_ref=order_ref, error_status_code=error_status_code,
+ 'request_data': request_data,
+ 'requestor_name': requestor_name,
+ 'requestor_email': requestor_email,
+ 'requestor_phone': requestor_phone},
+ order_ref=order_ref, error_status_code=error_status_code,
error_reason=error_reason)
self._container_ref = container_ref
@@ -408,6 +418,16 @@
response['source_container_ref'] = response['meta'].pop(
'container_ref')
+ # validate key_order meta fields.
+ if resp_type == 'key' and (
+ set(response['meta'].keys()) - set(KeyOrder._validMeta)):
+ invalidFields = ', '.join(
+ map(str, set(
+ response['meta'].keys()) -
+ set(KeyOrder._validMeta)))
+ raise TypeError(
+ 'Invalid KeyOrder meta field: [%s]' % invalidFields)
+
response.update(response.pop('meta'))
if order_type is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/osc_plugin.py
new/python-barbicanclient-4.2.0/barbicanclient/osc_plugin.py
--- old/python-barbicanclient-4.1.0/barbicanclient/osc_plugin.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/osc_plugin.py
2017-01-26 11:22:58.000000000 +0100
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+"""OpenStackClient plugin for Key Manager service."""
+
from barbicanclient import client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/secrets.py
new/python-barbicanclient-4.2.0/barbicanclient/secrets.py
--- old/python-barbicanclient-4.1.0/barbicanclient/secrets.py 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/secrets.py 2017-01-26
11:22:58.000000000 +0100
@@ -23,6 +23,7 @@
from barbicanclient import base
from barbicanclient import exceptions
from barbicanclient import formatter
+from barbicanclient._i18n import _LW
LOG = logging.getLogger(__name__)
@@ -168,7 +169,7 @@
if self._content_types:
return self._content_types
elif self._payload_content_type:
- return {u'default': six.u(self.payload_content_type)}
+ return {u'default': self.payload_content_type}
return None
@property
@@ -191,7 +192,7 @@
try:
self._fetch_payload()
except ValueError:
- LOG.warning("Secret does not contain a payload")
+ LOG.warning(_LW("Secret does not contain a payload"))
return None
return self._payload
@@ -240,9 +241,10 @@
@immutable_after_save
def payload_content_type(self, value):
LOG.warning(
- 'DEPRECATION WARNING: Manually setting the payload_content_type '
- 'can lead to unexpected results. It will be removed in a future '
- 'release. See Launchpad Bug #1419166.'
+ _LW('DEPRECATION WARNING: Manually setting the '
+ 'payload_content_type can lead to unexpected '
+ 'results. It will be removed in a future release. '
+ 'See Launchpad Bug #1419166.')
)
self._payload_content_type = value
@@ -250,9 +252,10 @@
@immutable_after_save
def payload_content_encoding(self, value):
LOG.warning(
- 'DEPRECATION WARNING: Manually setting the '
- 'payload_content_encoding can lead to unexpected results. It '
- 'will be removed in a future release. See Launchpad Bug #1419166.'
+ _LW('DEPRECATION WARNING: Manually setting the '
+ 'payload_content_encoding can lead to unexpected '
+ 'results. It will be removed in a future release. '
+ 'See Launchpad Bug #1419166.')
)
self._payload_content_encoding = value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/tests/keystone_client_fixtures.py
new/python-barbicanclient-4.2.0/barbicanclient/tests/keystone_client_fixtures.py
---
old/python-barbicanclient-4.1.0/barbicanclient/tests/keystone_client_fixtures.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/barbicanclient/tests/keystone_client_fixtures.py
2017-01-26 11:22:58.000000000 +0100
@@ -236,7 +236,7 @@
try:
self.barbican.run(argv=argv)
- except:
+ except Exception:
self.fail('failed to delete secret')
def test_v2_auth(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/tests/test_acls.py
new/python-barbicanclient-4.2.0/barbicanclient/tests/test_acls.py
--- old/python-barbicanclient-4.1.0/barbicanclient/tests/test_acls.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/tests/test_acls.py
2017-01-26 11:22:58.000000000 +0100
@@ -61,7 +61,7 @@
api_resp = self.manager.get(entity_ref=self.secret_ref)
self.assertEqual(self.secret_acl_ref,
self.responses.last_request.url)
- self.assertEqual(False, api_resp.get('read').project_access)
+ self.assertFalse(api_resp.get('read').project_access)
self.assertEqual('read', api_resp.get('read').operation_type)
self.assertEqual(self.secret_acl_ref, api_resp.get('read').acl_ref)
@@ -80,7 +80,7 @@
api_resp = self.manager.get(entity_ref=self.container_ref)
self.assertEqual(self.container_acl_ref,
self.responses.last_request.url)
- self.assertEqual(False, api_resp.get('read').project_access)
+ self.assertFalse(api_resp.get('read').project_access)
self.assertEqual('read', api_resp.get('read').operation_type)
self.assertEqual(self.container_acl_ref, api_resp.get('read').acl_ref)
@@ -110,7 +110,7 @@
read_acl = entity.read
# entity ref is kept same as provided input.
self.assertEqual(self.secret_ref + '///', read_acl.entity_ref)
- self.assertEqual(True, read_acl.project_access)
+ self.assertTrue(read_acl.project_access)
self.assertEqual(self.users1, read_acl.users)
self.assertEqual(acls.DEFAULT_OPERATION_TYPE, read_acl.operation_type)
# acl ref removes extra trailing slashes if there
@@ -130,7 +130,7 @@
self.assertEqual(self.container_ref + '///', entity.entity_ref)
read_acl = entity.read
- self.assertEqual(False, read_acl.project_access)
+ self.assertFalse(read_acl.project_access)
self.assertEqual(self.users2, read_acl.users)
self.assertEqual(acls.DEFAULT_OPERATION_TYPE, read_acl.operation_type)
# acl ref removes extra trailing slashes if there
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/tests/test_barbican.py
new/python-barbicanclient-4.2.0/barbicanclient/tests/test_barbican.py
--- old/python-barbicanclient-4.1.0/barbicanclient/tests/test_barbican.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/tests/test_barbican.py
2017-01-26 11:22:58.000000000 +0100
@@ -54,7 +54,7 @@
def test_should_show_usage_with_no_args(self):
exit_code = self.barbican.run([])
- self.assertEquals(1, exit_code)
+ self.assertEqual(1, exit_code)
self.assertIn('usage', self.captured_stderr.getvalue())
def test_should_error_if_noauth_and_authurl_both_specified(self):
@@ -117,7 +117,7 @@
api_version = argv.os_identity_api_version
barbican = Barbican()
response = barbican.check_auth_arguments(argv, api_version)
- self.assertEqual(True, response)
+ self.assertTrue(response)
def test_should_fail_check_auth_arguments_v2(self):
args = ("--os-username bob --os-password jan --os-auth-url boop"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/tests/test_client.py
new/python-barbicanclient-4.2.0/barbicanclient/tests/test_client.py
--- old/python-barbicanclient-4.1.0/barbicanclient/tests/test_client.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/tests/test_client.py
2017-01-26 11:22:58.000000000 +0100
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from keystoneclient import session
+from keystoneauth1 import session
import mock
from requests_mock.contrib import fixture
import testtools
@@ -151,13 +151,13 @@
def test_get_uses_href_as_is(self):
self.httpclient.get(self.href)
- self.assertEqual(self.get_mock.last_request.url, self.href)
+ self.assertEqual(self.href, self.get_mock.last_request.url)
def test_get_passes_params(self):
params = {'test': 'test1'}
self.httpclient.get(self.href, params=params)
- self.assertEqual(self.get_mock.last_request.url.split('?')[0],
- self.href)
+ self.assertEqual(self.href,
+ self.get_mock.last_request.url.split('?')[0])
self.assertEqual(['test1'], self.get_mock.last_request.qs['test'])
def test_get_includes_accept_header_of_application_json(self):
@@ -179,7 +179,7 @@
def test_get_raw_uses_href_as_is(self):
self.httpclient._get_raw(self.href, headers=self.headers)
- self.assertEqual(self.get_mock.last_request.url, self.href)
+ self.assertEqual(self.href, self.get_mock.last_request.url)
def test_get_raw_passes_headers(self):
self.httpclient._get_raw(self.href, headers={'test': 'test'})
@@ -263,14 +263,14 @@
resp.json.side_effect = ValueError()
resp.content = content = 'content'
msg = self.httpclient._get_error_message(resp)
- self.assertEqual(msg, content)
+ self.assertEqual(content, msg)
def test_gets_error_message_from_description_in_json(self):
resp = mock.MagicMock()
resp.json.return_value = {'title': 'test_text',
'description': 'oopsie'}
msg = self.httpclient._get_error_message(resp)
- self.assertEqual(msg, 'test_text: oopsie')
+ self.assertEqual('test_text: oopsie', msg)
class BaseEntityResource(testtools.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/tests/test_containers.py
new/python-barbicanclient-4.2.0/barbicanclient/tests/test_containers.py
--- old/python-barbicanclient-4.1.0/barbicanclient/tests/test_containers.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/tests/test_containers.py
2017-01-26 11:22:58.000000000 +0100
@@ -17,6 +17,7 @@
import mock
from oslo_utils import timeutils
+import six
from barbicanclient import acls
from barbicanclient.tests import test_client
@@ -283,8 +284,8 @@
secrets=self.container.generic_secrets
)
- self.assertEqual(container.secret_refs,
- self.container.generic_secret_refs)
+ self.assertEqual(self.container.generic_secret_refs,
+ container.secret_refs)
def test_should_reload_attributes_after_store(self):
data = {'container_ref': self.entity_href}
@@ -465,7 +466,6 @@
container_resp = self.container.get_dict(self.entity_href)
data = {"containers": [container_resp for v in range(3)]}
self.responses.get(self.entity_base, json=data)
-
containers_list = self.manager.list(limit=10, offset=5)
self.assertTrue(len(containers_list) == 3)
self.assertIsInstance(containers_list[0], containers.Container)
@@ -474,11 +474,30 @@
# Verify the correct URL was used to make the call.
self.assertEqual(self.entity_base,
self.responses.last_request.url.split('?')[0])
-
# Verify that correct information was sent in the call.
self.assertEqual(['10'], self.responses.last_request.qs['limit'])
self.assertEqual(['5'], self.responses.last_request.qs['offset'])
+ def test_should_get_list_when_secret_ref_without_name(self):
+ container_resp = self.container.get_dict(self.entity_href)
+ del container_resp.get("secret_refs")[0]["name"]
+ data = {"containers": [container_resp for v in range(3)]}
+ self.responses.get(self.entity_base, json=data)
+ containers_list = self.manager.list(limit=10, offset=5)
+
+ self.assertTrue(len(containers_list) == 3)
+ self.assertIsInstance(containers_list[0], containers.Container)
+ self.assertEqual(self.entity_href, containers_list[0].container_ref)
+
+ # Verify the correct URL was used to make the call.
+ self.assertEqual(self.entity_base,
+ self.responses.last_request.url.split('?')[0])
+
+ # Verify that the names of the secret_refs in the containers are None
+ for container in containers_list:
+ for name in six.iterkeys(container._secret_refs):
+ self.assertIsNone(name)
+
def test_should_fail_get_invalid_container(self):
self.assertRaises(ValueError, self.manager.get,
**{'container_ref': '12345'})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/barbicanclient/tests/test_orders.py
new/python-barbicanclient-4.2.0/barbicanclient/tests/test_orders.py
--- old/python-barbicanclient-4.1.0/barbicanclient/tests/test_orders.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/barbicanclient/tests/test_orders.py
2017-01-26 11:22:58.000000000 +0100
@@ -17,6 +17,7 @@
import mock
from oslo_utils import timeutils
import testtools
+import uuid
from barbicanclient import orders, base
from barbicanclient.tests import test_client
@@ -47,6 +48,24 @@
"order_ref": "{1}"
}}""".format(self.secret_ref, self.entity_href)
+ self.key_order_invalid_data = """{{
+ "status": "ACTIVE",
+ "secret_ref": "{0}",
+ "updated": "2014-10-21T17:15:50.871596",
+ "meta": {{
+ "name": "secretname",
+ "algorithm": "aes",
+ "request_type":"invalid",
+ "payload_content_type": "application/octet-stream",
+ "mode": "cbc",
+ "bit_length": 256,
+ "expiration": "2015-02-28T19:14:44.180394"
+ }},
+ "created": "2014-10-21T17:15:50.824202",
+ "type": "key",
+ "order_ref": "{1}"
+ }}""".format(self.secret_ref, self.entity_href)
+
self.manager = self.client.orders
def _get_order_args(self, order_data):
@@ -84,7 +103,6 @@
order_href = order.submit()
self.assertEqual(self.entity_href, order_href)
-
# Verify that attributes are immutable after store.
attributes = [
"name", "expiration", "algorithm", "bit_length", "mode",
@@ -193,6 +211,38 @@
except base.ImmutableException:
pass
+ def test_create_asymmetric_order_w_passphrase(self):
+ data = {'order_ref': self.entity_href}
+ self.responses.post(self.entity_base + '/', json=data)
+
+ passphrase = str(uuid.uuid4())
+ order = orders.AsymmetricOrder(
+ api=self.manager._api,
+ name='name',
+ algorithm='algorithm',
+ payload_content_type='payload_content_type',
+ passphrase=passphrase,
+ )
+ order_href = order.submit()
+ self.assertEqual(self.entity_href, order_href)
+ self.assertEqual(passphrase, order.pass_phrase)
+
+ def test_create_asymmetric_order_w_legacy_pass_phrase_param(self):
+ data = {'order_ref': self.entity_href}
+ self.responses.post(self.entity_base + '/', json=data)
+
+ passphrase = str(uuid.uuid4())
+ order = orders.AsymmetricOrder(
+ api=self.manager._api,
+ name='name',
+ algorithm='algorithm',
+ payload_content_type='payload_content_type',
+ pass_phrase=passphrase,
+ )
+ order_href = order.submit()
+ self.assertEqual(self.entity_href, order_href)
+ self.assertEqual(passphrase, order.pass_phrase)
+
class WhenTestingOrderManager(OrdersTestCase):
@@ -206,6 +256,16 @@
# Verify the correct URL was used to make the call.
self.assertEqual(self.entity_href, self.responses.last_request.url)
+ def test_should_get_invalid_meta(self):
+ self.responses.get(self.entity_href, text=self.key_order_invalid_data)
+
+ try:
+ # Verify checking for invalid meta fields.
+ order = self.manager.get(order_ref=self.entity_href)
+ self.fail("Didn't raise an TypeError exception")
+ except TypeError:
+ pass
+
def test_should_get_list(self):
data = {"orders": [json.loads(self.key_order_data) for _ in range(3)]}
self.responses.get(self.entity_base, json=data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/clientrc
new/python-barbicanclient-4.2.0/clientrc
--- old/python-barbicanclient-4.1.0/clientrc 2016-09-01 13:36:01.000000000
+0200
+++ new/python-barbicanclient-4.2.0/clientrc 2017-01-26 11:22:58.000000000
+0100
@@ -1,16 +1,17 @@
export OS_PROJECT_NAME=<YourProjectName>
-# Either Project ID or Project Name is required
-export OS_PROJECT_DOMAIN_ID=<YourProjectID>
-export OS_PROJECT_DOMAIN_NAME=<YourProjectName>
+# Either Project Domain ID or Project Domain Name is required
+export OS_PROJECT_DOMAIN_ID=<YourProjectDomainID>
+export OS_PROJECT_DOMAIN_NAME=<YourProjectDomainName>
-# Either Domain User ID or Domain User Name is required
+# Either User Domain ID or User Domain Name is required
export OS_USER_DOMAIN_ID=<YourUserDomainID>
export OS_USER_DOMAIN_NAME=<YourUserDomainName>
# Either User ID or Username can be used
export OS_USER_ID =<YourUserID>
export OS_USERNAME=<YourUserName>
+
export OS_PASSWORD=<YourPassword>
# OS_AUTH_URL should be your location of Keystone
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/doc/source/authentication.rst
new/python-barbicanclient-4.2.0/doc/source/authentication.rst
--- old/python-barbicanclient-4.1.0/doc/source/authentication.rst
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/doc/source/authentication.rst
2017-01-26 11:22:58.000000000 +0100
@@ -5,29 +5,31 @@
-----------------------
The client defers authentication to `Keystone Sessions`_, which provide several
-authentication plugins in the `keystoneclient.auth` namespace. Below we give
+authentication plugins in the `keystoneauth1.identity` namespace. Below we
give
examples of the most commonly used auth plugins.
-.. _`Keystone Sessions`:
http://docs.openstack.org/developer/python-keystoneclient/using-sessions.html
+.. _`Keystone Sessions`:
http://docs.openstack.org/developer/keystoneauth/using-sessions.html
Keystone API Version 3 Authentication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Authentication using Keystone API Version 3 can be achieved using the
-`keystoneclient.auth.identity.v3.Password` auth plugin.
+`keystoneauth1.identity.V3Password` auth plugin.
-Example::
+Example:
+
+ .. code-block:: python
- from keystoneclient.auth import identity
- from keystoneclient import session
from barbicanclient import client
+ from keystoneauth1 import identity
+ from keystoneauth1 import session
- auth = identity.v3.Password(auth_url='http://localhost:5000/v3',
- username='admin_user',
- user_domain_name='Default',
- password='password',
- project_name='demo'
- project_domain_name='Default')
+ auth = identity.V3Password(auth_url='http://localhost:5000/v3',
+ username='admin_user',
+ user_domain_name='Default',
+ password='password',
+ project_name='demo',
+ project_domain_name='Default')
sess = session.Session(auth=auth)
barbican = client.Client(session=sess)
@@ -35,18 +37,20 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Authentication using Keystone API Version 2 can be achieved using the
-`keystoneclient.auth.identity.v2.Password` auth plugin.
+`keystoneauth1.identity.V2Password` auth plugin.
+
+Example:
-Example::
+ .. code-block:: python
- from keystoneclient.auth import identity
- from keystoneclient import session
from barbicanclient import client
+ from keystoneauth1 import identity
+ from keystoneauth1 import session
- auth = identity.v2.Password(auth_url='http://localhost:5000/v2.0',
- username='admin_user',
- password='password',
- tenant_name='demo')
+ auth = identity.V2Password(auth_url='http://localhost:5000/v2.0',
+ username='admin_user',
+ password='password',
+ tenant_name='demo')
sess = session.Session(auth=auth)
barbican = client.Client(session=sess)
@@ -60,7 +64,9 @@
will be used for context (i.e. the project that owns the secrets you'll be
working with).
-Example::
+Example:
+
+ .. code-block:: python
from barbicanclient import client
@@ -93,22 +99,26 @@
.. code-block:: bash
- export OS_PROJECT_NAME=admin
+ export OS_PROJECT_NAME=<YourProjectName>
- # Either Project ID or Project Name is required
- export OS_PROJECT_DOMAIN_ID=<YourProjectID>
- export OS_PROJECT_DOMAIN_NAME=<YourProjectName>
+ # Either Project Domain ID or Project Domain Name is required
+ export OS_PROJECT_DOMAIN_ID=<YourProjectDomainID>
+ export OS_PROJECT_DOMAIN_NAME=<YourProjectDomainName>
- # Either User ID or User Name is required
+ # Either User Domain ID or User Domain Name is required
export OS_USER_DOMAIN_ID=<YourUserDomainID>
export OS_USER_DOMAIN_NAME=<YourUserDomainName>
- export OS_USERNAME=admin
- export OS_PASSWORD=password
+
+ # Either User ID or Username can be used
+ export OS_USER_ID =<YourUserID>
+ export OS_USERNAME=<YourUserName>
+
+ export OS_PASSWORD=<YourPassword>
# OS_AUTH_URL should be your location of Keystone
# Barbican Client defaults to Keystone V3
- export OS_AUTH_URL="http://localhost:5000/v3/"
- export BARBICAN_ENDPOINT="http://localhost:9311"
+ export OS_AUTH_URL="<YourAuthURL>:5000/v3/"
+ export BARBICAN_ENDPOINT="<YourBarbicanEndpoint>:9311"
Make any appropriate changes to this file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/doc/source/usage.rst
new/python-barbicanclient-4.2.0/doc/source/usage.rst
--- old/python-barbicanclient-4.1.0/doc/source/usage.rst 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/doc/source/usage.rst 2017-01-26
11:22:58.000000000 +0100
@@ -12,7 +12,9 @@
See :doc:`authentication` for more details.
-Example::
+Example:
+
+ .. code-block:: python
from barbicanclient import client
@@ -31,7 +33,9 @@
:class:`barbicanclient.secrets.SecretManager` class that is exposed as the
`secrets` attribute of the Client.
-Example::
+Example:
+
+ .. code-block:: python
# Store a random text password in Barbican
@@ -57,7 +61,9 @@
:meth:`barbicanclient.secrets.SecretManager.store` can later be used to
retrieve the secret data from barbican.
-Example::
+Example:
+
+ .. code-block:: python
# Retrieve Secret from secret reference
@@ -99,7 +105,9 @@
:class:`barbicanclient.orders.OrderManager` instance in the `orders` attribute
of the `Client`.
-Example::
+Example:
+
+ .. code-block:: python
# Submit an order to generate a random encryption key
@@ -117,7 +125,9 @@
The order reference returned by :meth:`barbicanclient.orders.Order.submit` can
later be used to retrieve the order from Barbican.
-Example::
+Example:
+
+ .. code-block:: python
# Retrieve Order from order reference
@@ -127,7 +137,9 @@
`'ACTIVE'`. An active order will contain the reference to the requested
secret (or container).
-Example::
+Example:
+
+ .. code-block:: python
# Retrieve Encryption Key generated by the above KeyOrder
@@ -149,7 +161,9 @@
:class:`barbicanclient.containers.ContainerManager` instance in the
`containers` attribute of the `Client`
-Example::
+Example:
+
+ .. code-block:: python
# Add the Secrets created above to a container
@@ -164,7 +178,9 @@
:meth:`barbicanclient.containers.Container.store` can later be used to
retrieve the container from Barbican.
-Example::
+Example:
+
+ .. code-block:: python
# Retrieve container from Barbican
@@ -182,7 +198,9 @@
ACLs should be managed using the :class:`barbicanclient.acls.ACLManager`
instance in the `acls` attribute of the `Client`.
-Example::
+Example:
+
+ .. code-block:: python
# Submits ACLs on an existing Secret with URI as 'secret_ref'
@@ -197,7 +215,9 @@
:class:`barbicanclient.acls.ContainerACL`. Refer to respective class for its
available APIs.
-Example::
+Example:
+
+ .. code-block:: python
# Get ACL entity for a Secret
# Returned entity will be either SecretACL or ContainerACL.
@@ -212,7 +232,9 @@
Its data is lazy loaded i.e. related ACL settings are not read till `acls`
attribute is accessed on secret or container entity.
-Example::
+Example:
+
+ .. code-block:: python
# Get secret entity for a given ref
secret = barbican.secrets.get(secret_ref)
@@ -233,7 +255,9 @@
If need to add users to existing 'read' ACL settings on a secret or container,
above mentioned get and submit methods can be used.
-Example::
+Example:
+
+ .. code-block:: python
# Every Barbican secret and container has default ACL setting which
# reflects default project access behavior.
@@ -271,7 +295,9 @@
If need to remove some users from existing ACL settings on a secret or
container, similar approach can be used as mentioned above for `add` example.
-Example::
+Example:
+
+ .. code-block:: python
# provide users to be removed as list.
remove_users = ['user1', 'user2', 'users3']
@@ -319,7 +345,9 @@
:meth:`barbicanclient.acls.SecretACL.remove` or
:meth:`barbicanclient.acls.ContainerACL.remove` can be used.
-Example::
+Example:
+
+ .. code-block:: python
# create ACL entity object with secret or container ref
blank_acl_entity = barbican.acls.create(entity_ref=secret_ref)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/acl_behaviors.py
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/acl_behaviors.py
---
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/acl_behaviors.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/acl_behaviors.py
2017-01-26 11:22:58.000000000 +0100
@@ -55,7 +55,7 @@
return argv
def acl_delete(self, entity_ref):
- """ Delete a secret or container acl
+ """Delete a secret or container acl
:param entity_ref Reference to secret or container entity
:return If error returns stderr string otherwise returns None.
@@ -190,7 +190,7 @@
return acl_list
def delete_all_created_acls(self):
- """ Delete all ACLs that we created """
+ """Delete all ACLs that we created"""
entities_to_delete = [entry for entry in self.acl_entity_set]
for entity_ref in entities_to_delete:
self.acl_delete(entity_ref)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/base_behaviors.py
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/base_behaviors.py
---
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/base_behaviors.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/base_behaviors.py
2017-01-26 11:22:58.000000000 +0100
@@ -31,7 +31,7 @@
self.cmdline_client = barbican.Barbican()
def add_auth_and_endpoint(self, arg_list):
- """ Update an argument list with authentication and endpoint data
+ """Update an argument list with authentication and endpoint data
Keystone v3 introduced the concept of a domain, so only the v3
flavor will include domain names.
@@ -70,7 +70,7 @@
self.LOG.info('updated command string: %s', arg_list)
def issue_barbican_command(self, argv):
- """ Issue the barbican command and return its output.
+ """Issue the barbican command and return its output.
The barbican command sometimes raises SystemExit, but not always, so
we will handle either situation here.
@@ -97,7 +97,7 @@
return outstr, errstr
def _prettytable_to_dict(self, str):
- """ Create a dict from the values in a PrettyTable string.
+ """Create a dict from the values in a PrettyTable string.
:param str: a string representing a PrettyTable output from a
barbican secret store or get command.
@@ -116,7 +116,7 @@
return retval
def _prettytable_to_list(self, str):
- """ Create a list from the values in a PrettyTable string.
+ """Create a list from the values in a PrettyTable string.
:param str: a string representing a PrettyTable output from a
barbican secret list command.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/container_behaviors.py
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/container_behaviors.py
---
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/container_behaviors.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/container_behaviors.py
2017-01-26 11:22:58.000000000 +0100
@@ -26,7 +26,7 @@
self.container_hrefs_to_delete = []
def delete_container(self, container_href):
- """ Delete a container
+ """Delete a container
:param container_href the href to the container to delete
"""
@@ -39,7 +39,7 @@
self.container_hrefs_to_delete.remove(container_href)
def create_container(self, secret_hrefs=[]):
- """ Create a container
+ """Create a container
:param secret_hrefs A list of existing secrets
:return: the href to the newly created container
@@ -58,7 +58,7 @@
return container_href
def get_container(self, container_href):
- """ Get a container
+ """Get a container
:param: the href to a container
:return dict of container values, or an empty dict if the container
@@ -77,7 +77,7 @@
return container_data
def list_containers(self):
- """ List containers
+ """List containers
:return: a list of containers
"""
@@ -89,6 +89,6 @@
return container_list
def delete_all_created_containers(self):
- """ Delete all containers that we created """
+ """Delete all containers that we created"""
for href in self.container_hrefs_to_delete:
self.delete_container(href)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/secret_behaviors.py
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/secret_behaviors.py
---
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/behaviors/secret_behaviors.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/behaviors/secret_behaviors.py
2017-01-26 11:22:58.000000000 +0100
@@ -28,7 +28,7 @@
def update_secret(self,
secret_href,
payload):
- """ Update a secret
+ """Update a secret
:param secret_href the href to the secret to update.
:param payload the payload to put into the secret.
@@ -42,7 +42,7 @@
stdout, stderr = self.issue_barbican_command(argv)
def delete_secret(self, secret_href):
- """ Delete a secret
+ """Delete a secret
:param secret_href the href to the secret to delete
"""
@@ -55,7 +55,7 @@
self.secret_hrefs_to_delete.remove(secret_href)
def store_secret(self, payload="Payload for testing", store_argv=[]):
- """ Store (aka create) a secret
+ """Store (aka create) a secret
The store_argv parameter allows additional command line parameters for
the store operation to be specified. This can be used to specify -a for
@@ -80,7 +80,7 @@
return secret_href
def get_secret(self, secret_href):
- """ Get a secret
+ """Get a secret
:param: the href to a secret
:return dict of secret values, or an empty dict if the secret
@@ -99,7 +99,7 @@
return secret_data
def get_secret_payload(self, secret_href, raw=False):
- """ Get a secret
+ """Get a secret
:param: the href to a secret
:param raw if True then add "-f value" to get raw payload (ie not
@@ -127,7 +127,7 @@
return secret
def list_secrets(self):
- """ List secrets
+ """List secrets
:return: a list of secrets
"""
@@ -140,6 +140,6 @@
return secret_list
def delete_all_created_secrets(self):
- """ Delete all secrets that we created """
+ """Delete all secrets that we created"""
for href in self.secret_hrefs_to_delete:
self.delete_secret(href)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/cli/v1/smoke/test_acl.py
new/python-barbicanclient-4.2.0/functionaltests/cli/v1/smoke/test_acl.py
--- old/python-barbicanclient-4.1.0/functionaltests/cli/v1/smoke/test_acl.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/functionaltests/cli/v1/smoke/test_acl.py
2017-01-26 11:22:59.000000000 +0100
@@ -240,5 +240,3 @@
# above secret ACL ref is passed instead of expected secret_ref
self.assertIn('Secret ACL URI', err)
- err = self.acl_behaviors.acl_delete(entity_ref=None)
- self.assertIn("Secret or container href", err)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/client/base.py
new/python-barbicanclient-4.2.0/functionaltests/client/base.py
--- old/python-barbicanclient-4.1.0/functionaltests/client/base.py
2016-09-01 13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/functionaltests/client/base.py
2017-01-26 11:22:58.000000000 +0100
@@ -18,8 +18,8 @@
from functionaltests.base import BaseTestCase
from functionaltests.common import config
from barbicanclient import client
-from keystoneclient.auth import identity
-from keystoneclient import session
+from keystoneauth1 import identity
+from keystoneauth1 import session
CONF = config.get_config()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/client/test_client_connectivity.py
new/python-barbicanclient-4.2.0/functionaltests/client/test_client_connectivity.py
---
old/python-barbicanclient-4.1.0/functionaltests/client/test_client_connectivity.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/client/test_client_connectivity.py
2017-01-26 11:22:58.000000000 +0100
@@ -18,9 +18,9 @@
from functionaltests.common import config
from barbicanclient import client
from barbicanclient import exceptions
-from keystoneclient.auth import identity
-from keystoneclient import session
-from keystoneclient import exceptions as ks_exceptions
+from keystoneauth1 import identity
+from keystoneauth1 import session
+from keystoneauth1 import exceptions as ks_exceptions
CONF = config.get_config()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/client/v1/functional/test_acl.py
new/python-barbicanclient-4.2.0/functionaltests/client/v1/functional/test_acl.py
---
old/python-barbicanclient-4.1.0/functionaltests/client/v1/functional/test_acl.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/client/v1/functional/test_acl.py
2017-01-26 11:22:58.000000000 +0100
@@ -291,7 +291,7 @@
entity.remove
)
- self.assertEqual(e.status_code, 404)
+ self.assertEqual(404, e.status_code)
@utils.parameterized_dataset(ACL_SUBMIT_DATA_POSITIVE)
@testcase.attr('positive')
@@ -349,7 +349,7 @@
entity.submit
)
if hasattr(e, 'status_code'):
- self.assertEqual(e.status_code, kwargs.get('error_code'))
+ self.assertEqual(kwargs.get('error_code'), e.status_code)
@utils.parameterized_dataset(ACL_DELETE_DATA)
def test_acl_delete(self, users, project_access, entity_ref_method,
@@ -476,7 +476,7 @@
server_acl.submit
)
if hasattr(e, 'status_code'):
- self.assertEqual(e.status_code, kwargs.get('error_code'))
+ self.assertEqual(kwargs.get('error_code'), e.status_code)
@utils.parameterized_dataset(ACL_REMOVE_USERS_DATA_POSITIVE)
@testcase.attr('positive')
@@ -503,7 +503,8 @@
acl_users = server_acl.read.users
if acl_users and remove_users:
acl_users = set(acl_users).difference(remove_users)
- server_acl.read.users = acl_users
+ # Python sets are not JSON serializable. Cast acl_users to a list.
+ server_acl.read.users = list(acl_users)
if kwargs.get('remove_project_access') is not None:
server_acl.read.project_access = \
@@ -554,7 +555,8 @@
acl_users = server_acl.read.users
if acl_users and remove_users:
acl_users = set(acl_users).difference(remove_users)
- server_acl.read.users = acl_users
+ # Python sets are not JSON serializable. Cast acl_users to a list.
+ server_acl.read.users = list(acl_users)
if kwargs.get('remove_project_access') is not None:
server_acl.read.project_access = \
@@ -566,4 +568,4 @@
server_acl.submit
)
if hasattr(e, 'status_code'):
- self.assertEqual(e.status_code, kwargs.get('error_code'))
+ self.assertEqual(kwargs.get('error_code'), e.status_code)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/functionaltests/client/v1/functional/test_orders.py
new/python-barbicanclient-4.2.0/functionaltests/client/v1/functional/test_orders.py
---
old/python-barbicanclient-4.1.0/functionaltests/client/v1/functional/test_orders.py
2016-09-01 13:36:01.000000000 +0200
+++
new/python-barbicanclient-4.2.0/functionaltests/client/v1/functional/test_orders.py
2017-01-26 11:22:59.000000000 +0100
@@ -79,6 +79,7 @@
order_resp = self.barbicanclient.orders.get(order_ref)
self.assertEqual(order.name, order_resp.name)
+ @testcase.skip('Launchpad 1425667')
@testcase.attr('positive')
def test_create_order_defaults_payload_content_type_none(self):
"""Covers creating orders with various valid payload content types."""
@@ -88,6 +89,10 @@
order_ref = self.cleanup.add_entity(order)
self.assertIsNotNone(order_ref)
+ order_resp = self.barbicanclient.orders.get(order_ref)
+ self.assertTrue(order_resp.status == "ACTIVE" or
+ order_resp.status == "PENDING")
+
@testcase.attr('positive')
def test_create_order_defaults_check_empty_name(self):
"""Create order with empty meta name.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/PKG-INFO
new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/PKG-INFO
--- old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/PKG-INFO
2016-09-01 13:38:51.000000000 +0200
+++ new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/PKG-INFO
2017-01-26 11:25:24.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-barbicanclient
-Version: 4.1.0
+Version: 4.2.0
Summary: Client Library for OpenStack Barbican Key Management API
Home-page: http://docs.openstack.org/developer/python-barbicanclient
Author: OpenStack
@@ -235,3 +235,4 @@
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/SOURCES.txt
new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/SOURCES.txt
--- old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/SOURCES.txt
2016-09-01 13:38:51.000000000 +0200
+++ new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/SOURCES.txt
2017-01-26 11:25:25.000000000 +0100
@@ -100,4 +100,5 @@
python_barbicanclient.egg-info/pbr.json
python_barbicanclient.egg-info/requires.txt
python_barbicanclient.egg-info/top_level.txt
-tools/hacking.sh
\ No newline at end of file
+tools/hacking.sh
+tools/tox_install.sh
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/pbr.json
new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/pbr.json
--- old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/pbr.json
2016-09-01 13:38:51.000000000 +0200
+++ new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/pbr.json
2017-01-26 11:25:24.000000000 +0100
@@ -1 +1 @@
-{"is_release": true, "git_version": "06066e7"}
\ No newline at end of file
+{"is_release": true, "git_version": "585e9c9"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/requires.txt
new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/requires.txt
--- old/python-barbicanclient-4.1.0/python_barbicanclient.egg-info/requires.txt
2016-09-01 13:38:51.000000000 +0200
+++ new/python-barbicanclient-4.2.0/python_barbicanclient.egg-info/requires.txt
2017-01-26 11:25:24.000000000 +0100
@@ -1,8 +1,9 @@
-pbr>=1.6
-requests>=2.10.0
+pbr>=1.8
+requests!=2.12.2,>=2.10.0
six>=1.9.0
-python-keystoneclient!=2.1.0,>=2.0.0
-cliff!=1.16.0,!=1.17.0,>=1.15.0
+cliff>=2.3.0
+oslo.config!=3.18.0,>=3.14.0
+keystoneauth1>=2.18.0
oslo.i18n>=2.1.0
oslo.serialization>=1.10.0
-oslo.utils>=3.16.0
+oslo.utils>=3.18.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/requirements.txt
new/python-barbicanclient-4.2.0/requirements.txt
--- old/python-barbicanclient-4.1.0/requirements.txt 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/requirements.txt 2017-01-26
11:22:59.000000000 +0100
@@ -1,11 +1,12 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-pbr>=1.6 # Apache-2.0
-requests>=2.10.0 # Apache-2.0
+pbr>=1.8 # Apache-2.0
+requests!=2.12.2,>=2.10.0 # Apache-2.0
six>=1.9.0 # MIT
-python-keystoneclient!=2.1.0,>=2.0.0 # Apache-2.0
-cliff!=1.16.0,!=1.17.0,>=1.15.0 # Apache-2.0
+cliff>=2.3.0 # Apache-2.0
+oslo.config!=3.18.0,>=3.14.0 # Apache-2.0
+keystoneauth1>=2.18.0 # Apache-2.0
oslo.i18n>=2.1.0 # Apache-2.0
oslo.serialization>=1.10.0 # Apache-2.0
-oslo.utils>=3.16.0 # Apache-2.0
+oslo.utils>=3.18.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/setup.cfg
new/python-barbicanclient-4.2.0/setup.cfg
--- old/python-barbicanclient-4.1.0/setup.cfg 2016-09-01 13:38:51.000000000
+0200
+++ new/python-barbicanclient-4.2.0/setup.cfg 2017-01-26 11:25:25.000000000
+0100
@@ -17,6 +17,7 @@
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
+ Programming Language :: Python :: 3.5
[files]
packages =
@@ -60,5 +61,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/test-requirements.txt
new/python-barbicanclient-4.2.0/test-requirements.txt
--- old/python-barbicanclient-4.1.0/test-requirements.txt 2016-09-01
13:36:01.000000000 +0200
+++ new/python-barbicanclient-4.2.0/test-requirements.txt 2017-01-26
11:22:58.000000000 +0100
@@ -1,18 +1,17 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-coverage>=3.6 # Apache-2.0
-discover # BSD
+coverage>=4.0 # Apache-2.0
hacking<0.11,>=0.10.0
fixtures>=3.0.0 # Apache-2.0/BSD
-requests-mock>=1.0 # Apache-2.0
+requests-mock>=1.1 # Apache-2.0
mock>=2.0 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
oslotest>=1.10.0 # Apache-2.0
nose # LGPL
-python-openstackclient>=2.1.0 # Apache-2.0
+python-openstackclient>=3.3.0 # Apache-2.0
# Documentation build requirements
-sphinx!=1.3b1,<1.3,>=1.2.1 # BSD
-oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
+sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
+oslosphinx>=4.7.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/tools/tox_install.sh
new/python-barbicanclient-4.2.0/tools/tox_install.sh
--- old/python-barbicanclient-4.1.0/tools/tox_install.sh 1970-01-01
01:00:00.000000000 +0100
+++ new/python-barbicanclient-4.2.0/tools/tox_install.sh 2017-01-26
11:22:58.000000000 +0100
@@ -0,0 +1,53 @@
+#!/usr/bin/env bash
+
+# [liujiong] This file is refer to tox_install.sh in neutron-lib.
+# Library constraint file contains this library version pin that is in conflict
+# with installing the library from source. We should replace the version pin in
+# the constraints file before applying it for from-source installation.
+
+ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
+BRANCH_NAME=master
+LIB_NAME=python-barbicanclient
+requirements_installed=$(echo "import openstack_requirements" | python
2>/dev/null ; echo $?)
+
+set -e
+
+CONSTRAINTS_FILE=$1
+shift
+
+install_cmd="pip install"
+mydir=$(mktemp -dt "$LIB_NAME-tox_install-XXXXXXX")
+trap "rm -rf $mydir" EXIT
+localfile=$mydir/upper-constraints.txt
+if [[ $CONSTRAINTS_FILE != http* ]]; then
+ CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
+fi
+curl $CONSTRAINTS_FILE -k -o $localfile
+install_cmd="$install_cmd -c$localfile"
+
+if [ $requirements_installed -eq 0 ]; then
+ echo "Requirements already installed; using existing package"
+elif [ -x "$ZUUL_CLONER" ]; then
+ pushd $mydir
+ $ZUUL_CLONER --cache-dir \
+ /opt/git \
+ --branch $BRANCH_NAME \
+ git://git.openstack.org \
+ openstack/requirements
+ cd openstack/requirements
+ $install_cmd -e .
+ popd
+else
+ if [ -z "$REQUIREMENTS_PIP_LOCATION" ]; then
+
REQUIREMENTS_PIP_LOCATION="git+https://git.openstack.org/openstack/requirements@$BRANCH_NAME#egg=requirements"
+ fi
+ $install_cmd -U -e ${REQUIREMENTS_PIP_LOCATION}
+fi
+
+# This is the main purpose of the script: Allow local installation of
+# the current repo. It is listed in constraints file and thus any
+# install will be constrained and we need to unconstrain it.
+edit-constraints $localfile -- $LIB_NAME "-e file://$PWD#egg=$LIB_NAME"
+
+$install_cmd -U $*
+exit $?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barbicanclient-4.1.0/tox.ini
new/python-barbicanclient-4.2.0/tox.ini
--- old/python-barbicanclient-4.1.0/tox.ini 2016-09-01 13:36:01.000000000
+0200
+++ new/python-barbicanclient-4.2.0/tox.ini 2017-01-26 11:22:58.000000000
+0100
@@ -1,11 +1,11 @@
[tox]
minversion = 1.6
-envlist = py34,py27,pypy,pep8
+envlist = py35,py34,py27,pypy,pep8
skipsdist = True
[testenv]
usedevelop = True
-install_command = pip install -U {opts} {packages}
+install_command = {toxinidir}/tools/tox_install.sh
{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
{opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
@@ -37,4 +37,4 @@
[flake8]
show-source = True
ignore = F,H
-exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
+exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build