Merge ~ines-almeida/launchpad-buildd:fetch-service-add-proxy-info-endpoint into launchpad-buildd:master

Proposed by Ines Almeida
Status: Merged
Approved by: Simone Pelosi
Approved revision: 54210c55e94a78c45dfc85d3dc91b4ad3b6eb197
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad-buildd:fetch-service-add-proxy-info-endpoint
Merge into: launchpad-buildd:master
Diff against target: 40 lines (+7/-0)
3 files modified
bin/test_buildd_generatetranslationtemplates (+1/-0)
bin/test_buildd_recipe (+1/-0)
lpbuildd/builder.py (+5/-0)
Reviewer Review Type Date Requested Status
Simone Pelosi Approve
Review via email: mp+465154@code.launchpad.net

Commit message

Add `proxy_info` endpoint that returns details for the proxy setup

To post a comment you must log in.
Revision history for this message
Simone Pelosi (pelpsi) wrote :

LGTM!

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/test_buildd_generatetranslationtemplates b/bin/test_buildd_generatetranslationtemplates
2index ffaf819..be4e1ef 100755
3--- a/bin/test_buildd_generatetranslationtemplates
4+++ b/bin/test_buildd_generatetranslationtemplates
5@@ -19,6 +19,7 @@ chroot_sha1 = sys.argv[1]
6
7 proxy = ServerProxy("http://localhost:8221/rpc")
8 print(proxy.info())
9+print(proxy.proxy_info())
10 print(proxy.status())
11 buildid = "1-2"
12 build_type = "translation-templates"
13diff --git a/bin/test_buildd_recipe b/bin/test_buildd_recipe
14index a1b4a26..4622396 100755
15--- a/bin/test_buildd_recipe
16+++ b/bin/test_buildd_recipe
17@@ -25,6 +25,7 @@ def deb_line(host, suites):
18 proxy = ServerProxy("http://localhost:8221/rpc")
19 print(proxy.echo("Hello World"))
20 print(proxy.info())
21+print(proxy.proxy_info())
22 status = proxy.status()
23 print(status)
24 if status[0] != "BuilderStatus.IDLE":
25diff --git a/lpbuildd/builder.py b/lpbuildd/builder.py
26index ed624b3..f821b34 100644
27--- a/lpbuildd/builder.py
28+++ b/lpbuildd/builder.py
29@@ -786,6 +786,11 @@ class XMLRPCBuilder(xmlrpc.XMLRPC):
30 """Echo the argument back."""
31 return args
32
33+ def xmlrpc_proxy_info(self):
34+ """Return the details for the proxy used by the manager."""
35+ proxy_fields = ["use_fetch_service", "revocation_endpoint"]
36+ return {k: getattr(self.builder.manager, k) for k in proxy_fields}
37+
38 def xmlrpc_info(self):
39 """Return the protocol version and the manager methods supported."""
40 return (

Subscribers

People subscribed via source and target branches