Merge ~cjwatson/launchpad:librarian-keystone-v3 into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: da7ed5fa603fff0ab11ade8d8fc8e13b4d621a1d
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:librarian-keystone-v3
Merge into: launchpad:master
Diff against target: 52 lines (+7/-4)
3 files modified
lib/lp/services/config/schema-lazr.conf (+3/-0)
lib/lp/services/librarianserver/swift.py (+2/-2)
lib/lp/testing/swift/fixture.py (+2/-2)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+404470@code.launchpad.net

Commit message

librarian: Allow selecting a different OS_AUTH_VERSION

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/services/config/schema-lazr.conf b/lib/lp/services/config/schema-lazr.conf
2index 752093f..7ead01c 100644
3--- a/lib/lp/services/config/schema-lazr.conf
4+++ b/lib/lp/services/config/schema-lazr.conf
5@@ -1257,6 +1257,9 @@ os_password: none
6 # datatype: string
7 os_tenant_name: none
8
9+# datatype: string
10+os_auth_version: 2.0
11+
12
13 # Mailman configuration. Most of this is configured in
14 # https://git.launchpad.net/lp-mailman instead; the entries here are only
15diff --git a/lib/lp/services/librarianserver/swift.py b/lib/lp/services/librarianserver/swift.py
16index 23344c0..c05a702 100644
17--- a/lib/lp/services/librarianserver/swift.py
18+++ b/lib/lp/services/librarianserver/swift.py
19@@ -1,4 +1,4 @@
20-# Copyright 2013-2019 Canonical Ltd. This software is licensed under the
21+# Copyright 2013-2021 Canonical Ltd. This software is licensed under the
22 # GNU Affero General Public License version 3 (see the file LICENSE).
23
24 """Move files from Librarian disk storage into Swift."""
25@@ -412,7 +412,7 @@ class ConnectionPool:
26 user=config.librarian_server.os_username,
27 key=config.librarian_server.os_password,
28 tenant_name=config.librarian_server.os_tenant_name,
29- auth_version='2.0',
30+ auth_version=config.librarian_server.os_auth_version,
31 )
32
33
34diff --git a/lib/lp/testing/swift/fixture.py b/lib/lp/testing/swift/fixture.py
35index 55cf8f3..3359380 100644
36--- a/lib/lp/testing/swift/fixture.py
37+++ b/lib/lp/testing/swift/fixture.py
38@@ -1,4 +1,4 @@
39-# Copyright 2013-2017 Canonical Ltd. This software is licensed under the
40+# Copyright 2013-2021 Canonical Ltd. This software is licensed under the
41 # GNU Affero General Public License version 3 (see the file LICENSE).
42
43 """Mock Swift test fixture."""
44@@ -86,7 +86,7 @@ class SwiftFixture(TacTestFixture):
45 """Return a valid connection to our mock Swift"""
46 connection_kwargs = {
47 "authurl": config.librarian_server.os_auth_url,
48- "auth_version": "2.0",
49+ "auth_version": config.librarian_server.os_auth_version,
50 "tenant_name": config.librarian_server.os_tenant_name,
51 "user": config.librarian_server.os_username,
52 "key": config.librarian_server.os_password,

Subscribers

People subscribed via source and target branches

to status/vote changes: