Hello community, here is the log from the commit of package python-barbicanclient for openSUSE:Factory checked in at 2018-12-06 12:19:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-barbicanclient (Old) and /work/SRC/openSUSE:Factory/.python-barbicanclient.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-barbicanclient" Thu Dec 6 12:19:13 2018 rev:9 rq:655472 version:4.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-barbicanclient/python-barbicanclient.changes 2018-09-07 15:36:53.534698771 +0200 +++ /work/SRC/openSUSE:Factory/.python-barbicanclient.new.19453/python-barbicanclient.changes 2018-12-06 12:19:17.601392540 +0100 @@ -1,0 +2,10 @@ +Thu Dec 6 05:56:48 UTC 2018 - cloud-de...@suse.de + +- update to version 4.7.1 + - Update UPPER_CONSTRAINTS_FILE for stable/rocky + - Import python-barbicanclient-dsvm + - Allow fetching by UUID, and respect interface + - Update .gitreview for stable/rocky + - import zuul job settings from project-config + +------------------------------------------------------------------- Old: ---- python-barbicanclient-4.7.0.tar.gz New: ---- python-barbicanclient-4.7.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-barbicanclient.spec ++++++ --- /var/tmp/diff_new_pack.UuLwYN/_old 2018-12-06 12:19:18.293391798 +0100 +++ /var/tmp/diff_new_pack.UuLwYN/_new 2018-12-06 12:19:18.293391798 +0100 @@ -12,18 +12,18 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: python-barbicanclient -Version: 4.7.0 +Version: 4.7.1 Release: 0 Summary: Client for the Barbican Key Management API License: Apache-2.0 Group: Development/Languages/Python URL: https://launchpad.net/python-barbicanclient -Source0: https://files.pythonhosted.org/packages/source/p/python-barbicanclient/python-barbicanclient-4.7.0.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/python-barbicanclient/python-barbicanclient-4.7.1.tar.gz BuildRequires: openstack-macros BuildRequires: python-devel BuildRequires: python2-cliff >= 2.8.0 ++++++ python-barbicanclient-4.7.0.tar.gz -> python-barbicanclient-4.7.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/.zuul.yaml new/python-barbicanclient-4.7.1/.zuul.yaml --- old/python-barbicanclient-4.7.0/.zuul.yaml 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/.zuul.yaml 2018-11-19 21:52:27.000000000 +0100 @@ -1,7 +1,27 @@ +- job: + name: python-barbicanclient-dsvm + parent: legacy-dsvm-base + run: playbooks/python-barbicanclient-dsvm/run.yaml + post-run: playbooks/python-barbicanclient-dsvm/post.yaml + timeout: 4200 + required-projects: + - openstack-infra/devstack-gate + - openstack/barbican + - openstack/barbican-tempest-plugin + - openstack/python-barbicanclient + - project: + templates: + - openstack-python-jobs + - openstack-python35-jobs + - publish-openstack-sphinx-docs + - check-requirements + - openstackclient-plugin-jobs check: jobs: - openstack-tox-lower-constraints + - python-barbicanclient-dsvm gate: jobs: - openstack-tox-lower-constraints + - python-barbicanclient-dsvm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/AUTHORS new/python-barbicanclient-4.7.1/AUTHORS --- old/python-barbicanclient-4.7.0/AUTHORS 2018-07-26 16:43:44.000000000 +0200 +++ new/python-barbicanclient-4.7.1/AUTHORS 2018-11-19 21:56:17.000000000 +0100 @@ -55,6 +55,7 @@ Nguyen Hai <nguyentriha...@gmail.com> Oleksii Chuprykov <ochupry...@mirantis.com> Ondřej Nový <ondrej.n...@firma.seznam.cz> +OpenStack Release Bot <infra-r...@openstack.org> Paul Kehrer <paul.l.keh...@gmail.com> Petr Kovar <pko...@redhat.com> Richard Lee <rble...@gmail.com> @@ -77,7 +78,6 @@ Wyllys Ingersoll <wyllys.ingers...@evault.com> Yushiro FURUKAWA <y.furukaw...@jp.fujitsu.com> ZhiQiang Fan <aji.zq...@gmail.com> -Zuul <z...@review.openstack.org> chadlung <chad.l...@gmail.com> chenxing <chen.x...@99cloud.net> hongzhezheng <zheng.hongzh...@zte.com.cn> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/ChangeLog new/python-barbicanclient-4.7.1/ChangeLog --- old/python-barbicanclient-4.7.0/ChangeLog 2018-07-26 16:43:44.000000000 +0200 +++ new/python-barbicanclient-4.7.1/ChangeLog 2018-11-19 21:56:17.000000000 +0100 @@ -1,6 +1,15 @@ CHANGES ======= +4.7.1 +----- + +* Allow fetching by UUID, and respect interface +* Import python-barbicanclient-dsvm +* import zuul job settings from project-config +* Update UPPER\_CONSTRAINTS\_FILE for stable/rocky +* Update .gitreview for stable/rocky + 4.7.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/PKG-INFO new/python-barbicanclient-4.7.1/PKG-INFO --- old/python-barbicanclient-4.7.0/PKG-INFO 2018-07-26 16:43:45.000000000 +0200 +++ new/python-barbicanclient-4.7.1/PKG-INFO 2018-11-19 21:56:17.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-barbicanclient -Version: 4.7.0 +Version: 4.7.1 Summary: Client Library for OpenStack Barbican Key Management API Home-page: https://docs.openstack.org/python-barbicanclient/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/base.py new/python-barbicanclient-4.7.1/barbicanclient/base.py --- old/python-barbicanclient-4.7.0/barbicanclient/base.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/base.py 2018-11-19 21:52:19.000000000 +0100 @@ -15,9 +15,13 @@ """ Base utilities to build API operation managers. """ +import logging import uuid +LOG = logging.getLogger(__name__) + + def filter_null_keys(dictionary): return dict(((k, v) for k, v in dictionary.items() if v is not None)) @@ -30,19 +34,26 @@ data_dict.items()} -def validate_ref(ref, entity): - """Verifies that there is a real uuid at the end of the uri +def validate_ref_and_return_uuid(ref, entity): + """Verifies that there is a real uuid (possibly at the end of a uri) - :return: Returns True for easier testing + :return: The uuid.UUID object :raises ValueError: If it cannot correctly parse the uuid in the ref. """ try: - _, entity_uuid = ref.rstrip('/').rsplit('/', 1) - uuid.UUID(entity_uuid) + # This works for a ref *or* a UUID, since we just pick the last piece + ref_pieces = ref.rstrip('/').rsplit('/', 1) + return uuid.UUID(ref_pieces[-1]) except Exception: raise ValueError('{0} incorrectly specified.'.format(entity)) - return True + +def calculate_uuid_ref(ref, entity): + entity_uuid = validate_ref_and_return_uuid( + ref, entity.capitalize().rstrip('s')) + entity_ref = "{entity}/{uuid}".format(entity=entity, uuid=entity_uuid) + LOG.info("Calculated %s uuid ref: %s", entity.capitalize(), entity_ref) + return entity_ref class ImmutableException(Exception): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/tests/test_base.py new/python-barbicanclient-4.7.1/barbicanclient/tests/test_base.py --- old/python-barbicanclient-4.7.0/barbicanclient/tests/test_base.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/tests/test_base.py 2018-11-19 21:52:19.000000000 +0100 @@ -14,6 +14,7 @@ # limitations under the License. import testtools +import uuid import barbicanclient from barbicanclient import base @@ -23,12 +24,21 @@ class TestValidateRef(testtools.TestCase): def test_valid_ref(self): - ref = 'http://localhost/ff2ca003-5ebb-4b61-8a17-3f9c54ef6356' - self.assertTrue(base.validate_ref(ref, 'Thing')) + secret_uuid = uuid.uuid4() + ref = 'http://localhost/' + str(secret_uuid) + self.assertEqual(secret_uuid, + base.validate_ref_and_return_uuid(ref, 'Thing')) + + def test_valid_uuid(self): + secret_uuid = uuid.uuid4() + self.assertEqual(secret_uuid, + base.validate_ref_and_return_uuid(str(secret_uuid), + 'Thing')) def test_invalid_uuid(self): ref = 'http://localhost/not_a_uuid' - self.assertRaises(ValueError, base.validate_ref, ref, 'Thing') + self.assertRaises(ValueError, base.validate_ref_and_return_uuid, ref, + 'Thing') def test_censored_copy(self): d1 = {'a': '1', 'password': 'my_password', 'payload': 'my_key', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_acls.py new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_acls.py --- old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_acls.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_acls.py 2018-11-19 21:52:19.000000000 +0100 @@ -25,12 +25,13 @@ def setUp(self): self._setUp('acl', entity_id='d9f95d61-8863-49d3-a045-5c2cb77130b5') - self.secret_ref = (self.endpoint + - '/secrets/8a3108ec-88fc-4f5c-86eb-f37b8ae8358e') - + self.secret_uuid = '8a3108ec-88fc-4f5c-86eb-f37b8ae8358e' + self.secret_ref = (self.endpoint + '/v1/secrets/' + self.secret_uuid) self.secret_acl_ref = '{0}/acl'.format(self.secret_ref) - self.container_ref = (self.endpoint + '/containers/' - '83c302c7-86fe-4f07-a277-c4962f121f19') + + self.container_uuid = '83c302c7-86fe-4f07-a277-c4962f121f19' + self.container_ref = (self.endpoint + '/v1/containers/' + + self.container_uuid) self.container_acl_ref = '{0}/acl'.format(self.container_ref) self.manager = self.client.acls @@ -54,16 +55,22 @@ class WhenTestingACLManager(ACLTestCase): - def test_should_get_secret_acl(self): + def test_should_get_secret_acl(self, entity_ref=None): + entity_ref = entity_ref or self.secret_ref self.responses.get(self.secret_acl_ref, json=self.get_acl_response_data()) - api_resp = self.manager.get(entity_ref=self.secret_ref) + api_resp = self.manager.get(entity_ref=entity_ref) self.assertEqual(self.secret_acl_ref, self.responses.last_request.url) 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) + self.assertIn(api_resp.get('read').acl_ref_relative, + self.secret_acl_ref) + + def test_should_get_secret_acl_using_stripped_uuid(self): + bad_href = "http://badsite.com/secrets/" + self.secret_uuid + self.test_should_get_secret_acl(bad_href) def test_should_get_secret_acl_with_extra_trailing_slashes(self): self.responses.get(requests_mock.ANY, @@ -73,16 +80,22 @@ self.assertEqual(self.secret_acl_ref, self.responses.last_request.url) - def test_should_get_container_acl(self): + def test_should_get_container_acl(self, entity_ref=None): + entity_ref = entity_ref or self.container_ref self.responses.get(self.container_acl_ref, json=self.get_acl_response_data()) - api_resp = self.manager.get(entity_ref=self.container_ref) + api_resp = self.manager.get(entity_ref=entity_ref) self.assertEqual(self.container_acl_ref, self.responses.last_request.url) 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) + self.assertIn(api_resp.get('read').acl_ref_relative, + self.container_acl_ref) + + def test_should_get_container_acl_using_stripped_uuid(self): + bad_href = "http://badsite.com/containers/" + self.container_uuid + self.test_should_get_container_acl(bad_href) def test_should_get_container_acl_with_trailing_slashes(self): self.responses.get(requests_mock.ANY, @@ -122,20 +135,26 @@ read_acl_via_get = entity.get('read') self.assertEqual(read_acl, read_acl_via_get) - def test_should_create_acl_with_users(self): - entity = self.manager.create(entity_ref=self.container_ref + '///', + def test_should_create_acl_with_users(self, entity_ref=None): + entity_ref = entity_ref or self.container_ref + entity = self.manager.create(entity_ref=entity_ref + '///', users=self.users2, project_access=False) self.assertIsInstance(entity, acls.ContainerACL) # entity ref is kept same as provided input. - self.assertEqual(self.container_ref + '///', entity.entity_ref) + self.assertEqual(entity_ref + '///', entity.entity_ref) read_acl = entity.read 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 - self.assertIn(self.container_ref, read_acl.acl_ref, + self.assertIn(entity_ref, read_acl.acl_ref, 'ACL ref has additional /acl') + self.assertIn(read_acl.acl_ref_relative, self.container_acl_ref) + + def test_should_create_acl_with_users_stripped_uuid(self): + bad_href = "http://badsite.com/containers/" + self.container_uuid + self.test_should_create_acl_with_users(bad_href) def test_should_create_acl_with_no_users(self): entity = self.manager.create(entity_ref=self.container_ref, users=[]) @@ -163,18 +182,23 @@ class WhenTestingACLEntity(ACLTestCase): - def test_should_submit_acl_with_users_project_access_set(self): + def test_should_submit_acl_with_users_project_access_set(self, href=None): + href = href or self.secret_ref data = {'acl_ref': self.secret_acl_ref} # register put acl URI with expected acl ref in response self.responses.put(self.secret_acl_ref, json=data) - entity = self.manager.create(entity_ref=self.secret_ref + '///', + entity = self.manager.create(entity_ref=href + '///', users=self.users1, project_access=True) api_resp = entity.submit() self.assertEqual(self.secret_acl_ref, api_resp) self.assertEqual(self.secret_acl_ref, self.responses.last_request.url) + def test_should_submit_acl_with_users_project_access_stripped_uuid(self): + bad_href = "http://badsite.com/secrets/" + self.secret_uuid + self.test_should_submit_acl_with_users_project_access_set(bad_href) + def test_should_submit_acl_with_project_access_set_but_no_users(self): data = {'acl_ref': self.secret_acl_ref} # register put acl URI with expected acl ref in response @@ -368,10 +392,11 @@ self.assertIsNone(data[4]) # updated self.assertEqual(self.container_acl_ref, data[5]) - def test_should_secret_acl_remove(self): + def test_should_secret_acl_remove(self, entity_ref=None): + entity_ref = entity_ref or self.secret_ref self.responses.delete(self.secret_acl_ref) - entity = self.manager.create(entity_ref=self.secret_ref, + entity = self.manager.create(entity_ref=entity_ref, users=self.users2) api_resp = entity.remove() @@ -391,14 +416,23 @@ self.responses.delete(self.container_acl_ref) - def test_should_container_acl_remove(self): + def test_should_secret_acl_remove_stripped_uuid(self): + bad_href = "http://badsite.com/secrets/" + self.secret_uuid + self.test_should_secret_acl_remove(bad_href) + + def test_should_container_acl_remove(self, entity_ref=None): + entity_ref = entity_ref or self.container_ref self.responses.delete(self.container_acl_ref) - entity = self.manager.create(entity_ref=self.container_ref) + entity = self.manager.create(entity_ref=entity_ref) entity.remove() self.assertEqual(self.container_acl_ref, self.responses.last_request.url) + def test_should_container_acl_remove_stripped_uuid(self): + bad_href = "http://badsite.com/containers/" + self.container_uuid + self.test_should_container_acl_remove(bad_href) + def test_should_fail_acl_remove_invalid_uri(self): # secret_acl URI expected and not secret acl URI entity = self.manager.create(entity_ref=self.secret_acl_ref) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_cas.py new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_cas.py --- old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_cas.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_cas.py 2018-11-19 21:52:19.000000000 +0100 @@ -55,13 +55,15 @@ self.ca = CAData() self.manager = self.client.cas - def test_should_get_lazy(self): - data = self.ca.get_dict(self.entity_href) + def test_should_get_lazy(self, ca_ref=None): + ca_ref = ca_ref or self.entity_href + + data = self.ca.get_dict(ca_ref) m = self.responses.get(self.entity_href, json=data) - ca = self.manager.get(ca_ref=self.entity_href) + ca = self.manager.get(ca_ref=ca_ref) self.assertIsInstance(ca, cas.CA) - self.assertEqual(self.entity_href, ca._ca_ref) + self.assertEqual(ca_ref, ca._ca_ref) # Verify GET wasn't called yet self.assertFalse(m.called) @@ -72,6 +74,13 @@ # Verify the correct URL was used to make the GET call self.assertEqual(self.entity_href, m.last_request.url) + def test_should_get_lazy_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_get_lazy(bad_href) + + def test_should_get_lazy_using_only_uuid(self): + self.test_should_get_lazy(self.entity_id) + def test_should_get_lazy_in_meta(self): data = self.ca.get_dict(self.entity_href) m = self.responses.get(self.entity_href, json=data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_containers.py new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_containers.py --- old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_containers.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_containers.py 2018-11-19 21:52:19.000000000 +0100 @@ -367,13 +367,15 @@ except AttributeError: pass - def test_should_get_generic_container(self): - data = self.container.get_dict(self.entity_href) + def test_should_get_generic_container(self, container_ref=None): + container_ref = container_ref or self.entity_href + + data = self.container.get_dict(container_ref) self.responses.get(self.entity_href, json=data) - container = self.manager.get(container_ref=self.entity_href) + container = self.manager.get(container_ref=container_ref) self.assertIsInstance(container, containers.Container) - self.assertEqual(self.entity_href, container.container_ref) + self.assertEqual(container_ref, container.container_ref) # Verify the correct URL was used to make the call. self.assertEqual(self.entity_href, self.responses.last_request.url) @@ -414,21 +416,39 @@ self.assertIsNotNone(container.public_key) self.assertIsNotNone(container.private_key_passphrase) - def test_should_delete_from_manager(self): + def test_should_get_generic_container_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_get_generic_container(bad_href) + + def test_should_get_generic_container_using_only_uuid(self): + self.test_should_get_generic_container(self.entity_id) + + def test_should_delete_from_manager(self, container_ref=None): + container_ref = container_ref or self.entity_href + self.responses.delete(self.entity_href, status_code=204) - self.manager.delete(container_ref=self.entity_href) + self.manager.delete(container_ref=container_ref) # Verify the correct URL was used to make the call. self.assertEqual(self.entity_href, self.responses.last_request.url) - def test_should_delete_from_object(self): - data = self.container.get_dict(self.entity_href) + def test_should_delete_from_manager_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_delete_from_manager(bad_href) + + def test_should_delete_from_manager_using_only_uuid(self): + self.test_should_delete_from_manager(self.entity_id) + + def test_should_delete_from_object(self, container_ref=None): + container_ref = container_ref or self.entity_href + + data = self.container.get_dict(container_ref) m = self.responses.get(self.entity_href, json=data) n = self.responses.delete(self.entity_href, status_code=204) - container = self.manager.get(container_ref=self.entity_href) - self.assertIsNotNone(container.container_ref) + container = self.manager.get(container_ref=container_ref) + self.assertEqual(container_ref, container.container_ref) container.delete() @@ -439,6 +459,13 @@ # Verify that the Container no longer has a container_ref self.assertIsNone(container.container_ref) + def test_should_delete_from_object_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_delete_from_object(bad_href) + + def test_should_delete_from_object_using_only_uuid(self): + self.test_should_delete_from_object(self.entity_id) + def test_should_store_after_delete_from_object(self): data = self.container.get_dict(self.entity_href) self.responses.get(self.entity_href, json=data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_orders.py new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_orders.py --- old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_orders.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_orders.py 2018-11-19 21:52:19.000000000 +0100 @@ -198,6 +198,34 @@ except AttributeError: pass + def test_should_delete_from_object(self, order_ref=None): + order_ref = order_ref or self.entity_href + + data = {'order_ref': order_ref} + self.responses.post(self.entity_base + '/', json=data) + self.responses.delete(self.entity_href, status_code=204) + + order = self.manager.create_key( + name='name', + algorithm='algorithm', + payload_content_type='payload_content_type' + ) + order_href = order.submit() + + self.assertEqual(order_ref, order_href) + + order.delete() + + # Verify the correct URL was used to make the call. + self.assertEqual(self.entity_href, self.responses.last_request.url) + + def test_should_delete_from_object_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_delete_from_object(bad_href) + + def test_should_delete_from_object_using_only_uuid(self): + self.test_should_delete_from_object(self.entity_id) + class WhenTestingAsymmetricOrders(OrdersTestCase): @@ -265,16 +293,25 @@ class WhenTestingOrderManager(OrdersTestCase): - def test_should_get(self): + def test_should_get(self, order_ref=None): + order_ref = order_ref or self.entity_href + self.responses.get(self.entity_href, text=self.key_order_data) - order = self.manager.get(order_ref=self.entity_href) + order = self.manager.get(order_ref=order_ref) self.assertIsInstance(order, orders.KeyOrder) self.assertEqual(self.entity_href, order.order_ref) # Verify the correct URL was used to make the call. self.assertEqual(self.entity_href, self.responses.last_request.url) + def test_should_get_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_get(bad_href) + + def test_should_get_using_only_uuid(self): + self.test_should_get(self.entity_id) + def test_should_get_invalid_meta(self): self.responses.get(self.entity_href, text=self.key_order_invalid_data) @@ -300,14 +337,22 @@ self.assertEqual(['10'], self.responses.last_request.qs['limit']) self.assertEqual(['5'], self.responses.last_request.qs['offset']) - def test_should_delete(self): + def test_should_delete(self, order_ref=None): + order_ref = order_ref or self.entity_href self.responses.delete(self.entity_href, status_code=204) - self.manager.delete(order_ref=self.entity_href) + self.manager.delete(order_ref=order_ref) # Verify the correct URL was used to make the call. self.assertEqual(self.entity_href, self.responses.last_request.url) + def test_should_delete_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_delete(bad_href) + + def test_should_delete_using_only_uuid(self): + self.test_should_delete(self.entity_id) + def test_should_fail_delete_no_href(self): self.assertRaises(ValueError, self.manager.delete, None) @@ -330,16 +375,25 @@ class WhenTestingCertificateOrders(OrdersTestCase): - def test_get(self): + def test_get(self, order_ref=None): + order_ref = order_ref or self.entity_href + self.responses.get(self.entity_href, text=self.cert_order_data) - order = self.manager.get(order_ref=self.entity_href) + order = self.manager.get(order_ref=order_ref) self.assertIsInstance(order, orders.CertificateOrder) self.assertEqual(self.entity_href, order.order_ref) # Verify the correct URL was used to make the call. self.assertEqual(self.entity_href, self.responses.last_request.url) + def test_get_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_get(bad_href) + + def test_get_using_only_uuid(self): + self.test_get(self.entity_id) + def test_repr(self): order_args = self._get_order_args(self.cert_order_data) order_obj = orders.CertificateOrder(api=None, **order_args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_secrets.py new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_secrets.py --- old/python-barbicanclient-4.7.0/barbicanclient/tests/v1/test_secrets.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/tests/v1/test_secrets.py 2018-11-19 21:52:19.000000000 +0100 @@ -219,13 +219,15 @@ except AttributeError: pass - def test_should_get_lazy(self): - data = self.secret.get_dict(self.entity_href) + def test_should_get_lazy(self, secret_ref=None): + secret_ref = secret_ref or self.entity_href + + data = self.secret.get_dict(secret_ref) m = self.responses.get(self.entity_href, json=data) - secret = self.manager.get(secret_ref=self.entity_href) + secret = self.manager.get(secret_ref=secret_ref) self.assertIsInstance(secret, secrets.Secret) - self.assertEqual(self.entity_href, secret.secret_ref) + self.assertEqual(secret_ref, secret.secret_ref) # Verify GET wasn't called yet self.assertFalse(m.called) @@ -236,6 +238,13 @@ # Verify the correct URL was used to make the GET call self.assertEqual(self.entity_href, m.last_request.url) + def test_should_get_lazy_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_get_lazy(bad_href) + + def test_should_get_lazy_using_only_uuid(self): + self.test_should_get_lazy(self.entity_id) + def test_should_get_acls_lazy(self): data = self.secret.get_dict(self.entity_href) m = self.responses.get(self.entity_href, json=data) @@ -388,22 +397,81 @@ self.assertEqual(self.entity_payload_href, decryption_response.last_request.url) - def test_should_delete(self): + def test_should_delete_from_manager(self, secret_ref=None): + secret_ref = secret_ref or self.entity_href + self.responses.delete(self.entity_href, status_code=204) - self.manager.delete(secret_ref=self.entity_href) + self.manager.delete(secret_ref=secret_ref) # Verify the correct URL was used to make the call. self.assertEqual(self.entity_href, self.responses.last_request.url) - def test_should_update(self): - data = {'secret_ref': self.entity_href} + def test_should_delete_from_manager_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_delete_from_manager(bad_href) + + def test_should_delete_from_manager_using_only_uuid(self): + self.test_should_delete_from_manager(self.entity_id) + + def test_should_delete_from_object(self, secref_ref=None): + secref_ref = secref_ref or self.entity_href + data = {'secret_ref': secref_ref} self.responses.post(self.entity_base + '/', json=data) secret = self.manager.create() secret.payload = None secret.store() + # Verify the secret has the correct ref for testing deletes + self.assertEqual(secref_ref, secret.secret_ref) + + self.responses.delete(self.entity_href, status_code=204) + + secret.delete() + + # Verify the correct URL was used to make the call. + self.assertEqual(self.entity_href, self.responses.last_request.url) + + def test_should_delete_from_object_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_delete_from_object(bad_href) + + def test_should_delete_from_object_using_only_uuid(self): + self.test_should_delete_from_object(self.entity_id) + + def test_should_update_from_manager(self, secret_ref=None): + # This literal will have type(unicode) in Python 2, but will have + # type(str) in Python 3. It is six.text_type in both cases. + text_payload = u'time for an ice cold \U0001f37a' + secret_ref = secret_ref or self.entity_href + + self.responses.put(self.entity_href, status_code=204) + + self.manager.update(secret_ref=secret_ref, payload=text_payload) + + # Verify the correct URL was used to make the call. + self.assertEqual(self.entity_href, self.responses.last_request.url) + + def test_should_update_from_manager_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_update_from_manager(bad_href) + + def test_should_update_from_manager_using_only_uuid(self): + self.test_should_update_from_manager(self.entity_id) + + def test_should_update_from_object(self, secref_ref=None): + secref_ref = secref_ref or self.entity_href + data = {'secret_ref': secref_ref} + self.responses.post(self.entity_base + '/', json=data) + + secret = self.manager.create() + secret.payload = None + secret.store() + + # Verify the secret has the correct ref for testing updates + self.assertEqual(secref_ref, secret.secret_ref) + # This literal will have type(unicode) in Python 2, but will have # type(str) in Python 3. It is six.text_type in both cases. text_payload = u'time for an ice cold \U0001f37a' @@ -419,6 +487,13 @@ # Verify that the data has been updated self.assertEqual(text_payload, secret.payload) + def test_should_update_from_object_using_stripped_uuid(self): + bad_href = "http://badsite.com/" + self.entity_id + self.test_should_update_from_object(bad_href) + + def test_should_update_from_object_using_only_uuid(self): + self.test_should_update_from_object(self.entity_id) + def test_should_get_list(self): secret_resp = self.secret.get_dict(self.entity_href) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/v1/acls.py new/python-barbicanclient-4.7.1/barbicanclient/v1/acls.py --- old/python-barbicanclient-4.7.0/barbicanclient/v1/acls.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/v1/acls.py 2018-11-19 21:52:19.000000000 +0100 @@ -86,10 +86,18 @@ return ACL.get_acl_ref_from_entity_ref(self.entity_ref) @property + def acl_ref_relative(self): + return self._parent_acl.acl_ref_relative + + @property def entity_ref(self): return self._entity_ref @property + def entity_uuid(self): + return self._parent_acl.entity_uuid + + @property def project_access(self): """Flag indicating project access behavior is enabled or not""" return self._project_access @@ -204,6 +212,12 @@ return self._entity_ref @property + def entity_uuid(self): + """Entity UUID""" + return str(base.validate_ref_and_return_uuid( + self._entity_ref, self._acl_type)) + + @property def operation_acls(self): """List of operation specific ACL settings.""" return self._operation_acls @@ -212,6 +226,11 @@ def acl_ref(self): return ACL.get_acl_ref_from_entity_ref(self.entity_ref) + @property + def acl_ref_relative(self): + return ACL.get_acl_ref_from_entity_ref_relative( + self.entity_uuid, self._parent_entity_path) + def add_operation_acl(self, users=None, project_access=None, operation_type=None, created=None, updated=None,): @@ -301,7 +320,7 @@ acl_data['users'] = per_op_acl.users acl_dict[op_type] = acl_data - response = self._api.put(self.acl_ref, json=acl_dict) + response = self._api.put(self.acl_ref_relative, json=acl_dict) return response.json().get('acl_ref') @@ -314,7 +333,7 @@ self.validate_input_ref() LOG.debug('Removing ACL for {0} for href: {1}' .format(self.acl_type, self.entity_ref)) - self._api.delete(self.acl_ref) + self._api.delete(self.acl_ref_relative) def load_acls_data(self): """Loads ACL entity from Barbican server using its acl_ref @@ -328,7 +347,7 @@ :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ - response = self._api.get(self.acl_ref) + response = self._api.get(self.acl_ref_relative) del self.operation_acls[:] # clearing list for all of its references for op_type in response: @@ -354,7 +373,7 @@ else: raise ValueError('{0} URI is not specified.'.format(res_title)) - base.validate_ref(self.entity_ref, ref_type) + base.validate_ref_and_return_uuid(self.entity_ref, ref_type) return ref_type @staticmethod @@ -365,6 +384,14 @@ return '{0}/{1}'.format(entity_ref, ACL._resource_name) @staticmethod + def get_acl_ref_from_entity_ref_relative(entity_ref, entity_type): + # Utility for converting entity ref to acl ref + if entity_ref: + entity_ref = entity_ref.rstrip('/') + return '{0}/{1}/{2}'.format(entity_type, entity_ref, + ACL._resource_name) + + @staticmethod def identify_ref_type(entity_ref): # Utility for identifying ACL type from given entity URI. if not entity_ref: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/v1/cas.py new/python-barbicanclient-4.7.1/barbicanclient/v1/cas.py --- old/python-barbicanclient-4.7.0/barbicanclient/v1/cas.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/v1/cas.py 2018-11-19 21:52:19.000000000 +0100 @@ -171,7 +171,8 @@ def _fill_lazy_properties(self): if self._ca_ref and not self._plugin_name: - result = self._api.get(self._ca_ref) + uuid_ref = base.calculate_uuid_ref(self._ca_ref, self._entity) + result = self._api.get(uuid_ref) self._fill_from_data( meta=result.get('meta'), expiration=result.get('expiration'), @@ -205,7 +206,7 @@ :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ LOG.debug("Getting ca - CA href: {0}".format(ca_ref)) - base.validate_ref(ca_ref, 'CA') + base.validate_ref_and_return_uuid(ca_ref, 'CA') return CA( api=self._api, ca_ref=ca_ref diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/v1/containers.py new/python-barbicanclient-4.7.1/barbicanclient/v1/containers.py --- old/python-barbicanclient-4.7.0/barbicanclient/v1/containers.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/v1/containers.py 2018-11-19 21:52:19.000000000 +0100 @@ -211,7 +211,9 @@ def delete(self): """Delete container from Barbican""" if self._container_ref: - self._api.delete(self._container_ref) + uuid_ref = base.calculate_uuid_ref(self._container_ref, + self._entity) + self._api.delete(uuid_ref) self._container_ref = None self._status = None self._created = None @@ -235,9 +237,10 @@ raise AttributeError("container_ref not set, cannot reload data.") LOG.debug('Getting container - Container href: {0}' .format(self._container_ref)) - base.validate_ref(self._container_ref, 'Container') + uuid_ref = base.calculate_uuid_ref(self._container_ref, + self._entity) try: - response = self._api.get(self._container_ref) + response = self._api.get(uuid_ref) except AttributeError: raise LookupError('Container {0} could not be found.' .format(self._container_ref)) @@ -530,14 +533,14 @@ def get(self, container_ref): """Retrieve an existing Container from Barbican - :param str container_ref: Full HATEOAS reference to a Container + :param container_ref: Full HATEOAS reference to a Container, or a UUID :returns: Container object or a subclass of the appropriate type """ LOG.debug('Getting container - Container href: {0}' .format(container_ref)) - base.validate_ref(container_ref, 'Container') + uuid_ref = base.calculate_uuid_ref(container_ref, self._entity) try: - response = self._api.get(container_ref) + response = self._api.get(uuid_ref) except AttributeError: raise LookupError('Container {0} could not be found.' .format(container_ref)) @@ -688,14 +691,15 @@ def delete(self, container_ref): """Delete a Container from Barbican - :param container_ref: Full HATEOAS reference to a Container + :param container_ref: Full HATEOAS reference to a Container, or a UUID :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ if not container_ref: raise ValueError('container_ref is required.') - self._api.delete(container_ref) + uuid_ref = base.calculate_uuid_ref(container_ref, self._entity) + self._api.delete(uuid_ref) def list(self, limit=10, offset=0, name=None, type=None): """List containers for the project. @@ -728,7 +732,7 @@ def register_consumer(self, container_ref, name, url): """Add a consumer to the container - :param container_ref: Full HATEOAS reference to a Container + :param container_ref: Full HATEOAS reference to a Container, or a UUID :param name: Name of the consuming service :param url: URL of the consuming resource :returns: A container object per the get() method @@ -738,8 +742,9 @@ """ LOG.debug('Creating consumer registration for container ' '{0} as {1}: {2}'.format(container_ref, name, url)) - href = '{0}/{1}/consumers'.format(self._entity, - container_ref.split('/')[-1]) + container_uuid = base.validate_ref_and_return_uuid( + container_ref, 'Container') + href = '{0}/{1}/consumers'.format(self._entity, container_uuid) consumer_dict = dict() consumer_dict['name'] = name consumer_dict['URL'] = url @@ -750,7 +755,7 @@ def remove_consumer(self, container_ref, name, url): """Remove a consumer from the container - :param container_ref: Full HATEOAS reference to a Container + :param container_ref: Full HATEOAS reference to a Container, or a UUID :param name: Name of the previously consuming service :param url: URL of the previously consuming resource :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses @@ -759,8 +764,9 @@ """ LOG.debug('Deleting consumer registration for container ' '{0} as {1}: {2}'.format(container_ref, name, url)) - href = '{0}/{1}/consumers'.format(self._entity, - container_ref.split('/')[-1]) + container_uuid = base.validate_ref_and_return_uuid( + container_ref, 'Container') + href = '{0}/{1}/consumers'.format(self._entity, container_uuid) consumer_dict = { 'name': name, 'URL': url diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/v1/orders.py new/python-barbicanclient-4.7.1/barbicanclient/v1/orders.py --- old/python-barbicanclient-4.7.0/barbicanclient/v1/orders.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/v1/orders.py 2018-11-19 21:52:19.000000000 +0100 @@ -241,7 +241,8 @@ def delete(self): """Deletes the Order from Barbican""" if self._order_ref: - self._api.delete(self._order_ref) + uuid_ref = base.calculate_uuid_ref(self._order_ref, self._entity) + self._api.delete(uuid_ref) self._order_ref = None else: raise LookupError("Order is not yet stored.") @@ -388,16 +389,16 @@ def get(self, order_ref): """Retrieve an existing Order from Barbican - :param order_ref: Full HATEOAS reference to an Order + :param order_ref: Full HATEOAS reference to an Order, or a UUID :returns: An instance of the appropriate subtype of Order :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ LOG.debug("Getting order - Order href: {0}".format(order_ref)) - base.validate_ref(order_ref, 'Order') + uuid_ref = base.calculate_uuid_ref(order_ref, self._entity) try: - response = self._api.get(order_ref) + response = self._api.get(uuid_ref) except AttributeError: raise LookupError( 'Order {0} could not be found.'.format(order_ref) @@ -518,11 +519,12 @@ def delete(self, order_ref): """Delete an Order from Barbican - :param order_ref: The href for the order + :param order_ref: Full HATEOAS reference to an Order, or a UUID """ if not order_ref: raise ValueError('order_ref is required.') - self._api.delete(order_ref) + uuid_ref = base.calculate_uuid_ref(order_ref, self._entity) + self._api.delete(uuid_ref) def list(self, limit=10, offset=0): """List Orders for the project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/barbicanclient/v1/secrets.py new/python-barbicanclient-4.7.1/barbicanclient/v1/secrets.py --- old/python-barbicanclient-4.7.0/barbicanclient/v1/secrets.py 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/barbicanclient/v1/secrets.py 2018-11-19 21:52:19.000000000 +0100 @@ -357,14 +357,16 @@ else: raise exceptions.PayloadException("Invalid Payload Type") - self._api.put(self._secret_ref, + uuid_ref = base.calculate_uuid_ref(self._secret_ref, self._entity) + self._api.put(uuid_ref, headers=headers, data=self.payload) def delete(self): """Deletes the Secret from Barbican""" if self._secret_ref: - self._api.delete(self._secret_ref) + uuid_ref = base.calculate_uuid_ref(self._secret_ref, self._entity) + self._api.delete(uuid_ref) self._secret_ref = None else: raise LookupError("Secret is not yet stored.") @@ -411,7 +413,8 @@ def _fill_lazy_properties(self): if self._secret_ref and not self._name: - result = self._api.get(self._secret_ref) + uuid_ref = base.calculate_uuid_ref(self._secret_ref, self._entity) + result = self._api.get(uuid_ref) self._fill_from_data( name=result.get('name'), expiration=result.get('expiration'), @@ -444,7 +447,7 @@ def get(self, secret_ref, payload_content_type=None): """Retrieve an existing Secret from Barbican - :param str secret_ref: Full HATEOAS reference to a Secret + :param str secret_ref: Full HATEOAS reference to a Secret, or a UUID :param str payload_content_type: DEPRECATED: Content type to use for payload decryption. Setting this can lead to unexpected results. See Launchpad Bug #1419166. @@ -455,7 +458,7 @@ :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ LOG.debug("Getting secret - Secret href: {0}".format(secret_ref)) - base.validate_ref(secret_ref, 'Secret') + base.validate_ref_and_return_uuid(secret_ref, 'Secret') return Secret( api=self._api, payload_content_type=payload_content_type, @@ -463,16 +466,16 @@ ) def update(self, secret_ref, payload=None): - """Update an existing Secret from Barbican + """Update an existing Secret in Barbican - :param str secret_ref: Full HATEOAS reference to a Secret + :param str secret_ref: Full HATEOAS reference to a Secret, or a UUID :param str payload: New payload to add to secret :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ - base.validate_ref(secret_ref, 'Secret') + base.validate_ref_and_return_uuid(secret_ref, 'Secret') if not secret_ref: raise ValueError('secret_ref is required.') @@ -483,7 +486,8 @@ else: raise exceptions.PayloadException("Invalid Payload Type") - self._api.put(secret_ref, + uuid_ref = base.calculate_uuid_ref(secret_ref, self._entity) + self._api.put(uuid_ref, headers=headers, data=payload) @@ -524,15 +528,16 @@ def delete(self, secret_ref): """Delete a Secret from Barbican - :param secret_ref: The href for the secret to be deleted + :param secret_ref: Full HATEOAS reference to a Secret, or a UUID :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses """ - base.validate_ref(secret_ref, 'Secret') + base.validate_ref_and_return_uuid(secret_ref, 'Secret') if not secret_ref: raise ValueError('secret_ref is required.') - self._api.delete(secret_ref) + uuid_ref = base.calculate_uuid_ref(secret_ref, self._entity) + self._api.delete(uuid_ref) def list(self, limit=10, offset=0, name=None, algorithm=None, mode=None, bits=0, secret_type=None, created=None, updated=None, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/playbooks/python-barbicanclient-dsvm/post.yaml new/python-barbicanclient-4.7.1/playbooks/python-barbicanclient-dsvm/post.yaml --- old/python-barbicanclient-4.7.0/playbooks/python-barbicanclient-dsvm/post.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-barbicanclient-4.7.1/playbooks/python-barbicanclient-dsvm/post.yaml 2018-11-19 21:52:19.000000000 +0100 @@ -0,0 +1,15 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/playbooks/python-barbicanclient-dsvm/run.yaml new/python-barbicanclient-4.7.1/playbooks/python-barbicanclient-dsvm/run.yaml --- old/python-barbicanclient-4.7.0/playbooks/python-barbicanclient-dsvm/run.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-barbicanclient-4.7.1/playbooks/python-barbicanclient-dsvm/run.yaml 2018-11-19 21:52:19.000000000 +0100 @@ -0,0 +1,64 @@ +- hosts: all + name: Autoconverted job legacy-python-barbicanclient-dsvm from old job gate-python-barbicanclient-dsvm-ubuntu-xenial + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + cat << 'EOF' >>"/tmp/dg-local.conf" + [[local|localrc]] + enable_plugin barbican git://git.openstack.org/openstack/barbican + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + export OVERRIDE_ENABLED_SERVICES=tempest,rabbit,mysql,key + export PROJECTS="openstack/barbican $PROJECTS" + export PROJECTS="openstack/python-barbicanclient $PROJECTS" + export PROJECTS="openstack/barbican-tempest-plugin $PROJECTS" + + function gate_hook { + $BASE/new/barbican/devstack/gate_hook.sh + } + export -f gate_hook + + function post_test_hook { + cd /opt/stack/new/python-barbicanclient/functionaltests + ./post_test_hook.sh + } + export -f post_test_hook + + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/python_barbicanclient.egg-info/PKG-INFO new/python-barbicanclient-4.7.1/python_barbicanclient.egg-info/PKG-INFO --- old/python-barbicanclient-4.7.0/python_barbicanclient.egg-info/PKG-INFO 2018-07-26 16:43:44.000000000 +0200 +++ new/python-barbicanclient-4.7.1/python_barbicanclient.egg-info/PKG-INFO 2018-11-19 21:56:17.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-barbicanclient -Version: 4.7.0 +Version: 4.7.1 Summary: Client Library for OpenStack Barbican Key Management API Home-page: https://docs.openstack.org/python-barbicanclient/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/python_barbicanclient.egg-info/SOURCES.txt new/python-barbicanclient-4.7.1/python_barbicanclient.egg-info/SOURCES.txt --- old/python-barbicanclient-4.7.0/python_barbicanclient.egg-info/SOURCES.txt 2018-07-26 16:43:45.000000000 +0200 +++ new/python-barbicanclient-4.7.1/python_barbicanclient.egg-info/SOURCES.txt 2018-11-19 21:56:17.000000000 +0100 @@ -100,6 +100,8 @@ functionaltests/common/cleanup.py functionaltests/common/config.py functionaltests/common/keys.py +playbooks/python-barbicanclient-dsvm/post.yaml +playbooks/python-barbicanclient-dsvm/run.yaml python_barbicanclient.egg-info/PKG-INFO python_barbicanclient.egg-info/SOURCES.txt python_barbicanclient.egg-info/dependency_links.txt @@ -107,4 +109,5 @@ python_barbicanclient.egg-info/not-zip-safe python_barbicanclient.egg-info/pbr.json python_barbicanclient.egg-info/requires.txt -python_barbicanclient.egg-info/top_level.txt \ No newline at end of file +python_barbicanclient.egg-info/top_level.txt +releasenotes/notes/use-only-uuid-from-href-81710d1b388dce57.yaml \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/python_barbicanclient.egg-info/pbr.json new/python-barbicanclient-4.7.1/python_barbicanclient.egg-info/pbr.json --- old/python-barbicanclient-4.7.0/python_barbicanclient.egg-info/pbr.json 2018-07-26 16:43:44.000000000 +0200 +++ new/python-barbicanclient-4.7.1/python_barbicanclient.egg-info/pbr.json 2018-11-19 21:56:17.000000000 +0100 @@ -1 +1 @@ -{"git_version": "985c46e", "is_release": true} \ No newline at end of file +{"git_version": "c8b10fd", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/releasenotes/notes/use-only-uuid-from-href-81710d1b388dce57.yaml new/python-barbicanclient-4.7.1/releasenotes/notes/use-only-uuid-from-href-81710d1b388dce57.yaml --- old/python-barbicanclient-4.7.0/releasenotes/notes/use-only-uuid-from-href-81710d1b388dce57.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-barbicanclient-4.7.1/releasenotes/notes/use-only-uuid-from-href-81710d1b388dce57.yaml 2018-11-19 21:52:19.000000000 +0100 @@ -0,0 +1,8 @@ +--- +features: + - | + Lookups (for all Read/Update/Delete actions) are now performed using only + the UUID of the entity. For backward compatability, full HATEOS refs may + be used, but everything before the UUID will be stripped and the service + catalog entry for Barbican will be substituted. This should have no impact + on accessing existing secrets with any version of Barbican. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-barbicanclient-4.7.0/tox.ini new/python-barbicanclient-4.7.1/tox.ini --- old/python-barbicanclient-4.7.0/tox.ini 2018-07-26 16:40:31.000000000 +0200 +++ new/python-barbicanclient-4.7.1/tox.ini 2018-11-19 21:52:27.000000000 +0100 @@ -10,7 +10,7 @@ PYTHON=coverage run --source barbicanclient --parallel-mode VIRTUAL_ENV={envdir} deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/rocky} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -22,6 +22,7 @@ coverage html -d cover coverage xml -o cover/coverage.xml coverage report -m +whitelist_externals = rm [testenv:debug] basepython = python3 @@ -38,7 +39,7 @@ [testenv:docs] basepython = python3 deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/rocky} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html doc/source doc/build/html