Skip to content

Commit

Permalink
Clients: JSON-formatted output for domains; Fix #4027 (#4086)
Browse files Browse the repository at this point in the history
* Clients: JSON-formatted output for domains; Fix #4027
* fix for docker environment variable magic
  • Loading branch information
mlassnig committed Oct 27, 2020
1 parent c69c4d2 commit 62ec46b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
47 changes: 26 additions & 21 deletions bin/rucio-admin
@@ -1,5 +1,6 @@
#!/usr/bin/env python
# Copyright 2012-2020 CERN for the benefit of the ATLAS collaboration.
# -*- coding: utf-8 -*-
# Copyright 2012-2020 CERN
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,26 +15,27 @@
# limitations under the License.
#
# Authors:
# - Mario Lassnig, <mario.lassnig@cern.ch>, 2012-2020
# - Martin Barisits, <martin.barisits@cern.ch>, 2012-2020
# - Vincent Garonne, <vgaronne@gmail.com>, 2012-2018
# - Thomas Beermann, <thomas.beermann@cern.ch>, 2012-2013
# - Cedric Serfon, <cedric.serfon@cern.ch>, 2013-2020
# - Wen Guan, <wguan.icedew@gmail.com>, 2014
# - Ralph Vigne, <ralph.vigne@cern.ch>, 2014
# - David Cameron, <d.g.cameron@gmail.com>, 2014-2015
# - Cheng-Hsi Chao, <cheng-hsi.chao@cern.ch>, 2014
# - Joaquin Bogado, <jbogado@linti.unlp.edu.ar>, 2014-2015
# - Brian Bockelman, <bbockelm@cse.unl.edu>, 2017-2018
# - Nicolo Magini, <Nicolo.Magini@cern.ch>, 2018
# - Hannes Hansen, <hannes.jakob.hansen@cern.ch>, 2018-2019
# - Dimitrios Christidis, <dimitrios.christidis@cern.ch>, 2019-2020
# - Ruturaj Gujar, <ruturaj.gujar23@gmail.com>, 2019
# - Jaroslav Guenther <jaroslav.guenther@gmail.com>, 2019-2020
# - Mario Lassnig <mario.lassnig@cern.ch>, 2012-2020
# - Martin Barisits <martin.barisits@cern.ch>, 2012-2020
# - Vincent Garonne <vincent.garonne@cern.ch>, 2012-2018
# - Thomas Beermann <thomas.beermann@cern.ch>, 2012-2013
# - Cedric Serfon <cedric.serfon@cern.ch>, 2013-2020
# - Wen Guan <wen.guan@cern.ch>, 2014
# - Ralph Vigne <ralph.vigne@cern.ch>, 2014
# - David Cameron <david.cameron@cern.ch>, 2014-2015
# - Cheng-Hsi Chao <cheng-hsi.chao@cern.ch>, 2014
# - Joaquín Bogado <jbogado@linti.unlp.edu.ar>, 2014-2019
# - Brian Bockelman <bbockelm@cse.unl.edu>, 2017-2018
# - Tomas Javurek <tomas.javurek@cern.ch>, 2018
# - Nicolo Magini <nicolo.magini@cern.ch>, 2018
# - nataliaratnikova <natasha@fnal.gov>, 2018
# - Hannes Hansen <hannes.jakob.hansen@cern.ch>, 2018-2019
# - Dimitrios Christidis <dimitrios.christidis@cern.ch>, 2019-2020
# - Ruturaj Gujar <ruturaj.gujar23@gmail.com>, 2019
# - Brandon White <bjwhite@fnal.gov>, 2020
# - Jaroslav Guenther <jaroslav.guenther@cern.ch>, 2019-2020
# - Patrick Austin <patrick.austin@stfc.ac.uk>, 2020
# - Rob Barnsley <R.Barnsley@skatelescope.org>, 2020
#
# PY3K COMPATIBLE
# - Rob Barnsley <robbarnsley@users.noreply.github.com>, 2020

from __future__ import division
from __future__ import print_function
Expand Down Expand Up @@ -568,7 +570,10 @@ def info_rse(args):
for protocol in sorted(rseinfo['protocols'], key=lambda x: x['scheme']):
print(' ' + protocol['scheme'])
for item in sorted(protocol):
print(' ' + item + ': ' + str(protocol[item]))
if item == 'domains':
print(' ' + item + ': \'' + json.dumps(protocol[item]) + '\'')
else:
print(' ' + item + ': ' + str(protocol[item]))
print('Usage:')
print('======')
for elem in sorted(usage, key=lambda x: x['source']):
Expand Down
4 changes: 3 additions & 1 deletion etc/docker/test/centos7.Dockerfile
@@ -1,4 +1,4 @@
# Copyright 2017-2020 CERN for the benefit of the ATLAS collaboration.
# Copyright 2017-2020 CERN
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,8 @@

FROM centos:7
ARG PYTHON
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

RUN yum install -y epel-release.noarch && \
yum -y update && \
Expand Down

0 comments on commit 62ec46b

Please sign in to comment.