From c8388738c71b76c9e3a7b70f86589d9715075864 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Thu, 19 Nov 2020 21:56:51 +0100 Subject: [PATCH 01/51] add PM doc --- .../Systems/Framework/ProxyManager/index.rst | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst new file mode 100644 index 00000000000..f2d2262d860 --- /dev/null +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -0,0 +1,7 @@ +.. _framework_proxymanager: + + +The Framework/ProxyManager service +================================== + +The ProxyManager service provide users proxy management: From 2028a19855683f216abdfefa58f0d34aedf0d6f4 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 24 Nov 2020 12:46:20 +0100 Subject: [PATCH 02/51] move ProxyProviders&Registry from ConfReference to dirac.cfg --- FrameworkSystem/Client/ProxyManagerClient.py | 5 +- FrameworkSystem/ConfigTemplate.cfg | 4 + FrameworkSystem/DB/ProxyDB.py | 12 +- .../Service/ProxyManagerHandler.py | 9 +- dirac.cfg | 255 +++++++++++++++++- .../ConfReference/Registry/Groups/index.rst | 59 ---- .../ConfReference/Registry/Hosts/index.rst | 25 -- .../ConfReference/Registry/Users/index.rst | 35 --- .../ConfReference/Registry/VO/index.rst | 45 ---- .../ConfReference/Registry/index.rst | 28 -- .../Resources/ProxyProviders/index.rst | 95 ------- .../Framework/Services/ProxyManager/index.rst | 11 - .../AdministratorGuide/HowTo/multiVO.rst | 4 + .../Systems/Configuration/index.rst | 2 + .../Systems/Framework/ProxyManager/index.rst | 31 ++- .../Systems/Framework/index.rst | 1 + docs/source/AdministratorGuide/index.rst | 1 + 17 files changed, 316 insertions(+), 306 deletions(-) delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Groups/index.rst delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Hosts/index.rst delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Users/index.rst delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Registry/VO/index.rst delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Registry/index.rst delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Resources/ProxyProviders/index.rst delete mode 100644 docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/ProxyManager/index.rst diff --git a/FrameworkSystem/Client/ProxyManagerClient.py b/FrameworkSystem/Client/ProxyManagerClient.py index 67a7ddbf71d..932cc586ec6 100755 --- a/FrameworkSystem/Client/ProxyManagerClient.py +++ b/FrameworkSystem/Client/ProxyManagerClient.py @@ -1,4 +1,7 @@ -""" ProxyManagemerClient has the function to "talk" to the ProxyManagemer service +""" ProxyManagemerClient has the function to "talk" to the ProxyManager service + (:mod:`~DIRAC.FrameworkSystem.Service.ProxyManagerHandler`). + This inherits the DIRAC base Client for direct execution of server functionality. + Client also contain caching of the requested proxy information. """ import six import os diff --git a/FrameworkSystem/ConfigTemplate.cfg b/FrameworkSystem/ConfigTemplate.cfg index 2e6f9a7865c..35755d438eb 100644 --- a/FrameworkSystem/ConfigTemplate.cfg +++ b/FrameworkSystem/ConfigTemplate.cfg @@ -13,10 +13,13 @@ Services storeHostInfo = Operator } } + ##BEGIN ProxyManager + # Section to describe ProxyManeger system ProxyManager { Port = 9152 MaxThreads = 100 + UseMyProxy = False getVOMSProxyWithTokenMaxThreads = 2 Authorization { @@ -37,6 +40,7 @@ Services setPersistency = ProxyManagement } } + ##END SecurityLogging { Port = 9153 diff --git a/FrameworkSystem/DB/ProxyDB.py b/FrameworkSystem/DB/ProxyDB.py index d27ff245615..60cb20e33d3 100755 --- a/FrameworkSystem/DB/ProxyDB.py +++ b/FrameworkSystem/DB/ProxyDB.py @@ -1,4 +1,14 @@ -""" ProxyRepository class is a front-end to the proxy repository Database +""" ProxyDB class is a front-end to the proxy database. + + Database contains the following tables:: + + *ProxyDB_Requests -- a delegation requests storage table for a given proxy Chain + *ProxyDB_CleanProxies -- table for storing proxies in "clean" form, ie without the presence of DIRAC and VOMS extensions. + *ProxyDB_Proxies -- obsolete table for storing proxies with already added DIRAC group extension, it is present only for backward compatibility and is used only if ProxyDB_CleanProxies does not have the required proxy. + *ProxyDB_VOMSProxies -- proxy storage table with VOMS extension already added. + *ProxyDB_Log -- table with logs. + *ProxyDB_Tokens -- token storage table for proxy requests. + *ProxyDB_ExpNotifs -- a table for accumulating proxy expiration notifications. """ __RCSID__ = "$Id$" diff --git a/FrameworkSystem/Service/ProxyManagerHandler.py b/FrameworkSystem/Service/ProxyManagerHandler.py index eaee0640179..7b9c67a5ef0 100644 --- a/FrameworkSystem/Service/ProxyManagerHandler.py +++ b/FrameworkSystem/Service/ProxyManagerHandler.py @@ -1,5 +1,10 @@ -""" ProxyManager is the implementation of the ProxyManagement service - in the DISET framework +""" ProxyManager is the implementation of the ProxyManagement service in the DISET framework + + .. literalinclude:: ../ConfigTemplate.cfg + :start-after: ##BEGIN ProxyManager + :end-before: ##END + :dedent: 2 + :caption: ProxyManager options """ __RCSID__ = "$Id$" diff --git a/dirac.cfg b/dirac.cfg index 6c6d56a6528..d8fa82d4ad9 100644 --- a/dirac.cfg +++ b/dirac.cfg @@ -1,3 +1,182 @@ +# Sections to register VOs, groups, users and hosts +# https://dirac.readthedocs.org/en/latest/AdministratorGuide/UserManagement.html +Registry +{ + + ##BEGIN Registry + # Default user group to be used: + DefaultGroup = lhcb_user + + # Querantine user group is usually to be used in case you want to set + # users in groups by hand as a "punishment" for a certain period of time: + QuarantineGroup = lowPriority_user + + # Default proxy time expressed in seconds: + DefaultProxyTime = 4000 + ##END + + # Trusted hosts section, subsections represents host name of the DIRAC secondary servers + Hosts + { + + dirac.host.com + { + + # Host distinguish name obtained from host certificate + DN = /O=MyOrg/OU=Unity/CN=dirac.host.com + + # Properties associated with the host + Properties = JobAdministrator + Properties += FullDelegation + Properties += Operator + Properties += CSAdministrator + Properties += ProductionManagement + Properties += AlarmsManagement + Properties += ProxyManagement + Properties += TrustedHost + } + } + ##BEGIN RegistryVO + # DIRAC VOs section, subsections represents name of the DIRAC VO or alias name of the real VOMS VO + VO + { + + # It is not manadatory for the DIRAC VO to have the same name as the corresponding VOMS VO + lhcb + { + + # VO administrator user name, that also MUST be registred(/Registry/Users section) + VOAdmin = lhcbadmin + + # VO administrator group used for querying VOMS server. + # If not specified, the VO "DefaultGroup" will be used + VOAdminGroup = lhcb_admin + + # Real VOMS VO name, if this VO is associated with VOMS VO + VOMSName = lhcb + + # Default Submit Pools for the users belonging to the VO + SubmitPools = lhcbPool + + # Section to describe all the VOMS servers that can be used with the given VOMS VO + VOMSServers + { + + # The host name of the VOMS server + cclcgvomsli01.in2p3.fr + { + + # DN of the VOMS server certificate + DN = /O=GRID-FR/C=FR/O=CNRS/OU=CC-IN2P3/CN=cclcgvomsli01.in2p3.fr + + # The VOMS server port + Port = 15003 + + # CA that issued the VOMS server certificate + CA = /C=FR/O=CNRS/CN=GRID2-FR + } + } + } + } + ##END + + ##BEGIN RegistryGroups + # DIRAC groups section, subsections represents the name of the group + Groups + { + + # Group for the common user + lhcb_user + { + + # DIRAC users logins than belongs to the group + Users = lhcbuser1 + + # Group properties(set permissions of the group users) + Properties = NormalUser # Normal user operations + + # Permission to download proxy with this group, by default: True + DownloadableProxy = False + + # Role of the users in the VO + VOMSRole = /lhcb + + # Virtual organization associated with the group + VOMSVO = lhcb + + # Just for normal users: + JobShare = 200 + + # Controls automatic Proxy upload by dirac-proxy-init: + AutoUploadProxy = True + + # Controls automatic Proxy upload by dirac-proxy-init for Pilot groups: + AutoUploadPilotProxy = True + + # Controls automatic addition of VOMS extension by dirac-proxy-init: + AutoAddVOMS = True + } + + # Group to submit pilot jobs + lhcb_pilot + { + Properties = GenericPilot # Generic pilot + Properties += LimitedDelegation # Allow getting only limited proxies (ie. pilots) + Properties += Pilot # Private pilot + } + + # Admin group + lhcb_admin + { + Properties = AlarmsManagement # Allow to set notifications and manage alarms + Properties += ServiceAdministrator # DIRAC Service Administrator + Properties += CSAdministrator # possibility to edit the Configuration Service + Properties += JobAdministrator # Job Administrator can manipulate everybody's jobs + Properties += FullDelegation # Allow getting full delegated proxies + Properties += ProxyManagement # Allow managing proxies + Properties += Operator # Operator + } + ##END + + ##BEGIN RegistryUsers + # DIRAC users section, subsections represents the name of the user + Users + { + + lhcbuser1 + { + # Distinguish name obtained from user certificate (Mandatory) + DN = /O=My organisation/C=FR/OU=Unit/CN=My Name + + # User e-mail (Mandatory) + Email = my@email.com + + # Cellular phone number + mobile = +030621555555 + + # Quota assigned to the user. Expressed in MBs. + Quota = 300 + + # This subsection describes the properties associated with each DN attribute (optional) + DNProperties + { + + # Arbitrary section name + DNSubsection + { + + # Distinguish name obtained from user certificate (Mandatory) + DN = /O=My organisation/C=FR/OU=Unit/CN=My Name + + # Proxy provider that can generate the proxy certificate with DN in DN attribute. + ProxyProviders = MY_DIRACCA + } + } + } + } + ##END +} + Systems { # the systems section is automatically obtained from the ConfigTemplate.cfg files and can be found at @@ -15,7 +194,7 @@ Systems MaxAttemptsPerFile = 256 # Max number of attempt per file DeleteGraceDays = 180 # days before removing jobs DeleteLimitPerCycle = 100 # Max number of deletes per cycle - KickAssignedHours = 1 # hours before kicking jobs with old assignment tag + KickAssignedHours = 1 # hours before kicking jobs with old assignment tag KickLimitPerCycle = 100 # Max number of kicks per cycle } @@ -216,6 +395,80 @@ Systems } Resources { + # Section for proxy providers, subsections is the names of the proxy providers + ProxyProviders + { + + MY_DIRACCA + { + + # Type of proxy provider + ProviderType = DIRACCA + + # Path to certificate file of CA + CertFile = /opt/dirac/etc/grid-security/DIRACCA-EOSH/cert.pem + + # Path to certificate key file of CA + KeyFile = /opt/dirac/etc/grid-security/DIRACCA-EOSH/key.pem + + # The distinguished name fields that must contain the exact same contents as that field in the CA's + # DN. If this parameter is not specified, the default value will be a empty list. + Match = O, OU + + # The distinguished name fields list that must be present. If this parameter is not specified, the + # default value will be a "CN". + Supplied = C, CN + + # The distinguished name fields list that are allowed, but not required. If this parameter is not + # specified, the default value will be a "C, O, OU, emailAddress" + Optional = emailAddress + + # Order of the distinguished name fields in a created user certificate. If this parameter is not + # specified, the default value will be a "C, O, OU, CN, emailAddress" + DNOrder = C, O, OU, emailAddress, CN + + # DN attributes that will be use to create user proxy + C = FR + O = DIRAC + OU = DIRAC TEST + + # The path to the openssl configuration file. This is optional and not recomended to use. + # But if you choose to use this option, it is recommended to use a relatively simple configuration + CAConfigFile = /opt/dirac/pro/etc/openssl_config_ca.cnf + } + + MY_PUSP + { + + ProviderType = DIRACCA + + # PUSP service URL + ServiceURL = https://mypuspserver.com/ + } + + MY_OAuth2 + { + + ProviderType = OAuth2 + + # Authorization server's issuer identifier URL + issuer = https://masterportal-pilot.aai.egi.eu/mp-oa2-server + + # Identifier of OAuth client + client_id = myproxy:oa4mp,2012:/client_id/aca7c8dfh439fewjb298fdb + + # Secret key of OAuth client + client_secret = ISh-Q32bkXRf-HD2hdh93d-hd20DH2-wqedwiU@S22 + + # OAuth2 parameter specified in https://tools.ietf.org/html/rfc6749 + prompt = consent + + # Some specific parameter for specific proxy provider + max_proxylifetime = 864000 + proxy_endpoint = https://masterportal-pilot.aai.egi.eu/mp-oa2-server/getproxy + } + + } #Where all your Catalogs are defined FileCatalogs { diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Groups/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Groups/index.rst deleted file mode 100644 index a53ed3c1d92..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Groups/index.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. _dirac-registry-cs: - -Registry / Groups - Subsections -=============================== - -This subsection is used to describe DIRAC groups registered in the server. - -+----------------------------------+------------------------------------------------+-----------------------------+ -| **Name** | **Description** | **Example** | -+----------------------------------+------------------------------------------------+-----------------------------+ -| ** | Subsection, represents the name of the group | dirac_user | -+----------------------------------+------------------------------------------------+-----------------------------+ -| */Users* | DIRAC users logins than belongs to the group | Users = atsareg | -| | | Users += msapunov | -+----------------------------------+------------------------------------------------+-----------------------------+ -| */Properties* | Properties of the group, this will change | Properties = NormalUser | -| | the permissions of the group. | | -+----------------------------------+------------------------------------------------+-----------------------------+ -| */DownloadableProxy* | Permission to download proxy with this group, | DownloadableProxy = False | -| | by default it's True(downloadable) | | -+----------------------------------+------------------------------------------------+-----------------------------+ -| */VOMSRole* | Role of the users in the VO | VOMSRole = /biomed | -+----------------------------------+------------------------------------------------+-----------------------------+ -| */VOMSVO* | Virtual organization associated with the group | VOMSVO = biomed | -+----------------------------------+------------------------------------------------+-----------------------------+ -| *JobShare* | Just for normal users | JobShare = 200 | -+----------------------------------+------------------------------------------------+-----------------------------+ -| *AutoUploadProxy* | Controls automatic Proxy upload by | AutoUploadProxy = True | -| | dirac-proxy-init | | -+----------------------------------+------------------------------------------------+-----------------------------+ -| *AutoUploadPilotProxy* | Controls automatic Proxy upload by | AutoUploadPilotProxy = True | -| | dirac-proxy-init for Pilot groups | | -+----------------------------------+------------------------------------------------+-----------------------------+ -| *AutoAddVOMS* | Controls automatic addition of VOMS | AutoAddVOMS = True | -| | extension by dirac-proxy-init | | -+----------------------------------+------------------------------------------------+-----------------------------+ - - -* Default properties by group: - - ** dirac_admin: - - - Properties = AlarmsManagement - - Properties += ServiceAdministrator - - Properties += CSAdministrator - - Properties += JobAdministrator - - Properties += FullDelegation - - Properties += ProxyManagement - - Properties += Operator - - ** dirac_pilot - - - Properties = GenericPilot - - Properties += LimitedDelegation - - Properties += Pilot - - ** dirac_user - - - Properties = NormalUser diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Hosts/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Hosts/index.rst deleted file mode 100644 index c329258aa7f..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Hosts/index.rst +++ /dev/null @@ -1,25 +0,0 @@ -Registry / Hosts - Subsections -============================== - -In this section each trusted hosts (DIRAC secondary servers) are described using simple attributes. - -A subsection called as DIRAC host name must be created and inside of this the following attributes -must be included: - -+--------------------------------+------------------------------------------+-----------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+--------------------------------+------------------------------------------+-----------------------------------------------------------+ -| ** | Subsection DIRAC host name | host-dirac.in2p3.fr | -+--------------------------------+------------------------------------------+-----------------------------------------------------------+ -| */DN* | Host distinguish name obtained from host | DN = /O=GRID-FR/C=FR/O=CNRS/OU=CC-IN2P3/CN=dirac.in2p3.fr | -| | certificate | | -+--------------------------------+------------------------------------------+-----------------------------------------------------------+ -| */Properties* | Properties associated with the host | Properties = JobAdministrator | -| | | Properties += FullDelegation | -| | | Properties += Operator | -| | | Properties += CSAdministrator | -| | | Properties += ProductionManagement | -| | | Properties += AlarmsManagement | -| | | Properties += ProxyManagement | -| | | Properties += TrustedHost | -+--------------------------------+------------------------------------------+-----------------------------------------------------------+ diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Users/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Users/index.rst deleted file mode 100644 index f5082852083..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/Users/index.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. _registryUsers: - -Registry / Users - Subsections -============================== - -In this section each user is described using simple attributes. An subsection with the DIRAC user name must be created. Some of the attributes than can -be included are mandatory and others are considered as helpers: - -+----------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+----------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| */DN* | Distinguish name obtained from user certificate | DN = /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Andrei Tsaregorodtsev | -| | (Mandatory) | | -+----------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| */Email* | User e-mail (Mandatory) | Email = atsareg@in2p3.fr | -+----------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| */mobile* | Cellular phone number | mobile = +030621555555 | -+----------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| */Quota* | Quota assigned to the user. Expressed in MBs. | Quota = 300 | -+----------------------------+-------------------------------------------------+--------------------------------------------------------------+ - -DNProperties - subsection -------------------------- - -The `Registry/Users//DNProperties` subsection describes the properties associated with each DN attribute. - -+-----------------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+-----------------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| */DN* | Distinguish name obtained from user certificate | DN = /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Andrei Tsaregorodtsev | -| | (Mandatory) | | -+-----------------------------------+-------------------------------------------------+--------------------------------------------------------------+ -| */ProxyProviders* | Proxy provider that can generate the proxy | ProxyProviders = MY_DIRACCA | -| | certificate with DN in DN attribute. | | -+-----------------------------------+-------------------------------------------------+--------------------------------------------------------------+ diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/VO/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/VO/index.rst deleted file mode 100644 index 0899b44bbcc..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/VO/index.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. _registry_vo: - -Registry / VO - Subsections -============================== - -In this section each Virtual Organization (VO) is described in a dedicated subsection. -The VO is a term coming from grid infrastructures where VO parameters are handled -by the VOMS services. In DIRAC VO is not necessarily corresponding to some VOMS -described VO. However, the VO options can include specific VOMS information. It is -not manadatory for the DIRAC VO to have the same name as the corresponding VOMS VO. -However, having these names the same can avoid confusions at the expense of having -names longer than necessary. - - -+----------------------------+------------------------------------------------------+--------------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+----------------------------+------------------------------------------------------+--------------------------------------------------------------+ -| */VOAdmin* | VO administrator user name | VOAdmin = joel | -+----------------------------+------------------------------------------------------+--------------------------------------------------------------+ -| */VOAdminGroup* | VO administrator group used for querying VOMS server | VOAdminGroup = lhcb_admin | -| | If not specified, the VO "DefaultGroup" will be used | | -+----------------------------+------------------------------------------------------+--------------------------------------------------------------+ -| */VOMSName* | VOMS VO name | VOMSName = lhcb | -+----------------------------+------------------------------------------------------+--------------------------------------------------------------+ -| */SubmitPools* | Default Submit Pools for the users belonging | SubmitPools = lhcbPool | -| | to the VO | | -+----------------------------+------------------------------------------------------+--------------------------------------------------------------+ - -VOMSServers subsection ------------------------- - -This subsection of the VO/ section contains parameters of all the VOMS servers that can -be used with the given . It has a subsection per each VOMS server ( ), the -name of the section is the host name of the VOMS server. These parameters are used in order -to create appropriate *vomses* and *vomsdir* directories when installing DIRAC clients. - -+----------------------------+--------------------------------------------+-------------------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+----------------------------+--------------------------------------------+-------------------------------------------------------------------+ -| */DN* | DN of the VOMS server certificate | DN = /O=GRID-FR/C=FR/O=CNRS/OU=CC-IN2P3/CN=cclcgvomsli01.in2p3.fr | -+----------------------------+--------------------------------------------+-------------------------------------------------------------------+ -| */Port* | The VOMS server port | Port = 15003 | -+----------------------------+--------------------------------------------+-------------------------------------------------------------------+ -| */CA* | CA that issued the VOMS server certificate | CA = /C=FR/O=CNRS/CN=GRID2-FR | -+----------------------------+--------------------------------------------+-------------------------------------------------------------------+ diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/index.rst deleted file mode 100644 index 531bfbc9277..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Registry/index.rst +++ /dev/null @@ -1,28 +0,0 @@ -Registry - Section -================== - -This section allows to register users, hosts and groups in DIRAC way. Also some attributes applicable for all -the configuration are defined. - -+---------------------------+-----------------------------------------+--------------------------------------------+ -| **Name** | **Description** | **Example** | -+---------------------------+-----------------------------------------+--------------------------------------------+ -| *DefaultGroup* | Default user group to be used | DefaultGroup = user | -+---------------------------+-----------------------------------------+--------------------------------------------+ -| *QuarantineGroup* | Querantine user group is usually | QuarantineGroup = lowPriority_user | -| | to be used in case you want to set | | -| | users in groups by hand | | -| | as a "punishment" for a certain period | | -| | of time | | -+---------------------------+-----------------------------------------+--------------------------------------------+ -| *DefaultProxyTime* | Default proxy time expressed in seconds | DefaultProxyTime = 4000 | -+---------------------------+-----------------------------------------+--------------------------------------------+ - - -.. toctree:: - :maxdepth: 2 - - Groups/index - Hosts/index - Users/index - VO/index diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/ProxyProviders/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/ProxyProviders/index.rst deleted file mode 100644 index 75c0840f7f1..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/ProxyProviders/index.rst +++ /dev/null @@ -1,95 +0,0 @@ -.. _resourcesProxyProviders: - -Resources / ProxyProviders -========================== - -In this section options for ProxyProviders can be set - - -Location for Parameters ------------------------ - -Subsections are instead used to describe proxy providers: - - /Resources/ProxyProviders/ - -Where `PROXY_PROVIDER_NAME` is the name of the proxy provider, like as "CheckInProxy" or "DIRAC_EOSC_CA". - -General Parameters ------------------- - -These parameters are valid for all types of proxy providers - -+---------------------------------+------------------------------------------------+-----------------------------------+ -| **Name** | **Description** | **Example** | -+---------------------------------+------------------------------------------------+-----------------------------------+ -| ProviderType | Type of proxy provider | OAuth2, DIRACCA, PUSP | -+---------------------------------+------------------------------------------------+-----------------------------------+ - - -OAuth2 Parameters ------------------ - -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ -| issuer | Authorization server's issuer identifier URL | https://masterportal-pilot.aai.egi.eu/mp-oa2-server | -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ -| client_id | Identifier of OAuth client | myproxy:oa4mp,2012:/client_id/aca7c8dfh439fewjb298fdb | -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ -| client_secret | Secret key of OAuth client | ISh-Q32bkXRf-HD2hdh93d(#hd20DH2-wqedwiU@S22 | -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ -| | Some parameter specified in OAuth2 authorization | prompt = consent | -| | framework(https://tools.ietf.org/html/rfc6749) | | -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ -| | Some specific parameter for specific proxy | max_proxylifetime = 864000 | -| | provider installation, e.g. CheckIns MasterPortal | proxy_endpoint = https://masterportal-pilot.aai.egi.eu/mp-oa2-server/getproxy | -+-------------------------+---------------------------------------------------+-------------------------------------------------------------------------------+ - - -DIRACCA Parameters ------------------- - -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| CertFile | Path to certificate file of CA | /opt/dirac/etc/grid-security/DIRACCA-EOSH/cert.pem | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| KeyFile | Path to certificate key file of CA | /opt/dirac/etc/grid-security/DIRACCA-EOSH/key.pem | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| Match | the distinguished name fields that must contain | O, OU | -| | the exact same contents as that field in the CA's | | -| | DN. If this parameter is not specified, the default| | -| | value will be a empty list. | | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| Supplied | the distinguished name fields list that must be | C, CN | -| | present. If this parameter is not specified, the | | -| | default value will be a "CN". | | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| Optional | the distinguished name fields list that are | emailAddress | -| | allowed, but not required. If this parameter is not| | -| | specified, the default value will be a | | -| | "C, O, OU, emailAddress". | | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| DNOrder | order of the distinguished name fields in a created| C, O, OU, emailAddress, CN | -| | user certificate. If this parameter is not | | -| | specified, the default value will be a | | -| | "C, O, OU, CN, emailAddress". | | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| | DN attributes that will be use to create user proxy| C = FR, O = DIRAC, OU = DIRAC TEST | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| CAConfigFile | the path to the openssl configuration file. | /opt/dirac/pro/etc/openssl_config_ca.cnf | -| | This is optional and not recomended to use. But if | | -| | you choose to use this option, it is recommended | | -| | to use a relatively simple configuration. | | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ - - -PUSP Parameters ------------------- - -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| **Name** | **Description** | **Example** | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ -| ServiceURL | PUSP service URL. | https://mypuspserver.com/ | -+------------------------+----------------------------------------------------+--------------------------------------------------------+ diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/ProxyManager/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/ProxyManager/index.rst deleted file mode 100644 index 1097894f621..00000000000 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/ProxyManager/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -Systems / Framework / / Service / ProxyManager - Sub-subsection -========================================================================== - - -ProxyManager is the implementation of the ProxyManagement service in the DISET framework. Using MyProxy server is not fully supported at the moment. - -+-----------------+------------------------------------------+----------------------------+ -| **Name** | **Description** | **Example** | -+-----------------+------------------------------------------+----------------------------+ -| *UseMyProxy* | Use myproxy server | UseMyProxy = False | -+-----------------+------------------------------------------+----------------------------+ diff --git a/docs/source/AdministratorGuide/HowTo/multiVO.rst b/docs/source/AdministratorGuide/HowTo/multiVO.rst index 6b642104364..27e637d73da 100644 --- a/docs/source/AdministratorGuide/HowTo/multiVO.rst +++ b/docs/source/AdministratorGuide/HowTo/multiVO.rst @@ -67,6 +67,8 @@ Add superb_user group DefaultGroup = superb_user } +.. _multi_vo_dirac_regVO: + Registry/VO ----------- :: @@ -92,6 +94,8 @@ Registry/VO } } +.. _multi_vo_dirac_regGroup: + Registry/Groups --------------- diff --git a/docs/source/AdministratorGuide/Systems/Configuration/index.rst b/docs/source/AdministratorGuide/Systems/Configuration/index.rst index 097d6cab7e6..7de685c2ece 100644 --- a/docs/source/AdministratorGuide/Systems/Configuration/index.rst +++ b/docs/source/AdministratorGuide/Systems/Configuration/index.rst @@ -1,3 +1,5 @@ +.. _configurationSystem: + ==================== Configuration System ==================== diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index f2d2262d860..b901731cf9f 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -1,7 +1,32 @@ .. _framework_proxymanager: +======================= +The ProxyManager system +======================= -The Framework/ProxyManager service -================================== +The ProxyManager(PM) system provide a users proxies management. This system allows to upload, delete and download proxies to the database. +This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. +The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. +It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. It is also possible to obtain a limited use proxy using tokens. -The ProxyManager service provide users proxy management: +Structure +========= + +The system consists of a client part :mod:`~DIRAC.FrameworkSystem.Client.ProxyManagerClient` that contains client access to +the production service :mod:`~DIRAC.FrameworkSystem.Service.ProxyManagerHandler` running on the server side, +which in turn communicates with the database :mod:`~DIRAC.FrameworkSystem.DB.ProxyDB`. +There are also commands and a web portal(:ref:`read how to install it `) interface for interaction with the user. +Consider each separately. + +Scripts +------- + +The following commands can be used to interact with this system to manage proxies:: + + *:ref:`dirac-admin-get-proxy ` + *:ref:`dirac-proxy-init ` + *:ref:`dirac-proxy-info ` + *:ref:`dirac-proxy-get-uploaded-info ` + *:ref:`dirac-admin-users-with-proxy ` + *dirac-admin-upload-proxy + *dirac-proxy-destroy diff --git a/docs/source/AdministratorGuide/Systems/Framework/index.rst b/docs/source/AdministratorGuide/Systems/Framework/index.rst index cf469664b34..7e70d1ca9dd 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/index.rst @@ -26,3 +26,4 @@ The following sections add some details for some of the Framework systems. ComponentMonitoring/index Monitoring/index Notification/index + ProxyManager/index diff --git a/docs/source/AdministratorGuide/index.rst b/docs/source/AdministratorGuide/index.rst index 6c646457755..5f78fe9b244 100644 --- a/docs/source/AdministratorGuide/index.rst +++ b/docs/source/AdministratorGuide/index.rst @@ -14,6 +14,7 @@ This administration documentation refers to the "Core" DIRAC project. :maxdepth: 2 Introduction/index + UserManagement/index ExternalsSupport/index ServerInstallations/index HowTo/index From e6a419c71b28318defbf0149f2fa1d638b00528c Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 24 Nov 2020 12:47:18 +0100 Subject: [PATCH 03/51] add user manage --- .../UserManagement/index.rst | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 docs/source/AdministratorGuide/UserManagement/index.rst diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst new file mode 100644 index 00000000000..465775d4550 --- /dev/null +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -0,0 +1,105 @@ +.. _admin_usermanagement: + + +User management Guides +====================== + +This section provides information you need for the user management. + +What are the components involved in that. +----------------------------------------- + + * Configuration system + * Registry + * VOMS2CSAgent + + +What is the user in DIRAC context? +---------------------------------- + +DIRAC users are entities that can be authenticated. In a fact it's a record in the **/Registry** section of the :ref:`Configuration system `. +Each user has a username as a unique identifier. Username can be created manually by administrator or automaticaly by scripts. +User contain attributes that desribed in the **/Registry/Users** section. To provide authentication user must have `DN` attribute, read more about :ref:`authentication `. +User has permissions. To describe permissions we use groups. + +What is the DIRAC groups? +------------------------- + +DIRAC groups collects DIRAC users and are described in the **/Registry/Groups** section, each subsection of the group is a description of the users permissions and rights for various Grid operations and +is associated with DIRAC Virtual Organization. The name of the DIRAC group usually consists of the DIRAC VO name and a word that describes the permissions for group users, +for example "dirac_user", "dirac_pilot", "dirac_admin". + +What is the DIRAC Virtual Organization(VO)? +------------------------------------------- + +The VO is a term coming from grid infrastructures where VO parameters are handled by the VOMS services. In DIRAC VO is not necessarily corresponding to some VOMS described VO. +However, the DIRAC VO describtion can include specific VOMS information. It is not manadatory for the DIRAC VO to have the same name as the corresponding VOMS VO. +However, having these names the same can avoid confusions at the expense of having names longer than necessary. DIRAC VO must be described in the **/Registry/VO** section. + +Consider the registration process +--------------------------------- + +User management has been provided by the Registry section of the Configuration System. To manage it you can use: + * dirac-admin commands to managing Registry + * configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) + * modify local cfg file manually (by default it located in /opt/dirac/etc/dirac.cfg) + * use the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent` to fetch VOMS VO users + +In a nutshell, how to edit the configuration from the portal. First, it should be noted that to be able to do this, +you must be an already registered user in a group that has the appropriate permission to edit the configuration("CSAdministrator"). +You need to log in under this user/group and use the Configuration Manager application, then enable the "Manage" mode, this will allow you to make changes. + +First of all, define, if necessary, some attributes at the root of the Registry section, that will be applicable for all the configuration are defined. + +.. literalinclude:: ../../../../dirac.cfg + :start-after: ##BEGIN Registry + :end-before: ##END + :dedent: 2 + :caption: Registry options + +To begin, consider how to add new VO to the **Registry/VO** section. Having all the necessary attributes VO you need to add it to the configuration. +One of the mandatory attributes of the VO is the **VOAdmin**(administrator of the VO), it must be registered as a DIRAC user(see the example below). +If the described VO is a VOMS VO, then it is important to note that the VO administrator should have an administrative role in the VOMS VO, +it is necessary to obtain relevant information from the VOMS servers regarding VO users. +In this case, the addition of VOMS VO is considered, respectively, there are attributes specific to VOMS. + +.. literalinclude:: ../../../../dirac.cfg + :start-after: ##BEGIN RegistryVO + :end-before: ##END + :dedent: 2 + :caption: VO description + +The next step is to create groups in the **Registry/Groups** section with the appropriate permissions. +It is usually necessary to have at least three groups:: + + *for regular users running tasks(e.g.: "dirac_user") + *to run pilot tasks(e.g.: "dirac_pilot") + *administrative group(e.g.: "dirac_admin") + +Permissions of the group users are determined by "Properties" option. Full description of all supported groups properties: :mod:`~DIRAC.Core.Security.Properties`. + +.. literalinclude:: ../../../../dirac.cfg + :start-after: ##BEGIN RegistryGroups + :end-before: ##END + :dedent: 2 + :caption: group description + +To add a new group you can use special DIRAC command that simplifies this action: +:ref:`dirac-admin-add-group `. + +Finally, create a user in the **Registry/Users** section: + +.. literalinclude:: ../../../../dirac.cfg + :start-after: ##BEGIN RegistryUsers + :end-before: ##END + :dedent: 2 + :caption: user description + +To add a new user you can use special DIRAC command that simplifies this action: +:ref:`dirac-admin-add-user `. + +.. toctree:: + :maxdepth: 1 + + authentication + multiVO From 69a54512cfdf3b674140954d9936db2f91eade06 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sat, 28 Nov 2020 15:31:33 +0100 Subject: [PATCH 04/51] fix docs --- .../ProxyProvider/DIRACCAProxyProvider.py | 19 ++--- Resources/ProxyProvider/PUSPProxyProvider.py | 6 ++ dirac.cfg | 36 ++++---- .../ConfigurationStructure/index.rst | 2 +- .../Resources/proxyprovider.rst | 82 +++---------------- .../Systems/Framework/ProxyManager/index.rst | 19 ++--- .../UserManagement/index.rst | 37 ++++----- 7 files changed, 76 insertions(+), 125 deletions(-) diff --git a/Resources/ProxyProvider/DIRACCAProxyProvider.py b/Resources/ProxyProvider/DIRACCAProxyProvider.py index 52ff58233f0..5c5f8be0fd5 100644 --- a/Resources/ProxyProvider/DIRACCAProxyProvider.py +++ b/Resources/ProxyProvider/DIRACCAProxyProvider.py @@ -3,18 +3,13 @@ This class is a simple, limited CA, its main purpose is to generate a simple proxy for DIRAC users who do not have any certificate register on the fly. - Required parameters in the DIRAC configuration for its implementation:: - - section: - - * ProviderType = DIRACCA, - * CertFile = , - * KeyFile = , - * Match = , # For ex.: 'Match = O, OU' - * Supplied = , - * Optional = , - * DNOrder = , # For ex.: 'DNOrder = O, OU, CN, emailAddress' - * : , # For ex.: 'OU = CA' + Required parameters in the DIRAC configuration for its implementation: + + .. literalinclude:: ../../../../dirac.cfg + :start-after: ## DIRACCA type: + :end-before: ## + :dedent: 2 + :caption: /Resources/ProxyProviders section Also, as an additional feature, this class can read properties from a simple openssl CA configuration file. To do this, just set the path to an existing configuration file as a CAConfigFile parameter. In this case, diff --git a/Resources/ProxyProvider/PUSPProxyProvider.py b/Resources/ProxyProvider/PUSPProxyProvider.py index b90fc13592d..1bb257ca008 100644 --- a/Resources/ProxyProvider/PUSPProxyProvider.py +++ b/Resources/ProxyProvider/PUSPProxyProvider.py @@ -1,5 +1,11 @@ """ ProxyProvider implementation for a per-user sub-proxy(PUSP) proxy generation using PUSP proxy server. More details about PUSP here: https://wiki.egi.eu/wiki/Usage_of_the_per_user_sub_proxy_in_EGI + + .. literalinclude:: ../../../../dirac.cfg + :start-after: ## PUSP type: + :end-before: ## + :dedent: 2 + :caption: /Resources/ProxyProviders section """ from six.moves.urllib.request import urlopen diff --git a/dirac.cfg b/dirac.cfg index d8fa82d4ad9..011d87669c9 100644 --- a/dirac.cfg +++ b/dirac.cfg @@ -3,7 +3,7 @@ Registry { - ##BEGIN Registry + ## Registry options: # Default user group to be used: DefaultGroup = lhcb_user @@ -13,7 +13,7 @@ Registry # Default proxy time expressed in seconds: DefaultProxyTime = 4000 - ##END + ## # Trusted hosts section, subsections represents host name of the DIRAC secondary servers Hosts @@ -36,7 +36,7 @@ Registry Properties += TrustedHost } } - ##BEGIN RegistryVO + ## VOs: # DIRAC VOs section, subsections represents name of the DIRAC VO or alias name of the real VOMS VO VO { @@ -78,9 +78,9 @@ Registry } } } - ##END + ## - ##BEGIN RegistryGroups + ## Groups: # DIRAC groups section, subsections represents the name of the group Groups { @@ -136,9 +136,9 @@ Registry Properties += ProxyManagement # Allow managing proxies Properties += Operator # Operator } - ##END + ## - ##BEGIN RegistryUsers + ## Users: # DIRAC users section, subsections represents the name of the user Users { @@ -174,7 +174,7 @@ Registry } } } - ##END + ## } Systems @@ -395,20 +395,22 @@ Systems } Resources { + # Section for proxy providers, subsections is the names of the proxy providers ProxyProviders { + ## DIRACCA type: MY_DIRACCA { - # Type of proxy provider + # Main option, to show which proxy provider type you want to register. ProviderType = DIRACCA - # Path to certificate file of CA + # The path to the CA certificate. This option is required. CertFile = /opt/dirac/etc/grid-security/DIRACCA-EOSH/cert.pem - # Path to certificate key file of CA + # The path to the CA key. This option is required. KeyFile = /opt/dirac/etc/grid-security/DIRACCA-EOSH/key.pem # The distinguished name fields that must contain the exact same contents as that field in the CA's @@ -427,16 +429,19 @@ Resources # specified, the default value will be a "C, O, OU, CN, emailAddress" DNOrder = C, O, OU, emailAddress, CN - # DN attributes that will be use to create user proxy + # To set default value for distinguished name field. C = FR O = DIRAC OU = DIRAC TEST # The path to the openssl configuration file. This is optional and not recomended to use. - # But if you choose to use this option, it is recommended to use a relatively simple configuration + # But if you choose to use this option, it is recommended to use a relatively simple configuration. + # All required parameters will be taken from the configuration file, except "DNOrder". CAConfigFile = /opt/dirac/pro/etc/openssl_config_ca.cnf } + ## + ## PUSP type: MY_PUSP { @@ -445,7 +450,9 @@ Resources # PUSP service URL ServiceURL = https://mypuspserver.com/ } + ## + ## OAuth2 type: MY_OAuth2 { @@ -467,8 +474,9 @@ Resources max_proxylifetime = 864000 proxy_endpoint = https://masterportal-pilot.aai.egi.eu/mp-oa2-server/getproxy } - + ## } + #Where all your Catalogs are defined FileCatalogs { diff --git a/docs/source/AdministratorGuide/Configuration/ConfigurationStructure/index.rst b/docs/source/AdministratorGuide/Configuration/ConfigurationStructure/index.rst index af35b2cec7b..e698d6aa1d4 100644 --- a/docs/source/AdministratorGuide/Configuration/ConfigurationStructure/index.rst +++ b/docs/source/AdministratorGuide/Configuration/ConfigurationStructure/index.rst @@ -28,7 +28,7 @@ At the top level of the Configuration tree there are the following sections: This section provides configuration data for all the DIRAC Systems, their instances and components - services, agents and databases. -:ref:`Registry ` +Registry The *Registry* contains information about DIRAC users, groups and communities (VOs). :ref:`Resources ` diff --git a/docs/source/AdministratorGuide/Resources/proxyprovider.rst b/docs/source/AdministratorGuide/Resources/proxyprovider.rst index f7fc7a5246d..1155eb1cab8 100644 --- a/docs/source/AdministratorGuide/Resources/proxyprovider.rst +++ b/docs/source/AdministratorGuide/Resources/proxyprovider.rst @@ -6,62 +6,17 @@ ProxyProvider This resource type provides an interface to obtain proxy certificates using a user identifier. The following proxy providers are presented here: ``DIRACCA``, ``PUSP``. When all users upload their proxies to proxy manager manually, you do not need to deploy these resources. The :ref:`registryUsers` section describes how to specify a proxy provifer for a user's DN. - +---------------------- DIRACCA proxy provider ---------------------- ProxyProvider implementation for the proxy generation using local Certification Authority (CA) credentials. DIRACCA type of the proxy provider is a simple CA, its main purpose is to generate a proxy on the fly for DIRAC users who do not have a certificate registered in DIRAC registry. To use it needs to have CA certificate and key locally. Here are two ways to set up this type of proxy provider in the DIRAC configuration: -Recommended way to set all required parameters in the DIRAC configuration:: - - Resources - { - ProxyProviders - { - MY_DIRAC_CA - { - ProviderType = DIRACCA - CertFile = /opt/dirac/pro/etc/grid-security/MY_DIRAC_CA.pem - KeyFile = /opt/dirac/pro/etc/grid-security/MY_DIRAC_CA.key.pem - Match = O, OU - Supplied = CN - Optional = emailAddress - DNOrder = O, OU, CN, emailAddress - } - } - } - -Configuration options are: - -* ``ProviderType``: main option, to show which proxy provider type you want to register. In the case of the DIRACCA proxy provider you must type ``DIRACCA``. -* ``CertFile``: the path to the CA certificate. This option is required. -* ``KeyFile``: the path to the CA key. This option is required. -* ``Match``: the distinguished name fields that must contain the exact same contents as that field in the CA's DN. If this parameter is not specified, the default value will be a empty list. -* ``Supplied``: the distinguished name fields list that must be present. If this parameter is not specified, the default value will be a ``CN``. -* ``Optional``: the distinguished name fields list that are allowed, but not required. If this parameter is not specified, the default value will be a ``C, O, OU, emailAddress``. -* ``DNOrder``: order of the distinguished name fields in a created user certificate. If this parameter is not specified, the default value will be a ``C, O, OU, CN, emailAddress``. -* ````: to set default value for distinguished name field, for example.: ``OU = MY, DIRAC``. - -Also, as an additional feature, this class can read properties from a simple openssl CA configuration file. To do this, just set the path to an existing openssl configuration file as a CAConfigFile parameter. Required parameters in the DIRAC configuration for its implementation:: - - Resources - { - ProxyProviders - { - CFG_DIRAC_CA - { - ProviderType = DIRACCA - CAConfigFile = /opt/dirac/pro/etc/openssl_config_ca.cnf - DNOrder = O, OU, CN, emailAddress - } - } - } - -Configuration options are: - -* ``ProviderType``: main option, to show which proxy provider type you want to register. In the case of the DIRACCA proxy provider you must type ``DIRACCA``. -* ``CAConfigFile``: the path to the openssl configuration file. This is optional and not recomended to use. But if you choose to use this option, it is recommended to use a relatively simple configuration. -* ``DNOrder``: order of the distinguished name fields in a created user certificate. If this parameter is not specified, the distinguished names order in the created proxy will be the same as in the configuration file policy block. +.. literalinclude:: ../../../../dirac.cfg + :start-after: ## DIRACCA type: + :end-before: ## + :dedent: 2 + :caption: /Resources/ProxyProviders section The Proxy provider supports the following distinguished names, `more details here `_: @@ -77,28 +32,17 @@ The Proxy provider supports the following distinguished names, `more details her * SP,ST(stateOrProvinceName) * SERIALNUMBER(serialNumber) - +------------------- PUSP proxy provider ------------------- -ProxyProvider implementation for a Per-User Sub-Proxy(PUSP) proxy generation using PUSP proxy server. `More details about PUSP here `_. Required parameters in the DIRAC configuration for its implementation:: - - Resources - { - ProxyProviders - { - PUSP_Prov - { - ProviderType = PUSP - ServiceURL = https://mypuspservice.url/ - } - } - } - -Configuration options are: +ProxyProvider implementation for a Per-User Sub-Proxy(PUSP) proxy generation using PUSP proxy server. `More details about PUSP here `_. Required parameters in the DIRAC configuration for its implementation: -* ``ProviderType``: main option, to show which proxy provider type you want to register. In the case of the PUSP proxy provider you must type ``PUSP``. -* ``ServiceURL``: PUSP service URL. +.. literalinclude:: ../../../../dirac.cfg + :start-after: ## PUSP type: + :end-before: ## + :dedent: 2 + :caption: /Resources/ProxyProviders section Usage diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index b901731cf9f..367803b570d 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -15,18 +15,17 @@ Structure The system consists of a client part :mod:`~DIRAC.FrameworkSystem.Client.ProxyManagerClient` that contains client access to the production service :mod:`~DIRAC.FrameworkSystem.Service.ProxyManagerHandler` running on the server side, which in turn communicates with the database :mod:`~DIRAC.FrameworkSystem.DB.ProxyDB`. -There are also commands and a web portal(:ref:`read how to install it `) interface for interaction with the user. +There are also commands and a web portal(:ref:`read how to install it `) interface for interaction with the user. Consider each separately. Scripts ------- -The following commands can be used to interact with this system to manage proxies:: - - *:ref:`dirac-admin-get-proxy ` - *:ref:`dirac-proxy-init ` - *:ref:`dirac-proxy-info ` - *:ref:`dirac-proxy-get-uploaded-info ` - *:ref:`dirac-admin-users-with-proxy ` - *dirac-admin-upload-proxy - *dirac-proxy-destroy +The following commands can be used to interact with this system to manage proxies: + * :ref:`dirac-admin-get-proxy ` + * :ref:`dirac-proxy-init ` + * :ref:`dirac-proxy-info ` + * :ref:`dirac-proxy-get-uploaded-info ` + * :ref:`dirac-admin-users-with-proxy ` + * dirac-admin-upload-proxy + * dirac-proxy-destroy diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 465775d4550..1376aa4dd7b 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -41,7 +41,7 @@ Consider the registration process User management has been provided by the Registry section of the Configuration System. To manage it you can use: * dirac-admin commands to managing Registry - * configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) + * configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) * modify local cfg file manually (by default it located in /opt/dirac/etc/dirac.cfg) * use the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent` to fetch VOMS VO users @@ -52,37 +52,36 @@ You need to log in under this user/group and use the Configuration Manager appli First of all, define, if necessary, some attributes at the root of the Registry section, that will be applicable for all the configuration are defined. .. literalinclude:: ../../../../dirac.cfg - :start-after: ##BEGIN Registry - :end-before: ##END + :start-after: ## Registry options: + :end-before: ## :dedent: 2 :caption: Registry options To begin, consider how to add new VO to the **Registry/VO** section. Having all the necessary attributes VO you need to add it to the configuration. -One of the mandatory attributes of the VO is the **VOAdmin**(administrator of the VO), it must be registered as a DIRAC user(see the example below). +One of the mandatory attributes of the VO is the **VOAdmin** (administrator of the VO), it must be registered as a DIRAC user(see the example below). If the described VO is a VOMS VO, then it is important to note that the VO administrator should have an administrative role in the VOMS VO, it is necessary to obtain relevant information from the VOMS servers regarding VO users. In this case, the addition of VOMS VO is considered, respectively, there are attributes specific to VOMS. .. literalinclude:: ../../../../dirac.cfg - :start-after: ##BEGIN RegistryVO - :end-before: ##END + :start-after: ## VOs + :end-before: ## :dedent: 2 - :caption: VO description + :caption: Registry section The next step is to create groups in the **Registry/Groups** section with the appropriate permissions. -It is usually necessary to have at least three groups:: - - *for regular users running tasks(e.g.: "dirac_user") - *to run pilot tasks(e.g.: "dirac_pilot") - *administrative group(e.g.: "dirac_admin") +It is usually necessary to have at least three groups: + * for regular users running tasks(e.g.: "dirac_user") + * to run pilot tasks(e.g.: "dirac_pilot") + * administrative group(e.g.: "dirac_admin") -Permissions of the group users are determined by "Properties" option. Full description of all supported groups properties: :mod:`~DIRAC.Core.Security.Properties`. +Permissions of the group users are determined by "Properties" option. Full description of all supported :mod:`~DIRAC.Core.Security.Properties`. .. literalinclude:: ../../../../dirac.cfg - :start-after: ##BEGIN RegistryGroups - :end-before: ##END + :start-after: ## Groups: + :end-before: ## :dedent: 2 - :caption: group description + :caption: Registry section To add a new group you can use special DIRAC command that simplifies this action: :ref:`dirac-admin-add-group `. @@ -90,10 +89,10 @@ To add a new group you can use special DIRAC command that simplifies this action Finally, create a user in the **Registry/Users** section: .. literalinclude:: ../../../../dirac.cfg - :start-after: ##BEGIN RegistryUsers - :end-before: ##END + :start-after: ## Users: + :end-before: ## :dedent: 2 - :caption: user description + :caption: Registry section To add a new user you can use special DIRAC command that simplifies this action: :ref:`dirac-admin-add-user `. From 87e018386ec2cded93db0f321927fb15875454c2 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sat, 28 Nov 2020 18:06:43 +0100 Subject: [PATCH 05/51] fix docs --- docs/source/AdministratorGuide/HowTo/multiVO.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/source/AdministratorGuide/HowTo/multiVO.rst b/docs/source/AdministratorGuide/HowTo/multiVO.rst index 27e637d73da..6b642104364 100644 --- a/docs/source/AdministratorGuide/HowTo/multiVO.rst +++ b/docs/source/AdministratorGuide/HowTo/multiVO.rst @@ -67,8 +67,6 @@ Add superb_user group DefaultGroup = superb_user } -.. _multi_vo_dirac_regVO: - Registry/VO ----------- :: @@ -94,8 +92,6 @@ Registry/VO } } -.. _multi_vo_dirac_regGroup: - Registry/Groups --------------- From 32ee78592c592cdd22b497edb97bffcf26b7cbc9 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sun, 29 Nov 2020 10:24:02 +0100 Subject: [PATCH 06/51] fix docs --- ConfigurationSystem/Agent/VOMS2CSAgent.py | 2 +- FrameworkSystem/DB/ProxyDB.py | 17 ++++++++++------- Resources/ProxyProvider/DIRACCAProxyProvider.py | 2 +- Resources/ProxyProvider/PUSPProxyProvider.py | 2 +- .../ConfReference/Resources/index.rst | 1 - .../Systems/Framework/Services/index.rst | 1 - .../Configuration/ConfReference/index.rst | 1 - .../Resources/proxyprovider.rst | 2 +- .../AdministratorGuide/UserManagement/index.rst | 8 ++------ 9 files changed, 16 insertions(+), 20 deletions(-) diff --git a/ConfigurationSystem/Agent/VOMS2CSAgent.py b/ConfigurationSystem/Agent/VOMS2CSAgent.py index 7567d81b8c1..34bbea026a0 100644 --- a/ConfigurationSystem/Agent/VOMS2CSAgent.py +++ b/ConfigurationSystem/Agent/VOMS2CSAgent.py @@ -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/`` configuration section. See also :ref:`registry_vo`. +in the ``/Registry/VO/`` configuration section. See also :ref:`/Registry/VO `. The following options can be set for the VOMS2CSAgent. diff --git a/FrameworkSystem/DB/ProxyDB.py b/FrameworkSystem/DB/ProxyDB.py index 60cb20e33d3..ed6f82d638d 100755 --- a/FrameworkSystem/DB/ProxyDB.py +++ b/FrameworkSystem/DB/ProxyDB.py @@ -2,13 +2,16 @@ Database contains the following tables:: - *ProxyDB_Requests -- a delegation requests storage table for a given proxy Chain - *ProxyDB_CleanProxies -- table for storing proxies in "clean" form, ie without the presence of DIRAC and VOMS extensions. - *ProxyDB_Proxies -- obsolete table for storing proxies with already added DIRAC group extension, it is present only for backward compatibility and is used only if ProxyDB_CleanProxies does not have the required proxy. - *ProxyDB_VOMSProxies -- proxy storage table with VOMS extension already added. - *ProxyDB_Log -- table with logs. - *ProxyDB_Tokens -- token storage table for proxy requests. - *ProxyDB_ExpNotifs -- a table for accumulating proxy expiration notifications. + * ProxyDB_Requests -- a delegation requests storage table for a given proxy Chain + * ProxyDB_CleanProxies -- table for storing proxies in "clean" form, ie without + the presence of DIRAC and VOMS extensions. + * ProxyDB_Proxies -- obsolete table for storing proxies with already added DIRAC + group extension, it is present only for backward compatibility and is used only + if ProxyDB_CleanProxies does not have the required proxy. + * ProxyDB_VOMSProxies -- proxy storage table with VOMS extension already added. + * ProxyDB_Log -- table with logs. + * ProxyDB_Tokens -- token storage table for proxy requests. + * ProxyDB_ExpNotifs -- a table for accumulating proxy expiration notifications. """ __RCSID__ = "$Id$" diff --git a/Resources/ProxyProvider/DIRACCAProxyProvider.py b/Resources/ProxyProvider/DIRACCAProxyProvider.py index 5c5f8be0fd5..f023b951712 100644 --- a/Resources/ProxyProvider/DIRACCAProxyProvider.py +++ b/Resources/ProxyProvider/DIRACCAProxyProvider.py @@ -5,7 +5,7 @@ Required parameters in the DIRAC configuration for its implementation: - .. literalinclude:: ../../../../dirac.cfg + .. literalinclude:: ../../../dirac.cfg :start-after: ## DIRACCA type: :end-before: ## :dedent: 2 diff --git a/Resources/ProxyProvider/PUSPProxyProvider.py b/Resources/ProxyProvider/PUSPProxyProvider.py index 1bb257ca008..72e49138beb 100644 --- a/Resources/ProxyProvider/PUSPProxyProvider.py +++ b/Resources/ProxyProvider/PUSPProxyProvider.py @@ -1,7 +1,7 @@ """ ProxyProvider implementation for a per-user sub-proxy(PUSP) proxy generation using PUSP proxy server. More details about PUSP here: https://wiki.egi.eu/wiki/Usage_of_the_per_user_sub_proxy_in_EGI - .. literalinclude:: ../../../../dirac.cfg + .. literalinclude:: ../../../dirac.cfg :start-after: ## PUSP type: :end-before: ## :dedent: 2 diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/index.rst index 10bd99826fd..95d7ff54100 100644 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/index.rst +++ b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/index.rst @@ -14,4 +14,3 @@ In this section all the physical resources than can be used by DIRAC users are d StorageElements/index StorageElementsGroups/index Computing/index - ProxyProviders/index diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/index.rst index a72648f7499..0f0d92430d3 100644 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/index.rst +++ b/docs/source/AdministratorGuide/Configuration/ConfReference/Systems/Framework/Services/index.rst @@ -38,7 +38,6 @@ Services associated with Framework system are: Monitoring/index Notification/index Plotting/index - ProxyManager/index SecurityLogging/index SystemAdministrator/index SystemLogging/index diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/index.rst index 6bb44e985ad..c1d01b5782d 100644 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/index.rst +++ b/docs/source/AdministratorGuide/Configuration/ConfReference/index.rst @@ -18,7 +18,6 @@ The detailed configuration options for agents, services, and executors are in th DiracSection Operations/index - Registry/index Resources/index Systems/index WebSite/index diff --git a/docs/source/AdministratorGuide/Resources/proxyprovider.rst b/docs/source/AdministratorGuide/Resources/proxyprovider.rst index 1155eb1cab8..d22abc4c8d6 100644 --- a/docs/source/AdministratorGuide/Resources/proxyprovider.rst +++ b/docs/source/AdministratorGuide/Resources/proxyprovider.rst @@ -4,7 +4,7 @@ ProxyProvider ============== -This resource type provides an interface to obtain proxy certificates using a user identifier. The following proxy providers are presented here: ``DIRACCA``, ``PUSP``. When all users upload their proxies to proxy manager manually, you do not need to deploy these resources. The :ref:`registryUsers` section describes how to specify a proxy provifer for a user's DN. +This resource type provides an interface to obtain proxy certificates using a user identifier. The following proxy providers are presented here: ``DIRACCA``, ``PUSP``. When all users upload their proxies to proxy manager manually, you do not need to deploy these resources. The :ref:`/Registry/Users ` section describes how to specify a proxy provifer for a user's DN. ---------------------- DIRACCA proxy provider diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 1376aa4dd7b..63de6bcda98 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -10,6 +10,7 @@ What are the components involved in that. ----------------------------------------- * Configuration system + * Registry * VOMS2CSAgent @@ -71,6 +72,7 @@ In this case, the addition of VOMS VO is considered, respectively, there are att The next step is to create groups in the **Registry/Groups** section with the appropriate permissions. It is usually necessary to have at least three groups: + * for regular users running tasks(e.g.: "dirac_user") * to run pilot tasks(e.g.: "dirac_pilot") * administrative group(e.g.: "dirac_admin") @@ -96,9 +98,3 @@ Finally, create a user in the **Registry/Users** section: To add a new user you can use special DIRAC command that simplifies this action: :ref:`dirac-admin-add-user `. - -.. toctree:: - :maxdepth: 1 - - authentication - multiVO From 54d658c0bcf7472eeb5ee8c959f51dba964e54fd Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sun, 29 Nov 2020 10:43:44 +0100 Subject: [PATCH 07/51] fix docs --- ConfigurationSystem/Agent/VOMS2CSAgent.py | 2 +- Resources/ProxyProvider/DIRACCAProxyProvider.py | 2 +- Resources/ProxyProvider/PUSPProxyProvider.py | 2 +- docs/source/AdministratorGuide/Resources/proxyprovider.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ConfigurationSystem/Agent/VOMS2CSAgent.py b/ConfigurationSystem/Agent/VOMS2CSAgent.py index 34bbea026a0..38e65d80a0e 100644 --- a/ConfigurationSystem/Agent/VOMS2CSAgent.py +++ b/ConfigurationSystem/Agent/VOMS2CSAgent.py @@ -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/`` configuration section. See also :ref:`/Registry/VO `. +in the ``/Registry/VO/`` configuration section. The following options can be set for the VOMS2CSAgent. diff --git a/Resources/ProxyProvider/DIRACCAProxyProvider.py b/Resources/ProxyProvider/DIRACCAProxyProvider.py index f023b951712..3b20ce2aed2 100644 --- a/Resources/ProxyProvider/DIRACCAProxyProvider.py +++ b/Resources/ProxyProvider/DIRACCAProxyProvider.py @@ -5,7 +5,7 @@ Required parameters in the DIRAC configuration for its implementation: - .. literalinclude:: ../../../dirac.cfg + .. literalinclude:: ../../../../../dirac.cfg :start-after: ## DIRACCA type: :end-before: ## :dedent: 2 diff --git a/Resources/ProxyProvider/PUSPProxyProvider.py b/Resources/ProxyProvider/PUSPProxyProvider.py index 72e49138beb..d3347eb6873 100644 --- a/Resources/ProxyProvider/PUSPProxyProvider.py +++ b/Resources/ProxyProvider/PUSPProxyProvider.py @@ -1,7 +1,7 @@ """ ProxyProvider implementation for a per-user sub-proxy(PUSP) proxy generation using PUSP proxy server. More details about PUSP here: https://wiki.egi.eu/wiki/Usage_of_the_per_user_sub_proxy_in_EGI - .. literalinclude:: ../../../dirac.cfg + .. literalinclude:: ../../../../../dirac.cfg :start-after: ## PUSP type: :end-before: ## :dedent: 2 diff --git a/docs/source/AdministratorGuide/Resources/proxyprovider.rst b/docs/source/AdministratorGuide/Resources/proxyprovider.rst index d22abc4c8d6..c0413050d0a 100644 --- a/docs/source/AdministratorGuide/Resources/proxyprovider.rst +++ b/docs/source/AdministratorGuide/Resources/proxyprovider.rst @@ -4,7 +4,7 @@ ProxyProvider ============== -This resource type provides an interface to obtain proxy certificates using a user identifier. The following proxy providers are presented here: ``DIRACCA``, ``PUSP``. When all users upload their proxies to proxy manager manually, you do not need to deploy these resources. The :ref:`/Registry/Users ` section describes how to specify a proxy provifer for a user's DN. +This resource type provides an interface to obtain proxy certificates using a user identifier. The following proxy providers are presented here: ``DIRACCA``, ``PUSP``. When all users upload their proxies to proxy manager manually, you do not need to deploy these resources. The **/Registry/Users** section describes how to specify a proxy provifer for a user's DN. ---------------------- DIRACCA proxy provider From b5bec64e157722f1e266692a4eb62db99902545b Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Mon, 30 Nov 2020 10:43:36 +0100 Subject: [PATCH 08/51] Update FrameworkSystem/Client/ProxyManagerClient.py Co-authored-by: fstagni --- FrameworkSystem/Client/ProxyManagerClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrameworkSystem/Client/ProxyManagerClient.py b/FrameworkSystem/Client/ProxyManagerClient.py index 932cc586ec6..7677f8407c1 100755 --- a/FrameworkSystem/Client/ProxyManagerClient.py +++ b/FrameworkSystem/Client/ProxyManagerClient.py @@ -1,4 +1,4 @@ -""" ProxyManagemerClient has the function to "talk" to the ProxyManager service +""" ProxyManagerClient has the function to "talk" to the ProxyManager service (:mod:`~DIRAC.FrameworkSystem.Service.ProxyManagerHandler`). This inherits the DIRAC base Client for direct execution of server functionality. Client also contain caching of the requested proxy information. From 04ef7b7a175ba37b3ddb684637400116321e16a9 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Mon, 30 Nov 2020 10:43:54 +0100 Subject: [PATCH 09/51] Update FrameworkSystem/ConfigTemplate.cfg Co-authored-by: fstagni --- FrameworkSystem/ConfigTemplate.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrameworkSystem/ConfigTemplate.cfg b/FrameworkSystem/ConfigTemplate.cfg index 35755d438eb..0b7f3e5e02b 100644 --- a/FrameworkSystem/ConfigTemplate.cfg +++ b/FrameworkSystem/ConfigTemplate.cfg @@ -14,7 +14,7 @@ Services } } ##BEGIN ProxyManager - # Section to describe ProxyManeger system + # Section to describe ProxyManager system ProxyManager { Port = 9152 From 6d2e9c45393a34992cf89c97a37bf8ef965cff51 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Mon, 30 Nov 2020 10:44:09 +0100 Subject: [PATCH 10/51] Update FrameworkSystem/DB/ProxyDB.py Co-authored-by: fstagni --- FrameworkSystem/DB/ProxyDB.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrameworkSystem/DB/ProxyDB.py b/FrameworkSystem/DB/ProxyDB.py index ed6f82d638d..10aafd9d83f 100755 --- a/FrameworkSystem/DB/ProxyDB.py +++ b/FrameworkSystem/DB/ProxyDB.py @@ -1,4 +1,4 @@ -""" ProxyDB class is a front-end to the proxy database. +""" ProxyDB class is a front-end to the ProxyDB MySQL database. Database contains the following tables:: From b26ab135e15039ab2aa22efce86800fffb05235b Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Mon, 30 Nov 2020 10:44:45 +0100 Subject: [PATCH 11/51] Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst Co-authored-by: fstagni --- .../AdministratorGuide/Systems/Framework/ProxyManager/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index 367803b570d..45a0d804daf 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -4,7 +4,7 @@ The ProxyManager system ======================= -The ProxyManager(PM) system provide a users proxies management. This system allows to upload, delete and download proxies to the database. +The ProxyManager(PM) system provides users proxies management. This system allows to upload, delete and download proxies to a DIRAC database. This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. It is also possible to obtain a limited use proxy using tokens. From 0f70b63a7e81ada76e5e6691f603f43aecf6424c Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Mon, 30 Nov 2020 10:45:07 +0100 Subject: [PATCH 12/51] Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst Co-authored-by: fstagni --- .../AdministratorGuide/Systems/Framework/ProxyManager/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index 45a0d804daf..99a02f750d9 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -7,7 +7,7 @@ The ProxyManager system The ProxyManager(PM) system provides users proxies management. This system allows to upload, delete and download proxies to a DIRAC database. This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. -It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. It is also possible to obtain a limited use proxy using tokens. +It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. It is also possible to obtain a limited user proxy using tokens. Structure ========= From 81e50b67db584b4b69a819d4bf0e6a0b591fae1b Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Mon, 30 Nov 2020 10:46:00 +0100 Subject: [PATCH 13/51] Update docs/source/AdministratorGuide/UserManagement/index.rst Co-authored-by: fstagni --- docs/source/AdministratorGuide/UserManagement/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 63de6bcda98..a027fdecdb8 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -20,7 +20,7 @@ What is the user in DIRAC context? DIRAC users are entities that can be authenticated. In a fact it's a record in the **/Registry** section of the :ref:`Configuration system `. Each user has a username as a unique identifier. Username can be created manually by administrator or automaticaly by scripts. -User contain attributes that desribed in the **/Registry/Users** section. To provide authentication user must have `DN` attribute, read more about :ref:`authentication `. +User attributes are described in the **/Registry/Users** section. To provide authentication a user must have the `DN` attribute, read more about :ref:`authentication `. User has permissions. To describe permissions we use groups. What is the DIRAC groups? From b5fe0cac31f3ab6e89a231379d0455f267b92216 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Mon, 30 Nov 2020 10:48:38 +0100 Subject: [PATCH 14/51] add description --- FrameworkSystem/DB/ProxyDB.py | 2 +- .../Systems/Framework/ProxyManager/index.rst | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/FrameworkSystem/DB/ProxyDB.py b/FrameworkSystem/DB/ProxyDB.py index 10aafd9d83f..12ef9f907e4 100755 --- a/FrameworkSystem/DB/ProxyDB.py +++ b/FrameworkSystem/DB/ProxyDB.py @@ -1,6 +1,6 @@ """ ProxyDB class is a front-end to the ProxyDB MySQL database. - Database contains the following tables:: + Database contains the following tables: * ProxyDB_Requests -- a delegation requests storage table for a given proxy Chain * ProxyDB_CleanProxies -- table for storing proxies in "clean" form, ie without diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index 99a02f750d9..db08d3e2987 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -4,10 +4,12 @@ The ProxyManager system ======================= -The ProxyManager(PM) system provides users proxies management. This system allows to upload, delete and download proxies to a DIRAC database. +The ProxyManager(PM) system provide a users proxies management. This system allows to upload, delete and download proxies to the database. +In a fact keeps uploaded long-living proxies in order to provide them for asynchronous operations performed on the user's behalf. This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. -It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. It is also possible to obtain a limited user proxy using tokens. +It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. The class :mod:`~DIRAC.Core.Security.VOMS` is used to add a VOMS extension. +It is also possible to obtain a limited use proxy using tokens. Structure ========= From 16614315e368f9a5762cacb86e17365ad0336015 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Mon, 30 Nov 2020 11:17:37 +0100 Subject: [PATCH 15/51] fix issues --- .../Systems/Framework/ProxyManager/index.rst | 5 ++--- .../AdministratorGuide/UserManagement/index.rst | 12 +++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index db08d3e2987..56753b1ef11 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -4,12 +4,12 @@ The ProxyManager system ======================= -The ProxyManager(PM) system provide a users proxies management. This system allows to upload, delete and download proxies to the database. +The ProxyManager(PM) system provides users proxies management. This system allows to upload, delete and download proxies to a DIRAC database. In a fact keeps uploaded long-living proxies in order to provide them for asynchronous operations performed on the user's behalf. This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. The class :mod:`~DIRAC.Core.Security.VOMS` is used to add a VOMS extension. -It is also possible to obtain a limited use proxy using tokens. +It is also possible to obtain a limited user proxy using tokens. Structure ========= @@ -18,7 +18,6 @@ The system consists of a client part :mod:`~DIRAC.FrameworkSystem.Client.ProxyMa the production service :mod:`~DIRAC.FrameworkSystem.Service.ProxyManagerHandler` running on the server side, which in turn communicates with the database :mod:`~DIRAC.FrameworkSystem.DB.ProxyDB`. There are also commands and a web portal(:ref:`read how to install it `) interface for interaction with the user. -Consider each separately. Scripts ------- diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index a027fdecdb8..3f6b01ddf8f 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -28,7 +28,7 @@ What is the DIRAC groups? DIRAC groups collects DIRAC users and are described in the **/Registry/Groups** section, each subsection of the group is a description of the users permissions and rights for various Grid operations and is associated with DIRAC Virtual Organization. The name of the DIRAC group usually consists of the DIRAC VO name and a word that describes the permissions for group users, -for example "dirac_user", "dirac_pilot", "dirac_admin". +for example "dteam_user", "dteam_pilot", "dteam_admin". What is the DIRAC Virtual Organization(VO)? ------------------------------------------- @@ -41,7 +41,9 @@ Consider the registration process --------------------------------- User management has been provided by the Registry section of the Configuration System. To manage it you can use: - * dirac-admin commands to managing Registry + * dirac-admin commands to managing Registry: + - :ref:`dirac-admin-add-group ` + - :ref:`dirac-admin-add-user ` * configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) * modify local cfg file manually (by default it located in /opt/dirac/etc/dirac.cfg) * use the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent` to fetch VOMS VO users @@ -73,9 +75,9 @@ In this case, the addition of VOMS VO is considered, respectively, there are att The next step is to create groups in the **Registry/Groups** section with the appropriate permissions. It is usually necessary to have at least three groups: - * for regular users running tasks(e.g.: "dirac_user") - * to run pilot tasks(e.g.: "dirac_pilot") - * administrative group(e.g.: "dirac_admin") + * for regular users running tasks(e.g.: "dteam_user") + * to run pilot tasks(e.g.: "dteam_pilot") + * administrative group(e.g.: "dteam_admin") Permissions of the group users are determined by "Properties" option. Full description of all supported :mod:`~DIRAC.Core.Security.Properties`. From 744353cc2f887f5a96097f846b3f06c569745bd1 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 1 Dec 2020 20:19:29 +0100 Subject: [PATCH 16/51] move CommandReference content to scripts docs --- .../scripts/dirac-admin-add-site.py | 26 ++++---- .../scripts/dirac-admin-sort-cs-sites.py | 37 ++++-------- .../dirac-configuration-dump-local-cache.py | 14 +++-- Core/scripts/dirac-info.py | 18 ++++-- Core/scripts/dirac-version.py | 7 ++- .../scripts/dirac-admin-allow-se.py | 18 +++--- .../scripts/dirac-admin-ban-se.py | 17 +++--- .../scripts/dirac-admin-user-quota.py | 23 ++++--- .../scripts/dirac-admin-get-CAs.py | 7 ++- .../scripts/dirac-admin-get-proxy.py | 19 +++++- .../scripts/dirac-admin-proxy-upload.py | 10 ++++ .../scripts/dirac-admin-sysadmin-cli.py | 12 ++++ .../scripts/dirac-admin-users-with-proxy.py | 28 ++++++++- .../scripts/dirac-proxy-destroy.py | 16 +++-- .../scripts/dirac-proxy-get-uploaded-info.py | 16 +++++ FrameworkSystem/scripts/dirac-proxy-info.py | 20 ++++++- FrameworkSystem/scripts/dirac-proxy-init.py | 12 +++- .../scripts/dirac-status-component.py | 60 ++++++++++++++++--- Interfaces/scripts/dirac-admin-add-group.py | 23 ++++--- Interfaces/scripts/dirac-admin-add-host.py | 24 +++++--- Interfaces/scripts/dirac-admin-add-user.py | 22 ++++--- Interfaces/scripts/dirac-admin-allow-site.py | 23 ++++--- Interfaces/scripts/dirac-admin-ban-site.py | 22 ++++--- Interfaces/scripts/dirac-admin-ce-info.py | 28 +++++---- Interfaces/scripts/dirac-admin-delete-user.py | 20 +++++-- .../scripts/dirac-admin-get-banned-sites.py | 9 +++ .../dirac-admin-get-job-pilot-output.py | 20 +++++-- .../scripts/dirac-admin-get-job-pilots.py | 38 ++++++++++-- .../scripts/dirac-admin-get-pilot-info.py | 39 +++++++++--- .../dirac-admin-get-pilot-logging-info.py | 39 ++++++++++-- .../scripts/dirac-admin-get-pilot-output.py | 23 ++++--- .../scripts/dirac-admin-get-site-mask.py | 31 +++++++--- Interfaces/scripts/dirac-admin-list-hosts.py | 14 ++++- Interfaces/scripts/dirac-admin-list-users.py | 25 ++++++-- Interfaces/scripts/dirac-admin-modify-user.py | 26 ++++---- .../scripts/dirac-admin-pilot-summary.py | 24 ++++++++ Interfaces/scripts/dirac-admin-reset-job.py | 22 ++++--- .../scripts/dirac-admin-service-ports.py | 43 +++++++++++-- .../scripts/dirac-admin-set-site-protocols.py | 20 +++++-- Interfaces/scripts/dirac-admin-site-info.py | 26 ++++++-- .../scripts/dirac-admin-site-mask-logging.py | 27 +++++---- .../dirac-admin-sync-users-from-file.py | 25 ++++---- .../scripts/dirac-framework-ping-service.py | 45 +++++++++++--- Interfaces/scripts/dirac-utils-file-adler.py | 21 +++++-- Interfaces/scripts/dirac-utils-file-md5.py | 23 ++++--- .../scripts/dirac-admin-show-task-queues.py | 25 +++++--- .../dirac-admin-add-group.rst | 26 -------- .../CommandReference/dirac-admin-add-host.rst | 25 -------- .../CommandReference/dirac-admin-add-site.rst | 22 ------- .../CommandReference/dirac-admin-add-user.rst | 27 --------- .../CommandReference/dirac-admin-allow-se.rst | 26 -------- .../dirac-admin-allow-site.rst | 25 -------- .../CommandReference/dirac-admin-ban-se.rst | 25 -------- .../CommandReference/dirac-admin-ban-site.rst | 24 -------- .../CommandReference/dirac-admin-ce-info.rst | 24 -------- .../dirac-admin-delete-user.rst | 19 ------ .../CommandReference/dirac-admin-get-CAs.rst | 18 ------ .../dirac-admin-get-banned-sites.rst | 14 ----- .../dirac-admin-get-job-pilot-output.rst | 19 ------ .../dirac-admin-get-job-pilots.rst | 37 ------------ .../dirac-admin-get-pilot-info.rst | 40 ------------- .../dirac-admin-get-pilot-logging-info.rst | 38 ------------ .../dirac-admin-get-pilot-output.rst | 21 ------- .../dirac-admin-get-proxy.rst | 30 ---------- .../dirac-admin-get-site-mask.rst | 27 --------- .../dirac-admin-list-hosts.rst | 19 ------ .../dirac-admin-list-users.rst | 27 --------- .../dirac-admin-modify-user.rst | 26 -------- .../dirac-admin-pilot-summary.rst | 28 --------- .../dirac-admin-reset-job.rst | 20 ------- .../dirac-admin-service-ports.rst | 42 ------------- .../dirac-admin-set-site-protocols.rst | 23 ------- .../dirac-admin-show-task-queues.rst | 28 --------- .../dirac-admin-site-info.rst | 25 -------- .../dirac-admin-site-mask-logging.rst | 23 ------- .../dirac-admin-sort-cs-sites.rst | 25 -------- .../dirac-admin-sync-users-from-file.rst | 23 ------- .../dirac-admin-sysadmin-cli.rst | 19 ------ .../dirac-admin-user-quota.rst | 22 ------- .../dirac-admin-users-with-proxy.rst | 32 ---------- .../dirac-configuration-dump-local-cache.rst | 20 ------- .../dirac-framework-ping-service.rst | 42 ------------- .../CommandReference/dirac-info.rst | 19 ------ .../dirac-proxy-get-uploaded-info.rst | 23 ------- .../CommandReference/dirac-proxy-info.rst | 33 ---------- .../CommandReference/dirac-proxy-init.rst | 36 ----------- .../dirac-status-component.rst | 59 ------------------ .../CommandReference/dirac-sys-sendmail.rst | 24 -------- .../dirac-utils-file-adler.rst | 20 ------- .../CommandReference/dirac-utils-file-md5.rst | 20 ------- .../CommandReference/index.rst | 21 +++++-- .../Systems/Framework/ProxyManager/index.rst | 9 +-- .../UserManagement/index.rst | 4 +- 93 files changed, 833 insertions(+), 1453 deletions(-) delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-add-group.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-add-host.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-add-site.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-add-user.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-se.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-site.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-se.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-site.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-ce-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-delete-user.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-CAs.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-banned-sites.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilot-output.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilots.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-logging-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-output.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-proxy.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-get-site-mask.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-list-hosts.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-list-users.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-modify-user.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-pilot-summary.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-reset-job.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-service-ports.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-set-site-protocols.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-show-task-queues.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-site-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-site-mask-logging.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-sort-cs-sites.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-sync-users-from-file.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-sysadmin-cli.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-user-quota.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-admin-users-with-proxy.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-configuration-dump-local-cache.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-framework-ping-service.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-proxy-get-uploaded-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-proxy-info.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-proxy-init.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-status-component.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-sys-sendmail.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-utils-file-adler.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-utils-file-md5.rst diff --git a/ConfigurationSystem/scripts/dirac-admin-add-site.py b/ConfigurationSystem/scripts/dirac-admin-add-site.py index 7c611cf25a0..8ef87b57890 100755 --- a/ConfigurationSystem/scripts/dirac-admin-add-site.py +++ b/ConfigurationSystem/scripts/dirac-admin-add-site.py @@ -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$" @@ -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() diff --git a/ConfigurationSystem/scripts/dirac-admin-sort-cs-sites.py b/ConfigurationSystem/scripts/dirac-admin-sort-cs-sites.py index bfbb7441265..51b08c45a94 100755 --- a/ConfigurationSystem/scripts/dirac-admin-sort-cs-sites.py +++ b/ConfigurationSystem/scripts/dirac-admin-sort-cs-sites.py @@ -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]
- 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$" @@ -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]
" % - 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() diff --git a/ConfigurationSystem/scripts/dirac-configuration-dump-local-cache.py b/ConfigurationSystem/scripts/dirac-configuration-dump-local-cache.py index 8977f37db19..a05f55f8fb5 100755 --- a/ConfigurationSystem/scripts/dirac-configuration-dump-local-cache.py +++ b/ConfigurationSystem/scripts/dirac-configuration-dump-local-cache.py @@ -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 @@ -34,11 +42,9 @@ def setRaw(args): return DIRAC.S_OK() +Script.setUsageMessage(__doc__) Script.registerSwitch("f:", "file=", "Dump Configuration data into ", 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 diff --git a/Core/scripts/dirac-info.py b/Core/scripts/dirac-info.py index 0b7ab40b2df..f6c23e927e3 100755 --- a/Core/scripts/dirac-info.py +++ b/Core/scripts/dirac-info.py @@ -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 @@ -19,9 +31,7 @@ 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, ])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Core/scripts/dirac-version.py b/Core/scripts/dirac-version.py index 919f82dd457..861f196c7cf 100755 --- a/Core/scripts/dirac-version.py +++ b/Core/scripts/dirac-version.py @@ -4,7 +4,12 @@ # Author : Ricardo Graciani ######################################################################## """ - print version of current DIRAC installation +Print version of current DIRAC installation + +Example: + + $ dirac-version + v5r12-pre9 """ from __future__ import print_function diff --git a/DataManagementSystem/scripts/dirac-admin-allow-se.py b/DataManagementSystem/scripts/dirac-admin-allow-se.py index 23785e6813c..fdb79753ab6 100755 --- a/DataManagementSystem/scripts/dirac-admin-allow-se.py +++ b/DataManagementSystem/scripts/dirac-admin-allow-se.py @@ -1,5 +1,14 @@ #!/usr/bin/env python -""" Enable using one or more Storage Elements +""" +Enable using one or more Storage Elements + +Usage: + + dirac-admin-allow-se SE1 [SE2 ...] + +Example: + + $ dirac-admin-allow-se M3PEC-disk """ from __future__ import print_function __RCSID__ = "$Id$" @@ -14,12 +23,7 @@ site = '' mute = False -Script.setUsageMessage(""" -Enable using one or more Storage Elements - -Usage: - %s SE1 [SE2 ...] -""" % Script.scriptName) +Script.setUsageMessage(__doc__) Script.registerSwitch("r", "AllowRead", " Allow only reading from the storage element") Script.registerSwitch("w", "AllowWrite", " Allow only writing to the storage element") diff --git a/DataManagementSystem/scripts/dirac-admin-ban-se.py b/DataManagementSystem/scripts/dirac-admin-ban-se.py index 47a8194581b..0496e94f860 100755 --- a/DataManagementSystem/scripts/dirac-admin-ban-se.py +++ b/DataManagementSystem/scripts/dirac-admin-ban-se.py @@ -1,6 +1,13 @@ #!/usr/bin/env python +""" +Ban one or more Storage Elements for usage + +Usage: + + dirac-admin-ban-se SE1 [SE2 ...] -""" Ban one or more Storage Elements for usage +Example: + $ dirac-admin-ban-se M3PEC-disk """ from __future__ import print_function __RCSID__ = "$Id$" @@ -15,13 +22,7 @@ site = '' mute = False -Script.setUsageMessage(""" -Ban one or more Storage Elements for usage - -Usage: - %s SE1 [SE2 ...] -""" % Script.scriptName) - +Script.setUsageMessage(__doc__) Script.registerSwitch("r", "BanRead", " Ban only reading from the storage element") Script.registerSwitch("w", "BanWrite", " Ban writing to the storage element") Script.registerSwitch("k", "BanCheck", " Ban check access to the storage element") diff --git a/DataManagementSystem/scripts/dirac-admin-user-quota.py b/DataManagementSystem/scripts/dirac-admin-user-quota.py index 57119da6492..556319c3ede 100755 --- a/DataManagementSystem/scripts/dirac-admin-user-quota.py +++ b/DataManagementSystem/scripts/dirac-admin-user-quota.py @@ -2,17 +2,26 @@ ######################################################################## # $HeadURL$ ######################################################################## -__RCSID__ = "$Id$" -import DIRAC -from DIRAC.Core.Base import Script - -Script.setUsageMessage(""" +""" Show storage quotas for specified users or for all registered users if nobody is specified Usage: - %s [user1 ...] -""" % Script.scriptName) + dirac-admin-user-quota [user1 ...] +Example: + $ dirac-admin-user-quota + ------------------------------ + Username | Quota (GB) + ------------------------------ + atsareg | None + msapunov | None + vhamar | None + ------------------------------ +""" +__RCSID__ = "$Id$" +import DIRAC +from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.parseCommandLine() users = Script.getPositionalArgs() diff --git a/FrameworkSystem/scripts/dirac-admin-get-CAs.py b/FrameworkSystem/scripts/dirac-admin-get-CAs.py index fd590cd242a..1a2635dd3b6 100755 --- a/FrameworkSystem/scripts/dirac-admin-get-CAs.py +++ b/FrameworkSystem/scripts/dirac-admin-get-CAs.py @@ -3,7 +3,8 @@ # File : dirac-admin-get-CAs # Author : Ricardo Graciani ######################################################################## -"""Refresh the local copy of the CA certificates and revocation lists. +""" +Refresh the local copy of the CA certificates and revocation lists. Connects to the BundleDelivery service to obtain the tar balls. Needed when proxies appear to be invalid. @@ -11,6 +12,10 @@ Usage: dirac-admin-get-CAs (|)* + +Example: + + $ dirac-admin-get-CAs """ import DIRAC diff --git a/FrameworkSystem/scripts/dirac-admin-get-proxy.py b/FrameworkSystem/scripts/dirac-admin-get-proxy.py index 35aa2233695..770f1d8ef25 100755 --- a/FrameworkSystem/scripts/dirac-admin-get-proxy.py +++ b/FrameworkSystem/scripts/dirac-admin-get-proxy.py @@ -4,7 +4,22 @@ # Author : Stuart Paterson ######################################################################## """ - Retrieve a delegated proxy for the given user and group +Retrieve a delegated proxy for the given user and group + +Usage: + + dirac-admin-get-proxy [option|cfgfile] ... group + +Arguments: + + DN: DN of the user + user: DIRAC user name (will fail if there is more than 1 DN registered) + group: DIRAC group name + +Example: + + $ dirac-admin-get-proxy vhamar dirac_user + Proxy downloaded to /afs/in2p3.fr/home/h/hamar/proxy.vhamar.dirac_user """ from __future__ import print_function import os @@ -16,7 +31,7 @@ from DIRAC.ConfigurationSystem.Client.Helpers import Registry __RCSID__ = "$Id$" - +Script.setUsageMessage(__doc__) class Params(object): diff --git a/FrameworkSystem/scripts/dirac-admin-proxy-upload.py b/FrameworkSystem/scripts/dirac-admin-proxy-upload.py index fdc0c91068a..63efad51589 100755 --- a/FrameworkSystem/scripts/dirac-admin-proxy-upload.py +++ b/FrameworkSystem/scripts/dirac-admin-proxy-upload.py @@ -3,13 +3,23 @@ # File : dirac-admin-proxy-upload.py # Author : Adrian Casajus ######################################################################## +""" +Usage: + dirac-admin-proxy-upload.py (|)* + +Example:: + + $ dirac-admin-proxy-upload +""" from __future__ import print_function + import sys from DIRAC.Core.Base import Script from DIRAC.FrameworkSystem.Client.ProxyUpload import CLIParams, uploadProxy __RCSID__ = "$Id$" +Script.setUsageMessage(__doc__) if __name__ == "__main__": cliParams = CLIParams() diff --git a/FrameworkSystem/scripts/dirac-admin-sysadmin-cli.py b/FrameworkSystem/scripts/dirac-admin-sysadmin-cli.py index b131b76f07e..c736320208d 100755 --- a/FrameworkSystem/scripts/dirac-admin-sysadmin-cli.py +++ b/FrameworkSystem/scripts/dirac-admin-sysadmin-cli.py @@ -1,7 +1,19 @@ #!/usr/bin/env python +""" +Usage: + + dirac-admin-sysadmin-cli.py (|)* + +Example: + + $ dirac-admin-sysadmin-cli --host dirac.in2p3.fr + DIRAC Root Path = /afs/in2p3.fr/home/h/hamar/DIRAC-v5r12 + dirac.in2p3.fr > +""" from DIRAC.Core.Base import Script __RCSID__ = "$Id$" +Script.setUsageMessage(__doc__) host = None Script.registerSwitch("H:", "host=", " Target host") diff --git a/FrameworkSystem/scripts/dirac-admin-users-with-proxy.py b/FrameworkSystem/scripts/dirac-admin-users-with-proxy.py index 87c584e76dd..507fd3804ae 100755 --- a/FrameworkSystem/scripts/dirac-admin-users-with-proxy.py +++ b/FrameworkSystem/scripts/dirac-admin-users-with-proxy.py @@ -1,13 +1,37 @@ #!/usr/bin/env python +""" +Usage: + dirac-admin-users-with-proxy.py (|)* + +Example: + + $ dirac-admin-users-with-proxy + * vhamar + DN : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar + group : dirac_admin + not after : 2011-06-29 12:04:25 + persistent : False + - + DN : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar + group : dirac_pilot + not after : 2011-06-29 12:04:27 + persistent : False + - + DN : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar + group : dirac_user + not after : 2011-06-29 12:04:30 + persistent : True +""" from __future__ import print_function + import DIRAC from DIRAC.Core.Base import Script -from DIRAC.FrameworkSystem.Client.ProxyManagerClient import gProxyManager from DIRAC.Core.Utilities import Time +from DIRAC.FrameworkSystem.Client.ProxyManagerClient import gProxyManager __RCSID__ = "$Id$" - +Script.setUsageMessage(__doc__) class Params(object): diff --git a/FrameworkSystem/scripts/dirac-proxy-destroy.py b/FrameworkSystem/scripts/dirac-proxy-destroy.py index 01a69ee03fe..acabd0485f0 100755 --- a/FrameworkSystem/scripts/dirac-proxy-destroy.py +++ b/FrameworkSystem/scripts/dirac-proxy-destroy.py @@ -1,19 +1,23 @@ #!/usr/bin/env python """ -command line tool to remove local and remote proxies -""" +Command line tool to remove local and remote proxies + +Usage: + + dirac-proxy-destroy.py (|)* +Example: + $ dirac-proxy-destroy -a +""" import os import DIRAC from DIRAC import gLogger, S_OK -from DIRAC.Core.Security import Locations from DIRAC.Core.Base import Script - +from DIRAC.Core.Security import Locations, ProxyInfo from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC.FrameworkSystem.Client.ProxyManagerClient import gProxyManager -from DIRAC.Core.Security import ProxyInfo from DIRAC.ConfigurationSystem.Client.Helpers import Registry __RCSID__ = "$Id$" @@ -56,7 +60,7 @@ def registerCLISwitches(self): """ add options to dirac option parser """ - Script.setUsageMessage("Script to delete a dirac proxy. Default: delete local proxy only.") + Script.setUsageMessage(__doc__) Script.registerSwitch( "a", "all", diff --git a/FrameworkSystem/scripts/dirac-proxy-get-uploaded-info.py b/FrameworkSystem/scripts/dirac-proxy-get-uploaded-info.py index 445ca7fe1a9..fcf273de853 100755 --- a/FrameworkSystem/scripts/dirac-proxy-get-uploaded-info.py +++ b/FrameworkSystem/scripts/dirac-proxy-get-uploaded-info.py @@ -3,6 +3,21 @@ # File : dirac-proxy-init.py # Author : Adrian Casajus ######################################################################## +""" +Usage: + + dirac-proxy-get-uploaded-info.py (|)* + +Example: + + $ dirac-proxy-get-uploaded-info + Checking for DNs /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar + -------------------------------------------------------------------------------------------------------- + | UserDN | UserGroup | ExpirationTime | PersistentFlag | + -------------------------------------------------------------------------------------------------------- + | /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar | dirac_user | 2011-06-29 12:04:25 | True | + -------------------------------------------------------------------------------------------------------- +""" from __future__ import print_function import sys @@ -17,6 +32,7 @@ from DIRAC.ConfigurationSystem.Client.Helpers import Registry __RCSID__ = "$Id:" +Script.setUsageMessage(__doc__) userName = False diff --git a/FrameworkSystem/scripts/dirac-proxy-info.py b/FrameworkSystem/scripts/dirac-proxy-info.py index 0d9aa9e94a6..3cd48d561a0 100755 --- a/FrameworkSystem/scripts/dirac-proxy-info.py +++ b/FrameworkSystem/scripts/dirac-proxy-info.py @@ -3,7 +3,24 @@ # File : dirac-proxy-info.py # Author : Adrian Casajus ######################################################################## - +""" +Usage: + + dirac-proxy-info.py (|)* + +Example: + + $ dirac-proxy-info + subject : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar/CN=proxy/CN=proxy + issuer : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar/CN=proxy + identity : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar + timeleft : 23:53:55 + DIRAC group : dirac_user + path : /tmp/x509up_u40885 + username : vhamar + VOMS : True + VOMS fqan : ['/formation'] +""" from __future__ import print_function from DIRAC.Core.Utilities.ReturnValues import S_OK @@ -59,6 +76,7 @@ def setManagerInfo(self, arg): import sys from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.registerSwitch("f:", "file=", "File to use as user key", params.setProxyLocation) Script.registerSwitch("i", "version", "Print version", params.showVersion) Script.registerSwitch("n", "novoms", "Disable VOMS", params.disableVOMS) diff --git a/FrameworkSystem/scripts/dirac-proxy-init.py b/FrameworkSystem/scripts/dirac-proxy-init.py index fab0ff68bd4..47b23feb2d4 100755 --- a/FrameworkSystem/scripts/dirac-proxy-init.py +++ b/FrameworkSystem/scripts/dirac-proxy-init.py @@ -3,6 +3,16 @@ # File : dirac-proxy-init.py # Author : Adrian Casajus ######################################################################## +""" +Usage: + + dirac-proxy-init.py (|)* + +Example: + + $ dirac-proxy-init -g dirac_user -t --rfc + Enter Certificate password: +""" from __future__ import division import os @@ -21,7 +31,7 @@ from DIRAC.FrameworkSystem.Client.BundleDeliveryClient import BundleDeliveryClient __RCSID__ = "$Id$" - +Script.setUsageMessage(__doc__) class Params(ProxyGeneration.CLIParams): diff --git a/FrameworkSystem/scripts/dirac-status-component.py b/FrameworkSystem/scripts/dirac-status-component.py index 0257c97adff..ef5010433c2 100755 --- a/FrameworkSystem/scripts/dirac-status-component.py +++ b/FrameworkSystem/scripts/dirac-status-component.py @@ -1,19 +1,65 @@ #!/usr/bin/env python """ Status of DIRAC components using runsvstat utility + +Usage: + + dirac-status-component [option|cfgfile] ... [system [service|agent]] + +Arguments: + + system: Name of the system for the component (default *: all) + service|agent: Name of the particular component (default *: all) + +Example: + + $ dirac-status-component + DIRAC Root Path = /vo/dirac/versions/Lyon-HEAD-1296215324 + Name : Runit Uptime PID + WorkloadManagement_PilotStatusAgent : Run 4029 1697 + WorkloadManagement_JobHistoryAgent : Run 4029 1679 + Framework_CAUpdateAgent : Run 4029 1658 + Framework_SecurityLogging : Run 4025 2111 + WorkloadManagement_Matcher : Run 4029 1692 + WorkloadManagement_StalledJobAgent : Run 4029 1704 + WorkloadManagement_JobCleaningAgent : Run 4029 1676 + Web_paster : Run 4029 1683 + WorkloadManagement_MightyOptimizer : Run 4029 1695 + WorkloadManagement_JobMonitoring : Run 4025 2133 + WorkloadManagement_StatesAccountingAgent : Run 4029 1691 + RequestManagement_RequestManager : Run 4025 2141 + DataManagement_FileCatalog : Run 4024 2236 + WorkloadManagement_JobManager : Run 4024 2245 + WorkloadManagement_TaskQueueDirector : Run 4029 1693 + Framework_Notification : Run 4026 2101 + Web_httpd : Run 4029 1681 + Framework_ProxyManager : Run 4024 2260 + Framework_Monitoring : Run 4027 1948 + WorkloadManagement_WMSAdministrator : Run 4027 1926 + WorkloadManagement_InputDataAgent : Run 4029 1687 + Framework_SystemLogging : Run 4025 2129 + Accounting_DataStore : Run 4025 2162 + Framework_SystemAdministrator : Run 4026 2053 + Accounting_ReportGenerator : Run 4026 2048 + Framework_SystemLoggingDBCleaner : Run 4029 1667 + DataManagement_StorageElementProxy : Run 4024 2217 + Framework_Plotting : Run 4025 2208 + Configuration_Server : Run 4029 1653 + WorkloadManagement_SandboxStore : Run 4025 2186 + Framework_UserProfileManager : Run 4025 2182 + DataManagement_StorageElement : Run 4024 2227 + Framework_TopErrorMessagesReporter : Run 4029 1672 + Configuration_CE2CSAgent : Run 1 32461 + WorkloadManagement_JobStateUpdate : Run 4025 2117 + Framework_SystemLoggingReport : Run 4024 2220 + Framework_BundleDelivery : Run 4025 2157 """ -# from __future__ import print_function from DIRAC.Core.Base import Script Script.disableCS() -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... [system [service|agent]]' % Script.scriptName, - 'Arguments:', - ' system: Name of the system for the component (default *: all)', - ' service|agent: Name of the particular component (default *: all)'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine() args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-add-group.py b/Interfaces/scripts/dirac-admin-add-group.py index 9764f294fc1..935b25162ce 100755 --- a/Interfaces/scripts/dirac-admin-add-group.py +++ b/Interfaces/scripts/dirac-admin-add-group.py @@ -1,5 +1,19 @@ #!/usr/bin/env python +""" +Add or Modify a Group info in DIRAC +Usage: + + dirac-admin-add-group [option|cfgfile] ... Property= ... + +Arguments: + + Property=: Other properties to be added to the User like (VOMSRole=XXXX) + +Example: + + $ dirac-admin-add-group -G dirac_test +""" __RCSID__ = "$Id$" # pylint: disable=wrong-import-position @@ -35,13 +49,7 @@ def addProperty(arg): groupProperties.append(arg) -Script.setUsageMessage('\n'.join(['Add or Modify a Group info in DIRAC', - '\nUsage:\n', - ' %s [option|cfgfile] ... Property= ...' % Script.scriptName, - '\nArguments:\n', - ' Property=: Other properties to be added to the User like (VOMSRole=XXXX)', - ])) - +Script.setUsageMessage(__doc__) Script.registerSwitch('G:', 'GroupName:', 'Name of the Group (Mandatory)', setGroupName) Script.registerSwitch( 'U:', @@ -53,7 +61,6 @@ def addProperty(arg): 'Property:', 'Property to be added to the Group (Allow Multiple instances or None)', addProperty) - Script.parseCommandLine(ignoreErrors=True) if groupName is None: diff --git a/Interfaces/scripts/dirac-admin-add-host.py b/Interfaces/scripts/dirac-admin-add-host.py index 72196064f4a..e4468e22770 100755 --- a/Interfaces/scripts/dirac-admin-add-host.py +++ b/Interfaces/scripts/dirac-admin-add-host.py @@ -1,4 +1,19 @@ #!/usr/bin/env python +""" +Add or Modify a Host info in DIRAC + +Usage: + + dirac-admin-add-host [option|cfgfile] ... Property= ... + +Arguments: + + Property=: Other properties to be added to the User like (Responsible=XXX) + +Example: + + $ dirac-admin-add-host -H dirac.i2np3.fr -D /O=GRID-FR/C=FR/O=CNRS/OU=CC-IN2P3/CN=dirac.in2p3.fr +""" __RCSID__ = "$Id$" import DIRAC from DIRAC.Core.Base import Script @@ -30,13 +45,7 @@ def addProperty(arg): hostProperties.append(arg) -Script.setUsageMessage('\n'.join(['Add or Modify a Host info in DIRAC', - '\nUsage:\n', - ' %s [option|cfgfile] ... Property= ...' % Script.scriptName, - '\nArguments:\n', - ' Property=: Other properties to be added to the User like (Responsible=XXX)', - ])) - +Script.setUsageMessage(__doc__) Script.registerSwitch('H:', 'HostName:', 'Name of the Host (Mandatory)', setHostName) Script.registerSwitch('D:', 'HostDN:', 'DN of the Host Certificate (Mandatory)', setHostDN) Script.registerSwitch( @@ -44,7 +53,6 @@ def addProperty(arg): 'Property:', 'Property to be added to the Host (Allow Multiple instances or None)', addProperty) - Script.parseCommandLine(ignoreErrors=True) if hostName is None or hostDN is None: diff --git a/Interfaces/scripts/dirac-admin-add-user.py b/Interfaces/scripts/dirac-admin-add-user.py index a3945a4a0e6..ef128c1fa85 100755 --- a/Interfaces/scripts/dirac-admin-add-user.py +++ b/Interfaces/scripts/dirac-admin-add-user.py @@ -1,5 +1,19 @@ #!/usr/bin/env python +""" +Add or Modify a User info in DIRAC +Usage: + + dirac-admin-add-user [option|cfgfile] ... Property= ... + +Arguments: + + Property=: Properties to be added to the User like (Phone=XXXX) + +Example: + + $ dirac-admin-add-user -N vhamar -D /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar -M hamar@cppm.in2p3.fr -G dirac_user +""" __RCSID__ = "$Id$" import DIRAC @@ -43,12 +57,7 @@ def addUserGroup(arg): userGroups.append(arg) -Script.setUsageMessage('\n'.join(['Add or Modify a User info in DIRAC', - 'Usage:', - ' %s [option|cfgfile] ... Property= ...' % Script.scriptName, - 'Arguments:', - ' Property=: Properties to be added to the User like (Phone=XXXX)', ])) - +Script.setUsageMessage(__doc__) Script.registerSwitch('N:', 'UserName:', 'Short Name of the User (Mandatory)', setUserName) Script.registerSwitch('D:', 'UserDN:', 'DN of the User Certificate (Mandatory)', setUserDN) Script.registerSwitch('M:', 'UserMail:', 'eMail of the user (Mandatory)', setUserMail) @@ -57,7 +66,6 @@ def addUserGroup(arg): 'UserGroup:', 'Name of the Group for the User (Allow Multiple instances or None)', addUserGroup) - Script.parseCommandLine(ignoreErrors=True) if userName is None or userDN is None or userMail is None: diff --git a/Interfaces/scripts/dirac-admin-allow-site.py b/Interfaces/scripts/dirac-admin-allow-site.py index dc95c8f3fc9..6eb1f6515ab 100755 --- a/Interfaces/scripts/dirac-admin-allow-site.py +++ b/Interfaces/scripts/dirac-admin-allow-site.py @@ -4,7 +4,20 @@ # Author : Stuart Paterson ######################################################################## """ - Add Site to Active mask for current Setup +Add Site to Active mask for current Setup + +Usage: + + dirac-admin-allow-site [option|cfgfile] ... Site Comment + +Arguments: + + Site: Name of the Site + Comment: Reason of the action + +Example: + + $ dirac-admin-allow-site LCG.IN2P3.fr "FRANCE" """ from __future__ import print_function @@ -13,14 +26,8 @@ import time from DIRAC.Core.Base import Script - +Script.setUsageMessage(__doc__) Script.registerSwitch("E:", "email=", "Boolean True/False (True by default)") -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... Site Comment' % Script.scriptName, - 'Arguments:', - ' Site: Name of the Site', - ' Comment: Reason of the action'])) Script.parseCommandLine(ignoreErrors=True) from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin diff --git a/Interfaces/scripts/dirac-admin-ban-site.py b/Interfaces/scripts/dirac-admin-ban-site.py index f9ea7d09cc4..e3413ea2fcd 100755 --- a/Interfaces/scripts/dirac-admin-ban-site.py +++ b/Interfaces/scripts/dirac-admin-ban-site.py @@ -4,7 +4,20 @@ # Author : Stuart Paterson ######################################################################## """ - Remove Site from Active mask for current Setup +Remove Site from Active mask for current Setup + +Usage: + + dirac-admin-ban-site [option|cfgfile] ... Site Comment + +Arguments: + + Site: Name of the Site + Comment: Reason of the action + +Example: + + $ dirac-admin-ban-site LCG.IN2P3.fr "Pilot installation problems" """ from __future__ import print_function @@ -15,13 +28,8 @@ from DIRAC import exit as DIRACExit, gConfig, gLogger from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.registerSwitch("E:", "email=", "Boolean True/False (True by default)") -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... Site Comment' % Script.scriptName, - 'Arguments:', - ' Site: Name of the Site', - ' Comment: Reason of the action'])) Script.parseCommandLine(ignoreErrors=True) from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations diff --git a/Interfaces/scripts/dirac-admin-ce-info.py b/Interfaces/scripts/dirac-admin-ce-info.py index 8b3d8803c55..f44790173fa 100755 --- a/Interfaces/scripts/dirac-admin-ce-info.py +++ b/Interfaces/scripts/dirac-admin-ce-info.py @@ -4,26 +4,34 @@ # Author : Vladimir Romanovsky ######################################################################## """ - Retrieve Site Associated to a given CE +Retrieve Site Associated to a given CE + +Usage: + + dirac-admin-ce-info [option|cfgfile] ... CE ... + +Arguments: + + CE: Name of the CE (mandatory) + +Example: + + $ dirac-admin-ce-info LCG.IN2P3.fr """ from __future__ import print_function __RCSID__ = "$Id$" from DIRAC import gConfig, gLogger, exit as Dexit from DIRAC.Core.Base import Script -from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCESiteMapping -from DIRAC.ConfigurationSystem.Client.Helpers import cfgPath - - -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... CE ...' % Script.scriptName, - 'Arguments:', - ' CE: Name of the CE (mandatory)'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() +from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCESiteMapping +from DIRAC.ConfigurationSystem.Client.Helpers import cfgPath + + if len(args) < 1: Script.showHelp(exitCode=1) diff --git a/Interfaces/scripts/dirac-admin-delete-user.py b/Interfaces/scripts/dirac-admin-delete-user.py index 204bf6e6389..92706a635b5 100755 --- a/Interfaces/scripts/dirac-admin-delete-user.py +++ b/Interfaces/scripts/dirac-admin-delete-user.py @@ -5,18 +5,26 @@ # Author : Adrian Casajus ######################################################################## """ - Remove User from Configuration +Remove User from Configuration + +Usage: + + dirac-admin-delete-user [option|cfgfile] ... User ... + +Arguments: + + User: User name + +Example: + + $ dirac-admin-delete-user vhamar """ from __future__ import print_function __RCSID__ = "$Id$" from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... User ...' % Script.scriptName, - 'Arguments:', - ' User: User name'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-get-banned-sites.py b/Interfaces/scripts/dirac-admin-get-banned-sites.py index a0e1c838f37..6c18c801ba5 100755 --- a/Interfaces/scripts/dirac-admin-get-banned-sites.py +++ b/Interfaces/scripts/dirac-admin-get-banned-sites.py @@ -3,10 +3,19 @@ # File : dirac-admin-get-banned-sites # Author : Stuart Paterson ######################################################################## +""" +Usage: + dirac-admin-get-banned-sites (|)* +Example: + + $ dirac-admin-get-banned-sites + LCG.IN2P3.fr Site not present in logging table +""" __RCSID__ = "$Id$" from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) from DIRAC import gLogger, exit as DIRACExit diff --git a/Interfaces/scripts/dirac-admin-get-job-pilot-output.py b/Interfaces/scripts/dirac-admin-get-job-pilot-output.py index d52723f5fa5..88feef08db5 100755 --- a/Interfaces/scripts/dirac-admin-get-job-pilot-output.py +++ b/Interfaces/scripts/dirac-admin-get-job-pilot-output.py @@ -4,18 +4,26 @@ # Author : Stuart Paterson ######################################################################## """ - Retrieve the output of the pilot that executed a given job +Retrieve the output of the pilot that executed a given job + +Usage: + + dirac-admin-get-job-pilot-output [option|cfgfile] ... JobID ... + +Arguments: + + JobID: DIRAC ID of the Job + +Example: + + $ dirac-admin-get-job-pilot-output 34 """ from __future__ import print_function __RCSID__ = "$Id$" from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... JobID ...' % Script.scriptName, - 'Arguments:', - ' JobID: DIRAC ID of the Job'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-get-job-pilots.py b/Interfaces/scripts/dirac-admin-get-job-pilots.py index 972a490b959..2215471b9c2 100755 --- a/Interfaces/scripts/dirac-admin-get-job-pilots.py +++ b/Interfaces/scripts/dirac-admin-get-job-pilots.py @@ -4,7 +4,37 @@ # Author : Stuart Paterson ######################################################################## """ - Retrieve info about pilots that have matched a given Job +Retrieve info about pilots that have matched a given Job + +Usage: + + dirac-admin-get-job-pilots [option|cfgfile] ... JobID + +Arguments: + + JobID: DIRAC ID of the Job + +Example: + + $ dirac-admin-get-job-pilots 1848 + {'https://marlb.in2p3.fr:9000/bqYViq6KrVgGfr6wwgT45Q': {'AccountingSent': 'False', + 'BenchMark': 8.1799999999999997, + 'Broker': 'marwms.in2p3.fr', + 'DestinationSite': 'lpsc-ce.in2p3.fr', + 'GridSite': 'LCG.LPSC.fr', + 'GridType': 'gLite', + 'Jobs': [1848L], + 'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 39, 10), + 'OutputReady': 'True', + 'OwnerDN': '/O=GRID-FR/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', + 'OwnerGroup': '/biomed', + 'ParentID': 0L, + 'PilotID': 2247L, + 'PilotJobReference': 'https://marlb.in2p3.fr:9000/bqYViq6KT45Q', + 'PilotStamp': '', + 'Status': 'Done', + 'SubmissionTime': datetime.datetime(2011, 2, 21, 12, 27, 52), + 'TaskQueueID': 399L}} """ from __future__ import print_function __RCSID__ = "$Id$" @@ -13,11 +43,7 @@ from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... JobID' % Script.scriptName, - 'Arguments:', - ' JobID: DIRAC ID of the Job'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-get-pilot-info.py b/Interfaces/scripts/dirac-admin-get-pilot-info.py index c5e5b2ed155..170f071742c 100755 --- a/Interfaces/scripts/dirac-admin-get-pilot-info.py +++ b/Interfaces/scripts/dirac-admin-get-pilot-info.py @@ -1,10 +1,39 @@ #!/usr/bin/env python ######################################################################## -# File : dirac-admin-get-pilot-output +# File : dirac-admin-get-pilot-info # Author : Ricardo Graciani ######################################################################## """ - Retrieve available info about the given pilot +Retrieve available info about the given pilot + +Usage: + + dirac-admin-get-pilot-info [option|cfgfile] ... PilotID ... + +Arguments: + + PilotID: Grid ID of the pilot + +Example: + + $ dirac-admin-get-pilot-info https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw + {'https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw': {'AccountingSent': 'False', + 'BenchMark': 0.0, + 'Broker': 'marwms.in2p3.fr', + 'DestinationSite': 'cclcgceli01.in2p3.fr', + 'GridSite': 'LCG.IN2P3.fr', + 'GridType': 'gLite', + 'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 49, 14), + 'OutputReady': 'False', + 'OwnerDN': '/O=GRID-FR/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', + 'OwnerGroup': '/biomed', + 'ParentID': 0L, + 'PilotID': 2241L, + 'PilotJobReference': 'https://marlb.in2p3.fr:9000/2KHF4_ZrQjkw', + 'PilotStamp': '', + 'Status': 'Done', + 'SubmissionTime': datetime.datetime(2011, 2, 21, 12, 27, 52), + 'TaskQueueID': 399L}} """ from __future__ import print_function __RCSID__ = "$Id$" @@ -22,11 +51,7 @@ def setExtendedPrint(_arg): extendedPrint = True -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... PilotID ...' % Script.scriptName, - 'Arguments:', - ' PilotID: Grid ID of the pilot'])) +Script.setUsageMessage(__doc__) Script.registerSwitch('e', 'extended', 'Get extended printout', setExtendedPrint) Script.parseCommandLine(ignoreErrors=True) diff --git a/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py b/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py index 3cda7057c79..ec89a4dc48e 100755 --- a/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py +++ b/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py @@ -4,7 +4,38 @@ # Author : Stuart Paterson ######################################################################## """ - Retrieve logging info of a Grid pilot +Retrieve logging info of a Grid pilot + +Usage: + + dirac-admin-get-pilot-logging-info [option|cfgfile] ... PilotID ... + +Arguments: + + PilotID: Grid ID of the pilot + +Example: + + $ dirac-admin-get-pilot-logging-info https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw + Pilot Reference: dirac-admin-get-pilot-logging-info https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw + ===================== glite-job-logging-info Success ===================== + + LOGGING INFORMATION: + + Printing info for the Job : https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw + + --- + Event: RegJob + - Arrived = Mon Feb 21 13:27:50 2011 CET + - Host = marwms.in2p3.fr + - Jobtype = SIMPLE + - Level = SYSTEM + - Ns = https://marwms.in2p3.fr:7443/glite_wms_wmproxy_server + - Nsubjobs = 0 + - Parent = https://marlb.in2p3.fr:9000/WQHVOB1mI4oqrlYz2ZKtgA + - Priority = asynchronous + - Seqcode = UI=000000:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000 + - Source = NetworkServer """ from __future__ import print_function @@ -14,11 +45,7 @@ from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... PilotID ...' % Script.scriptName, - 'Arguments:', - ' PilotID: Grid ID of the pilot'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-get-pilot-output.py b/Interfaces/scripts/dirac-admin-get-pilot-output.py index 66f312092e7..3ae3ff4adb4 100755 --- a/Interfaces/scripts/dirac-admin-get-pilot-output.py +++ b/Interfaces/scripts/dirac-admin-get-pilot-output.py @@ -5,19 +5,28 @@ # Author : Stuart Paterson ######################################################################## """ - Retrieve output of a Grid pilot +Retrieve output of a Grid pilot + +Usage: + + dirac-admin-get-pilot-output [option|cfgfile] ... PilotID ... + +Arguments: + + PilotID: Grid ID of the pilot + +Example: + + $ dirac-admin-get-pilot-output https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw + $ ls -la + drwxr-xr-x 2 hamar marseill 2048 Feb 21 14:13 pilot_26KCLKBFtxXKHF4_ZrQjkw """ from __future__ import print_function __RCSID__ = "$Id$" from DIRAC.Core.Base import Script - -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... PilotID ...' % Script.scriptName, - 'Arguments:', - ' PilotID: Grid ID of the pilot'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-get-site-mask.py b/Interfaces/scripts/dirac-admin-get-site-mask.py index e6a763b5167..2220427f293 100755 --- a/Interfaces/scripts/dirac-admin-get-site-mask.py +++ b/Interfaces/scripts/dirac-admin-get-site-mask.py @@ -3,20 +3,35 @@ # File : dirac-admin-get-site-mask # Author : Stuart Paterson ######################################################################## +""" +Get the list of sites enabled in the mask for job submission + +Usage: + dirac-admin-get-site-mask [options] + +Example: + + $ dirac-admin-get-site-mask + LCG.CGG.fr + LCG.CPPM.fr + LCG.GRIF.fr + LCG.IBCP.fr + LCG.IN2P3.fr + LCG.IPNL.fr + LCG.IPSL-IPGP.fr + LCG.IRES.fr + LCG.LAPP.fr + LCG.LPSC.fr + LCG.M3PEC.fr + LCG.MSFG.fr +""" from __future__ import print_function __RCSID__ = "$Id$" - from DIRAC.Core.Base import Script -Script.setUsageMessage(""" -Get the list of sites enabled in the mask for job submission - -Usage: - %s [options] -""" % Script.scriptName) - +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) from DIRAC import exit as DIRACExit, gLogger diff --git a/Interfaces/scripts/dirac-admin-list-hosts.py b/Interfaces/scripts/dirac-admin-list-hosts.py index 9f8979f7bac..0e85341f3fb 100755 --- a/Interfaces/scripts/dirac-admin-list-hosts.py +++ b/Interfaces/scripts/dirac-admin-list-hosts.py @@ -1,13 +1,25 @@ #!/usr/bin/env python ######################################################################## -# File : dirac-admin-list-users +# File : dirac-admin-list-hosts # Author : Adrian Casajus ######################################################################## +""" +Usage: + + dirac-admin-list-hosts (|)* + +Example: + + $ dirac-admin-list-hosts + dirac.in2p3.fr + host-dirac.in2p3.fr +""" from __future__ import print_function __RCSID__ = "$Id$" from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.registerSwitch("e", "extended", "Show extended info") Script.parseCommandLine(ignoreErrors=True) diff --git a/Interfaces/scripts/dirac-admin-list-users.py b/Interfaces/scripts/dirac-admin-list-users.py index 27734aff60b..0147044b76f 100755 --- a/Interfaces/scripts/dirac-admin-list-users.py +++ b/Interfaces/scripts/dirac-admin-list-users.py @@ -4,19 +4,32 @@ # Author : Adrian Casajus ######################################################################## """ - Lists the users in the Configuration. If no group is specified return all users. +Lists the users in the Configuration. If no group is specified return all users. + +Usage: + + dirac-admin-list-users [option|cfgfile] ... [Group] ... + +Arguments: + + Group: Only users from this group (default: all) + +Example: + + $ dirac-admin-list-users + All users registered: + vhamar + msapunov + atsareg """ from __future__ import print_function __RCSID__ = "$Id$" + import DIRAC from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.registerSwitch("e", "extended", "Show extended info") -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... [Group] ...' % Script.scriptName, - 'Arguments:', - ' Group: Only users from this group (default: all)'])) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-modify-user.py b/Interfaces/scripts/dirac-admin-modify-user.py index ea9bb6e2f96..5bcea007db4 100755 --- a/Interfaces/scripts/dirac-admin-modify-user.py +++ b/Interfaces/scripts/dirac-admin-modify-user.py @@ -4,7 +4,21 @@ # Author : Adrian Casajus ######################################################################## """ - Modify a user in the CS. +Modify a user in the CS. + +Usage: + + dirac-admin-modify-user [option|cfgfile] ... user DN group [group] ... + +Arguments: + + user: User name (mandatory) + DN: DN of the User (mandatory) + group: Add the user to the group (mandatory) + +Example: + + $ dirac-admin-modify-user vhamar group dirac_user """ from __future__ import print_function @@ -13,18 +27,10 @@ import DIRAC from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.registerSwitch("p:", "property=", "Add property to the user =") Script.registerSwitch("f", "force", "create the user if it doesn't exist") - -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... user DN group [group] ...' % Script.scriptName, - 'Arguments:', - ' user: User name (mandatory)', - ' DN: DN of the User (mandatory)', - ' group: Add the user to the group (mandatory)'])) Script.parseCommandLine(ignoreErrors=True) - args = Script.getPositionalArgs() if len(args) < 3: diff --git a/Interfaces/scripts/dirac-admin-pilot-summary.py b/Interfaces/scripts/dirac-admin-pilot-summary.py index dea1b4d44cc..f798ffd2455 100755 --- a/Interfaces/scripts/dirac-admin-pilot-summary.py +++ b/Interfaces/scripts/dirac-admin-pilot-summary.py @@ -3,7 +3,30 @@ # File : dirac-admin-pilot-summary # Author : Stuart Paterson ######################################################################## +""" +Usage: + dirac-admin-pilot-summary (|)* + +Example: + + $ dirac-admin-pilot-summary + CE Status Count Status Count Status Count Status Count Status Count Status Count Status Count + sbgce1.in2p3.fr Done 31 + lpsc-ce.in2p3.fr Done 111 + lyogrid02.in2p3.fr Done 81 + egee-ce.datagrid.jussieu.fr Aborted 81 Done 18 + cclcgceli03.in2p3.fr Done 275 + marce01.in2p3.fr Done 156 + node07.datagrid.cea.fr Done 75 + cclcgceli01.in2p3.fr Aborted 1 Done 235 + ce0.m3pec.u-bordeaux1.fr Done 63 + grive11.ibcp.fr Aborted 3 Done 90 + lptace01.msfg.fr Aborted 3 Aborted_Day 3 Done 90 + ipnls2001.in2p3.fr Done 87 + Total Aborted 89 Done 1423 Ready 0 Running 0 Scheduled 0 Submitted 0 Waiting 0 + lapp-ce01.in2p3.fr Aborted 1 Done 111 +""" from __future__ import print_function __RCSID__ = "$Id$" @@ -12,6 +35,7 @@ import DIRAC from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-reset-job.py b/Interfaces/scripts/dirac-admin-reset-job.py index 778ec26f26d..b76c3bd7d59 100755 --- a/Interfaces/scripts/dirac-admin-reset-job.py +++ b/Interfaces/scripts/dirac-admin-reset-job.py @@ -4,7 +4,20 @@ # Author : Stuart Paterson ######################################################################## """ - Reset a job or list of jobs in the WMS +Reset a job or list of jobs in the WMS + +Usage: + + dirac-admin-reset-job [option|cfgfile] ... JobID ... + +Arguments: + + JobID: DIRAC ID of the Job + +Example: + + $ dirac-admin-reset-job 1848 + Reset Job 1848 """ from __future__ import print_function @@ -13,13 +26,8 @@ import DIRAC from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... JobID ...' % Script.scriptName, - 'Arguments:', - ' JobID: DIRAC ID of the Job'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) - args = Script.getPositionalArgs() if len(args) < 1: diff --git a/Interfaces/scripts/dirac-admin-service-ports.py b/Interfaces/scripts/dirac-admin-service-ports.py index acc5d9a3d26..09bf38d8a69 100755 --- a/Interfaces/scripts/dirac-admin-service-ports.py +++ b/Interfaces/scripts/dirac-admin-service-ports.py @@ -4,7 +4,42 @@ # Author : Stuart Paterson ######################################################################## """ - Print the service ports for the specified setup +Print the service ports for the specified setup + +Usage: + + dirac-admin-service-ports [option|cfgfile] ... [Setup] + +Arguments: + + Setup: Name of the setup + +Example: + + $ dirac-admin-service-ports + {'Accounting/DataStore': 9133, + 'Accounting/ReportGenerator': 9134, + 'DataManagement/FileCatalog': 9197, + 'DataManagement/StorageElement': 9148, + 'DataManagement/StorageElementProxy': 9149, + 'Framework/BundleDelivery': 9158, + 'Framework/Monitoring': 9142, + 'Framework/Notification': 9154, + 'Framework/Plotting': 9157, + 'Framework/ProxyManager': 9152, + 'Framework/SecurityLogging': 9153, + 'Framework/SystemAdministrator': 9162, + 'Framework/SystemLogging': 9141, + 'Framework/SystemLoggingReport': 9144, + 'Framework/UserProfileManager': 9155, + 'RequestManagement/RequestManager': 9143, + 'WorkloadManagement/JobManager': 9132, + 'WorkloadManagement/JobMonitoring': 9130, + 'WorkloadManagement/JobStateUpdate': 9136, + 'WorkloadManagement/PilotManager': 9171, + 'WorkloadManagement/Matcher': 9170, + 'WorkloadManagement/SandboxStore': 9196, + 'WorkloadManagement/WMSAdministrator': 9145} """ from __future__ import print_function @@ -13,11 +48,7 @@ import DIRAC from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... [Setup]' % Script.scriptName, - 'Arguments:', - ' Setup: Name of the setup'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-set-site-protocols.py b/Interfaces/scripts/dirac-admin-set-site-protocols.py index b6508c64ebe..703ee452bd4 100755 --- a/Interfaces/scripts/dirac-admin-set-site-protocols.py +++ b/Interfaces/scripts/dirac-admin-set-site-protocols.py @@ -4,7 +4,19 @@ # Author : Stuart Paterson ######################################################################## """ - Defined protocols for each SE for a given site. +Defined protocols for each SE for a given site. + +Usage: + + dirac-admin-set-site-protocols [option|cfgfile] ... Protocol ... + +Arguments: + + Protocol: SE access protocol (mandatory) + +Example: + + $ dirac-admin-set-site-protocols """ from __future__ import print_function @@ -13,12 +25,8 @@ import DIRAC from DIRAC.Core.Base import Script +Script.setUsageMessage(__doc__) Script.registerSwitch("", "Site=", "Site for which protocols are to be set (mandatory)") -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... Protocol ...' % Script.scriptName, - 'Arguments:', - ' Protocol: SE access protocol (mandatory)'])) Script.parseCommandLine(ignoreErrors=True) site = None diff --git a/Interfaces/scripts/dirac-admin-site-info.py b/Interfaces/scripts/dirac-admin-site-info.py index b71532ba000..165201401d9 100755 --- a/Interfaces/scripts/dirac-admin-site-info.py +++ b/Interfaces/scripts/dirac-admin-site-info.py @@ -4,7 +4,25 @@ # Author : Stuart Paterson ######################################################################## """ - Print Configuration information for a given Site +Print Configuration information for a given Site + +Usage: + + dirac-admin-site-info [option|cfgfile] ... Site ... + +Arguments: + + Site: Name of the Site + +Example: + + $ dirac-admin-site-info LCG.IN2P3.fr + {'CE': 'cclcgceli01.in2p3.fr, cclcgceli03.in2p3.fr, sbgce1.in2p3.fr', + 'Coordinates': '4.8655:45.7825', + 'Mail': 'grid.admin@cc.in2p3.fr', + 'MoUTierLevel': '1', + 'Name': 'IN2P3-CC', + 'SE': 'IN2P3-disk, DIRAC-USER'} """ from __future__ import print_function @@ -13,11 +31,7 @@ import DIRAC from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... Site ...' % Script.scriptName, - 'Arguments:', - ' Site: Name of the Site'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-site-mask-logging.py b/Interfaces/scripts/dirac-admin-site-mask-logging.py index 824dc3766da..d9733559905 100755 --- a/Interfaces/scripts/dirac-admin-site-mask-logging.py +++ b/Interfaces/scripts/dirac-admin-site-mask-logging.py @@ -1,25 +1,32 @@ #!/usr/bin/env python -""" - Retrieves site mask logging information. -""" - ######################################################################## # File : dirac-admin-site-mask-logging # Author : Stuart Paterson ######################################################################## +""" +Retrieves site mask logging information. + +Usage: + + dirac-admin-site-mask-logging [option|cfgfile] ... Site ... +Arguments: + + Site: Name of the Site + +Example: + + $ dirac-admin-site-mask-logging LCG.IN2P3.fr + Site Mask Logging Info for LCG.IN2P3.fr + Active 2010-12-08 21:28:16 ( atsareg ) +""" from __future__ import print_function __RCSID__ = "$Id$" import DIRAC from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... Site ...' % Script.scriptName, - 'Arguments:', - ' Site: Name of the Site'])) - +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() diff --git a/Interfaces/scripts/dirac-admin-sync-users-from-file.py b/Interfaces/scripts/dirac-admin-sync-users-from-file.py index e5fba5fcaea..b8b4feb7921 100755 --- a/Interfaces/scripts/dirac-admin-sync-users-from-file.py +++ b/Interfaces/scripts/dirac-admin-sync-users-from-file.py @@ -4,7 +4,19 @@ # Author : Adrian Casajus ######################################################################## """ - Sync users in Configuration with the cfg contents. +Sync users in Configuration with the cfg contents. + +Usage: + + dirac-admin-sync-users-from-file [option|cfgfile] ... UserCfg + +Arguments: + + UserCfg: Cfg FileName with Users as sections containing DN, Groups, and other properties as options + +Example: + + $ dirac-admin-sync-users-from-file file_users.cfg """ from __future__ import print_function @@ -14,18 +26,9 @@ from DIRAC.Core.Base import Script from DIRAC.Core.Utilities.CFG import CFG +Script.setUsageMessage(__doc__) Script.registerSwitch("t", "test", "Only test. Don't commit changes") -Script.setUsageMessage( - '\n'.join( - [ - __doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... UserCfg' % - Script.scriptName, - 'Arguments:', - ' UserCfg: Cfg FileName with Users as sections containing DN, Groups, and other properties as options'])) Script.parseCommandLine(ignoreErrors=True) - args = Script.getExtraCLICFGFiles() if len(args) < 1: diff --git a/Interfaces/scripts/dirac-framework-ping-service.py b/Interfaces/scripts/dirac-framework-ping-service.py index 2bb702b53ec..86ce98d8b6d 100755 --- a/Interfaces/scripts/dirac-framework-ping-service.py +++ b/Interfaces/scripts/dirac-framework-ping-service.py @@ -4,7 +4,42 @@ # Author : Stuart Paterson ######################################################################## """ - Ping the given DIRAC Service +Ping the given DIRAC Service + +Usage: + + dirac-framework-ping-service [option|cfgfile] ... System Service|System/Agent + +Arguments: + + System: Name of the DIRAC system (ie: WorkloadManagement) + Service: Name of the DIRAC service (ie: Matcher) + url: URL of the service to ping (instead of System and Service) + +Example: + + $ dirac-framework-ping-service WorkloadManagement PilotManager + {'OK': True, + 'Value': {'cpu times': {'children system time': 0.0, + 'children user time': 0.0, + 'elapsed real time': 8778481.7200000007, + 'system time': 54.859999999999999, + 'user time': 361.06999999999999}, + 'host uptime': 4485212L, + 'load': '3.44 3.90 4.02', + 'name': 'WorkloadManagement/PilotManager', + 'service start time': datetime.datetime(2011, 2, 21, 8, 58, 35, 521438), + 'service uptime': 85744, + 'service url': 'dips://dirac.in2p3.fr:9171/WorkloadManagement/PilotManager', + 'time': datetime.datetime(2011, 3, 14, 11, 47, 40, 394957), + 'version': 'v5r12-pre9'}, + 'rpcStub': (('WorkloadManagement/PilotManager', + {'delegatedDN': '/O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar', + 'delegatedGroup': 'dirac_user', + 'skipCACheck': True, + 'timeout': 120}), + 'ping', + ())} """ from __future__ import print_function @@ -13,13 +48,7 @@ import DIRAC from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... System Service|System/Agent' % Script.scriptName, - 'Arguments:', - ' System: Name of the DIRAC system (ie: WorkloadManagement) (mandatory)', - ' Service: Name of the DIRAC service (ie: Matcher) (mandatory)', - ' url: URL of the service to ping (instead of System and Service)'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=True) args = Script.getPositionalArgs() system = None diff --git a/Interfaces/scripts/dirac-utils-file-adler.py b/Interfaces/scripts/dirac-utils-file-adler.py index 7bcb4150870..366ef83c0b8 100755 --- a/Interfaces/scripts/dirac-utils-file-adler.py +++ b/Interfaces/scripts/dirac-utils-file-adler.py @@ -3,7 +3,20 @@ # File : dirac-utils-file-adler ######################################################################## """ - Calculate alder32 of the supplied file +Calculate alder32 of the supplied file + +Usage: + + dirac-utils-file-adler [option|cfgfile] ... File ... + +Arguments: + + File: File Name + +Example: + + $ dirac-utils-file-adler Example.tgz + Example.tgz 88b4ca8b """ from __future__ import print_function @@ -13,11 +26,7 @@ from DIRAC.Core.Utilities.Adler import fileAdler from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... File ...' % Script.scriptName, - 'Arguments:', - ' File: File Name'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=False) files = Script.getPositionalArgs() if len(files) == 0: diff --git a/Interfaces/scripts/dirac-utils-file-md5.py b/Interfaces/scripts/dirac-utils-file-md5.py index a6388542d41..e242b4709ed 100755 --- a/Interfaces/scripts/dirac-utils-file-md5.py +++ b/Interfaces/scripts/dirac-utils-file-md5.py @@ -1,10 +1,23 @@ #!/usr/bin/env python ######################################################################## -# File : dirac-utils-file-adler +# File : dirac-utils-file-md5 # Author : ######################################################################## """ - Calculate md5 of the supplied file +Calculate md5 of the supplied file + +Usage: + + dirac-utils-file-md5 [option|cfgfile] ... File ... + +Arguments: + + File: File Name + +Example: + + $ dirac-utils-file-md5 Example.tgz + Example.tgz 5C1A1102-EAFD-2CBA-25BD-0EFCCFC3623E """ from __future__ import print_function @@ -14,11 +27,7 @@ from DIRAC.Core.Utilities.File import makeGuid from DIRAC.Core.Base import Script -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ... File ...' % Script.scriptName, - 'Arguments:', - ' File: File Name'])) +Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=False) files = Script.getPositionalArgs() if len(files) == 0: diff --git a/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py b/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py index 2c90424cbb4..3a4f56a1769 100755 --- a/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py +++ b/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py @@ -4,7 +4,23 @@ # Author : Ricardo Graciani ######################################################################## """ - Show details of currently active Task Queues +Show details of currently active Task Queues + +Usage: + + dirac-admin-show-task-queues [option|cfgfile] + +Example: + + $ dirac-admin-show-task-queues + Getting TQs.. + * TQ 401 + CPUTime: 360 + Jobs: 3 + OwnerDN: /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar + OwnerGroup: dirac_user + Priority: 1.0 + Setup: Dirac-Production """ from __future__ import print_function @@ -36,14 +52,9 @@ def setTaskQueueID(optVal): taskQueueID = int(optVal) return S_OK() - +Script.setUsageMessage(__doc__) Script.registerSwitch("v", "verbose", "give max details about task queues", setVerbose) Script.registerSwitch("t:", "taskQueue=", "show this task queue only", setTaskQueueID) - -Script.setUsageMessage('\n'.join([__doc__.split('\n')[1], - 'Usage:', - ' %s [option|cfgfile] ' % Script.scriptName])) - Script.parseCommandLine(initializeMonitor=False) result = MatcherClient().getActiveTaskQueues() diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-group.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-group.rst deleted file mode 100644 index 55305502032..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-group.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _admin_dirac-admin-add-group: - -===================== -dirac-admin-add-group -===================== - -Add or Modify a Group info in DIRAC - -Usage:: - - dirac-admin-add-group [option|cfgfile] ... Property= ... - -Arguments:: - - Property=: Other properties to be added to the User like (VOMSRole=XXXX) - -Options:: - - -G --GroupName : Name of the Group (Mandatory) - -U --UserName : Short Name of user to be added to the Group (Allow Multiple instances or None) - -P --Property : Property to be added to the Group (Allow Multiple instances or None) - -Example:: - - $ dirac-admin-add-group -G dirac_test - $ diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-host.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-host.rst deleted file mode 100644 index 9a87ca8a58d..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-host.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _admin_dirac-admin-add-host: - -==================== -dirac-admin-add-host -==================== - -Add or Modify a Host info in DIRAC - -Usage:: - - dirac-admin-add-host [option|cfgfile] ... Property= ... - -Arguments:: - - Property=: Other properties to be added to the User like (Responsible=XXXX) - -Options:: - - -H --HostName : Name of the Host (Mandatory) - -D --HostDN : DN of the Host Certificate (Mandatory) - -P --Property : Property to be added to the Host (Allow Multiple instances or None) - -Example:: - - $ dirac-admin-add-host -H dirac.i2np3.fr -D /O=GRID-FR/C=FR/O=CNRS/OU=CC-IN2P3/CN=dirac.in2p3.fr diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-site.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-site.rst deleted file mode 100644 index f9ca2ce48c6..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-site.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. _admin_dirac-admin-add-site: - -==================== -dirac-admin-add-site -==================== - -Add a new DIRAC SiteName to DIRAC Configuration, including one or more CEs. - -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 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-user.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-user.rst deleted file mode 100644 index 2521600a4e1..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-add-user.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _admin_dirac-admin-add-user: - -==================== -dirac-admin-add-user -==================== - -Add or Modify a User info in DIRAC - -Usage:: - - dirac-admin-add-user [option|cfgfile] ... Property= ... - -Arguments:: - - Property=: Properties to be added to the User like (Phone=XXXX) - -Options:: - - -N --UserName : Short Name of the User (Mandatory) - -D --UserDN : DN of the User Certificate (Mandatory) - -M --UserMail : eMail of the user (Mandatory) - -G --UserGroup : Name of the Group for the User (Allow Multiple instances or None) - -Example:: - - $ dirac-admin-add-user -N vhamar -D /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar -M hamar@cppm.in2p3.fr -G dirac_user - $ diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-se.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-se.rst deleted file mode 100644 index 5986ffa6b0b..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-se.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _admin_dirac-admin-allow-se: - -==================== -dirac-admin-allow-se -==================== - -Enable using one or more Storage Elements - -Usage:: - - dirac-admin-allow-se SE1 [SE2 ...] - -Options:: - - -r --AllowRead : Allow only reading from the storage element - -w --AllowWrite : Allow only writing to the storage element - -k --AllowCheck : Allow only check access to the storage element - -v --AllowRemove : Allow only remove access to the storage element - -a --All : Allow all access to the storage element - -m --Mute : Do not send email - -S --Site : Allow all SEs associated to site - -Example:: - - $ dirac-admin-allow-se M3PEC-disk - $ diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-site.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-site.rst deleted file mode 100644 index fc94109d748..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-allow-site.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _admin_dirac-admin-allow-site: - -====================== -dirac-admin-allow-site -====================== - -Add Site to Active mask for current Setup - -Usage:: - - dirac-admin-allow-site [option|cfgfile] ... Site Comment - -Arguments:: - - Site: Name of the Site - Comment: Reason of the action - -Options:: - - -E --email : Boolean True/False (True by default) - -Example:: - - - $ dirac-admin-allow-site LCG.IN2P3.fr 'FRANCE' diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-se.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-se.rst deleted file mode 100644 index 9f2044252ef..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-se.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _admin_dirac-admin-ban-se: - -================== -dirac-admin-ban-se -================== - -Ban one or more Storage Elements for usage - -Usage:: - - dirac-admin-ban-se SE1 [SE2 ...] - -Options:: - - -r --BanRead : Ban only reading from the storage element - -w --BanWrite : Ban writing to the storage element - -k --BanCheck : Ban check access to the storage element - -v --BanRemove : Ban remove access to the storage element - -a --All : Ban all access to the storage element - -m --Mute : Do not send email - -S --Site : Ban all SEs associate to site (note that if writing is allowed, check is always allowed) - -Example:: - - $ dirac-admin-ban-se M3PEC-disk diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-site.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-site.rst deleted file mode 100644 index 88b634b0160..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-ban-site.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _admin_dirac-admin-ban-site: - -==================== -dirac-admin-ban-site -==================== - -Remove Site from Active mask for current Setup - -Usage:: - - dirac-admin-ban-site [option|cfgfile] ... Site Comment - -Arguments:: - - Site: Name of the Site - Comment: Reason of the action - -Options:: - - -E --email : Boolean True/False (True by default) - -Example:: - - $ dirac-admin-ban-site LCG.IN2P3.fr 'Pilot installation problems' diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-ce-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-ce-info.rst deleted file mode 100644 index 764ca3944f6..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-ce-info.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _admin_dirac-admin-ce-info: - -=================== -dirac-admin-ce-info -=================== - -Retrieve Site Associated to a given CE - -Usage:: - - dirac-admin-ce-info [option|cfgfile] ... CE ... - -Arguments:: - - CE: Name of the CE - -Options:: - - -G --Grid : Define the Grid where to look (Default: LCG) - -Example:: - - - $ dirac-admin-ce-info LCG.IN2P3.fr diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-delete-user.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-delete-user.rst deleted file mode 100644 index 0d127aee7ff..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-delete-user.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _admin_dirac-admin-delete-user: - -======================= -dirac-admin-delete-user -======================= - -Remove User from Configuration - -Usage:: - - dirac-admin-delete-user [option|cfgfile] ... User ... - -Arguments:: - - User: User name - -Example:: - - $ dirac-admin-delete-user vhamar diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-CAs.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-CAs.rst deleted file mode 100644 index a8e84cd756a..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-CAs.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. _admin_dirac-admin-get-CAs: - -=================== -dirac-admin-get-CAs -=================== - -Refresh the local copy of the CA certificates and revocation lists. - -Connects to the BundleDelivery service to obtain the tar balls. Needed when proxies appear to be -invalid. - -Usage:: - - dirac-admin-get-CAs (|)* - -Example:: - - $ dirac-admin-get-CAs diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-banned-sites.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-banned-sites.rst deleted file mode 100644 index 134fac678a8..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-banned-sites.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. _admin_dirac-admin-get-banned-sites: - -============================ -dirac-admin-get-banned-sites -============================ - -Usage:: - - dirac-admin-get-banned-sites.py (|)* - -Example:: - - $dirac-admin-get-banned-sites.py - LCG.IN2P3.fr Site not present in logging table diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilot-output.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilot-output.rst deleted file mode 100644 index 0b7a5f863ed..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilot-output.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _admin_dirac-admin-get-job-pilot-output: - -================================ -dirac-admin-get-job-pilot-output -================================ - -Retrieve the output of the pilot that executed a given job - -Usage:: - - dirac-admin-get-job-pilot-output [option|cfgfile] ... JobID ... - -Arguments:: - - JobID: DIRAC ID of the Job - -Example:: - - $ dirac-admin-get-job-pilot-output 34 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilots.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilots.rst deleted file mode 100644 index 13392c075ed..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-job-pilots.rst +++ /dev/null @@ -1,37 +0,0 @@ -.. _admin_dirac-admin-get-job-pilots: - -========================== -dirac-admin-get-job-pilots -========================== - -Retrieve info about pilots that have matched a given Job - -Usage:: - - dirac-admin-get-job-pilots [option|cfgfile] ... JobID - -Arguments:: - - JobID: DIRAC ID of the Job - -Example:: - - $ dirac-admin-get-job-pilots 1848 - {'https://marlb.in2p3.fr:9000/bqYViq6KrVgGfr6wwgT45Q': {'AccountingSent': 'False', - 'BenchMark': 8.1799999999999997, - 'Broker': 'marwms.in2p3.fr', - 'DestinationSite': 'lpsc-ce.in2p3.fr', - 'GridSite': 'LCG.LPSC.fr', - 'GridType': 'gLite', - 'Jobs': [1848L], - 'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 39, 10), - 'OutputReady': 'True', - 'OwnerDN': '/O=GRID-FR/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', - 'OwnerGroup': '/biomed', - 'ParentID': 0L, - 'PilotID': 2247L, - 'PilotJobReference': 'https://marlb.in2p3.fr:9000/bqYViq6KrVgGfr6wwgT45Q', - 'PilotStamp': '', - 'Status': 'Done', - 'SubmissionTime': datetime.datetime(2011, 2, 21, 12, 27, 52), - 'TaskQueueID': 399L}} diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-info.rst deleted file mode 100644 index 518bf575365..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-info.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. _admin_dirac-admin-get-pilot-info: - -========================== -dirac-admin-get-pilot-info -========================== - -Retrieve available info about the given pilot - -Usage:: - - dirac-admin-get-pilot-info [option|cfgfile] ... PilotID ... - -Arguments:: - - PilotID: Grid ID of the pilot - -Options:: - - -e --extended : Get extended printout - -Example:: - - $ dirac-admin-get-pilot-info https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw - {'https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw': {'AccountingSent': 'False', - 'BenchMark': 0.0, - 'Broker': 'marwms.in2p3.fr', - 'DestinationSite': 'cclcgceli01.in2p3.fr', - 'GridSite': 'LCG.IN2P3.fr', - 'GridType': 'gLite', - 'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 49, 14), - 'OutputReady': 'False', - 'OwnerDN': '/O=GRID-FR/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', - 'OwnerGroup': '/biomed', - 'ParentID': 0L, - 'PilotID': 2241L, - 'PilotJobReference': 'https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw', - 'PilotStamp': '', - 'Status': 'Done', - 'SubmissionTime': datetime.datetime(2011, 2, 21, 12, 27, 52), - 'TaskQueueID': 399L}} diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-logging-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-logging-info.rst deleted file mode 100644 index 4c1742c4c39..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-logging-info.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. _admin_dirac-admin-get-pilot-logging-info: - -================================== -dirac-admin-get-pilot-logging-info -================================== - -Retrieve logging info of a Grid pilot - -Usage:: - - dirac-admin-get-pilot-logging-info [option|cfgfile] ... PilotID ... - -Arguments:: - - PilotID: Grid ID of the pilot - -Example:: - - $ dirac-admin-get-pilot-logging-info https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw - Pilot Reference: %s https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw - ===================== glite-job-logging-info Success ===================== - - LOGGING INFORMATION: - - Printing info for the Job : https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw - - --- - Event: RegJob - - Arrived = Mon Feb 21 13:27:50 2011 CET - - Host = marwms.in2p3.fr - - Jobtype = SIMPLE - - Level = SYSTEM - - Ns = https://marwms.in2p3.fr:7443/glite_wms_wmproxy_server - - Nsubjobs = 0 - - Parent = https://marlb.in2p3.fr:9000/WQHVOB1mI4oqrlYz2ZKtgA - - Priority = asynchronous - - Seqcode = UI=000000:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000 - - Source = NetworkServer diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-output.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-output.rst deleted file mode 100644 index 42e82aeaa0b..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-pilot-output.rst +++ /dev/null @@ -1,21 +0,0 @@ -.. _admin_dirac-admin-get-pilot-output: - -============================ -dirac-admin-get-pilot-output -============================ - -Retrieve output of a Grid pilot - -Usage:: - - dirac-admin-get-pilot-output [option|cfgfile] ... PilotID ... - -Arguments:: - - PilotID: Grid ID of the pilot - -Example:: - - $ dirac-admin-get-pilot-output https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw - $ ls -la - drwxr-xr-x 2 hamar marseill 2048 Feb 21 14:13 pilot_26KCLKBFtxXKHF4_ZrQjkw diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-proxy.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-proxy.rst deleted file mode 100644 index 3ace2b66a87..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-proxy.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. _admin_dirac-admin-get-proxy: - -===================== -dirac-admin-get-proxy -===================== - -Retrieve a delegated proxy for the given user and group - -Usage:: - - dirac-admin-get-proxy [option|cfgfile] ... group - -Arguments:: - - DN: DN of the user - user: DIRAC user name (will fail if there is more than 1 DN registered) - group: DIRAC group name - -Options:: - - -v --valid : Valid HH:MM for the proxy. By default is 24 hours - -l --limited : Get a limited proxy - -u --out : File to write as proxy - -a --voms : Get proxy with VOMS extension mapped to the DIRAC group - -m --vomsAttr : VOMS attribute to require - -Example:: - - $ dirac-admin-get-proxy vhamar dirac_user - Proxy downloaded to /afs/in2p3.fr/home/h/hamar/proxy.vhamar.dirac_user diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-site-mask.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-site-mask.rst deleted file mode 100644 index baf75251983..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-get-site-mask.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _admin_dirac-admin-get-site-mask: - -========================= -dirac-admin-get-site-mask -========================= - -Get the list of sites enabled in the mask for job submission - -Usage:: - - dirac-admin-get-site-mask [options] - -Example:: - - $ dirac-admin-get-site-mask - LCG.CGG.fr - LCG.CPPM.fr - LCG.GRIF.fr - LCG.IBCP.fr - LCG.IN2P3.fr - LCG.IPNL.fr - LCG.IPSL-IPGP.fr - LCG.IRES.fr - LCG.LAPP.fr - LCG.LPSC.fr - LCG.M3PEC.fr - LCG.MSFG.fr diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-list-hosts.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-list-hosts.rst deleted file mode 100644 index 827b64a32fa..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-list-hosts.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _admin_dirac-admin-list-hosts: - -====================== -dirac-admin-list-hosts -====================== - -Usage:: - - dirac-admin-list-hosts.py (|)* - -Options:: - - -e --extended : Show extended info - -Example:: - - $ dirac-admin-list-hosts - dirac.in2p3.fr - host-dirac.in2p3.fr diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-list-users.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-list-users.rst deleted file mode 100644 index f8dc6a03cf4..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-list-users.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _admin_dirac-admin-list-users: - -====================== -dirac-admin-list-users -====================== - -Lists the users in the Configuration. If no group is specified return all users. - -Usage:: - - dirac-admin-list-users [option|cfgfile] ... [Group] ... - -Arguments:: - - Group: Only users from this group (default: all) - -Options:: - - -e --extended : Show extended info - -Example:: - - $ dirac-admin-list-users - All users registered: - vhamar - msapunov - atsareg diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-modify-user.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-modify-user.rst deleted file mode 100644 index 631b6e90a99..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-modify-user.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _admin_dirac-admin-modify-user: - -======================= -dirac-admin-modify-user -======================= - -Modify a user in the CS. - -Usage:: - - dirac-admin-modify-user [option|cfgfile] ... user DN group [group] ... - -Arguments:: - - user: User name - DN: DN of the User - group: Add the user to the group - -Options:: - - -p --property : Add property to the user = - -f --force : create the user if it doesn't exist - -Example:: - - $ dirac-admin-modify-user vhamar group dirac_user diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-pilot-summary.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-pilot-summary.rst deleted file mode 100644 index 6442aef67be..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-pilot-summary.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. _admin_dirac-admin-pilot-summary: - -========================= -dirac-admin-pilot-summary -========================= - -Usage:: - - dirac-admin-pilot-summary.py (|)* - -Example:: - - $ dirac-admin-pilot-summary - CE Status Count Status Count Status Count Status Count Status Count Status Count Status Count - sbgce1.in2p3.fr Done 31 - lpsc-ce.in2p3.fr Done 111 - lyogrid02.in2p3.fr Done 81 - egee-ce.datagrid.jussieu.fr Aborted 81 Done 18 - cclcgceli03.in2p3.fr Done 275 - marce01.in2p3.fr Done 156 - node07.datagrid.cea.fr Done 75 - cclcgceli01.in2p3.fr Aborted 1 Done 235 - ce0.m3pec.u-bordeaux1.fr Done 63 - grive11.ibcp.fr Aborted 3 Done 90 - lptace01.msfg.fr Aborted 3 Aborted_Day 3 Done 90 - ipnls2001.in2p3.fr Done 87 - Total Aborted 89 Done 1423 Ready 0 Running 0 Scheduled 0 Submitted 0 Waiting 0 - lapp-ce01.in2p3.fr Aborted 1 Done 111 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-reset-job.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-reset-job.rst deleted file mode 100644 index 49a88bc76b8..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-reset-job.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _admin_dirac-admin-reset-job: - -===================== -dirac-admin-reset-job -===================== - -Reset a job or list of jobs in the WMS - -Usage:: - - dirac-admin-reset-job [option|cfgfile] ... JobID ... - -Arguments:: - - JobID: DIRAC ID of the Job - -Example:: - - $ dirac-admin-reset-job 1848 - Reset Job 1848 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-service-ports.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-service-ports.rst deleted file mode 100644 index 7448e057029..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-service-ports.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. _admin_dirac-admin-service-ports: - -========================= -dirac-admin-service-ports -========================= - -Print the service ports for the specified setup - -Usage:: - - dirac-admin-service-ports [option|cfgfile] ... [Setup] - -Arguments:: - - Setup: Name of the setup - -Example:: - - $ dirac-admin-service-ports - {'Accounting/DataStore': 9133, - 'Accounting/ReportGenerator': 9134, - 'DataManagement/FileCatalog': 9197, - 'DataManagement/StorageElement': 9148, - 'DataManagement/StorageElementProxy': 9149, - 'Framework/BundleDelivery': 9158, - 'Framework/Monitoring': 9142, - 'Framework/Notification': 9154, - 'Framework/Plotting': 9157, - 'Framework/ProxyManager': 9152, - 'Framework/SecurityLogging': 9153, - 'Framework/SystemAdministrator': 9162, - 'Framework/SystemLogging': 9141, - 'Framework/SystemLoggingReport': 9144, - 'Framework/UserProfileManager': 9155, - 'RequestManagement/RequestManager': 9143, - 'WorkloadManagement/JobManager': 9132, - 'WorkloadManagement/JobMonitoring': 9130, - 'WorkloadManagement/JobStateUpdate': 9136, - 'WorkloadManagement/PilotManager': 9171, - 'WorkloadManagement/Matcher': 9170, - 'WorkloadManagement/SandboxStore': 9196, - 'WorkloadManagement/WMSAdministrator': 9145} diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-set-site-protocols.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-set-site-protocols.rst deleted file mode 100644 index bfb99144d4b..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-set-site-protocols.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _admin_dirac-admin-set-site-protocols: - -============================== -dirac-admin-set-site-protocols -============================== - -Defined protocols for each SE for a given site. - -Usage:: - - dirac-admin-set-site-protocols [option|cfgfile] ... Protocol ... - -Arguments:: - - Protocol: SE access protocol (mandatory) - -Options:: - - --Site= : Site for which protocols are to be set (mandatory) - -Example:: - - $ dirac-admin-set-site-protocols diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-show-task-queues.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-show-task-queues.rst deleted file mode 100644 index 1ae3ae9a188..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-show-task-queues.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. _admin_dirac-admin-show-task-queues: - -============================ -dirac-admin-show-task-queues -============================ - -Show details of currently active Task Queues - -Usage:: - - dirac-admin-show-task-queues [option|cfgfile] - -Options:: - - -v --verbose : give max details about task queues - -t --taskQueue : show this task queue only - -Example:: - - $ dirac-admin-show-task-queues - Getting TQs.. - * TQ 401 - CPUTime: 360 - Jobs: 3 - OwnerDN: /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - OwnerGroup: dirac_user - Priority: 1.0 - Setup: Dirac-Production diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-site-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-site-info.rst deleted file mode 100644 index faf5a57381b..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-site-info.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _admin_dirac-admin-site-info: - -===================== -dirac-admin-site-info -===================== - -Print Configuration information for a given Site - -Usage:: - - dirac-admin-site-info [option|cfgfile] ... Site ... - -Arguments:: - - Site: Name of the Site - -Example:: - - $ dirac-admin-site-info LCG.IN2P3.fr - {'CE': 'cclcgceli01.in2p3.fr, cclcgceli03.in2p3.fr, sbgce1.in2p3.fr, clrlcgce01.in2p3.fr, clrlcgce02.in2p3.fr, clrlcgce03.in2p3.fr, grid10.lal.in2p3.fr, polgrid1.in2p3.fr', - 'Coordinates': '4.8655:45.7825', - 'Mail': 'grid.admin@cc.in2p3.fr', - 'MoUTierLevel': '1', - 'Name': 'IN2P3-CC', - 'SE': 'IN2P3-disk, DIRAC-USER'} diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-site-mask-logging.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-site-mask-logging.rst deleted file mode 100644 index 9f6c1ae56a0..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-site-mask-logging.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _admin_dirac-admin-site-mask-logging: - -============================= -dirac-admin-site-mask-logging -============================= - -Retrieves site mask logging information. - -Usage:: - - dirac-admin-site-mask-logging [option|cfgfile] ... Site ... - -Arguments:: - - Site: Name of the Site - -Example:: - - $ dirac-admin-site-mask-logging LCG.IN2P3.fr - - Site Mask Logging Info for LCG.IN2P3.fr - - Active 2010-12-08 21:28:16 ( atsareg ) "" diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-sort-cs-sites.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-sort-cs-sites.rst deleted file mode 100644 index a1318917af3..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-sort-cs-sites.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _admin_dirac-admin-sort-cs-sites: - -========================= -dirac-admin-sort-cs-sites -========================= - -Sort site names at CS in "/Resources" section. Sort can be alphabetic or by country postfix in a site name. - -Usage:: - - dirac-admin-sort-cs-sites [option|cfgfile]
- -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 - -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 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-sync-users-from-file.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-sync-users-from-file.rst deleted file mode 100644 index 351c949707f..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-sync-users-from-file.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _admin_dirac-admin-sync-users-from-file: - -================================ -dirac-admin-sync-users-from-file -================================ - -Sync users in Configuration with the cfg contents. - -Usage:: - - dirac-admin-sync-users-from-file [option|cfgfile] ... UserCfg - -Arguments:: - - UserCfg: Cfg FileName with Users as sections containing DN, Groups, and other properties as options - -Options:: - - -t --test : Only test. Don't commit changes - -Example:: - - $ dirac-admin-sync-users-from-file file_users.cfg diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-sysadmin-cli.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-sysadmin-cli.rst deleted file mode 100644 index 18060db46a4..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-sysadmin-cli.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _admin_dirac-admin-sysadmin-cli: - -======================== -dirac-admin-sysadmin-cli -======================== - -Usage:: - - dirac-admin-sysadmin-cli.py (|)* - -Options:: - - -H --host : Target host - -Example:: - - $ dirac-admin-sysadmin-cli --host dirac.in2p3.fr - DIRAC Root Path = /afs/in2p3.fr/home/h/hamar/DIRAC-v5r12 - dirac.in2p3.fr > diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-user-quota.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-user-quota.rst deleted file mode 100644 index c572d2a5749..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-user-quota.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. _admin_dirac-admin-user-quota: - -====================== -dirac-admin-user-quota -====================== - -Show storage quotas for specified users or for all registered users if nobody is specified - -Usage:: - - dirac-admin-user-quota [user1 ...] - -Example:: - - $ dirac-admin-user-quota - ------------------------------ - Username | Quota (GB) - ------------------------------ - atsareg | None - msapunov | None - vhamar | None - ------------------------------ diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-admin-users-with-proxy.rst b/docs/source/AdministratorGuide/CommandReference/dirac-admin-users-with-proxy.rst deleted file mode 100644 index 42998236a6e..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-admin-users-with-proxy.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. _admin_dirac-admin-users-with-proxy: - -============================ -dirac-admin-users-with-proxy -============================ - -Usage:: - - dirac-admin-users-with-proxy.py (|)* - -Options:: - - -v --valid : Required HH:MM for the users - -Example:: - - $ dirac-admin-users-with-proxy - * vhamar - DN : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - group : dirac_admin - not after : 2011-06-29 12:04:25 - persistent : False - - - DN : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - group : dirac_pilot - not after : 2011-06-29 12:04:27 - persistent : False - - - DN : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - group : dirac_user - not after : 2011-06-29 12:04:30 - persistent : True diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-configuration-dump-local-cache.rst b/docs/source/AdministratorGuide/CommandReference/dirac-configuration-dump-local-cache.rst deleted file mode 100644 index 4cf3d370fdf..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-configuration-dump-local-cache.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _admin_dirac-configuration-dump-local-cache: - -==================================== -dirac-configuration-dump-local-cache -==================================== - -Dump DIRAC Configuration data - -Usage:: - - dirac-configuration-dump-local-cache [option|cfgfile] ... - -Options:: - - -f --file : Dump Configuration data into - -r --raw : Do not make any modification to the data - -Example:: - - $ dirac-configuration-dump-local-cache -f /tmp/dump-conf.txt diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-framework-ping-service.rst b/docs/source/AdministratorGuide/CommandReference/dirac-framework-ping-service.rst deleted file mode 100644 index e046b5bdab1..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-framework-ping-service.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. _admin_dirac-framework-ping-service: - -============================ -dirac-framework-ping-service -============================ - -Ping the given DIRAC Service - -Usage:: - - dirac-framework-ping-service [option|cfgfile] ... System Service|System/Agent - -Arguments:: - - System: Name of the DIRAC system (ie: WorkloadManagement) - Service: Name of the DIRAC service (ie: Matcher) - url: URL of the service to ping (instead of System and Service) - -Example:: - - $ dirac-framework-ping-service WorkloadManagement PilotManager - {'OK': True, - 'Value': {'cpu times': {'children system time': 0.0, - 'children user time': 0.0, - 'elapsed real time': 8778481.7200000007, - 'system time': 54.859999999999999, - 'user time': 361.06999999999999}, - 'host uptime': 4485212L, - 'load': '3.44 3.90 4.02', - 'name': 'WorkloadManagement/PilotManager', - 'service start time': datetime.datetime(2011, 2, 21, 8, 58, 35, 521438), - 'service uptime': 85744, - 'service url': 'dips://dirac.in2p3.fr:9171/WorkloadManagement/PilotManager', - 'time': datetime.datetime(2011, 3, 14, 11, 47, 40, 394957), - 'version': 'v5r12-pre9'}, - 'rpcStub': (('WorkloadManagement/PilotManager', - {'delegatedDN': '/O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar', - 'delegatedGroup': 'dirac_user', - 'skipCACheck': True, - 'timeout': 120}), - 'ping', - ())} diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-info.rst deleted file mode 100644 index 204f5335e05..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-info.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _admin_dirac-info: - -========== -dirac-info -========== - -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 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-proxy-get-uploaded-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-proxy-get-uploaded-info.rst deleted file mode 100644 index 157f9957d88..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-proxy-get-uploaded-info.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _admin_dirac-proxy-get-uploaded-info: - -============================= -dirac-proxy-get-uploaded-info -============================= - -Usage:: - - dirac-proxy-get-uploaded-info.py (|)* - -Options:: - - -u --user : User to query (by default oneself) - -Example:: - - $ dirac-proxy-get-uploaded-info - Checking for DNs /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - -------------------------------------------------------------------------------------------------------- - | UserDN | UserGroup | ExpirationTime | PersistentFlag | - -------------------------------------------------------------------------------------------------------- - | /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar | dirac_user | 2011-06-29 12:04:25 | True | - -------------------------------------------------------------------------------------------------------- diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-proxy-info.rst b/docs/source/AdministratorGuide/CommandReference/dirac-proxy-info.rst deleted file mode 100644 index 402d79b13fa..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-proxy-info.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _admin_dirac-proxy-info: - -================ -dirac-proxy-info -================ - -Usage:: - - dirac-proxy-info.py (|)* - -Options:: - - -f --file : File to use as user key - -i --version : Print version - -n --novoms : Disable VOMS - -v --checkvalid : Return error if the proxy is invalid - -x --nocs : Disable CS - -e --steps : Show steps info - -j --noclockcheck : Disable checking if time is ok - -m --uploadedinfo : Show uploaded proxies info - -Example:: - - $ dirac-proxy-info - subject : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar/CN=proxy/CN=proxy - issuer : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar/CN=proxy - identity : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - timeleft : 23:53:55 - DIRAC group : dirac_user - path : /tmp/x509up_u40885 - username : vhamar - VOMS : True - VOMS fqan : ['/formation'] diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-proxy-init.rst b/docs/source/AdministratorGuide/CommandReference/dirac-proxy-init.rst deleted file mode 100644 index 4fca413987c..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-proxy-init.rst +++ /dev/null @@ -1,36 +0,0 @@ -.. _admin_dirac-proxy-init: - -================ -dirac-proxy-init -================ - -Usage:: - - dirac-proxy-init.py (|)* - -Options:: - - -v --valid : Valid HH:MM for the proxy. By default is 24 hours - -g --group : DIRAC Group to embed in the proxy - -b --strength : Set the proxy strength in bytes - -l --limited : Generate a limited proxy - -t --strict : Fail on each error. Treat warnings as errors. - -S --summary : Enable summary output when generating proxy - -C --Cert : File to use as user certificate - -K --Key : File to use as user key - -u --out : File to write as proxy - -x --nocs : Disable CS check - -p --pwstdin : Get passwd from stdin - -i --version : Print version - -j --noclockcheck : Disable checking if time is ok - -r --rfc : Create an RFC proxy, true by default, deprecated flag - -L --legacy : Create a legacy non-RFC proxy - -U --upload : Upload a long lived proxy to the ProxyManager - -P --uploadPilot : Upload a long lived pilot proxy to the ProxyManager - -M --VOMS : Add voms extension - -Example:: - - $ dirac-proxy-init -g dirac_user -t --rfc - Enter Certificate password: - $ diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-status-component.rst b/docs/source/AdministratorGuide/CommandReference/dirac-status-component.rst deleted file mode 100644 index 2e3d43e7e55..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-status-component.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. _admin_dirac-status-component: - -====================== -dirac-status-component -====================== - -Status of DIRAC components using runsvstat utility - -Usage:: - - dirac-status-component [option|cfgfile] ... [system [service|agent]] - -Arguments:: - - system: Name of the system for the component (default *: all) - service|agent: Name of the particular component (default *: all) - -Example:: - - $ dirac-status-component - DIRAC Root Path = /vo/dirac/versions/Lyon-HEAD-1296215324 - Name : Runit Uptime PID - WorkloadManagement_PilotStatusAgent : Run 4029 1697 - WorkloadManagement_JobHistoryAgent : Run 4029 1679 - Framework_CAUpdateAgent : Run 4029 1658 - Framework_SecurityLogging : Run 4025 2111 - WorkloadManagement_Matcher : Run 4029 1692 - WorkloadManagement_StalledJobAgent : Run 4029 1704 - WorkloadManagement_JobCleaningAgent : Run 4029 1676 - Web_paster : Run 4029 1683 - WorkloadManagement_MightyOptimizer : Run 4029 1695 - WorkloadManagement_JobMonitoring : Run 4025 2133 - WorkloadManagement_StatesAccountingAgent : Run 4029 1691 - RequestManagement_RequestManager : Run 4025 2141 - DataManagement_FileCatalog : Run 4024 2236 - WorkloadManagement_JobManager : Run 4024 2245 - WorkloadManagement_TaskQueueDirector : Run 4029 1693 - Framework_Notification : Run 4026 2101 - Web_httpd : Run 4029 1681 - Framework_ProxyManager : Run 4024 2260 - Framework_Monitoring : Run 4027 1948 - WorkloadManagement_WMSAdministrator : Run 4027 1926 - WorkloadManagement_InputDataAgent : Run 4029 1687 - Framework_SystemLogging : Run 4025 2129 - Accounting_DataStore : Run 4025 2162 - Framework_SystemAdministrator : Run 4026 2053 - Accounting_ReportGenerator : Run 4026 2048 - Framework_SystemLoggingDBCleaner : Run 4029 1667 - DataManagement_StorageElementProxy : Run 4024 2217 - Framework_Plotting : Run 4025 2208 - Configuration_Server : Run 4029 1653 - WorkloadManagement_SandboxStore : Run 4025 2186 - Framework_UserProfileManager : Run 4025 2182 - DataManagement_StorageElement : Run 4024 2227 - Framework_TopErrorMessagesReporter : Run 4029 1672 - Configuration_CE2CSAgent : Run 1 32461 - WorkloadManagement_JobStateUpdate : Run 4025 2117 - Framework_SystemLoggingReport : Run 4024 2220 - Framework_BundleDelivery : Run 4025 2157 diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-sys-sendmail.rst b/docs/source/AdministratorGuide/CommandReference/dirac-sys-sendmail.rst deleted file mode 100644 index 67fbcbe12ed..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-sys-sendmail.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _admin_dirac-sys-sendmail: - -================== -dirac-sys-sendmail -================== - -Utility to send an e-mail using DIRAC notification service. - - Arguments:: - - Formated text message. The message consists of e-mail headers and e-mail body - separated by two newline characters. Headers are key : value pairs separated - by newline character. Meaningful headers are "To:", "From:", "Subject:". - Other keys will be ommited. - Message body is an arbitrary string. - - Options:: - - There are no options. - - Examples:: - - dirac-sys-sendmail "From: source@email.com\nTo: destination@email.com\nSubject: Test\n\nMessage body" - echo "From: source@email.com\nSubject: Test\n\nMessage body" | dirac-sys-sendmail destination@email.com diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-utils-file-adler.rst b/docs/source/AdministratorGuide/CommandReference/dirac-utils-file-adler.rst deleted file mode 100644 index 54190a7f237..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-utils-file-adler.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _admin_dirac-utils-file-adler: - -====================== -dirac-utils-file-adler -====================== - -Calculate alder32 of the supplied file - -Usage:: - - dirac-utils-file-adler [option|cfgfile] ... File ... - -Arguments:: - - File: File Name - -Example:: - - $ dirac-utils-file-adler Example.tgz - Example.tgz 88b4ca8b diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-utils-file-md5.rst b/docs/source/AdministratorGuide/CommandReference/dirac-utils-file-md5.rst deleted file mode 100644 index d42d6bdcd4c..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-utils-file-md5.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _admin_dirac-utils-file-md5: - -==================== -dirac-utils-file-md5 -==================== - -Calculate md5 of the supplied file - -Usage:: - - dirac-utils-file-md5 [option|cfgfile] ... File ... - -Arguments:: - - File: File Name - -Example:: - - $ dirac-utils-file-md5 Example.tgz - Example.tgz 5C1A1102-EAFD-2CBA-25BD-0EFCCFC3623E diff --git a/docs/source/AdministratorGuide/CommandReference/index.rst b/docs/source/AdministratorGuide/CommandReference/index.rst index 4e2f8b10143..598b8955d85 100644 --- a/docs/source/AdministratorGuide/CommandReference/index.rst +++ b/docs/source/AdministratorGuide/CommandReference/index.rst @@ -21,6 +21,8 @@ General information: dirac-admin-service-ports dirac-platform +.. _registry_cmd: + Managing Registry: .. toctree:: @@ -135,20 +137,27 @@ User convenience: dirac-utils-file-adler dirac-utils-file-md5 -Other commands: +.. _proxymanager_cmd: + +ProxyManager management commands: .. toctree:: :maxdepth: 2 - dirac-admin-accounting-cli - - dirac-admin-get-proxy - dirac-admin-proxy-upload - dirac-proxy-get-uploaded-info dirac-proxy-info dirac-proxy-init dirac-proxy-destroy + dirac-admin-get-proxy + dirac-admin-proxy-upload + dirac-proxy-get-uploaded-info +Other commands: + +.. toctree:: + :maxdepth: 2 + + dirac-admin-accounting-cli + dirac-admin-sysadmin-cli dirac-admin-update-instance dirac-admin-update-pilot diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index 56753b1ef11..9a7d1184ba7 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -22,11 +22,4 @@ There are also commands and a web portal(:ref:`read how to install it ` - * :ref:`dirac-proxy-init ` - * :ref:`dirac-proxy-info ` - * :ref:`dirac-proxy-get-uploaded-info ` - * :ref:`dirac-admin-users-with-proxy ` - * dirac-admin-upload-proxy - * dirac-proxy-destroy +You can be use :ref:`DIRAC commands ` to interact with this system to manage proxies. diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 3f6b01ddf8f..c6132983f8f 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -41,9 +41,7 @@ Consider the registration process --------------------------------- User management has been provided by the Registry section of the Configuration System. To manage it you can use: - * dirac-admin commands to managing Registry: - - :ref:`dirac-admin-add-group ` - - :ref:`dirac-admin-add-user ` + * :ref:`dirac commands ` to managing Registry * configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) * modify local cfg file manually (by default it located in /opt/dirac/etc/dirac.cfg) * use the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent` to fetch VOMS VO users From 77dbc3c8025ff43980890c343bec4a42dca21a25 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 2 Dec 2020 00:44:30 +0100 Subject: [PATCH 17/51] fix docs --- Interfaces/scripts/dirac-admin-add-user.py | 2 +- .../scripts/dirac-admin-get-job-pilots.py | 4 +-- .../scripts/dirac-admin-get-pilot-info.py | 4 +-- .../dirac-admin-get-pilot-logging-info.py | 20 ++++++------- .../scripts/dirac-admin-pilot-summary.py | 30 +++++++++---------- .../scripts/dirac-admin-show-task-queues.py | 1 + .../CommandReference/dirac-version.rst | 3 +- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Interfaces/scripts/dirac-admin-add-user.py b/Interfaces/scripts/dirac-admin-add-user.py index ef128c1fa85..decd8821eda 100755 --- a/Interfaces/scripts/dirac-admin-add-user.py +++ b/Interfaces/scripts/dirac-admin-add-user.py @@ -12,7 +12,7 @@ Example: - $ dirac-admin-add-user -N vhamar -D /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar -M hamar@cppm.in2p3.fr -G dirac_user + $ dirac-admin-add-user -N vhamar -D /O=GRID/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar -M hamar@cppm.in2p3.fr -G dirac_user """ __RCSID__ = "$Id$" diff --git a/Interfaces/scripts/dirac-admin-get-job-pilots.py b/Interfaces/scripts/dirac-admin-get-job-pilots.py index 2215471b9c2..66ed5c679d8 100755 --- a/Interfaces/scripts/dirac-admin-get-job-pilots.py +++ b/Interfaces/scripts/dirac-admin-get-job-pilots.py @@ -26,11 +26,11 @@ 'Jobs': [1848L], 'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 39, 10), 'OutputReady': 'True', - 'OwnerDN': '/O=GRID-FR/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', + 'OwnerDN': '/O=GRID/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', 'OwnerGroup': '/biomed', 'ParentID': 0L, 'PilotID': 2247L, - 'PilotJobReference': 'https://marlb.in2p3.fr:9000/bqYViq6KT45Q', + 'PilotJobReference': 'https://marlb.in2p3.fr:9000/biq6KT45Q', 'PilotStamp': '', 'Status': 'Done', 'SubmissionTime': datetime.datetime(2011, 2, 21, 12, 27, 52), diff --git a/Interfaces/scripts/dirac-admin-get-pilot-info.py b/Interfaces/scripts/dirac-admin-get-pilot-info.py index 170f071742c..b065688b839 100755 --- a/Interfaces/scripts/dirac-admin-get-pilot-info.py +++ b/Interfaces/scripts/dirac-admin-get-pilot-info.py @@ -25,11 +25,11 @@ 'GridType': 'gLite', 'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 49, 14), 'OutputReady': 'False', - 'OwnerDN': '/O=GRID-FR/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', + 'OwnerDN': '/O=GRID/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard', 'OwnerGroup': '/biomed', 'ParentID': 0L, 'PilotID': 2241L, - 'PilotJobReference': 'https://marlb.in2p3.fr:9000/2KHF4_ZrQjkw', + 'PilotJobReference': 'https://marlb.in2p3.fr:9000/2KHFrQjkw', 'PilotStamp': '', 'Status': 'Done', 'SubmissionTime': datetime.datetime(2011, 2, 21, 12, 27, 52), diff --git a/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py b/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py index ec89a4dc48e..663159a976b 100755 --- a/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py +++ b/Interfaces/scripts/dirac-admin-get-pilot-logging-info.py @@ -26,16 +26,16 @@ --- Event: RegJob - - Arrived = Mon Feb 21 13:27:50 2011 CET - - Host = marwms.in2p3.fr - - Jobtype = SIMPLE - - Level = SYSTEM - - Ns = https://marwms.in2p3.fr:7443/glite_wms_wmproxy_server - - Nsubjobs = 0 - - Parent = https://marlb.in2p3.fr:9000/WQHVOB1mI4oqrlYz2ZKtgA - - Priority = asynchronous - - Seqcode = UI=000000:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000 - - Source = NetworkServer + - Arrived = Mon Feb 21 13:27:50 2011 CET + - Host = marwms.in2p3.fr + - Jobtype = SIMPLE + - Level = SYSTEM + - Ns = https://marwms.in2p3.fr:7443/glite_wms_wmproxy_server + - Nsubjobs = 0 + - Parent = https://marlb.in2p3.fr:9000/WQHVOB1mI4oqrlYz2ZKtgA + - Priority = asynchronous + - Seqcode = UI=000000:NS=0000000001:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000 + - Source = NetworkServer """ from __future__ import print_function diff --git a/Interfaces/scripts/dirac-admin-pilot-summary.py b/Interfaces/scripts/dirac-admin-pilot-summary.py index f798ffd2455..85538c1e2d5 100755 --- a/Interfaces/scripts/dirac-admin-pilot-summary.py +++ b/Interfaces/scripts/dirac-admin-pilot-summary.py @@ -11,21 +11,21 @@ Example: $ dirac-admin-pilot-summary - CE Status Count Status Count Status Count Status Count Status Count Status Count Status Count - sbgce1.in2p3.fr Done 31 - lpsc-ce.in2p3.fr Done 111 - lyogrid02.in2p3.fr Done 81 - egee-ce.datagrid.jussieu.fr Aborted 81 Done 18 - cclcgceli03.in2p3.fr Done 275 - marce01.in2p3.fr Done 156 - node07.datagrid.cea.fr Done 75 - cclcgceli01.in2p3.fr Aborted 1 Done 235 - ce0.m3pec.u-bordeaux1.fr Done 63 - grive11.ibcp.fr Aborted 3 Done 90 - lptace01.msfg.fr Aborted 3 Aborted_Day 3 Done 90 - ipnls2001.in2p3.fr Done 87 - Total Aborted 89 Done 1423 Ready 0 Running 0 Scheduled 0 Submitted 0 Waiting 0 - lapp-ce01.in2p3.fr Aborted 1 Done 111 + CE Status Count Status Count Status Count Status Count Status Count Status Count Status Count + sbgce1.in2p3.fr Done 31 + lpsc-ce.in2p3.fr Done 111 + lyogrid2.in2p3.fr Done 81 + egee-ce.jusieu.fr Aborted 81 Done 18 + cclcgce3.in2p3.fr Done 275 + marce01.in2p3.fr Done 156 + node7.datagrid.fr Done 75 + cclcgceli01.fr Aborted 1 Done 235 + ce0.m3pec.u-bo.fr Done 63 + grive11.ibcp.fr Aborted 3 Done 90 + lptace01.msfg.fr Aborted 3 Done 3 Done 90 + ipnls1.in2p3.fr Done 87 + Total Aborted 89 Done 1423 Ready 0 Running 0 Scheduled 0 Submitted 0 Waiting 0 + lappce01.in2p3.fr Aborted 1 Done 111 """ from __future__ import print_function __RCSID__ = "$Id$" diff --git a/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py b/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py index 3a4f56a1769..b80ae6f4d05 100755 --- a/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py +++ b/WorkloadManagementSystem/scripts/dirac-admin-show-task-queues.py @@ -52,6 +52,7 @@ def setTaskQueueID(optVal): taskQueueID = int(optVal) return S_OK() + Script.setUsageMessage(__doc__) Script.registerSwitch("v", "verbose", "give max details about task queues", setVerbose) Script.registerSwitch("t:", "taskQueue=", "show this task queue only", setTaskQueueID) diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst index 54d7e5fef57..b9af60aaa42 100644 --- a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst +++ b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst @@ -6,6 +6,5 @@ Return the current dirac version used by the client. Example:: - $ dirac-version + $ dirac-version v5r12-pre9 - From 9e34e13591ff8f4871a9c5e7f8d3e2193f48ff1b Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 2 Dec 2020 16:38:14 +0100 Subject: [PATCH 18/51] fix witespace --- .../source/AdministratorGuide/CommandReference/dirac-version.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst index b9af60aaa42..1c790fc8a9f 100644 --- a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst +++ b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst @@ -8,3 +8,4 @@ Example:: $ dirac-version v5r12-pre9 + From bd7aa5a36d18f3df12abeb3a581a7d7fb22f38a9 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 2 Dec 2020 16:59:37 +0100 Subject: [PATCH 19/51] fix witespace --- Core/scripts/dirac-version.py | 2 +- .../AdministratorGuide/CommandReference/dirac-version.rst | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/scripts/dirac-version.py b/Core/scripts/dirac-version.py index 861f196c7cf..4d61bcfe93e 100755 --- a/Core/scripts/dirac-version.py +++ b/Core/scripts/dirac-version.py @@ -8,7 +8,7 @@ Example: - $ dirac-version + $ dirac-version v5r12-pre9 """ from __future__ import print_function diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst index 1c790fc8a9f..b9af60aaa42 100644 --- a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst +++ b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst @@ -8,4 +8,3 @@ Example:: $ dirac-version v5r12-pre9 - From 05be08f5098f7d8e307183c3755e30437f5482fd Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Tue, 8 Dec 2020 02:30:22 +0100 Subject: [PATCH 20/51] Update Interfaces/scripts/dirac-admin-add-group.py Co-authored-by: Andre Sailer --- Interfaces/scripts/dirac-admin-add-group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interfaces/scripts/dirac-admin-add-group.py b/Interfaces/scripts/dirac-admin-add-group.py index 935b25162ce..cf9136c49a7 100755 --- a/Interfaces/scripts/dirac-admin-add-group.py +++ b/Interfaces/scripts/dirac-admin-add-group.py @@ -8,7 +8,7 @@ Arguments: - Property=: Other properties to be added to the User like (VOMSRole=XXXX) + Property=: Other properties to be added to the Group like (VOMSRole=XXXX) Example: From 1e19250aeb9d6f5f108853b03c844a88c8717929 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Tue, 8 Dec 2020 02:30:37 +0100 Subject: [PATCH 21/51] Update Interfaces/scripts/dirac-admin-add-host.py Co-authored-by: Andre Sailer --- Interfaces/scripts/dirac-admin-add-host.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interfaces/scripts/dirac-admin-add-host.py b/Interfaces/scripts/dirac-admin-add-host.py index e4468e22770..70a9a51b1a1 100755 --- a/Interfaces/scripts/dirac-admin-add-host.py +++ b/Interfaces/scripts/dirac-admin-add-host.py @@ -8,7 +8,7 @@ Arguments: - Property=: Other properties to be added to the User like (Responsible=XXX) + Property=: Other properties to be added to the Host like (Responsible=XXX) Example: From 58de564e54b00bee95262a893ef9236ae8cc8ee9 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Tue, 8 Dec 2020 02:31:29 +0100 Subject: [PATCH 22/51] Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst Co-authored-by: Andre Sailer --- .../AdministratorGuide/Systems/Framework/ProxyManager/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index 9a7d1184ba7..f77797be983 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -4,7 +4,7 @@ The ProxyManager system ======================= -The ProxyManager(PM) system provides users proxies management. This system allows to upload, delete and download proxies to a DIRAC database. +The ProxyManager(PM) system provides users proxies management. This system allows one to upload, delete and download proxies to a DIRAC database. In a fact keeps uploaded long-living proxies in order to provide them for asynchronous operations performed on the user's behalf. This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. From e7498c34f0e54d6e08510db22bcec58b6e7f1c54 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Tue, 8 Dec 2020 02:31:47 +0100 Subject: [PATCH 23/51] Update docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst Co-authored-by: Andre Sailer --- .../AdministratorGuide/Systems/Framework/ProxyManager/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index f77797be983..893efd09e3b 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -5,7 +5,7 @@ The ProxyManager system ======================= The ProxyManager(PM) system provides users proxies management. This system allows one to upload, delete and download proxies to a DIRAC database. -In a fact keeps uploaded long-living proxies in order to provide them for asynchronous operations performed on the user's behalf. +It keeps uploaded long-living proxies in order to provide them for asynchronous operations performed on the user's behalf. This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. The class :mod:`~DIRAC.Core.Security.VOMS` is used to add a VOMS extension. From 373dce415079a9b92994afec5914a9e60962dc41 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Tue, 8 Dec 2020 02:32:06 +0100 Subject: [PATCH 24/51] Update docs/source/AdministratorGuide/UserManagement/index.rst Co-authored-by: Andre Sailer --- docs/source/AdministratorGuide/UserManagement/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index c6132983f8f..917f5cf687c 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -18,7 +18,7 @@ What are the components involved in that. What is the user in DIRAC context? ---------------------------------- -DIRAC users are entities that can be authenticated. In a fact it's a record in the **/Registry** section of the :ref:`Configuration system `. +DIRAC users are entities that can be authenticated. Basically, it's a record in the **/Registry** section of the :ref:`Configuration system `. Each user has a username as a unique identifier. Username can be created manually by administrator or automaticaly by scripts. User attributes are described in the **/Registry/Users** section. To provide authentication a user must have the `DN` attribute, read more about :ref:`authentication `. User has permissions. To describe permissions we use groups. From c5f00dc44f34046e750da967ece6a019635890a0 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Tue, 8 Dec 2020 02:32:25 +0100 Subject: [PATCH 25/51] Update docs/source/AdministratorGuide/UserManagement/index.rst Co-authored-by: Andre Sailer --- docs/source/AdministratorGuide/UserManagement/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 917f5cf687c..44a182cc51d 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -34,7 +34,7 @@ What is the DIRAC Virtual Organization(VO)? ------------------------------------------- The VO is a term coming from grid infrastructures where VO parameters are handled by the VOMS services. In DIRAC VO is not necessarily corresponding to some VOMS described VO. -However, the DIRAC VO describtion can include specific VOMS information. It is not manadatory for the DIRAC VO to have the same name as the corresponding VOMS VO. +However, the DIRAC VO description can include specific VOMS information. It is not mandatory for the DIRAC VO to have the same name as the corresponding VOMS VO. However, having these names the same can avoid confusions at the expense of having names longer than necessary. DIRAC VO must be described in the **/Registry/VO** section. Consider the registration process From b4d07a0a990e139fcad12eac5b8ac74a0232009d Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 8 Dec 2020 18:14:01 +0100 Subject: [PATCH 26/51] fix issues --- FrameworkSystem/DB/ProxyDB.py | 20 +++++----- .../scripts/dirac-status-component.py | 37 +------------------ Interfaces/scripts/dirac-admin-modify-user.py | 2 +- .../scripts/dirac-admin-set-site-protocols.py | 2 +- .../UserManagement/index.rst | 9 +++-- 5 files changed, 18 insertions(+), 52 deletions(-) diff --git a/FrameworkSystem/DB/ProxyDB.py b/FrameworkSystem/DB/ProxyDB.py index 12ef9f907e4..0adfb32dd48 100755 --- a/FrameworkSystem/DB/ProxyDB.py +++ b/FrameworkSystem/DB/ProxyDB.py @@ -2,16 +2,16 @@ Database contains the following tables: - * ProxyDB_Requests -- a delegation requests storage table for a given proxy Chain - * ProxyDB_CleanProxies -- table for storing proxies in "clean" form, ie without - the presence of DIRAC and VOMS extensions. - * ProxyDB_Proxies -- obsolete table for storing proxies with already added DIRAC - group extension, it is present only for backward compatibility and is used only - if ProxyDB_CleanProxies does not have the required proxy. - * ProxyDB_VOMSProxies -- proxy storage table with VOMS extension already added. - * ProxyDB_Log -- table with logs. - * ProxyDB_Tokens -- token storage table for proxy requests. - * ProxyDB_ExpNotifs -- a table for accumulating proxy expiration notifications. + * ProxyDB_Requests -- a delegation requests storage table for a given proxy Chain + * ProxyDB_CleanProxies -- table for storing proxies in "clean" form, ie without + the presence of DIRAC and VOMS extensions. + * ProxyDB_Proxies -- obsolete table for storing proxies with already added DIRAC + group extension, it is present only for backward compatibility and is used only + if ProxyDB_CleanProxies does not have the required proxy. + * ProxyDB_VOMSProxies -- proxy storage table with VOMS extension already added. + * ProxyDB_Log -- table with logs. + * ProxyDB_Tokens -- token storage table for proxy requests. + * ProxyDB_ExpNotifs -- a table for accumulating proxy expiration notifications. """ __RCSID__ = "$Id$" diff --git a/FrameworkSystem/scripts/dirac-status-component.py b/FrameworkSystem/scripts/dirac-status-component.py index ef5010433c2..4a2a2eabc49 100755 --- a/FrameworkSystem/scripts/dirac-status-component.py +++ b/FrameworkSystem/scripts/dirac-status-component.py @@ -17,42 +17,7 @@ DIRAC Root Path = /vo/dirac/versions/Lyon-HEAD-1296215324 Name : Runit Uptime PID WorkloadManagement_PilotStatusAgent : Run 4029 1697 - WorkloadManagement_JobHistoryAgent : Run 4029 1679 - Framework_CAUpdateAgent : Run 4029 1658 - Framework_SecurityLogging : Run 4025 2111 - WorkloadManagement_Matcher : Run 4029 1692 - WorkloadManagement_StalledJobAgent : Run 4029 1704 - WorkloadManagement_JobCleaningAgent : Run 4029 1676 - Web_paster : Run 4029 1683 - WorkloadManagement_MightyOptimizer : Run 4029 1695 - WorkloadManagement_JobMonitoring : Run 4025 2133 - WorkloadManagement_StatesAccountingAgent : Run 4029 1691 - RequestManagement_RequestManager : Run 4025 2141 - DataManagement_FileCatalog : Run 4024 2236 - WorkloadManagement_JobManager : Run 4024 2245 - WorkloadManagement_TaskQueueDirector : Run 4029 1693 - Framework_Notification : Run 4026 2101 - Web_httpd : Run 4029 1681 - Framework_ProxyManager : Run 4024 2260 - Framework_Monitoring : Run 4027 1948 - WorkloadManagement_WMSAdministrator : Run 4027 1926 - WorkloadManagement_InputDataAgent : Run 4029 1687 - Framework_SystemLogging : Run 4025 2129 - Accounting_DataStore : Run 4025 2162 - Framework_SystemAdministrator : Run 4026 2053 - Accounting_ReportGenerator : Run 4026 2048 - Framework_SystemLoggingDBCleaner : Run 4029 1667 - DataManagement_StorageElementProxy : Run 4024 2217 - Framework_Plotting : Run 4025 2208 - Configuration_Server : Run 4029 1653 - WorkloadManagement_SandboxStore : Run 4025 2186 - Framework_UserProfileManager : Run 4025 2182 - DataManagement_StorageElement : Run 4024 2227 - Framework_TopErrorMessagesReporter : Run 4029 1672 - Configuration_CE2CSAgent : Run 1 32461 - WorkloadManagement_JobStateUpdate : Run 4025 2117 - Framework_SystemLoggingReport : Run 4024 2220 - Framework_BundleDelivery : Run 4025 2157 + WorkloadManagement_JobHistoryAgent : Run 4029 167 """ from __future__ import print_function diff --git a/Interfaces/scripts/dirac-admin-modify-user.py b/Interfaces/scripts/dirac-admin-modify-user.py index 5bcea007db4..4b7a2c0970c 100755 --- a/Interfaces/scripts/dirac-admin-modify-user.py +++ b/Interfaces/scripts/dirac-admin-modify-user.py @@ -18,7 +18,7 @@ Example: - $ dirac-admin-modify-user vhamar group dirac_user + $ dirac-admin-modify-user vhamar /C=FR/O=Org/CN=User dirac_user """ from __future__ import print_function diff --git a/Interfaces/scripts/dirac-admin-set-site-protocols.py b/Interfaces/scripts/dirac-admin-set-site-protocols.py index 703ee452bd4..eaf78d329c3 100755 --- a/Interfaces/scripts/dirac-admin-set-site-protocols.py +++ b/Interfaces/scripts/dirac-admin-set-site-protocols.py @@ -16,7 +16,7 @@ Example: - $ dirac-admin-set-site-protocols + $ dirac-admin-set-site-protocols --Site """ from __future__ import print_function diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 44a182cc51d..d086f10561d 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -41,10 +41,11 @@ Consider the registration process --------------------------------- User management has been provided by the Registry section of the Configuration System. To manage it you can use: - * :ref:`dirac commands ` to managing Registry - * configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) - * modify local cfg file manually (by default it located in /opt/dirac/etc/dirac.cfg) - * use the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent` to fetch VOMS VO users + +* :ref:`dirac commands ` to managing Registry +* configuration manager application in the Web portal (need to :ref:`install WebAppDIRAC extension `) +* modify local cfg file manually (by default it located in /opt/dirac/etc/dirac.cfg) +* use the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent` to fetch VOMS VO users In a nutshell, how to edit the configuration from the portal. First, it should be noted that to be able to do this, you must be an already registered user in a group that has the appropriate permission to edit the configuration("CSAdministrator"). From c59b0740887825a083b1745a49f63d27ccd9a6d4 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 9 Dec 2020 12:29:56 +0100 Subject: [PATCH 27/51] fix scripts --- Interfaces/scripts/dirac-admin-get-site-mask.py | 6 ------ Interfaces/scripts/dirac-admin-service-ports.py | 17 +---------------- .../scripts/dirac-admin-set-site-protocols.py | 2 +- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/Interfaces/scripts/dirac-admin-get-site-mask.py b/Interfaces/scripts/dirac-admin-get-site-mask.py index 2220427f293..670fc399e73 100755 --- a/Interfaces/scripts/dirac-admin-get-site-mask.py +++ b/Interfaces/scripts/dirac-admin-get-site-mask.py @@ -15,12 +15,6 @@ $ dirac-admin-get-site-mask LCG.CGG.fr LCG.CPPM.fr - LCG.GRIF.fr - LCG.IBCP.fr - LCG.IN2P3.fr - LCG.IPNL.fr - LCG.IPSL-IPGP.fr - LCG.IRES.fr LCG.LAPP.fr LCG.LPSC.fr LCG.M3PEC.fr diff --git a/Interfaces/scripts/dirac-admin-service-ports.py b/Interfaces/scripts/dirac-admin-service-ports.py index 09bf38d8a69..aa0a98e1bb3 100755 --- a/Interfaces/scripts/dirac-admin-service-ports.py +++ b/Interfaces/scripts/dirac-admin-service-ports.py @@ -17,25 +17,10 @@ Example: $ dirac-admin-service-ports - {'Accounting/DataStore': 9133, - 'Accounting/ReportGenerator': 9134, - 'DataManagement/FileCatalog': 9197, - 'DataManagement/StorageElement': 9148, - 'DataManagement/StorageElementProxy': 9149, - 'Framework/BundleDelivery': 9158, - 'Framework/Monitoring': 9142, - 'Framework/Notification': 9154, - 'Framework/Plotting': 9157, - 'Framework/ProxyManager': 9152, - 'Framework/SecurityLogging': 9153, + {'Framework/ProxyManager': 9152, 'Framework/SystemAdministrator': 9162, - 'Framework/SystemLogging': 9141, - 'Framework/SystemLoggingReport': 9144, 'Framework/UserProfileManager': 9155, - 'RequestManagement/RequestManager': 9143, 'WorkloadManagement/JobManager': 9132, - 'WorkloadManagement/JobMonitoring': 9130, - 'WorkloadManagement/JobStateUpdate': 9136, 'WorkloadManagement/PilotManager': 9171, 'WorkloadManagement/Matcher': 9170, 'WorkloadManagement/SandboxStore': 9196, diff --git a/Interfaces/scripts/dirac-admin-set-site-protocols.py b/Interfaces/scripts/dirac-admin-set-site-protocols.py index eaf78d329c3..e03bd8818fc 100755 --- a/Interfaces/scripts/dirac-admin-set-site-protocols.py +++ b/Interfaces/scripts/dirac-admin-set-site-protocols.py @@ -16,7 +16,7 @@ Example: - $ dirac-admin-set-site-protocols --Site + $ dirac-admin-set-site-protocols --Site=LCG.IN2P3.fr SRM2 """ from __future__ import print_function From 25f26d6f74d02657ccfbbb092054e9e5625f6f91 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Mon, 14 Dec 2020 04:50:48 +0100 Subject: [PATCH 28/51] remove dirac-version, fix docs --- Core/scripts/dirac-agent.py | 14 +++-- Core/scripts/dirac-deploy-scripts.py | 54 +++++++++++++++---- Core/scripts/dirac-executor.py | 11 +++- Core/scripts/dirac-info.py | 9 +++- Core/scripts/dirac-install-extension.py | 31 ++++++----- Core/scripts/dirac-platform.py | 15 ++++++ Core/scripts/dirac-version.py | 17 ------ .../scripts/dirac-admin-user-quota.py | 7 ++- FrameworkSystem/ConfigTemplate.cfg | 8 +-- .../Service/ProxyManagerHandler.py | 4 +- .../scripts/dirac-admin-get-proxy.py | 2 +- .../scripts/dirac-admin-get-banned-sites.py | 3 +- .../scripts/dirac-stager-show-stats.py | 7 ++- dirac.cfg | 5 ++ docs/docs.conf | 6 +-- .../CommandReference/dirac-agent.rst | 6 --- .../CommandReference/dirac-deploy-scripts.rst | 15 ------ .../CommandReference/dirac-executor.rst | 7 --- .../CommandReference/dirac-service.rst | 7 --- .../dirac-stager-show-stats.rst | 23 -------- .../CommandReference/dirac-version.rst | 10 ---- .../CommandReference/index.rst | 1 - .../HowTo/authentication.rst | 54 ++++--------------- .../Systems/Framework/ProxyManager/index.rst | 2 +- tests/System/client_core.sh | 7 --- tests/System/transformationSystem.sh | 2 +- tests/System/transformation_replication.sh | 2 +- 27 files changed, 145 insertions(+), 184 deletions(-) delete mode 100755 Core/scripts/dirac-version.py delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-agent.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-deploy-scripts.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-executor.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-service.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-stager-show-stats.rst delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-version.rst diff --git a/Core/scripts/dirac-agent.py b/Core/scripts/dirac-agent.py index 14938ea7e42..344134225d6 100755 --- a/Core/scripts/dirac-agent.py +++ b/Core/scripts/dirac-agent.py @@ -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 (|)* -""" 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: diff --git a/Core/scripts/dirac-deploy-scripts.py b/Core/scripts/dirac-deploy-scripts.py index 93d6b8d4ad5..30cf3b58805 100755 --- a/Core/scripts/dirac-deploy-scripts.py +++ b/Core/scripts/dirac-deploy-scripts.py @@ -1,22 +1,55 @@ #!/usr/bin/env python """ Deploy all scripts and extensions -Options: - * --symlink: this will create symlinks instead of wrappers - * : you can specify the folder where your python installation should be fetched from + +Usage:: + + dirac-deploy-scripts (|)* ... + +Arguments:: + python path: you can specify the folder where your python installation should be fetched from to replace the shebang + +Example:: + + $ dirac-deploy-scripts + Scripts will be deployed at /afs/in2p3.fr/home/h/hamar/DIRAC-v5r12/scripts + Inspecting DIRAC module + Inspecting EELADIRAC module + """ 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" @@ -45,12 +78,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) + usage(str(err)) for o, a in opts: + if o in ('-h', '--help'): + usage() if o == "--symlink": useSymlinks = True elif o == "--module": diff --git a/Core/scripts/dirac-executor.py b/Core/scripts/dirac-executor.py index 1de70593222..dae0699d2f9 100755 --- a/Core/scripts/dirac-executor.py +++ b/Core/scripts/dirac-executor.py @@ -3,11 +3,17 @@ # File : dirac-executor # Author : Adria Casajus ######################################################################## -__RCSID__ = "$Id$" +""" +This is a script to launch DIRAC executors + +Usage:: + + dirac-executor (|)* -""" This is a script to launch DIRAC executors """ +__RCSID__ = "$Id$" + import sys from DIRAC.ConfigurationSystem.Client.LocalConfiguration import LocalConfiguration from DIRAC import gLogger @@ -15,6 +21,7 @@ from DIRAC.Core.Utilities.DErrno import includeExtensionErrors localCfg = LocalConfiguration() +localCfg.setUsageMessage(__doc__) positionalArgs = localCfg.getPositionalArguments() if len(positionalArgs) == 0: diff --git a/Core/scripts/dirac-info.py b/Core/scripts/dirac-info.py index f6c23e927e3..9ec1467a350 100755 --- a/Core/scripts/dirac-info.py +++ b/Core/scripts/dirac-info.py @@ -31,9 +31,16 @@ from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getVOForGroup from DIRAC.Core.Utilities.PrettyPrint import printTable + +def version(arg): + Script.disableCS() + print(DIRAC.version) + DIRAC.exit(0) + + Script.setUsageMessage(__doc__) +Script.registerSwitch("v", "version", "print version of current DIRAC installation", version) Script.parseCommandLine(ignoreErrors=True) -args = Script.getPositionalArgs() records = [] diff --git a/Core/scripts/dirac-install-extension.py b/Core/scripts/dirac-install-extension.py index c767b01346e..e9f0528bba2 100644 --- a/Core/scripts/dirac-install-extension.py +++ b/Core/scripts/dirac-install-extension.py @@ -1,40 +1,39 @@ #!/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 (|)* - -l - the project in which the extension is developed - -r - the project release version - -e - 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 " % 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])) - + sys.exit(0) diff --git a/Core/scripts/dirac-platform.py b/Core/scripts/dirac-platform.py index 718c25e262c..ab4058891ac 100755 --- a/Core/scripts/dirac-platform.py +++ b/Core/scripts/dirac-platform.py @@ -3,8 +3,23 @@ # File : dirac-platform # Author : Adria Casajus ######################################################################## +""" +The *dirac-platform* script determines the "platform" of a certain node. +The platform is a string used to identify the minimal characteristics of the node, +enough to determine which version of DIRAC can be installed. +Invoked at any installation, so by the *dirac-install* script, and by the pilots. + +On a RHEL 6 node, for example, the determined dirac platform is "Linux_x86_64_glibc-2.5" + +Example:: + + $ dirac-platform + Linux_x86_64_glibc-2.5 + +""" from __future__ import print_function + __RCSID__ = "$Id$" try: diff --git a/Core/scripts/dirac-version.py b/Core/scripts/dirac-version.py deleted file mode 100755 index 4d61bcfe93e..00000000000 --- a/Core/scripts/dirac-version.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -######################################################################## -# File : dirac-version -# Author : Ricardo Graciani -######################################################################## -""" -Print version of current DIRAC installation - -Example: - - $ dirac-version - v5r12-pre9 -""" -from __future__ import print_function - -import DIRAC -print(DIRAC.version) diff --git a/DataManagementSystem/scripts/dirac-admin-user-quota.py b/DataManagementSystem/scripts/dirac-admin-user-quota.py index 556319c3ede..6939b739a6b 100755 --- a/DataManagementSystem/scripts/dirac-admin-user-quota.py +++ b/DataManagementSystem/scripts/dirac-admin-user-quota.py @@ -6,8 +6,11 @@ Show storage quotas for specified users or for all registered users if nobody is specified Usage: - dirac-admin-user-quota [user1 ...] -Example: + + dirac-admin-user-quota [user1 ...] + +Example:: + $ dirac-admin-user-quota ------------------------------ Username | Quota (GB) diff --git a/FrameworkSystem/ConfigTemplate.cfg b/FrameworkSystem/ConfigTemplate.cfg index 0b7f3e5e02b..ca7fe91ff83 100644 --- a/FrameworkSystem/ConfigTemplate.cfg +++ b/FrameworkSystem/ConfigTemplate.cfg @@ -13,14 +13,16 @@ Services storeHostInfo = Operator } } - ##BEGIN ProxyManager + ## ProxyManager: # Section to describe ProxyManager system + # https://dirac.readthedocs.org/en/latest/AdministratorGuide/Systems/Framework/ProxyManager/index.html ProxyManager { Port = 9152 MaxThreads = 100 + # Flag to use myproxy server UseMyProxy = False - getVOMSProxyWithTokenMaxThreads = 2 + # Description of rules for access to methods Authorization { Default = authenticated @@ -40,7 +42,7 @@ Services setPersistency = ProxyManagement } } - ##END + ## SecurityLogging { Port = 9153 diff --git a/FrameworkSystem/Service/ProxyManagerHandler.py b/FrameworkSystem/Service/ProxyManagerHandler.py index 7b9c67a5ef0..502ba040630 100644 --- a/FrameworkSystem/Service/ProxyManagerHandler.py +++ b/FrameworkSystem/Service/ProxyManagerHandler.py @@ -1,8 +1,8 @@ """ ProxyManager is the implementation of the ProxyManagement service in the DISET framework .. literalinclude:: ../ConfigTemplate.cfg - :start-after: ##BEGIN ProxyManager - :end-before: ##END + :start-after: ## ProxyManager: + :end-before: ## :dedent: 2 :caption: ProxyManager options """ diff --git a/FrameworkSystem/scripts/dirac-admin-get-proxy.py b/FrameworkSystem/scripts/dirac-admin-get-proxy.py index 770f1d8ef25..1694748458c 100755 --- a/FrameworkSystem/scripts/dirac-admin-get-proxy.py +++ b/FrameworkSystem/scripts/dirac-admin-get-proxy.py @@ -16,7 +16,7 @@ user: DIRAC user name (will fail if there is more than 1 DN registered) group: DIRAC group name -Example: +Example:: $ dirac-admin-get-proxy vhamar dirac_user Proxy downloaded to /afs/in2p3.fr/home/h/hamar/proxy.vhamar.dirac_user diff --git a/Interfaces/scripts/dirac-admin-get-banned-sites.py b/Interfaces/scripts/dirac-admin-get-banned-sites.py index 6c18c801ba5..7f83965343d 100755 --- a/Interfaces/scripts/dirac-admin-get-banned-sites.py +++ b/Interfaces/scripts/dirac-admin-get-banned-sites.py @@ -7,7 +7,8 @@ Usage: dirac-admin-get-banned-sites (|)* -Example: + +Example:: $ dirac-admin-get-banned-sites LCG.IN2P3.fr Site not present in logging table diff --git a/StorageManagementSystem/scripts/dirac-stager-show-stats.py b/StorageManagementSystem/scripts/dirac-stager-show-stats.py index 2e12402cddf..5a0e93c5cbf 100755 --- a/StorageManagementSystem/scripts/dirac-stager-show-stats.py +++ b/StorageManagementSystem/scripts/dirac-stager-show-stats.py @@ -8,7 +8,11 @@ Reports breakdown of file(s) number/size in different staging states across Storage Elements. Currently used Cache per SE is also reported. (active pins) -Example: +Usage:: + + dirac-stager-show-stats (|)* + +Example:: dirac-stager-show-stats @@ -31,6 +35,7 @@ Script.setUsageMessage(__doc__) Script.parseCommandLine(ignoreErrors=False) + from DIRAC.StorageManagementSystem.Client.StorageManagerClient import StorageManagerClient client = StorageManagerClient() diff --git a/dirac.cfg b/dirac.cfg index 011d87669c9..2a4159e627e 100644 --- a/dirac.cfg +++ b/dirac.cfg @@ -1,3 +1,4 @@ +### Registry section: # Sections to register VOs, groups, users and hosts # https://dirac.readthedocs.org/en/latest/AdministratorGuide/UserManagement.html Registry @@ -36,6 +37,7 @@ Registry Properties += TrustedHost } } + ## VOs: # DIRAC VOs section, subsections represents name of the DIRAC VO or alias name of the real VOMS VO VO @@ -136,6 +138,7 @@ Registry Properties += ProxyManagement # Allow managing proxies Properties += Operator # Operator } + } ## ## Users: @@ -176,6 +179,7 @@ Registry } ## } +### Systems { @@ -397,6 +401,7 @@ Resources { # Section for proxy providers, subsections is the names of the proxy providers + # https://dirac.readthedocs.org/en/latest/AdministratorGuide/Resources/proxyprovider.html ProxyProviders { diff --git a/docs/docs.conf b/docs/docs.conf index 90e3dfa8f46..bc1a28f87c2 100644 --- a/docs/docs.conf +++ b/docs/docs.conf @@ -48,8 +48,6 @@ ignore_commands= dirac-framework-self-ping, # obsolete dirac-dms-add-files, -# just prints version, no help - dirac-version, # just prints platform, no help dirac-platform, # no doc, purely internal use @@ -75,7 +73,7 @@ title = Admin # this list of patterns will reject scripts that are matched by the patterns above exclude = # the scripts in this list are added to the indexFile, but the rst file has to be provided manually -manual = dirac-cert-convert.sh, dirac-platform, dirac-version +manual = dirac-cert-convert.sh, dirac-platform # where to place the rst files sectionPath = source/AdministratorGuide/CommandReference # optional: only if a hand curated rst file exists @@ -101,5 +99,5 @@ sectionPath = source/UserGuide/CommandReference/%(title)s pattern = dirac-proxy, dirac-info, myproxy, -resource- title = Others exclude = -manual = dirac-cert-convert.sh, dirac-platform, dirac-version +manual = dirac-cert-convert.sh, dirac-platform sectionPath = source/UserGuide/CommandReference/%(title)s diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-agent.rst b/docs/source/AdministratorGuide/CommandReference/dirac-agent.rst deleted file mode 100644 index e15f4665648..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-agent.rst +++ /dev/null @@ -1,6 +0,0 @@ -================== -dirac-agent -================== - -Script running a dirac agent. Mostly internal. - diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-deploy-scripts.rst b/docs/source/AdministratorGuide/CommandReference/dirac-deploy-scripts.rst deleted file mode 100644 index add4d6be320..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-deploy-scripts.rst +++ /dev/null @@ -1,15 +0,0 @@ -=========================== -dirac-deploy-scripts -=========================== - - Scripts will be deployed at /afs/in2p3.fr/home/h/hamar/DIRAC-v6r7/scripts - - Inspecting DIRAC module - -Example:: - - $ dirac-deploy-scripts - Scripts will be deployed at /afs/in2p3.fr/home/h/hamar/DIRAC-v5r12/scripts - Inspecting DIRAC module - Inspecting EELADIRAC module - diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-executor.rst b/docs/source/AdministratorGuide/CommandReference/dirac-executor.rst deleted file mode 100644 index 8b8cb9e6c47..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-executor.rst +++ /dev/null @@ -1,7 +0,0 @@ -===================== -dirac-executor -===================== - -2013-02-06 12:30:09 UTC Framework FATAL: You must specify which executor to run! - - diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-service.rst b/docs/source/AdministratorGuide/CommandReference/dirac-service.rst deleted file mode 100644 index 38133af3927..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-service.rst +++ /dev/null @@ -1,7 +0,0 @@ -==================== -dirac-service -==================== - -2013-02-06 13:06:27 UTC Framework FATAL: You must specify which server to run! - - diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-stager-show-stats.rst b/docs/source/AdministratorGuide/CommandReference/dirac-stager-show-stats.rst deleted file mode 100644 index b7a819985cd..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-stager-show-stats.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _admin_dirac-stager-show-stats: - -======================= -dirac-stager-show-stats -======================= - -Reports breakdown of file(s) number/size in different staging states across Storage Elements. -Currently used Cache per SE is also reported. (active pins) - -Example:: - - dirac-stager-show-stats - - Status SE NumberOfFiles Size(GB) - -------------------------------------------------------------------------- - Staged GRIDKA-RDST 1 4.5535 - StageSubmitted GRIDKA-RDST 5 22.586 - Waiting PIC-RDST 3 13.6478 - - WARNING: the Size for files with Status=New is not yet determined at the point of selection! - - --------------------- current status of the SE Caches from the DB----------- - GRIDKA-RDST : 6 replicas with a size of 29.141 GB. diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst b/docs/source/AdministratorGuide/CommandReference/dirac-version.rst deleted file mode 100644 index b9af60aaa42..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-version.rst +++ /dev/null @@ -1,10 +0,0 @@ -==================== -dirac-version -==================== - -Return the current dirac version used by the client. - -Example:: - - $ dirac-version - v5r12-pre9 diff --git a/docs/source/AdministratorGuide/CommandReference/index.rst b/docs/source/AdministratorGuide/CommandReference/index.rst index 598b8955d85..9bdabf0e6f4 100644 --- a/docs/source/AdministratorGuide/CommandReference/index.rst +++ b/docs/source/AdministratorGuide/CommandReference/index.rst @@ -114,7 +114,6 @@ Managing DIRAC installation: dirac-configure dirac-admin-get-CAs dirac-info - dirac-version dirac-admin-check-config-options dirac-populate-component-db diff --git a/docs/source/AdministratorGuide/HowTo/authentication.rst b/docs/source/AdministratorGuide/HowTo/authentication.rst index e3cab832856..e8cba855220 100644 --- a/docs/source/AdministratorGuide/HowTo/authentication.rst +++ b/docs/source/AdministratorGuide/HowTo/authentication.rst @@ -18,53 +18,23 @@ To identify users DIRAC use RBAC model (Role Based Access Control) - A username has a DN, and the groups in which it is included - A user group has a number of properties -Before authorize or not some tasks you have to define these properties, hostnames, usernames and groups. For that you may register informations at ``/DIRAC/Registry``. After registering users create a proxy with a group and this guarantees certain properties. - -Bellow a simple example with only one user, one group and one host:: - - Registry - { - Users - { - userName - { - DN = /C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser/emailAddress=lhcb-dirac-ci@cern.ch - Email = youremail@yourprovider.com - } - } - - Groups - { - groupName - { - Users = userName - Properties = CSAdministrator, JobAdministrator, ServiceAdministrator, ProxyDelegation, FullDelegation - } - } - - Hosts - { - hostName - { - DN = /C=ch/O=DIRAC/OU=DIRAC CI/CN=dirac.cern.ch/emailAddress=lhcb-dirac-ci@cern.ch - Properties = CSAdministrator, JobAdministrator, ServiceAdministrator, ProxyDelegation, FullDelegation - } - } - } - - -Users and their roles registered in a VOMS server can be synchronized to the DIRAC configuration using the -:mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent`. +Before authorize or not some tasks you have to define these properties, hostnames, usernames and groups. For that you may :ref:`register informations` at ``/DIRAC/Registry``. +.. literalinclude:: ../../../../dirac.cfg + :start-after: ### Registry section: + :end-before: ### + :dedent: 0 -************** -Authorizations -************** +After registering users create a proxy with a group and this guarantees certain properties. +Users and their roles registered in a VOMS server can be synchronized to the DIRAC configuration using the :mod:`~DIRAC.ConfigurationSystem.Agent.VOMS2CSAgent`. -All procedure have a list of required Properties and user may have at least one property to execute the procedure. Be careful, properties are associated with groups, not directly with users! +************** +Authorizations +************** +All procedure have a list of required :mod:`~DIRAC.Core.Security.Properties` and user may have at least one property to execute the procedure. Be careful, properties are associated with groups, not directly with users! There are two main ways to define required properties: @@ -78,5 +48,3 @@ If you don't want to define specific properties you can use "authenticated", "an - "any" and "all" have the same effect, everyone can call the procedure. It can be dangerous if you allow non-secured connections. You also have to define properties for groups of users in the configuration system at ```/DIRAC/Registry/Groups/(groupName)/Properties```. - -For a comprehensive list of Properties, see :py:mod:`~DIRAC.Core.Security.Properties` \ No newline at end of file diff --git a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst index 893efd09e3b..c515d9f3604 100644 --- a/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst +++ b/docs/source/AdministratorGuide/Systems/Framework/ProxyManager/index.rst @@ -9,7 +9,7 @@ It keeps uploaded long-living proxies in order to provide them for asynchronous This system is vital, as the proxies stored here are used to run users jobs and pilots, as well as to retrieve information from VOMS. The system also contains the logic of notification (look :ref:`Notification system ` of the expiration of the proxy. It is also important to mention that the PM manages proxy extensions, both DIRAC and VOMS. The class :mod:`~DIRAC.Core.Security.VOMS` is used to add a VOMS extension. -It is also possible to obtain a limited user proxy using tokens. +It is also possible to obtain a limited user proxy using tokens. If such a proxy is also available through :ref:`a proxy provider ` that is supported by DIRAC, it is used to update the proxy if necessary. Structure ========= diff --git a/tests/System/client_core.sh b/tests/System/client_core.sh index 513676cb6ae..b4221674ceb 100755 --- a/tests/System/client_core.sh +++ b/tests/System/client_core.sh @@ -58,13 +58,6 @@ if [[ "${?}" -ne 0 ]]; then exit 1 fi -echo " " -echo "====== dirac-version" -dirac-version -if [[ "${?}" -ne 0 ]]; then - exit 1 -fi - echo " " echo "====== dirac-platform" dirac-platform diff --git a/tests/System/transformationSystem.sh b/tests/System/transformationSystem.sh index a79020196f5..bc46b3c0cc0 100755 --- a/tests/System/transformationSystem.sh +++ b/tests/System/transformationSystem.sh @@ -32,7 +32,7 @@ stamptime=$(date +%Y%m%d_%H%M%S) stime=$(date +"%H%M%S") tdate=$(date +"20%y-%m-%d") ttime=$(date +"%R") -version=$(dirac-version) +version=$(dirac-info -v) if [[ -d "TransformationSystemTest" ]]; then echo "Removing TransformationSystemTest" diff --git a/tests/System/transformation_replication.sh b/tests/System/transformation_replication.sh index 80938d560e3..47b90ca587e 100755 --- a/tests/System/transformation_replication.sh +++ b/tests/System/transformation_replication.sh @@ -33,7 +33,7 @@ echo " " #Values to be used stime=$(date +"%H%M%S") tdate=$(date +"20%y-%m-%d") -version=$(dirac-version) +version=$(dirac-info -v) if [[ -d "TransformationSystemTest" ]]; then echo "Removing TransformationSystemTest" From 46e1dc466b5449c28af26ce0a6a7621e979e6364 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Mon, 14 Dec 2020 05:05:42 +0100 Subject: [PATCH 29/51] fix docs --- Core/scripts/dirac-deploy-scripts.py | 9 ++++----- Core/scripts/dirac-install-extension.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Core/scripts/dirac-deploy-scripts.py b/Core/scripts/dirac-deploy-scripts.py index 30cf3b58805..bd90b5b61e8 100755 --- a/Core/scripts/dirac-deploy-scripts.py +++ b/Core/scripts/dirac-deploy-scripts.py @@ -12,7 +12,7 @@ Example:: - $ dirac-deploy-scripts + $ dirac-deploy-scripts Scripts will be deployed at /afs/in2p3.fr/home/h/hamar/DIRAC-v5r12/scripts Inspecting DIRAC module Inspecting EELADIRAC module @@ -32,8 +32,7 @@ cmdOpts = (('', 'symlink', 'this will create symlinks instead of wrappers'), ('', 'module=', 'module in which to look for the scripts'), - ('h', 'help', 'help doc string'))) - + ('h', 'help', 'help doc string')) def usage(err=''): """ Usage printout @@ -46,7 +45,7 @@ def usage(err=''): 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) @@ -82,7 +81,7 @@ def usage(err=''): "".join([opt[0] for opt in cmdOpts]), [opt[1] for opt in cmdOpts]) except getopt.GetoptError as err: - # print help information and exit: + # print help information and exit usage(str(err)) for o, a in opts: if o in ('-h', '--help'): diff --git a/Core/scripts/dirac-install-extension.py b/Core/scripts/dirac-install-extension.py index e9f0528bba2..fd550ef1e6d 100644 --- a/Core/scripts/dirac-install-extension.py +++ b/Core/scripts/dirac-install-extension.py @@ -33,7 +33,7 @@ def usage(): print('Options::\n\n') for cmdOpt in cmdOpts: print(" %s %s : %s" % (cmdOpt[0].ljust(3), cmdOpt[1].ljust(20), cmdOpt[2])) - + sys.exit(0) From 6b892c7ecce46a6c48a96b308254539cbba729c9 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Mon, 14 Dec 2020 05:10:23 +0100 Subject: [PATCH 30/51] fix docs --- Core/scripts/dirac-deploy-scripts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/scripts/dirac-deploy-scripts.py b/Core/scripts/dirac-deploy-scripts.py index bd90b5b61e8..bf0bfaa490e 100755 --- a/Core/scripts/dirac-deploy-scripts.py +++ b/Core/scripts/dirac-deploy-scripts.py @@ -34,6 +34,7 @@ ('', 'module=', 'module in which to look for the scripts'), ('h', 'help', 'help doc string')) + def usage(err=''): """ Usage printout From def0586ecf28d7e4f1152d264e4f1c015945f7ef Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 5 Jan 2021 16:47:31 +0200 Subject: [PATCH 31/51] add help, fix dirac-platform --- Core/scripts/dirac-platform.py | 17 +++++++++++++++++ Interfaces/scripts/dirac-framework-self-ping.py | 5 +---- docs/docs.conf | 14 +------------- .../CommandReference/Others/dirac-version.rst | 11 ----------- 4 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 docs/source/UserGuide/CommandReference/Others/dirac-version.rst diff --git a/Core/scripts/dirac-platform.py b/Core/scripts/dirac-platform.py index ab4058891ac..bbf8c3bf885 100755 --- a/Core/scripts/dirac-platform.py +++ b/Core/scripts/dirac-platform.py @@ -12,6 +12,10 @@ On a RHEL 6 node, for example, the determined dirac platform is "Linux_x86_64_glibc-2.5" +Usage:: + + dirac-platform [option|cfgfile] + Example:: $ dirac-platform @@ -22,6 +26,19 @@ __RCSID__ = "$Id$" +import sys +import getopt + +cmdOpt = ('h', 'help', 'help doc string') + +optList, args = getopt.getopt(sys.argv[1:], cmdOpt[0], cmdOpt[1]) +for opt, value in optList: + if opt in ('-h', '--help'): + print(__doc__) + print('Options::\n\n') + print(" %s %s : %s" % (cmdOpt[0].ljust(3), cmdOpt[1].ljust(20), cmdOpt[2])) + sys.exit(0) + try: from DIRAC.Core.Utilities.Platform import getPlatformString except Exception: diff --git a/Interfaces/scripts/dirac-framework-self-ping.py b/Interfaces/scripts/dirac-framework-self-ping.py index 2fd8e34f555..1867461ed3d 100755 --- a/Interfaces/scripts/dirac-framework-self-ping.py +++ b/Interfaces/scripts/dirac-framework-self-ping.py @@ -23,7 +23,4 @@ rpc = RPCClient('dips://localhost:%s' % sys.argv[1]) res = rpc.ping() time.sleep(0.1) - if not res['OK']: - sys.exit(1) - else: - sys.exit(0) + sys.exit(0 if res['OK'] else 1) diff --git a/docs/docs.conf b/docs/docs.conf index bc1a28f87c2..4c7af685334 100644 --- a/docs/docs.conf +++ b/docs/docs.conf @@ -38,24 +38,12 @@ target_file = source/AdministratorGuide/Configuration/ExampleConfig.rst # list of commands which are not executed to get doc files, rst files have to be # created by hand ignore_commands= -# does not have --help, deploys scripts - dirac-deploy-scripts, # does not have --help, starts compiling externals dirac-compile-externals, # does not have --help dirac-install-client, # does not have --help - dirac-framework-self-ping, -# obsolete - dirac-dms-add-files, -# just prints platform, no help - dirac-platform, -# no doc, purely internal use - dirac-agent, -# no doc, purely internal use - dirac-executor, -# no doc, purely internal use - dirac-service, + dirac-framework-self-ping # scripts where the module docstring should be added to the documentation add_module_docstring = dirac-install diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-version.rst b/docs/source/UserGuide/CommandReference/Others/dirac-version.rst deleted file mode 100644 index dc4d8ff05a8..00000000000 --- a/docs/source/UserGuide/CommandReference/Others/dirac-version.rst +++ /dev/null @@ -1,11 +0,0 @@ -============= -dirac-version -============= - -Prints the version of DIRAC, see also `dirac-info` - -Example:: - - $ dirac-version - v6r20-pre17 - From 8bde7b03e112a16ad6148ea4d5378a8768f879bd Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 5 Jan 2021 17:03:13 +0200 Subject: [PATCH 32/51] add help, fix dirac-version --- Core/scripts/dirac-version.py | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Core/scripts/dirac-version.py diff --git a/Core/scripts/dirac-version.py b/Core/scripts/dirac-version.py new file mode 100644 index 00000000000..bcbc62c4c03 --- /dev/null +++ b/Core/scripts/dirac-version.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +######################################################################## +# File : dirac-version +# Author : Ricardo Graciani +######################################################################## +""" +Print version of current DIRAC installation + +Usage:: + + dirac-version [option] + +Example:: + + $ dirac-version + +""" +from __future__ import print_function + +__RCSID__ = "$Id$" + +import sys +import getopt + +cmdOpt = ('h', 'help', 'help doc string') + +optList, args = getopt.getopt(sys.argv[1:], cmdOpt[0], cmdOpt[1]) +for opt, value in optList: + if opt in ('-h', '--help'): + print(__doc__) + print('Options::\n\n') + print(" %s %s : %s" % (cmdOpt[0].ljust(3), cmdOpt[1].ljust(20), cmdOpt[2])) + sys.exit(0) + +import DIRAC +print(DIRAC.version) From e4e645969b1c77686d42d23541eef76af4b93970 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 5 Jan 2021 17:07:37 +0200 Subject: [PATCH 33/51] fix dirac-platform --- Core/scripts/dirac-info.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Core/scripts/dirac-info.py b/Core/scripts/dirac-info.py index 9ec1467a350..f654e336060 100755 --- a/Core/scripts/dirac-info.py +++ b/Core/scripts/dirac-info.py @@ -38,8 +38,15 @@ def version(arg): 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) records = [] From d4daa7a2621ce5579e8aef8613144d89d9e7d1ad Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 6 Jan 2021 02:16:42 +0200 Subject: [PATCH 34/51] fix cmd index --- docs/source/AdministratorGuide/CommandReference/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/AdministratorGuide/CommandReference/index.rst b/docs/source/AdministratorGuide/CommandReference/index.rst index 9bdabf0e6f4..598b8955d85 100644 --- a/docs/source/AdministratorGuide/CommandReference/index.rst +++ b/docs/source/AdministratorGuide/CommandReference/index.rst @@ -114,6 +114,7 @@ Managing DIRAC installation: dirac-configure dirac-admin-get-CAs dirac-info + dirac-version dirac-admin-check-config-options dirac-populate-component-db From 387ce58aef6b2fb0ca0716a4dab66df58901f845 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Thu, 7 Jan 2021 12:21:53 +0200 Subject: [PATCH 35/51] cleaning NOTICE: for scripts help doc --- Core/scripts/dirac-service.py | 10 +++++++++- docs/diracdoctools/Utilities.py | 7 +++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Core/scripts/dirac-service.py b/Core/scripts/dirac-service.py index cd2625237a5..7bb51bcbc24 100755 --- a/Core/scripts/dirac-service.py +++ b/Core/scripts/dirac-service.py @@ -3,6 +3,14 @@ # File : dirac-service # Author : Adria Casajus ######################################################################## +""" +This is a script to launch DIRAC services. Mostly internal. + +Usage:: + + dirac-service (|)* + +""" import sys @@ -14,7 +22,7 @@ __RCSID__ = "$Id$" localCfg = LocalConfiguration() - +localCfg.setUsageMessage(__doc__) positionalArgs = localCfg.getPositionalArguments() if len(positionalArgs) == 0: diff --git a/docs/diracdoctools/Utilities.py b/docs/diracdoctools/Utilities.py index 1736dc2dff3..6f61f5e91b7 100644 --- a/docs/diracdoctools/Utilities.py +++ b/docs/diracdoctools/Utilities.py @@ -107,8 +107,11 @@ def runCommand(command): result = subprocess.check_output(shlex.split(command), stderr=subprocess.STDOUT, universal_newlines=True) if 'NOTICE:' in result: - LOG.warn('NOTICE in output for: %s', command) - return '' + lines = [] + LOG.warn('NOTICE in output for: %s; cleaning output from datestamp..', command) + for l in result.split('\n'): + lines.append(re.sub(r"^.*NOTICE: ", "", l)) + result = "\n".join(lines) if len(lines) > 2 else '' return result except (OSError, subprocess.CalledProcessError) as e: LOG.error('Error when runnning command %s: %r', command, e.output) From fed2d940d9ae5aef93be720c82e501b169061dfe Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 8 Jan 2021 18:06:48 +0200 Subject: [PATCH 36/51] move dirac.cfg to build --- Resources/ProxyProvider/DIRACCAProxyProvider.py | 2 +- Resources/ProxyProvider/PUSPProxyProvider.py | 2 +- docs/Makefile | 5 ++++- docs/diracdoctools/Utilities.py | 6 ++++-- docs/source/AdministratorGuide/HowTo/authentication.rst | 2 +- .../source/AdministratorGuide/Resources/proxyprovider.rst | 4 ++-- docs/source/AdministratorGuide/UserManagement/index.rst | 8 ++++---- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Resources/ProxyProvider/DIRACCAProxyProvider.py b/Resources/ProxyProvider/DIRACCAProxyProvider.py index 3b20ce2aed2..3d1a085c28e 100644 --- a/Resources/ProxyProvider/DIRACCAProxyProvider.py +++ b/Resources/ProxyProvider/DIRACCAProxyProvider.py @@ -5,7 +5,7 @@ Required parameters in the DIRAC configuration for its implementation: - .. literalinclude:: ../../../../../dirac.cfg + .. literalinclude:: /build/dirac.cfg :start-after: ## DIRACCA type: :end-before: ## :dedent: 2 diff --git a/Resources/ProxyProvider/PUSPProxyProvider.py b/Resources/ProxyProvider/PUSPProxyProvider.py index d3347eb6873..51412c19aee 100644 --- a/Resources/ProxyProvider/PUSPProxyProvider.py +++ b/Resources/ProxyProvider/PUSPProxyProvider.py @@ -1,7 +1,7 @@ """ ProxyProvider implementation for a per-user sub-proxy(PUSP) proxy generation using PUSP proxy server. More details about PUSP here: https://wiki.egi.eu/wiki/Usage_of_the_per_user_sub_proxy_in_EGI - .. literalinclude:: ../../../../../dirac.cfg + .. literalinclude:: /build/dirac.cfg :start-after: ## PUSP type: :end-before: ## :dedent: 2 diff --git a/docs/Makefile b/docs/Makefile index dab812674b8..02c97d7ff8a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,9 +11,12 @@ # You can set these variables from the command line. #SPHINXOPTS = -SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build +CFGPATH = ../dirac.cfg +# Move dirac.cfg to source dir +USEDIRACCFG = cp $(CFGPATH) $(BUILDDIR)/ +SPHINXBUILD = $(USEDIRACCFG) && sphinx-build diff --git a/docs/diracdoctools/Utilities.py b/docs/diracdoctools/Utilities.py index 6f61f5e91b7..4fcd29f58dc 100644 --- a/docs/diracdoctools/Utilities.py +++ b/docs/diracdoctools/Utilities.py @@ -4,11 +4,12 @@ from builtins import open -import logging import os +import re import sys -import subprocess32 as subprocess import shlex +import logging +import subprocess32 as subprocess LOG = logging.getLogger(__name__) @@ -111,6 +112,7 @@ def runCommand(command): LOG.warn('NOTICE in output for: %s; cleaning output from datestamp..', command) for l in result.split('\n'): lines.append(re.sub(r"^.*NOTICE: ", "", l)) + # if the output is less than 3 lines something went wrong result = "\n".join(lines) if len(lines) > 2 else '' return result except (OSError, subprocess.CalledProcessError) as e: diff --git a/docs/source/AdministratorGuide/HowTo/authentication.rst b/docs/source/AdministratorGuide/HowTo/authentication.rst index e8cba855220..60a64441ba7 100644 --- a/docs/source/AdministratorGuide/HowTo/authentication.rst +++ b/docs/source/AdministratorGuide/HowTo/authentication.rst @@ -20,7 +20,7 @@ To identify users DIRAC use RBAC model (Role Based Access Control) Before authorize or not some tasks you have to define these properties, hostnames, usernames and groups. For that you may :ref:`register informations` at ``/DIRAC/Registry``. -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ### Registry section: :end-before: ### :dedent: 0 diff --git a/docs/source/AdministratorGuide/Resources/proxyprovider.rst b/docs/source/AdministratorGuide/Resources/proxyprovider.rst index c0413050d0a..fbef3d67abb 100644 --- a/docs/source/AdministratorGuide/Resources/proxyprovider.rst +++ b/docs/source/AdministratorGuide/Resources/proxyprovider.rst @@ -12,7 +12,7 @@ DIRACCA proxy provider ProxyProvider implementation for the proxy generation using local Certification Authority (CA) credentials. DIRACCA type of the proxy provider is a simple CA, its main purpose is to generate a proxy on the fly for DIRAC users who do not have a certificate registered in DIRAC registry. To use it needs to have CA certificate and key locally. Here are two ways to set up this type of proxy provider in the DIRAC configuration: -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ## DIRACCA type: :end-before: ## :dedent: 2 @@ -38,7 +38,7 @@ PUSP proxy provider ProxyProvider implementation for a Per-User Sub-Proxy(PUSP) proxy generation using PUSP proxy server. `More details about PUSP here `_. Required parameters in the DIRAC configuration for its implementation: -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ## PUSP type: :end-before: ## :dedent: 2 diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index d086f10561d..6ed4644712a 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -53,7 +53,7 @@ You need to log in under this user/group and use the Configuration Manager appli First of all, define, if necessary, some attributes at the root of the Registry section, that will be applicable for all the configuration are defined. -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ## Registry options: :end-before: ## :dedent: 2 @@ -65,7 +65,7 @@ If the described VO is a VOMS VO, then it is important to note that the VO admin it is necessary to obtain relevant information from the VOMS servers regarding VO users. In this case, the addition of VOMS VO is considered, respectively, there are attributes specific to VOMS. -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ## VOs :end-before: ## :dedent: 2 @@ -80,7 +80,7 @@ It is usually necessary to have at least three groups: Permissions of the group users are determined by "Properties" option. Full description of all supported :mod:`~DIRAC.Core.Security.Properties`. -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ## Groups: :end-before: ## :dedent: 2 @@ -91,7 +91,7 @@ To add a new group you can use special DIRAC command that simplifies this action Finally, create a user in the **Registry/Users** section: -.. literalinclude:: ../../../../dirac.cfg +.. literalinclude:: /build/dirac.cfg :start-after: ## Users: :end-before: ## :dedent: 2 From b09bbd55aa0864e6fa4bfc1a29f004067a064f16 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 8 Jan 2021 20:50:15 +0200 Subject: [PATCH 37/51] fix build --- docs/Makefile | 2 +- docs/diracdoctools/Utilities.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 02c97d7ff8a..d04c707befa 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,7 +15,7 @@ PAPER = BUILDDIR = build CFGPATH = ../dirac.cfg # Move dirac.cfg to source dir -USEDIRACCFG = cp $(CFGPATH) $(BUILDDIR)/ +USEDIRACCFG = mkdir $(BUILDDIR) && cp $(CFGPATH) $(BUILDDIR)/ SPHINXBUILD = $(USEDIRACCFG) && sphinx-build diff --git a/docs/diracdoctools/Utilities.py b/docs/diracdoctools/Utilities.py index 4fcd29f58dc..dbba1ee370c 100644 --- a/docs/diracdoctools/Utilities.py +++ b/docs/diracdoctools/Utilities.py @@ -110,8 +110,8 @@ def runCommand(command): if 'NOTICE:' in result: lines = [] LOG.warn('NOTICE in output for: %s; cleaning output from datestamp..', command) - for l in result.split('\n'): - lines.append(re.sub(r"^.*NOTICE: ", "", l)) + for line in result.split('\n'): + lines.append(re.sub(r"^.*NOTICE: ", "", line)) # if the output is less than 3 lines something went wrong result = "\n".join(lines) if len(lines) > 2 else '' return result From 56e26f4cade490db726a96d72dacdd3722e807d9 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sat, 9 Jan 2021 13:04:17 +0200 Subject: [PATCH 38/51] copy dirac.cfg to source --- Resources/ProxyProvider/DIRACCAProxyProvider.py | 2 +- Resources/ProxyProvider/PUSPProxyProvider.py | 2 +- docs/Makefile | 3 ++- docs/source/AdministratorGuide/HowTo/authentication.rst | 2 +- .../source/AdministratorGuide/Resources/proxyprovider.rst | 4 ++-- docs/source/AdministratorGuide/UserManagement/index.rst | 8 ++++---- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Resources/ProxyProvider/DIRACCAProxyProvider.py b/Resources/ProxyProvider/DIRACCAProxyProvider.py index 3d1a085c28e..b4b049fcdd4 100644 --- a/Resources/ProxyProvider/DIRACCAProxyProvider.py +++ b/Resources/ProxyProvider/DIRACCAProxyProvider.py @@ -5,7 +5,7 @@ Required parameters in the DIRAC configuration for its implementation: - .. literalinclude:: /build/dirac.cfg + .. literalinclude:: /dirac.cfg :start-after: ## DIRACCA type: :end-before: ## :dedent: 2 diff --git a/Resources/ProxyProvider/PUSPProxyProvider.py b/Resources/ProxyProvider/PUSPProxyProvider.py index 51412c19aee..db9276dd92d 100644 --- a/Resources/ProxyProvider/PUSPProxyProvider.py +++ b/Resources/ProxyProvider/PUSPProxyProvider.py @@ -1,7 +1,7 @@ """ ProxyProvider implementation for a per-user sub-proxy(PUSP) proxy generation using PUSP proxy server. More details about PUSP here: https://wiki.egi.eu/wiki/Usage_of_the_per_user_sub_proxy_in_EGI - .. literalinclude:: /build/dirac.cfg + .. literalinclude:: /dirac.cfg :start-after: ## PUSP type: :end-before: ## :dedent: 2 diff --git a/docs/Makefile b/docs/Makefile index d04c707befa..5c073324373 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,7 +15,7 @@ PAPER = BUILDDIR = build CFGPATH = ../dirac.cfg # Move dirac.cfg to source dir -USEDIRACCFG = mkdir $(BUILDDIR) && cp $(CFGPATH) $(BUILDDIR)/ +USEDIRACCFG = cp $(CFGPATH) source/ SPHINXBUILD = $(USEDIRACCFG) && sphinx-build @@ -47,6 +47,7 @@ help: clean: -rm -rf $(BUILDDIR)/* + -rm -rf source/dirac.cfg cleanall: clean diracdoctools/scripts/dirac-docs-build-code.py --clean diff --git a/docs/source/AdministratorGuide/HowTo/authentication.rst b/docs/source/AdministratorGuide/HowTo/authentication.rst index 60a64441ba7..bbcf764dddf 100644 --- a/docs/source/AdministratorGuide/HowTo/authentication.rst +++ b/docs/source/AdministratorGuide/HowTo/authentication.rst @@ -20,7 +20,7 @@ To identify users DIRAC use RBAC model (Role Based Access Control) Before authorize or not some tasks you have to define these properties, hostnames, usernames and groups. For that you may :ref:`register informations` at ``/DIRAC/Registry``. -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ### Registry section: :end-before: ### :dedent: 0 diff --git a/docs/source/AdministratorGuide/Resources/proxyprovider.rst b/docs/source/AdministratorGuide/Resources/proxyprovider.rst index fbef3d67abb..1d77b53de0b 100644 --- a/docs/source/AdministratorGuide/Resources/proxyprovider.rst +++ b/docs/source/AdministratorGuide/Resources/proxyprovider.rst @@ -12,7 +12,7 @@ DIRACCA proxy provider ProxyProvider implementation for the proxy generation using local Certification Authority (CA) credentials. DIRACCA type of the proxy provider is a simple CA, its main purpose is to generate a proxy on the fly for DIRAC users who do not have a certificate registered in DIRAC registry. To use it needs to have CA certificate and key locally. Here are two ways to set up this type of proxy provider in the DIRAC configuration: -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ## DIRACCA type: :end-before: ## :dedent: 2 @@ -38,7 +38,7 @@ PUSP proxy provider ProxyProvider implementation for a Per-User Sub-Proxy(PUSP) proxy generation using PUSP proxy server. `More details about PUSP here `_. Required parameters in the DIRAC configuration for its implementation: -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ## PUSP type: :end-before: ## :dedent: 2 diff --git a/docs/source/AdministratorGuide/UserManagement/index.rst b/docs/source/AdministratorGuide/UserManagement/index.rst index 6ed4644712a..eec2b348284 100644 --- a/docs/source/AdministratorGuide/UserManagement/index.rst +++ b/docs/source/AdministratorGuide/UserManagement/index.rst @@ -53,7 +53,7 @@ You need to log in under this user/group and use the Configuration Manager appli First of all, define, if necessary, some attributes at the root of the Registry section, that will be applicable for all the configuration are defined. -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ## Registry options: :end-before: ## :dedent: 2 @@ -65,7 +65,7 @@ If the described VO is a VOMS VO, then it is important to note that the VO admin it is necessary to obtain relevant information from the VOMS servers regarding VO users. In this case, the addition of VOMS VO is considered, respectively, there are attributes specific to VOMS. -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ## VOs :end-before: ## :dedent: 2 @@ -80,7 +80,7 @@ It is usually necessary to have at least three groups: Permissions of the group users are determined by "Properties" option. Full description of all supported :mod:`~DIRAC.Core.Security.Properties`. -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ## Groups: :end-before: ## :dedent: 2 @@ -91,7 +91,7 @@ To add a new group you can use special DIRAC command that simplifies this action Finally, create a user in the **Registry/Users** section: -.. literalinclude:: /build/dirac.cfg +.. literalinclude:: /dirac.cfg :start-after: ## Users: :end-before: ## :dedent: 2 From a29e91be0ce08d38092503f4429999d1f048475b Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sun, 10 Jan 2021 12:26:38 +0200 Subject: [PATCH 39/51] fix doc --- .../CommandReference/dirac-platform.rst | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 docs/source/AdministratorGuide/CommandReference/dirac-platform.rst diff --git a/docs/source/AdministratorGuide/CommandReference/dirac-platform.rst b/docs/source/AdministratorGuide/CommandReference/dirac-platform.rst deleted file mode 100644 index 74cc3d488b3..00000000000 --- a/docs/source/AdministratorGuide/CommandReference/dirac-platform.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. _dirac-platform: - -============== -dirac-platform -============== - -The *dirac-platform* script determines the "platform" of a certain node. -The platform is a string used to identify the minimal characteristics of the node, -enough to determine which version of DIRAC can be installed. - -Invoked at any installation, so by the *dirac-install* script, and by the pilots. - -On a RHEL 6 node, for example, the determined dirac platform is "Linux_x86_64_glibc-2.5" - -Example:: - - $ dirac-platform - Linux_x86_64_glibc-2.5 From 0afe13d3255c01a7732aaf291ef61c190e665981 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 19 Jan 2021 16:29:23 +0100 Subject: [PATCH 40/51] fix doc --- docs/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 5c073324373..6a3d66e234b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -13,9 +13,8 @@ #SPHINXOPTS = PAPER = BUILDDIR = build -CFGPATH = ../dirac.cfg # Move dirac.cfg to source dir -USEDIRACCFG = cp $(CFGPATH) source/ +USEDIRACCFG = cp ../dirac.cfg source/ SPHINXBUILD = $(USEDIRACCFG) && sphinx-build From 974df59159001abad32a7f7a9c31e18e447c328b Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Tue, 19 Jan 2021 16:53:32 +0100 Subject: [PATCH 41/51] fix docs.conf --- docs/docs.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs.conf b/docs/docs.conf index 4c7af685334..b90ec597e58 100644 --- a/docs/docs.conf +++ b/docs/docs.conf @@ -61,7 +61,7 @@ title = Admin # this list of patterns will reject scripts that are matched by the patterns above exclude = # the scripts in this list are added to the indexFile, but the rst file has to be provided manually -manual = dirac-cert-convert.sh, dirac-platform +manual = dirac-cert-convert.sh # where to place the rst files sectionPath = source/AdministratorGuide/CommandReference # optional: only if a hand curated rst file exists @@ -87,5 +87,5 @@ sectionPath = source/UserGuide/CommandReference/%(title)s pattern = dirac-proxy, dirac-info, myproxy, -resource- title = Others exclude = -manual = dirac-cert-convert.sh, dirac-platform +manual = dirac-cert-convert.sh sectionPath = source/UserGuide/CommandReference/%(title)s From f52973236da8c8dcde512ee921913bba9e52c78d Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 20 Jan 2021 19:45:45 +0100 Subject: [PATCH 42/51] fix cmd module name --- .../scripts/dirac-docs-build-code.py | 2 +- .../scripts/dirac-docs-build-commands.py | 2 +- .../dirac-docs-concatenate-diraccfg.py | 2 +- .../DeveloperGuide/CodeDocumenting/index.rst | 4 ++-- .../dirac-dms-clean-directory.rst | 2 +- .../DataManagement/dirac-dms-find-lfns.rst | 2 +- .../dirac-dms-lfn-accessURL.rst | 4 ++-- .../DataManagement/dirac-dms-lfn-replicas.rst | 2 +- .../dirac-dms-replicate-lfn.rst | 4 ++-- .../CommandReference/Others/dirac-info.rst | 5 +++++ .../Others/dirac-proxy-get-uploaded-info.rst | 8 +++---- .../Others/dirac-proxy-info.rst | 22 +++++++++---------- .../Others/dirac-proxy-init.rst | 13 +++++------ docs/source/conf.py | 10 ++++----- 14 files changed, 43 insertions(+), 39 deletions(-) diff --git a/docs/diracdoctools/scripts/dirac-docs-build-code.py b/docs/diracdoctools/scripts/dirac-docs-build-code.py index 3289e6f7109..ae10c94d6fe 100755 --- a/docs/diracdoctools/scripts/dirac-docs-build-code.py +++ b/docs/diracdoctools/scripts/dirac-docs-build-code.py @@ -2,5 +2,5 @@ """Create rst files for documentation of DIRAC source code.""" import sys -from diracdoctools.cmd.codeReference import run, CLParser +from diracdoctools.Cmd.codeReference import run, CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/diracdoctools/scripts/dirac-docs-build-commands.py b/docs/diracdoctools/scripts/dirac-docs-build-commands.py index bd2219c50e0..544f692b29d 100755 --- a/docs/diracdoctools/scripts/dirac-docs-build-commands.py +++ b/docs/diracdoctools/scripts/dirac-docs-build-commands.py @@ -7,6 +7,6 @@ """ import sys -from diracdoctools.cmd.commandReference import run +from diracdoctools.Cmd.commandReference import run from diracdoctools.Config import CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py b/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py index c9c719c32e2..2c0b8091cde 100755 --- a/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py +++ b/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py @@ -2,6 +2,6 @@ """script to concatenate the dirac.cfg file's Systems sections with the content of the ConfigTemplate.cfg files.""" import sys -from diracdoctools.cmd.concatcfg import run +from diracdoctools.Cmd.concatcfg import run from diracdoctools.Config import CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/source/DeveloperGuide/CodeDocumenting/index.rst b/docs/source/DeveloperGuide/CodeDocumenting/index.rst index 97a4ab3b451..6b3103279a0 100644 --- a/docs/source/DeveloperGuide/CodeDocumenting/index.rst +++ b/docs/source/DeveloperGuide/CodeDocumenting/index.rst @@ -140,7 +140,7 @@ Code Reference `````````````` The code reference is either created by calling ``run`` from -``diracdoctools.cmd.codeReference`` or by invoking the script +``diracdoctools.Cmd.codeReference`` or by invoking the script ``dirac-docs-build-code.py``. This creates an ``rst`` file for each python file, using ``autodoc`` to document all classes inside those modules. The actual documentation is build when sphinx is invoked, which must be able to @@ -151,7 +151,7 @@ Command Reference ````````````````` The command references can be created by calling ``run`` from -``diracdoctools.cmd.commandReference``, or by calling the +``diracdoctools.Cmd.commandReference``, or by calling the ``dirac-docs-build-command.py`` script. ``[commands.section]`` will result in a list of commands with links to their documentation, which is based on the output of their ``--help``. The resulting ``index.rst`` has to be included explicitly diff --git a/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-clean-directory.rst b/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-clean-directory.rst index e410530daba..011414a5a31 100644 --- a/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-clean-directory.rst +++ b/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-clean-directory.rst @@ -10,7 +10,7 @@ file catalogs. Usage:: - dirac-dms-clean-directory + dirac-dms-clean-directory Example:: diff --git a/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-find-lfns.rst b/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-find-lfns.rst index 999a00c6319..48092d7eea7 100644 --- a/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-find-lfns.rst +++ b/docs/source/UserGuide/CommandReference/DataManagement/dirac-dms-find-lfns.rst @@ -12,7 +12,7 @@ Usage:: Arguments:: - metaspec: metadata index specification (of the form: "meta=value" or "meta|)* -Options:: - - -u --user : User to query (by default oneself) - Example:: $ dirac-proxy-get-uploaded-info @@ -21,3 +17,7 @@ Example:: -------------------------------------------------------------------------------------------------------- | /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar | dirac_user | 2011-06-29 12:04:25 | True | -------------------------------------------------------------------------------------------------------- + +Options:: + + -u --user : User to query (by default oneself) diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst index d10ee7e935a..b586e8f642b 100644 --- a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst +++ b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst @@ -8,17 +8,6 @@ Usage:: dirac-proxy-info.py (|)* -Options:: - - -f --file : File to use as user key - -i --version : Print version - -n --novoms : Disable VOMS - -v --checkvalid : Return error if the proxy is invalid - -x --nocs : Disable CS - -e --steps : Show steps info - -j --noclockcheck : Disable checking if time is ok - -m --uploadedinfo : Show uploaded proxies info - Example:: $ dirac-proxy-info @@ -31,3 +20,14 @@ Example:: username : vhamar VOMS : True VOMS fqan : ['/formation'] + +Options:: + + -f --file : File to use as user key + -i --version : Print version + -n --novoms : Disable VOMS + -v --checkvalid : Return error if the proxy is invalid + -x --nocs : Disable CS + -e --steps : Show steps info + -j --noclockcheck : Disable checking if time is ok + -m --uploadedinfo : Show uploaded proxies info diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst index a700ca0c270..3bb9fdf4fde 100644 --- a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst +++ b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst @@ -8,6 +8,12 @@ Usage:: dirac-proxy-init.py (|)* +Example:: + + $ dirac-proxy-init -g dirac_user -t --rfc + + Enter Certificate password:: + Options:: -v --valid : Valid HH:MM for the proxy. By default is 24 hours @@ -26,11 +32,4 @@ Options:: -r --rfc : Create an RFC proxy, true by default, deprecated flag -L --legacy : Create a legacy non-RFC proxy -U --upload : Upload a long lived proxy to the ProxyManager - -P --uploadPilot : Upload a long lived pilot proxy to the ProxyManager -M --VOMS : Add voms extension - -Example:: - - $ dirac-proxy-init -g dirac_user --rfc - Enter Certificate password: - $ diff --git a/docs/source/conf.py b/docs/source/conf.py index 65df3815551..b29a9fe3249 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ from recommonmark.transform import AutoStructify import diracdoctools -import diracdoctools.cmd +import diracdoctools.Cmd from diracdoctools import fakeEnvironment, environmentSetup, DIRAC_DOC_MOCK_LIST from diracdoctools.Utilities import setUpReadTheDocsEnvironment @@ -34,7 +34,7 @@ LOG.info('Current location %r', os.getcwd()) LOG.info('DiracDocTools location %r', diracdoctools.__file__) LOG.info('DiracDocTools location %r', diracdoctools.Utilities.__file__) -LOG.info('DiracDocTools location %r', diracdoctools.cmd.__file__) +LOG.info('DiracDocTools location %r', diracdoctools.Cmd.__file__) #............................................................................... # configuration @@ -51,18 +51,18 @@ # re-create the RST files for the command references LOG.info('Building command reference') - from diracdoctools.cmd.commandReference import run as buildCommandReference + from diracdoctools.Cmd.commandReference import run as buildCommandReference buildCommandReference(configFile='../docs.conf') # singlehtml build needs too much memory, so we need to create less code documentation buildType = 'limited' if any('singlehtml' in arg for arg in sys.argv) else 'full' LOG.info('Chosing build type: %r', buildType) - from diracdoctools.cmd.codeReference import run as buildCodeDoc + from diracdoctools.Cmd.codeReference import run as buildCodeDoc buildCodeDoc(configFile='../docs.conf', buildType=buildType) # Update dirac.cfg LOG.info('Concatenating dirac.cfg') - from diracdoctools.cmd.concatcfg import run as updateCompleteDiracCFG + from diracdoctools.Cmd.concatcfg import run as updateCompleteDiracCFG updateCompleteDiracCFG(configFile='../docs.conf') # AUTO SETUP END From 4c15f3e0b6207acaf759eabd287d8f3900e9d161 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Wed, 20 Jan 2021 20:31:20 +0100 Subject: [PATCH 43/51] fix doc --- .../CommandReference/Others/dirac-info.rst | 24 ------------- .../Others/dirac-platform.rst | 16 --------- .../Others/dirac-proxy-get-uploaded-info.rst | 23 ------------ .../Others/dirac-proxy-info.rst | 33 ----------------- .../Others/dirac-proxy-init.rst | 35 ------------------- 5 files changed, 131 deletions(-) delete mode 100644 docs/source/UserGuide/CommandReference/Others/dirac-info.rst delete mode 100644 docs/source/UserGuide/CommandReference/Others/dirac-platform.rst delete mode 100644 docs/source/UserGuide/CommandReference/Others/dirac-proxy-get-uploaded-info.rst delete mode 100644 docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst delete mode 100644 docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-info.rst b/docs/source/UserGuide/CommandReference/Others/dirac-info.rst deleted file mode 100644 index e2ecd5169e7..00000000000 --- a/docs/source/UserGuide/CommandReference/Others/dirac-info.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _dirac-info: - -========== -dirac-info -========== - -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 - -Options:: - - -v --version : print version of current DIRAC installation - -p --platform : print platform of current DIRAC installation diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-platform.rst b/docs/source/UserGuide/CommandReference/Others/dirac-platform.rst deleted file mode 100644 index fb9eeaa9e36..00000000000 --- a/docs/source/UserGuide/CommandReference/Others/dirac-platform.rst +++ /dev/null @@ -1,16 +0,0 @@ -============== -dirac-platform -============== - -The *dirac-platform* script determines the "platform" of a certain node. -The platform is a string used to identify the minimal characteristics of the node, -enough to determine which version of DIRAC can be installed. - -Invoked at any installation, so by the *dirac-install* script, and by the pilots. - -On a RHEL 6 node, for example, the determined dirac platform is "Linux_x86_64_glibc-2.5" - -Example:: - - $ dirac-platform - Linux_x86_64_glibc-2.5 diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-get-uploaded-info.rst b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-get-uploaded-info.rst deleted file mode 100644 index d157543392c..00000000000 --- a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-get-uploaded-info.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _dirac-proxy-get-uploaded-info: - -============================= -dirac-proxy-get-uploaded-info -============================= - -Usage:: - - dirac-proxy-get-uploaded-info.py (|)* - -Example:: - - $ dirac-proxy-get-uploaded-info - Checking for DNs /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - -------------------------------------------------------------------------------------------------------- - | UserDN | UserGroup | ExpirationTime | PersistentFlag | - -------------------------------------------------------------------------------------------------------- - | /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar | dirac_user | 2011-06-29 12:04:25 | True | - -------------------------------------------------------------------------------------------------------- - -Options:: - - -u --user : User to query (by default oneself) diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst deleted file mode 100644 index b586e8f642b..00000000000 --- a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-info.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _dirac-proxy-info: - -================ -dirac-proxy-info -================ - -Usage:: - - dirac-proxy-info.py (|)* - -Example:: - - $ dirac-proxy-info - subject : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar/CN=proxy/CN=proxy - issuer : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar/CN=proxy - identity : /O=GRID-FR/C=FR/O=CNRS/OU=CPPM/CN=Vanessa Hamar - timeleft : 23:53:55 - DIRAC group : dirac_user - path : /tmp/x509up_u40885 - username : vhamar - VOMS : True - VOMS fqan : ['/formation'] - -Options:: - - -f --file : File to use as user key - -i --version : Print version - -n --novoms : Disable VOMS - -v --checkvalid : Return error if the proxy is invalid - -x --nocs : Disable CS - -e --steps : Show steps info - -j --noclockcheck : Disable checking if time is ok - -m --uploadedinfo : Show uploaded proxies info diff --git a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst b/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst deleted file mode 100644 index 3bb9fdf4fde..00000000000 --- a/docs/source/UserGuide/CommandReference/Others/dirac-proxy-init.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. _dirac-proxy-init: - -================ -dirac-proxy-init -================ - -Usage:: - - dirac-proxy-init.py (|)* - -Example:: - - $ dirac-proxy-init -g dirac_user -t --rfc - - Enter Certificate password:: - -Options:: - - -v --valid : Valid HH:MM for the proxy. By default is 24 hours - -g --group : DIRAC Group to embed in the proxy - -b --strength : Set the proxy strength in bytes - -l --limited : Generate a limited proxy - -t --strict : Fail on each error. Treat warnings as errors. - -S --summary : Enable summary output when generating proxy - -C --Cert : File to use as user certificate - -K --Key : File to use as user key - -u --out : File to write as proxy - -x --nocs : Disable CS check - -p --pwstdin : Get passwd from stdin - -i --version : Print version - -j --noclockcheck : Disable checking if time is ok - -r --rfc : Create an RFC proxy, true by default, deprecated flag - -L --legacy : Create a legacy non-RFC proxy - -U --upload : Upload a long lived proxy to the ProxyManager - -M --VOMS : Add voms extension From c7ceff88620ae915b7a2a50ca28f08913e12a606 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Thu, 21 Jan 2021 20:37:19 +0100 Subject: [PATCH 44/51] cmd module to diraccmd --- docs/diracdoctools/{cmd => diraccmd}/__init__.py | 0 docs/diracdoctools/{cmd => diraccmd}/codeReference.py | 0 .../{cmd => diraccmd}/commandReference.py | 0 docs/diracdoctools/{cmd => diraccmd}/concatcfg.py | 0 docs/diracdoctools/scripts/dirac-docs-build-code.py | 2 +- .../diracdoctools/scripts/dirac-docs-build-commands.py | 2 +- .../scripts/dirac-docs-concatenate-diraccfg.py | 2 +- docs/source/DeveloperGuide/CodeDocumenting/index.rst | 4 ++-- docs/source/conf.py | 10 +++++----- 9 files changed, 10 insertions(+), 10 deletions(-) rename docs/diracdoctools/{cmd => diraccmd}/__init__.py (100%) rename docs/diracdoctools/{cmd => diraccmd}/codeReference.py (100%) rename docs/diracdoctools/{cmd => diraccmd}/commandReference.py (100%) rename docs/diracdoctools/{cmd => diraccmd}/concatcfg.py (100%) diff --git a/docs/diracdoctools/cmd/__init__.py b/docs/diracdoctools/diraccmd/__init__.py similarity index 100% rename from docs/diracdoctools/cmd/__init__.py rename to docs/diracdoctools/diraccmd/__init__.py diff --git a/docs/diracdoctools/cmd/codeReference.py b/docs/diracdoctools/diraccmd/codeReference.py similarity index 100% rename from docs/diracdoctools/cmd/codeReference.py rename to docs/diracdoctools/diraccmd/codeReference.py diff --git a/docs/diracdoctools/cmd/commandReference.py b/docs/diracdoctools/diraccmd/commandReference.py similarity index 100% rename from docs/diracdoctools/cmd/commandReference.py rename to docs/diracdoctools/diraccmd/commandReference.py diff --git a/docs/diracdoctools/cmd/concatcfg.py b/docs/diracdoctools/diraccmd/concatcfg.py similarity index 100% rename from docs/diracdoctools/cmd/concatcfg.py rename to docs/diracdoctools/diraccmd/concatcfg.py diff --git a/docs/diracdoctools/scripts/dirac-docs-build-code.py b/docs/diracdoctools/scripts/dirac-docs-build-code.py index ae10c94d6fe..c288197bc19 100755 --- a/docs/diracdoctools/scripts/dirac-docs-build-code.py +++ b/docs/diracdoctools/scripts/dirac-docs-build-code.py @@ -2,5 +2,5 @@ """Create rst files for documentation of DIRAC source code.""" import sys -from diracdoctools.Cmd.codeReference import run, CLParser +from diracdoctools.diraccmd.codeReference import run, CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/diracdoctools/scripts/dirac-docs-build-commands.py b/docs/diracdoctools/scripts/dirac-docs-build-commands.py index 544f692b29d..7b2fc90e428 100755 --- a/docs/diracdoctools/scripts/dirac-docs-build-commands.py +++ b/docs/diracdoctools/scripts/dirac-docs-build-commands.py @@ -7,6 +7,6 @@ """ import sys -from diracdoctools.Cmd.commandReference import run +from diracdoctools.diraccmd.commandReference import run from diracdoctools.Config import CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py b/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py index 2c0b8091cde..88dec4acba6 100755 --- a/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py +++ b/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py @@ -2,6 +2,6 @@ """script to concatenate the dirac.cfg file's Systems sections with the content of the ConfigTemplate.cfg files.""" import sys -from diracdoctools.Cmd.concatcfg import run +from diracdoctools.diraccmd.concatcfg import run from diracdoctools.Config import CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/source/DeveloperGuide/CodeDocumenting/index.rst b/docs/source/DeveloperGuide/CodeDocumenting/index.rst index 6b3103279a0..91f440eb5b0 100644 --- a/docs/source/DeveloperGuide/CodeDocumenting/index.rst +++ b/docs/source/DeveloperGuide/CodeDocumenting/index.rst @@ -140,7 +140,7 @@ Code Reference `````````````` The code reference is either created by calling ``run`` from -``diracdoctools.Cmd.codeReference`` or by invoking the script +``diracdoctools.diraccmd.codeReference`` or by invoking the script ``dirac-docs-build-code.py``. This creates an ``rst`` file for each python file, using ``autodoc`` to document all classes inside those modules. The actual documentation is build when sphinx is invoked, which must be able to @@ -151,7 +151,7 @@ Command Reference ````````````````` The command references can be created by calling ``run`` from -``diracdoctools.Cmd.commandReference``, or by calling the +``diracdoctools.diraccmd.commandReference``, or by calling the ``dirac-docs-build-command.py`` script. ``[commands.section]`` will result in a list of commands with links to their documentation, which is based on the output of their ``--help``. The resulting ``index.rst`` has to be included explicitly diff --git a/docs/source/conf.py b/docs/source/conf.py index b29a9fe3249..bfe1674cb3e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ from recommonmark.transform import AutoStructify import diracdoctools -import diracdoctools.Cmd +import diracdoctools.diraccmd from diracdoctools import fakeEnvironment, environmentSetup, DIRAC_DOC_MOCK_LIST from diracdoctools.Utilities import setUpReadTheDocsEnvironment @@ -34,7 +34,7 @@ LOG.info('Current location %r', os.getcwd()) LOG.info('DiracDocTools location %r', diracdoctools.__file__) LOG.info('DiracDocTools location %r', diracdoctools.Utilities.__file__) -LOG.info('DiracDocTools location %r', diracdoctools.Cmd.__file__) +LOG.info('DiracDocTools location %r', diracdoctools.diraccmd.__file__) #............................................................................... # configuration @@ -51,18 +51,18 @@ # re-create the RST files for the command references LOG.info('Building command reference') - from diracdoctools.Cmd.commandReference import run as buildCommandReference + from diracdoctools.diraccmd.commandReference import run as buildCommandReference buildCommandReference(configFile='../docs.conf') # singlehtml build needs too much memory, so we need to create less code documentation buildType = 'limited' if any('singlehtml' in arg for arg in sys.argv) else 'full' LOG.info('Chosing build type: %r', buildType) - from diracdoctools.Cmd.codeReference import run as buildCodeDoc + from diracdoctools.diraccmd.codeReference import run as buildCodeDoc buildCodeDoc(configFile='../docs.conf', buildType=buildType) # Update dirac.cfg LOG.info('Concatenating dirac.cfg') - from diracdoctools.Cmd.concatcfg import run as updateCompleteDiracCFG + from diracdoctools.diraccmd.concatcfg import run as updateCompleteDiracCFG updateCompleteDiracCFG(configFile='../docs.conf') # AUTO SETUP END From 08d7224d9bf25e77b3edce0fc712aadbae35ed20 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 22 Jan 2021 13:53:58 +0100 Subject: [PATCH 45/51] fix dirac-deploy-scripts --- Core/scripts/dirac-deploy-scripts.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/scripts/dirac-deploy-scripts.py b/Core/scripts/dirac-deploy-scripts.py index bf0bfaa490e..b35e5e7bc0f 100755 --- a/Core/scripts/dirac-deploy-scripts.py +++ b/Core/scripts/dirac-deploy-scripts.py @@ -1,6 +1,7 @@ #!/usr/bin/env python """ -Deploy all scripts and extensions +Deploy all scripts and extensions. +This script is not meant to be called by users (it's automatically called by dirac-install). Usage:: @@ -13,10 +14,6 @@ Example:: $ dirac-deploy-scripts - Scripts will be deployed at /afs/in2p3.fr/home/h/hamar/DIRAC-v5r12/scripts - Inspecting DIRAC module - Inspecting EELADIRAC module - """ from __future__ import print_function From 0592197b94dd9dea1506dd8ae8aa9daae15187ae Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 22 Jan 2021 14:03:04 +0100 Subject: [PATCH 46/51] diraccmd -> cmd --- docs/diracdoctools/{diraccmd => cmd}/__init__.py | 0 docs/diracdoctools/{diraccmd => cmd}/codeReference.py | 0 .../{diraccmd => cmd}/commandReference.py | 0 docs/diracdoctools/{diraccmd => cmd}/concatcfg.py | 0 docs/diracdoctools/scripts/dirac-docs-build-code.py | 2 +- .../diracdoctools/scripts/dirac-docs-build-commands.py | 2 +- .../scripts/dirac-docs-concatenate-diraccfg.py | 2 +- docs/source/DeveloperGuide/CodeDocumenting/index.rst | 4 ++-- docs/source/conf.py | 10 +++++----- 9 files changed, 10 insertions(+), 10 deletions(-) rename docs/diracdoctools/{diraccmd => cmd}/__init__.py (100%) rename docs/diracdoctools/{diraccmd => cmd}/codeReference.py (100%) rename docs/diracdoctools/{diraccmd => cmd}/commandReference.py (100%) rename docs/diracdoctools/{diraccmd => cmd}/concatcfg.py (100%) diff --git a/docs/diracdoctools/diraccmd/__init__.py b/docs/diracdoctools/cmd/__init__.py similarity index 100% rename from docs/diracdoctools/diraccmd/__init__.py rename to docs/diracdoctools/cmd/__init__.py diff --git a/docs/diracdoctools/diraccmd/codeReference.py b/docs/diracdoctools/cmd/codeReference.py similarity index 100% rename from docs/diracdoctools/diraccmd/codeReference.py rename to docs/diracdoctools/cmd/codeReference.py diff --git a/docs/diracdoctools/diraccmd/commandReference.py b/docs/diracdoctools/cmd/commandReference.py similarity index 100% rename from docs/diracdoctools/diraccmd/commandReference.py rename to docs/diracdoctools/cmd/commandReference.py diff --git a/docs/diracdoctools/diraccmd/concatcfg.py b/docs/diracdoctools/cmd/concatcfg.py similarity index 100% rename from docs/diracdoctools/diraccmd/concatcfg.py rename to docs/diracdoctools/cmd/concatcfg.py diff --git a/docs/diracdoctools/scripts/dirac-docs-build-code.py b/docs/diracdoctools/scripts/dirac-docs-build-code.py index c288197bc19..3289e6f7109 100755 --- a/docs/diracdoctools/scripts/dirac-docs-build-code.py +++ b/docs/diracdoctools/scripts/dirac-docs-build-code.py @@ -2,5 +2,5 @@ """Create rst files for documentation of DIRAC source code.""" import sys -from diracdoctools.diraccmd.codeReference import run, CLParser +from diracdoctools.cmd.codeReference import run, CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/diracdoctools/scripts/dirac-docs-build-commands.py b/docs/diracdoctools/scripts/dirac-docs-build-commands.py index 7b2fc90e428..bd2219c50e0 100755 --- a/docs/diracdoctools/scripts/dirac-docs-build-commands.py +++ b/docs/diracdoctools/scripts/dirac-docs-build-commands.py @@ -7,6 +7,6 @@ """ import sys -from diracdoctools.diraccmd.commandReference import run +from diracdoctools.cmd.commandReference import run from diracdoctools.Config import CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py b/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py index 88dec4acba6..c9c719c32e2 100755 --- a/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py +++ b/docs/diracdoctools/scripts/dirac-docs-concatenate-diraccfg.py @@ -2,6 +2,6 @@ """script to concatenate the dirac.cfg file's Systems sections with the content of the ConfigTemplate.cfg files.""" import sys -from diracdoctools.diraccmd.concatcfg import run +from diracdoctools.cmd.concatcfg import run from diracdoctools.Config import CLParser sys.exit(run(**(CLParser().optionDict()))) diff --git a/docs/source/DeveloperGuide/CodeDocumenting/index.rst b/docs/source/DeveloperGuide/CodeDocumenting/index.rst index 91f440eb5b0..97a4ab3b451 100644 --- a/docs/source/DeveloperGuide/CodeDocumenting/index.rst +++ b/docs/source/DeveloperGuide/CodeDocumenting/index.rst @@ -140,7 +140,7 @@ Code Reference `````````````` The code reference is either created by calling ``run`` from -``diracdoctools.diraccmd.codeReference`` or by invoking the script +``diracdoctools.cmd.codeReference`` or by invoking the script ``dirac-docs-build-code.py``. This creates an ``rst`` file for each python file, using ``autodoc`` to document all classes inside those modules. The actual documentation is build when sphinx is invoked, which must be able to @@ -151,7 +151,7 @@ Command Reference ````````````````` The command references can be created by calling ``run`` from -``diracdoctools.diraccmd.commandReference``, or by calling the +``diracdoctools.cmd.commandReference``, or by calling the ``dirac-docs-build-command.py`` script. ``[commands.section]`` will result in a list of commands with links to their documentation, which is based on the output of their ``--help``. The resulting ``index.rst`` has to be included explicitly diff --git a/docs/source/conf.py b/docs/source/conf.py index bfe1674cb3e..65df3815551 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ from recommonmark.transform import AutoStructify import diracdoctools -import diracdoctools.diraccmd +import diracdoctools.cmd from diracdoctools import fakeEnvironment, environmentSetup, DIRAC_DOC_MOCK_LIST from diracdoctools.Utilities import setUpReadTheDocsEnvironment @@ -34,7 +34,7 @@ LOG.info('Current location %r', os.getcwd()) LOG.info('DiracDocTools location %r', diracdoctools.__file__) LOG.info('DiracDocTools location %r', diracdoctools.Utilities.__file__) -LOG.info('DiracDocTools location %r', diracdoctools.diraccmd.__file__) +LOG.info('DiracDocTools location %r', diracdoctools.cmd.__file__) #............................................................................... # configuration @@ -51,18 +51,18 @@ # re-create the RST files for the command references LOG.info('Building command reference') - from diracdoctools.diraccmd.commandReference import run as buildCommandReference + from diracdoctools.cmd.commandReference import run as buildCommandReference buildCommandReference(configFile='../docs.conf') # singlehtml build needs too much memory, so we need to create less code documentation buildType = 'limited' if any('singlehtml' in arg for arg in sys.argv) else 'full' LOG.info('Chosing build type: %r', buildType) - from diracdoctools.diraccmd.codeReference import run as buildCodeDoc + from diracdoctools.cmd.codeReference import run as buildCodeDoc buildCodeDoc(configFile='../docs.conf', buildType=buildType) # Update dirac.cfg LOG.info('Concatenating dirac.cfg') - from diracdoctools.diraccmd.concatcfg import run as updateCompleteDiracCFG + from diracdoctools.cmd.concatcfg import run as updateCompleteDiracCFG updateCompleteDiracCFG(configFile='../docs.conf') # AUTO SETUP END From 06c9ed384417c65920c02a7a9059240f8e375ee7 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 22 Jan 2021 15:05:36 +0100 Subject: [PATCH 47/51] fix ref --- .../Configuration/ConfReference/Resources/Computing/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst index 1b3fdc7748b..65dcc9b99ac 100644 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst +++ b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst @@ -14,7 +14,7 @@ highest prority /Resources/Computing/OSCompatibility -This section is used to define a compatibility matrix between dirac platforms (:ref:`dirac-platform`) and OS versions. +This section is used to define a compatibility matrix between dirac platforms (:ref:`_admin_dirac-platform`) and OS versions. An example of this session is the following:: @@ -59,7 +59,7 @@ An example of this session is the following:: Linux_x86_64_glibc-2.5 += x86_64_SL_Nitrogen_7.2 } -What's on the left is an example of a dirac platform as determined the dirac-platform script (:ref:`dirac-platform`). +What's on the left is an example of a dirac platform as determined the dirac-platform script (:ref:`_admin_dirac-platform`). This platform is declared to be compatible with a list of "OS" strings. These strings are identifying the architectures of computing elements. This list of strings can be constructed from the "Architecture" + "OS" fields From 3985d06e52afabe4fc5df5cb968638f68d46cf08 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 22 Jan 2021 15:13:27 +0100 Subject: [PATCH 48/51] use BEGIN in ConfigTemplate --- FrameworkSystem/ConfigTemplate.cfg | 4 ++-- FrameworkSystem/Service/ProxyManagerHandler.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FrameworkSystem/ConfigTemplate.cfg b/FrameworkSystem/ConfigTemplate.cfg index ca7fe91ff83..5c8f0a760c9 100644 --- a/FrameworkSystem/ConfigTemplate.cfg +++ b/FrameworkSystem/ConfigTemplate.cfg @@ -13,7 +13,7 @@ Services storeHostInfo = Operator } } - ## ProxyManager: + ##BEGIN ProxyManager: # Section to describe ProxyManager system # https://dirac.readthedocs.org/en/latest/AdministratorGuide/Systems/Framework/ProxyManager/index.html ProxyManager @@ -42,7 +42,7 @@ Services setPersistency = ProxyManagement } } - ## + ##END SecurityLogging { Port = 9153 diff --git a/FrameworkSystem/Service/ProxyManagerHandler.py b/FrameworkSystem/Service/ProxyManagerHandler.py index 502ba040630..64ef6314c84 100644 --- a/FrameworkSystem/Service/ProxyManagerHandler.py +++ b/FrameworkSystem/Service/ProxyManagerHandler.py @@ -1,8 +1,8 @@ """ ProxyManager is the implementation of the ProxyManagement service in the DISET framework .. literalinclude:: ../ConfigTemplate.cfg - :start-after: ## ProxyManager: - :end-before: ## + :start-after: ##BEGIN ProxyManager: + :end-before: ##END :dedent: 2 :caption: ProxyManager options """ From 4d93c2477e31ef685451c3db2809dfa7207bb956 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Sat, 23 Jan 2021 17:41:00 +0100 Subject: [PATCH 49/51] fix ref --- .../Configuration/ConfReference/Resources/Computing/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst index 65dcc9b99ac..b4413837039 100644 --- a/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst +++ b/docs/source/AdministratorGuide/Configuration/ConfReference/Resources/Computing/index.rst @@ -14,7 +14,7 @@ highest prority /Resources/Computing/OSCompatibility -This section is used to define a compatibility matrix between dirac platforms (:ref:`_admin_dirac-platform`) and OS versions. +This section is used to define a compatibility matrix between dirac platforms (:ref:`admin_dirac-platform`) and OS versions. An example of this session is the following:: @@ -59,7 +59,7 @@ An example of this session is the following:: Linux_x86_64_glibc-2.5 += x86_64_SL_Nitrogen_7.2 } -What's on the left is an example of a dirac platform as determined the dirac-platform script (:ref:`_admin_dirac-platform`). +What's on the left is an example of a dirac platform as determined the dirac-platform script (:ref:`admin_dirac-platform`). This platform is declared to be compatible with a list of "OS" strings. These strings are identifying the architectures of computing elements. This list of strings can be constructed from the "Architecture" + "OS" fields From 6a057c5be4b90ac3928c075897020d822c99070e Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 29 Jan 2021 19:47:31 +0100 Subject: [PATCH 50/51] fix docs --- docs/Makefile | 4 +--- docs/diracdoctools/cmd/concatcfg.py | 8 ++++++++ docs/source/conf.py | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 6a3d66e234b..3470612a370 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -13,9 +13,7 @@ #SPHINXOPTS = PAPER = BUILDDIR = build -# Move dirac.cfg to source dir -USEDIRACCFG = cp ../dirac.cfg source/ -SPHINXBUILD = $(USEDIRACCFG) && sphinx-build +SPHINXBUILD = sphinx-build diff --git a/docs/diracdoctools/cmd/concatcfg.py b/docs/diracdoctools/cmd/concatcfg.py index 004760e19f5..5a2d2df4fcd 100644 --- a/docs/diracdoctools/cmd/concatcfg.py +++ b/docs/diracdoctools/cmd/concatcfg.py @@ -7,6 +7,7 @@ import re import textwrap import sys +import shutil from diracdoctools.Config import Configuration from diracdoctools.Utilities import makeLogger @@ -29,6 +30,11 @@ def __init__(self, configFile='docs.conf'): self.config = Configuration(configFile, sections=['CFG']) self.retVal = 0 + def prepareDiracCFG(self): + """Copy dirac.cfg file to source dir.""" + LOG.info('Copy %r to source directory', self.config.cfg_baseFile) + shutil.copy(self.config.cfg_baseFile, '/'.join([self.config.docsPath, 'source/'])) + def updateCompleteDiracCFG(self): """Read the dirac.cfg and update the Systems sections from the ConfigTemplate.cfg files.""" compCfg = CFG() @@ -38,6 +44,8 @@ def updateCompleteDiracCFG(self): LOG.error('Failed to find Main Dirac cfg at %r', mainDiracCfgPath) return 1 + self.prepareDiracCFG() + LOG.info('Extracting default configuration from %r', mainDiracCfgPath) loadCFG = CFG() loadCFG.loadFromFile(mainDiracCfgPath) diff --git a/docs/source/conf.py b/docs/source/conf.py index 65df3815551..73e7959d5bd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -67,6 +67,11 @@ # AUTO SETUP END +else: + # If not READTHEDOCS just prepare dirac.cfg for docs + from diracdoctools.cmd.concatcfg import ConcatCFG + ConcatCFG(configFile='../docs.conf').prepareDiracCFG() + # get the dirac version try: from DIRAC import version From 7934bdcf3b801451df06dc8d06400f1a71fefbd1 Mon Sep 17 00:00:00 2001 From: TaykYoku Date: Fri, 29 Jan 2021 20:27:54 +0100 Subject: [PATCH 51/51] fix whitespace --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 73e7959d5bd..33d76caf1ce 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,7 +69,7 @@ else: # If not READTHEDOCS just prepare dirac.cfg for docs - from diracdoctools.cmd.concatcfg import ConcatCFG + from diracdoctools.cmd.concatcfg import ConcatCFG ConcatCFG(configFile='../docs.conf').prepareDiracCFG() # get the dirac version