From 3a08bda09969a3e49d796835e8c8898785c120ce Mon Sep 17 00:00:00 2001 From: tmaeno Date: Wed, 10 Feb 2021 09:49:55 +0100 Subject: [PATCH] for VOs sharing the same OIDC client --- pandatools/Client.py | 9 ++++++++- pandatools/PandaToolsPkgInfo.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandatools/Client.py b/pandatools/Client.py index 367a2627..94785df5 100755 --- a/pandatools/Client.py +++ b/pandatools/Client.py @@ -177,6 +177,7 @@ def get(self,url,data,rucioAccount=False, via_file=False): if self.authMode == 'oidc': self.get_id_token() com += ' -H "Authorization: Bearer {0}"'.format(self.idToken) + com += ' -H "Origin: {0}"'.format(self.authVO) else: if self.sslCert != '': com += ' --cert %s' % self.sslCert @@ -248,6 +249,7 @@ def post(self,url,data,rucioAccount=False, is_json=False, via_file=False): if self.authMode == 'oidc': self.get_id_token() com += ' -H "Authorization: Bearer {0}"'.format(self.idToken) + com += ' -H "Origin: {0}"'.format(self.authVO) else: if self.sslCert != '': com += ' --cert %s' % self.sslCert @@ -322,6 +324,7 @@ def put(self,url,data): if self.authMode == 'oidc': self.get_id_token() com += ' -H "Authorization: Bearer {0}"'.format(self.idToken) + com += ' -H "Origin: {0}"'.format(self.authVO) else: if self.sslCert != '': com += ' --cert %s' % self.sslCert @@ -1218,11 +1221,15 @@ def hello(verbose=False): # execute url = baseURLSSL + '/isAlive' try: - status,output = curl.post(url, {}) + status, output = curl.post(url, {}) if status != 0: msg = "Not good. " + output tmp_log.error(msg) return EC_Failed, msg + elif output != "alive=yes": + msg = "Not good. " + output + tmp_log.error(msg) + return EC_Failed, msg else: msg = "OK" tmp_log.info(msg) diff --git a/pandatools/PandaToolsPkgInfo.py b/pandatools/PandaToolsPkgInfo.py index c5029596..92903ce4 100644 --- a/pandatools/PandaToolsPkgInfo.py +++ b/pandatools/PandaToolsPkgInfo.py @@ -1 +1 @@ -release_version = "1.4.51" +release_version = "1.4.52"