Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c838873
add PM doc
TaykYoku Nov 19, 2020
2028a19
move ProxyProviders&Registry from ConfReference to dirac.cfg
TaykYoku Nov 24, 2020
e6a419c
add user manage
TaykYoku Nov 24, 2020
69a5451
fix docs
TaykYoku Nov 28, 2020
87e0183
fix docs
TaykYoku Nov 28, 2020
32ee785
fix docs
TaykYoku Nov 29, 2020
54d658c
fix docs
TaykYoku Nov 29, 2020
b5bec64
Update FrameworkSystem/Client/ProxyManagerClient.py
TaykYoku Nov 30, 2020
04ef7b7
Update FrameworkSystem/ConfigTemplate.cfg
TaykYoku Nov 30, 2020
6d2e9c4
Update FrameworkSystem/DB/ProxyDB.py
TaykYoku Nov 30, 2020
b26ab13
Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/…
TaykYoku Nov 30, 2020
0f70b63
Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/…
TaykYoku Nov 30, 2020
81e50b6
Update docs/source/AdministratorGuide/UserManagement/index.rst
TaykYoku Nov 30, 2020
b5fe0ca
add description
TaykYoku Nov 30, 2020
1661431
fix issues
TaykYoku Nov 30, 2020
744353c
move CommandReference content to scripts docs
TaykYoku Dec 1, 2020
77dbc3c
fix docs
TaykYoku Dec 1, 2020
9e34e13
fix witespace
TaykYoku Dec 2, 2020
bd7aa5a
fix witespace
TaykYoku Dec 2, 2020
05be08f
Update Interfaces/scripts/dirac-admin-add-group.py
TaykYoku Dec 8, 2020
1e19250
Update Interfaces/scripts/dirac-admin-add-host.py
TaykYoku Dec 8, 2020
58de564
Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/…
TaykYoku Dec 8, 2020
e7498c3
Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/…
TaykYoku Dec 8, 2020
373dce4
Update docs/source/AdministratorGuide/UserManagement/index.rst
TaykYoku Dec 8, 2020
c5f00dc
Update docs/source/AdministratorGuide/UserManagement/index.rst
TaykYoku Dec 8, 2020
b4d07a0
fix issues
TaykYoku Dec 8, 2020
c59b074
fix scripts
TaykYoku Dec 9, 2020
25f26d6
remove dirac-version, fix docs
TaykYoku Dec 14, 2020
46e1dc4
fix docs
TaykYoku Dec 14, 2020
6b892c7
fix docs
TaykYoku Dec 14, 2020
def0586
add help, fix dirac-platform
TaykYoku Jan 5, 2021
8bde7b0
add help, fix dirac-version
TaykYoku Jan 5, 2021
e4e6459
fix dirac-platform
TaykYoku Jan 5, 2021
d4daa7a
fix cmd index
TaykYoku Jan 6, 2021
387ce58
cleaning NOTICE: for scripts help doc
TaykYoku Jan 7, 2021
fed2d94
move dirac.cfg to build
TaykYoku Jan 8, 2021
b09bbd5
fix build
TaykYoku Jan 8, 2021
56e26f4
copy dirac.cfg to source
TaykYoku Jan 9, 2021
a29e91b
fix doc
TaykYoku Jan 10, 2021
0afe13d
fix doc
TaykYoku Jan 19, 2021
974df59
fix docs.conf
TaykYoku Jan 19, 2021
f529732
fix cmd module name
TaykYoku Jan 20, 2021
4c15f3e
fix doc
TaykYoku Jan 20, 2021
c7ceff8
cmd module to diraccmd
TaykYoku Jan 21, 2021
08d7224
fix dirac-deploy-scripts
TaykYoku Jan 22, 2021
0592197
diraccmd -> cmd
TaykYoku Jan 22, 2021
06c9ed3
fix ref
TaykYoku Jan 22, 2021
3985d06
use BEGIN in ConfigTemplate
TaykYoku Jan 22, 2021
4d93c24
fix ref
TaykYoku Jan 23, 2021
6a057c5
fix docs
TaykYoku Jan 29, 2021
7934bdc
fix whitespace
TaykYoku Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ConfigurationSystem/Agent/VOMS2CSAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- Sends report for performed operation to the VO administrator

The agent is performing its operations with credentials of the VO administrator as defined
in the ``/Registry/VO/<VO_name>`` configuration section. See also :ref:`registry_vo`.
in the ``/Registry/VO/<VO_name>`` configuration section.

The following options can be set for the VOMS2CSAgent.

Expand Down
26 changes: 15 additions & 11 deletions ConfigurationSystem/scripts/dirac-admin-add-site.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
Add a new DIRAC SiteName to DIRAC Configuration, including one or more CEs.
If site is already in the CS with another name, error message will be produced.
If site is already in the CS with the right name, only new CEs will be added.

Usage:

dirac-admin-add-site [option|cfgfile] ... DIRACSiteName GridSiteName CE [CE] ...

Arguments:

DIRACSiteName: Name of the site for DIRAC in the form GRID.LOCATION.COUNTRY (ie:LCG.CERN.ch)
GridSiteName: Name of the site in the Grid (ie: CERN-PROD)
CE: Name of the CE to be included in the site (ie: ce111.cern.ch)

Example:

$ dirac-admin-add-site LCG.IN2P3.fr IN2P3-Site
"""
__RCSID__ = "$Id$"

Expand All @@ -18,17 +32,7 @@

if __name__ == "__main__":

Script.setUsageMessage(
'\n'.join(
[
__doc__.split('\n')[1],
'Usage:',
' %s [option|cfgfile] ... DIRACSiteName GridSiteName CE [CE] ...' %
Script.scriptName,
'Arguments:',
' DIRACSiteName: Name of the site for DIRAC in the form GRID.LOCATION.COUNTRY (ie:LCG.CERN.ch)',
' GridSiteName: Name of the site in the Grid (ie: CERN-PROD)',
' CE: Name of the CE to be included in the site (ie: ce111.cern.ch)']))
Script.setUsageMessage(__doc__)
Script.parseCommandLine(ignoreErrors=True)
args = Script.getPositionalArgs()

Expand Down
37 changes: 13 additions & 24 deletions ConfigurationSystem/scripts/dirac-admin-sort-cs-sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
# Author : Matvey Sapunov
########################################################################
"""
Sort site names at CS in "/Resources" section. Sort can be alphabetic or by country postfix in a site name.
Alphabetic sort is default (i.e. LCG.IHEP.cn, LCG.IHEP.su, LCG.IN2P3.fr)
Sort site names at CS in "/Resources" section. Sort can be alphabetic or by country postfix in a site name.
Alphabetic sort is default (i.e. LCG.IHEP.cn, LCG.IHEP.su, LCG.IN2P3.fr)

Options:
-C --country Sort site names by country postfix (i.e. LCG.IHEP.cn, LCG.IN2P3.fr, LCG.IHEP.su)
-R --reverse Reverse the sort order
Usage:

Argument:
Name of the subsection in the CS '/Resources/Sites/' section to be sorted (i.e. LCG, DIRAC)
dirac-admin-sort-cs-sites [option|cfgfile] <Section>

Example: dirac-admin-sort-cs-sites -C DIRAC
Sort sites in subsection /Resources/Sites/DIRAC by country postfix
Optional arguments:

Section: Name of the subsection in '/Resources/Sites/' for sort (i.e. LCG DIRAC)

Example:

$ dirac-admin-sort-cs-sites -C CLOUDS DIRAC
sort site names by country postfix in '/Resources/Sites/CLOUDS' and '/Resources/Sites/DIRAC' subsection
"""
__RCSID__ = "$Id$"

Expand Down Expand Up @@ -50,27 +53,13 @@ def country(arg):
return cb[2]


Script.setUsageMessage(__doc__)
Script.registerSwitch(
"C",
"country",
"Sort site names by country postfix (i.e. LCG.IHEP.cn, LCG.IN2P3.fr, LCG.IHEP.su)",
sortBy)
Script.registerSwitch("R", "reverse", "Reverse the sort order", isReverse)

Script.setUsageMessage(
"\n".join(
[
__doc__.split("\n")[1],
"Usage:",
" %s [option|cfgfile] <Section>" %
Script.scriptName,
"Optional arguments:",
" Section: Name of the subsection in '/Resources/Sites/' for sort (i.e. LCG DIRAC)",
"Example:",
" dirac-admin-sort-cs-sites -C CLOUDS DIRAC",
" sort site names by country postfix in '/Resources/Sites/CLOUDS' and '/Resources/Sites/DIRAC' subsection",
""]))

Script.parseCommandLine(ignoreErrors=True)
args = Script.getPositionalArgs()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
# Author : Adria Casajus
########################################################################
"""
Dump DIRAC Configuration data
Dump DIRAC Configuration data

Usage:

dirac-configuration-dump-local-cache [option|cfgfile] ...

Example:

$ dirac-configuration-dump-local-cache -f /tmp/dump-conf.txt
"""
from __future__ import print_function

Expand Down Expand Up @@ -34,11 +42,9 @@ def setRaw(args):
return DIRAC.S_OK()


Script.setUsageMessage(__doc__)
Script.registerSwitch("f:", "file=", "Dump Configuration data into <file>", setFilename)
Script.registerSwitch("r", "raw", "Do not make any modification to the data", setRaw)
Script.setUsageMessage('\n'.join([__doc__.split('\n')[1],
'Usage:',
' %s [option|cfgfile] ...' % Script.scriptName, ]))
Script.parseCommandLine()

from DIRAC import gConfig, gLogger
Expand Down
14 changes: 11 additions & 3 deletions Core/scripts/dirac-agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@
# File : dirac-agent
# Author : Adria Casajus, Andrei Tsaregorodtsev, Stuart Paterson
########################################################################
__RCSID__ = "$Id$"
"""
This is a script to launch DIRAC agents. Mostly internal.

Usage::

dirac-agent (<options>|<cfgFile>)*

""" This is a script to launch DIRAC agents
"""

__RCSID__ = "$Id$"

import sys
from DIRAC.ConfigurationSystem.Client.LocalConfiguration import LocalConfiguration

from DIRAC import gLogger
from DIRAC.Core.Base.AgentReactor import AgentReactor
from DIRAC.Core.Utilities.DErrno import includeExtensionErrors
from DIRAC.ConfigurationSystem.Client.LocalConfiguration import LocalConfiguration

localCfg = LocalConfiguration()
localCfg.setUsageMessage(__doc__)

positionalArgs = localCfg.getPositionalArguments()
if len(positionalArgs) == 0:
Expand Down
55 changes: 44 additions & 11 deletions Core/scripts/dirac-deploy-scripts.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,52 @@
#!/usr/bin/env python
"""
Deploy all scripts and extensions
Options:
* --symlink: this will create symlinks instead of wrappers
* <python path>: you can specify the folder where your python installation should be fetched from
Deploy all scripts and extensions.
This script is not meant to be called by users (it's automatically called by dirac-install).

Usage::

dirac-deploy-scripts (<options>|<cfgFile>)* ... <python path>

Arguments::
python path: you can specify the folder where your python installation should be fetched from
to replace the shebang

Example::

$ dirac-deploy-scripts
"""
from __future__ import print_function

__RCSID__ = "$Id$"

import getopt
import os
import shutil
import stat
import re
import sys
import stat
import getopt
import shutil
import platform

cmdOpts = (('', 'symlink', 'this will create symlinks instead of wrappers'),
('', 'module=', 'module in which to look for the scripts'),
('h', 'help', 'help doc string'))


def usage(err=''):
""" Usage printout

:param str err: will print something like "option -a not recognized"
"""
if err:
print(err)
print(__doc__)
print('Options::\n\n')
for cmdOpt in cmdOpts:
print(" %s %s : %s" % (cmdOpt[0].ljust(3), cmdOpt[1].ljust(20), cmdOpt[2]))

sys.exit(2 if err else 0)


DEBUG = False

moduleSuffix = "DIRAC"
Expand Down Expand Up @@ -45,12 +75,15 @@
module = None

try:
opts, args = getopt.getopt(sys.argv[1:], "", ["symlink", "module="])
opts, args = getopt.getopt(sys.argv[1:],
"".join([opt[0] for opt in cmdOpts]),
[opt[1] for opt in cmdOpts])
except getopt.GetoptError as err:
# print help information and exit:
print(str(err)) # will print something like "option -a not recognized"
sys.exit(2)
# print help information and exit
usage(str(err))
for o, a in opts:
if o in ('-h', '--help'):
usage()
if o == "--symlink":
useSymlinks = True
elif o == "--module":
Expand Down
11 changes: 9 additions & 2 deletions Core/scripts/dirac-executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
# File : dirac-executor
# Author : Adria Casajus
########################################################################
__RCSID__ = "$Id$"
"""
This is a script to launch DIRAC executors

Usage::

dirac-executor (<options>|<cfgFile>)*

""" This is a script to launch DIRAC executors
"""

__RCSID__ = "$Id$"

import sys
from DIRAC.ConfigurationSystem.Client.LocalConfiguration import LocalConfiguration
from DIRAC import gLogger
from DIRAC.Core.Base.ExecutorReactor import ExecutorReactor
from DIRAC.Core.Utilities.DErrno import includeExtensionErrors

localCfg = LocalConfiguration()
localCfg.setUsageMessage(__doc__)

positionalArgs = localCfg.getPositionalArguments()
if len(positionalArgs) == 0:
Expand Down
34 changes: 29 additions & 5 deletions Core/scripts/dirac-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
# Author : Andrei Tsaregorodtsev
########################################################################
"""
Report info about local DIRAC installation
Report info about local DIRAC installation

Usage:

dirac-info [option|cfgfile] ... Site

Example:

$ dirac-info
DIRAC version : v5r12
Setup : Dirac-Production
ConfigurationServer : ['dips://dirac.in2p3.fr:9135/Configuration/Server']
VirtualOrganization : vo.formation.idgrilles.fr
"""

from __future__ import print_function
Expand All @@ -19,11 +31,23 @@
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getVOForGroup
from DIRAC.Core.Utilities.PrettyPrint import printTable

Script.setUsageMessage('\n'.join([__doc__.split('\n')[1],
'Usage:',
' %s [option|cfgfile] ... Site' % Script.scriptName, ]))

def version(arg):
Script.disableCS()
print(DIRAC.version)
DIRAC.exit(0)


def platform(arg):
Script.disableCS()
print(DIRAC.getPlatform())
DIRAC.exit(0)


Script.setUsageMessage(__doc__)
Script.registerSwitch("v", "version", "print version of current DIRAC installation", version)
Script.registerSwitch("p", "platform", "print platform of current DIRAC installation", platform)
Script.parseCommandLine(ignoreErrors=True)
args = Script.getPositionalArgs()

records = []

Expand Down
29 changes: 14 additions & 15 deletions Core/scripts/dirac-install-extension.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
#!/usr/bin/env python
""" dirac-install-extension command allows to add a specified extension
to an already existing DIRAC installation. No new version directory is created.
The command is based on the main DIRAC installer dirac-install.py.
"""
Allows to add a specified extension to an already existing DIRAC installation.
The extension can come from another project than the one installed.
No new version directory is created. The command is based on the main DIRAC installer dirac-install.py.

Usage::

The valid options are:
dirac-install-extension (<options>|<cfgFile>)*

-l <project> - the project in which the extension is developed
-r <release> - the project release version
-e <extension> - the extension name. Several -e options can be given
"""

from __future__ import unicode_literals, absolute_import, division, print_function

import os
import sys
import importlib
import getopt
import time
import six
import time
import getopt
import importlib

cmdOpts = (('r:', 'release=', 'Release version to install'),
('l:', 'project=', 'Project to install'),
('e:', 'extensions=', 'Extensions to install (comma separated)'),
('e:', 'extensions=', 'Extensions to install (comma separated). Several -e options can be given'),
('M:', 'defaultsURL=', 'Where to retrieve the global defaults from'),
('h', 'help', 'help doc string'))


def usage():
""" Usage printout
"""
print("\nThe command allows to add a specified extension to an already existing DIRAC installation.\n"
"The extension can come from another project than the one installed.")
print("\nUsage:\n\n %s <opts> <cfgFile>" % os.path.basename(sys.argv[0]))
print("\nOptions:")
print(__doc__)
print('Options::\n\n')
for cmdOpt in cmdOpts:
print(" %s %s : %s" % (cmdOpt[0].ljust(3), cmdOpt[1].ljust(20), cmdOpt[2]))

Expand Down
Loading