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
diff --git a/bin/test_buildd_generatetranslationtemplates b/bin/test_buildd_generatetranslationtemplates
index ffaf819..be4e1ef 100755
--- a/bin/test_buildd_generatetranslationtemplates
+++ b/bin/test_buildd_generatetranslationtemplates
@@ -19,6 +19,7 @@ chroot_sha1 = sys.argv[1]
1919
20proxy = ServerProxy("http://localhost:8221/rpc")20proxy = ServerProxy("http://localhost:8221/rpc")
21print(proxy.info())21print(proxy.info())
22print(proxy.proxy_info())
22print(proxy.status())23print(proxy.status())
23buildid = "1-2"24buildid = "1-2"
24build_type = "translation-templates"25build_type = "translation-templates"
diff --git a/bin/test_buildd_recipe b/bin/test_buildd_recipe
index a1b4a26..4622396 100755
--- a/bin/test_buildd_recipe
+++ b/bin/test_buildd_recipe
@@ -25,6 +25,7 @@ def deb_line(host, suites):
25proxy = ServerProxy("http://localhost:8221/rpc")25proxy = ServerProxy("http://localhost:8221/rpc")
26print(proxy.echo("Hello World"))26print(proxy.echo("Hello World"))
27print(proxy.info())27print(proxy.info())
28print(proxy.proxy_info())
28status = proxy.status()29status = proxy.status()
29print(status)30print(status)
30if status[0] != "BuilderStatus.IDLE":31if status[0] != "BuilderStatus.IDLE":
diff --git a/lpbuildd/builder.py b/lpbuildd/builder.py
index ed624b3..f821b34 100644
--- a/lpbuildd/builder.py
+++ b/lpbuildd/builder.py
@@ -786,6 +786,11 @@ class XMLRPCBuilder(xmlrpc.XMLRPC):
786 """Echo the argument back."""786 """Echo the argument back."""
787 return args787 return args
788788
789 def xmlrpc_proxy_info(self):
790 """Return the details for the proxy used by the manager."""
791 proxy_fields = ["use_fetch_service", "revocation_endpoint"]
792 return {k: getattr(self.builder.manager, k) for k in proxy_fields}
793
789 def xmlrpc_info(self):794 def xmlrpc_info(self):
790 """Return the protocol version and the manager methods supported."""795 """Return the protocol version and the manager methods supported."""
791 return (796 return (

Subscribers

People subscribed via source and target branches