DPDK CI discussions
 help / color / Atom feed
From: "Mcnamara, John" <john.mcnamara@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "Wei, FangfangX" <fangfangx.wei@intel.com>,
	"ci@dpdk.org" <ci@dpdk.org>, "Xu, Qian Q" <qian.q.xu@intel.com>,
	"Liu, Yong" <yong.liu@intel.com>,
	"Chen, WeichunX" <weichunx.chen@intel.com>
Subject: Re: [dpdk-ci] [PATCH v4 7/7] tests: add checkpatch
Date: Fri, 9 Dec 2016 12:11:00 +0000
Message-ID: <B27915DBBA3421428155699D51E4CFE202671BC7@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <2627126.3MAZ6CHQzW@xps13>


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Friday, December 9, 2016 10:11 AM
> To: Mcnamara, John <john.mcnamara@intel.com>
> Cc: Wei, FangfangX <fangfangx.wei@intel.com>; ci@dpdk.org; Xu, Qian Q
> <qian.q.xu@intel.com>; Liu, Yong <yong.liu@intel.com>; Chen, WeichunX
> <weichunx.chen@intel.com>
> Subject: Re: [dpdk-ci] [PATCH v4 7/7] tests: add checkpatch
> 
> 2016-12-09 10:07, Mcnamara, John:
> > From: ci [mailto:ci-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > > 2016-12-09 08:51, Wei, FangfangX:
> > > > My internet connection is working fine, and also configure
> > > > http_proxy
> > > and https_proxy, but the connection is still timeout.
> > > >
> > > > I think that's because the rpc client can't connect to your rpc
> server.
> > > Is there any other configuration should be configured?
> > >
> > > I've found it is an open issue. pwclient does not work with proxy:
> > > 	https://github.com/getpatchwork/patchwork/issues/47
> > >
> >
> > Hi,
> >
> > I have a hardcoded patch that allows pwclient to work within the Intel
> firewall. I'll send it on to the @intel.com people.
> 
> In the meantime, I'm trying to fix the issue upstream.
> And I'll send a v5 of these patches to be able to get the patch from
> patchwork without requiring pwclient.


Thomas,

For what it is worth here is my patch. It isn't a general solution since the proxy is hardcoded and also it doesn't work with a proxy that requires a password.

John



diff --git a/pwclient b/pwclient
index dfbea30..1652a7e 100755
--- a/pwclient
+++ b/pwclient
@@ -29,6 +29,7 @@ import subprocess
 import base64
 import ConfigParser
 import shutil
+import httplib
 
 # Default Patchwork remote XML-RPC server URL
 # This script will check the PW_XMLRPC_URL environment variable
@@ -80,6 +81,22 @@ class Filter:
         """Return human-readable description of the filter."""
         return str(self.d)
 
+class ProxiedTransport(xmlrpclib.Transport):
+
+    def set_proxy(self, proxy):
+        self.proxy = proxy
+
+    def make_connection(self, host):
+        self.realhost = host
+        h = httplib.HTTPConnection(self.proxy)
+        return h
+
+    def send_request(self, connection, handler, request_body):
+        connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
+
+    def send_host(self, connection, host):
+        connection.putheader('Host', self.realhost)
+
 class BasicHTTPAuthTransport(xmlrpclib.SafeTransport):
 
     def __init__(self, username = None, password = None, use_https = False):
@@ -431,7 +448,8 @@ def main():
     url = config.get(project_str, 'url')
 
     (username, password) = (None, None)
-    transport = None
+    transport = ProxiedTransport()
+    transport.set_proxy('proxy.mydomain.com:123')
     if action in auth_actions:
         if config.has_option(project_str, 'username') and \
                 config.has_option(project_str, 'password'):

  reply index

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 17:02 [dpdk-ci] [PATCH 0/7] first scripts for CI integration Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 1/7] tools: add mail filter Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 2/7] tools: add mail parser Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 3/7] config: add loader and template Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 4/7] tools: add patchwork client Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 5/7] tools: add per-patch report mailer Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 6/7] tools: add patchwork integration Thomas Monjalon
2016-11-25 17:02 ` [dpdk-ci] [PATCH 7/7] tests: add checkpatch Thomas Monjalon
2016-12-01 13:44 ` [dpdk-ci] [PATCH v2 0/7] first scripts for CI integration Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 1/7] tools: add mail filter Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 2/7] tools: add mail parser Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 3/7] config: add loader and template Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 4/7] tools: add patchwork client Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 5/7] tools: add per-patch report mailer Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 6/7] tools: add patchwork integration Thomas Monjalon
2016-12-01 13:44   ` [dpdk-ci] [PATCH v2 7/7] tests: add checkpatch Thomas Monjalon
2016-12-01 16:58   ` [dpdk-ci] [PATCH v3 0/7] first scripts for CI integration Thomas Monjalon
2016-12-01 16:58     ` [dpdk-ci] [PATCH v3 1/7] tools: add mail filter Thomas Monjalon
2016-12-01 16:58     ` [dpdk-ci] [PATCH v3 2/7] tools: add mail parser Thomas Monjalon
2016-12-01 16:58     ` [dpdk-ci] [PATCH v3 3/7] config: add loader and template Thomas Monjalon
2016-12-01 16:58     ` [dpdk-ci] [PATCH v3 4/7] tools: add patchwork client Thomas Monjalon
2016-12-01 16:58     ` [dpdk-ci] [PATCH v3 5/7] tools: add per-patch report mailer Thomas Monjalon
2016-12-01 16:59     ` [dpdk-ci] [PATCH v3 6/7] tools: add patchwork integration Thomas Monjalon
2016-12-01 16:59     ` [dpdk-ci] [PATCH v3 7/7] tests: add checkpatch Thomas Monjalon
2016-12-05 13:26   ` [dpdk-ci] [PATCH v4 0/7] first scripts for CI integration Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 1/7] tools: add mail filter Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 2/7] tools: add mail parser Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 3/7] config: add loader and template Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 4/7] tools: add patchwork client Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 5/7] tools: add per-patch report mailer Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 6/7] tools: add patchwork integration Thomas Monjalon
2016-12-05 13:26     ` [dpdk-ci] [PATCH v4 7/7] tests: add checkpatch Thomas Monjalon
2016-12-06  6:34       ` Wei, FangfangX
2016-12-06  8:40         ` Thomas Monjalon
2016-12-06  9:04           ` Wei, FangfangX
2016-12-07  5:48           ` Wei, FangfangX
2016-12-07  9:32             ` Thomas Monjalon
2016-12-08  9:02               ` Wei, FangfangX
2016-12-08 13:11                 ` Thomas Monjalon
2016-12-09  8:51                   ` Wei, FangfangX
2016-12-09  9:16                     ` Thomas Monjalon
2016-12-09 10:07                       ` Mcnamara, John
2016-12-09 10:11                         ` Thomas Monjalon
2016-12-09 12:11                           ` Mcnamara, John [this message]
2016-12-12  9:27                       ` Wei, FangfangX
2016-12-12  9:34                         ` Wei, FangfangX
2016-12-12  9:58                           ` Thomas Monjalon
2016-12-13  8:29                             ` Wei, FangfangX
2016-12-13  8:49                               ` Thomas Monjalon
2016-12-13  9:24                                 ` Wei, FangfangX
2016-12-21 11:45                                   ` Thomas Monjalon
2016-12-12  9:39                         ` Thomas Monjalon
2016-12-13  8:22                           ` Wei, FangfangX
2016-12-14 23:05     ` [dpdk-ci] [PATCH v5 0/9] first scripts for CI integration Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 1/9] tools: add mail filter Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 2/9] tools: add mail parser Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 3/9] config: add loader and template Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 4/9] tools: add patchwork client Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 5/9] tools: fix pwclient for proxy and python 3 Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 6/9] tools: add patch mail download Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 7/9] tools: add per-patch report mailer Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 8/9] tools: add patchwork integration Thomas Monjalon
2016-12-14 23:05       ` [dpdk-ci] [PATCH v5 9/9] tests: add checkpatch Thomas Monjalon
2016-12-21 11:46       ` [dpdk-ci] [PATCH v5 0/9] first scripts for CI integration Thomas Monjalon

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B27915DBBA3421428155699D51E4CFE202671BC7@IRSMSX103.ger.corp.intel.com \
    --to=john.mcnamara@intel.com \
    --cc=ci@dpdk.org \
    --cc=fangfangx.wei@intel.com \
    --cc=qian.q.xu@intel.com \
    --cc=thomas.monjalon@6wind.com \
    --cc=weichunx.chen@intel.com \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK CI discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/ci/0 ci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ci ci/ http://inbox.dpdk.org/ci \
		ci@dpdk.org
	public-inbox-index ci


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.ci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox